#include <L2gammaAlgo.h>

Public Types | |
| enum | { kBEmcAlgo = 0, kEEmcAlgo } |
| enum | { kThresh1 = 0, kThresh2 } |
Public Member Functions | |
| ushort | getNumberOfHighTowers () |
| ushort | getRdoOfHighTower (ushort i) |
| ushort | rdo2tower (ushort rdo) |
| ushort | tower2rdo (ushort tow) |
| void | setTowerThreshold (float pt) |
| set the L2 high tower threshold. F_par[0] | |
| void | setPatchThreshold (float pt) |
| set the L2 trigger patch threshold. F_par[1] | |
| float | getTowerThreshold () |
| float | getPatchThreshold () |
| void | setUseOfflineGains () |
| if set, instructs the algo to correct for offline gains | |
| L2gammaAlgo (const char *name, L2EmcDb *db, char *outDir, int resOff) | |
| class constructor | |
| ~L2gammaAlgo () | |
| class destructor | |
| void | init (int run, int I_par[5], float F_par[5]) |
| One time initialization. | |
| int | initRun (int run) |
| initialize the data structures for the next run | |
| int | initRun (int run, int I_par[5], float F_par[5]) |
| initialize the data structures for the next run | |
| int | initRun (char *myname, int run, int I_par[5], float F_par[5]) |
| bool | doEvent (int inpEveId, TrgDataType *trgData, int emcIn, unsigned short *emcData) |
| bool | doEvent (int L0trigger, int inuptEventID, TrgDataType *trgData, int bemcIn, unsigned short *bemcData, int eemcIn, unsigned short *eemcData) |
| void | clear () |
| clear data structures for ... | |
| void | finishRun () |
| cleanup for runs. output of warnings (eg hot channels) etc... | |
| void | finish () |
| final output of statistics, histograms, etc... | |
| void | setLogFile (const char *fname="./bsqueal.log") |
| Set logfile for summary output (overrides constructor option). | |
| void | setHistFile (const char *fname="./bsqueal.dat") |
| Set filename for histogram output (overrides constructor option). | |
Public Attributes | |
| ushort | mListOfRdosHT [MAX_TOWERS] |
| ushort | mListOfRdosTP [MAX_TOWERS] |
| ushort | nRdosHT |
| ushort | nRdosTP |
| float | mETofTP [MAX_TOWERS] |
| ushort | mADCofHT [MAX_TOWERS] |
Protected Member Functions | |
| void | printPatchConfig (int rdo) |
| void | jbook () |
| void | jclear () |
| ushort | phibin (ushort sec, ushort sub) |
| Log file. | |
| ushort | tower (ushort phi, ushort eta) |
Protected Attributes | |
| ushort | mEEmc |
| ushort | mBEmc |
| ushort | mThresholdLevel |
| ushort | mNumEtas |
| ushort | mNumPhis |
| ushort | mNumSubs |
| ushort | mNumSecs |
| ushort | mNumTower |
| ushort | mNumClust |
| ushort | mNumRdo |
| const float * | mEtaBins |
| ushort | mMaxADC |
| float | mMaxET |
| float | mIdealGainT |
| int | mHistogramBase |
| ushort | mHistogramPres |
| ushort | mIdThreshold |
| L2gammaAlgo * | mL2input |
| int | mRunNumber |
| Run number for the current run. | |
| float | mTowerThreshold |
| High tower threshold. | |
| float | mPatchThreshold |
| Patch threshold. | |
| int | mUseOfflineGains |
| Option to use offline gains. | |
| int | mUseBbc |
| Option to correct for vertex effects (not in use yet). | |
| int | mDefaultI_par [5] |
| float | mDefaultF_par [5] |
| int | mNumberInput |
| event counters | |
| int | mNumberAcceptHT |
| int | mNumberAcceptTP |
| int | mPrescale |
| int | mTowerFrequency [MAX_TOWERS] |
| int | mPatchFrequency [MAX_TOWERS] |
| ushort | mTowerAdcThreshold [MAX_TOWERS] |
| float | mPatchAdcThreshold [MAX_TOWERS] |
| ushort | mPatchStat [MAX_TOWERS] |
| ushort | mPatchFail [MAX_TOWERS] |
| ushort | mTowerStat [MAX_TOWERS] |
| ushort | mTowerFail [MAX_TOWERS] |
| ushort | mRdo2tower [MAX_TOWERS] |
| Map to go from Rdo to Tower and Tower to Rdo. | |
| ushort | mTower2rdo [MAX_TOWERS] |
| ushort | mNumPatch [MAX_TOWERS] |
| Number and list of up to 9 neighboring towers. | |
| ushort | mRdoPatch [MAX_TOWERS][9] |
| float | mTowerPed [MAX_TOWERS] |
| float | mPatchPed [MAX_TOWERS] |
| float | mTowerGain [MAX_TOWERS] |
| float | mTowerGainIdeal [MAX_TOWERS] |
| float | mTowerAdcCorrection [MAX_TOWERS] |
| int | mNumberLive |
| Counters for error monitoring. | |
| int | mEvalTime |
| L2Histo | mHistos [19] |
| L2 histograms. | |
Definition at line 60 of file L2gammaAlgo.h.
| bool L2gammaAlgo::doEvent | ( | int | L0trigger, | |
| int | inuptEventID, | |||
| TrgDataType * | trgData, | |||
| int | bemcIn, | |||
| unsigned short * | bemcData, | |||
| int | eemcIn, | |||
| unsigned short * | eemcData | |||
| ) |
implementation of the "virtual" method in L2VirtualAlgo. this is a wrapper for doEvent( int, TrgDataType*, int, ushort ) above.
Definition at line 606 of file L2gammaAlgo.cxx.
| bool L2gammaAlgo::doEvent | ( | int | inpEveId, | |
| TrgDataType * | trgData, | |||
| int | emcIn, | |||
| unsigned short * | emcData | |||
| ) |
process one event through L2 and evaluate. returns true to accept an event, false to reject. fatal algorithm errors will always return true to tick off the shift crew and get them to take action (we hope).
| inpEveId | event id | |
| trgData | the trigger data block | |
| emcIn | specifies whether the calorimeter is in the run or not | |
| emcData | is the L2 data block (raw ADC values) to be processed |
Get pointer to block of bytes where L2gammaResult will reside
And write to L2result
Test trig and prescale and fill QA histograms when they are satisfied
Definition at line 629 of file L2gammaAlgo.cxx.
References clear(), mEEmc, mHistos, mL2input, mNumberInput, mNumPatch, mPatchAdcThreshold, mPatchThreshold, mRdo2tower, and mTowerAdcThreshold.
Referenced by doEvent().
| int L2gammaAlgo::initRun | ( | int | run, | |
| int | I_par[5], | |||
| float | F_par[5] | |||
| ) |
initialize the data structures for the next run
Reset event counters
read in database for this run
determine ideal gains for each of the eta bins
clear high tower and patch thresholds
loop over all db entries and calculate ADC thresholds
I really need to think about this!
second loop over all db entries, this time we calculate ADC thresholds on the 3x3 tower patch
loop over neighboring towers, **including the current tower**, and add ped/gain to the patch threshold. the result should be sum_i ped_i/g_i for each rdo channel (plus the ET threshold already initialized).
assign this rdo to the physical tower patch
Definition at line 180 of file L2gammaAlgo.cxx.
References mEEmc, mL2input, mNumberInput, mNumberLive, mNumPatch, mPatchAdcThreshold, mPatchStat, mPatchThreshold, mRdo2tower, mRunNumber, mTowerAdcThreshold, mTowerThreshold, mUseBbc, mUseOfflineGains, phibin(), printPatchConfig(), setPatchThreshold(), and setTowerThreshold().
| void L2gammaAlgo::printPatchConfig | ( | int | rdo | ) | [protected] |
prints patch configuration (peds, stat, fail, gains, etc...) for easier(?) debugging of patch problems online
Definition at line 1113 of file L2gammaAlgo.cxx.
References mEEmc, mRdo2tower, and mTowerAdcThreshold.
Referenced by finishRun(), and initRun().
ushort L2gammaAlgo::mEEmc [protected] |
The following block of variables are initialized in the constructor and select between the two calorimeter geometries
Definition at line 73 of file L2gammaAlgo.h.
Referenced by doEvent(), init(), initRun(), and printPatchConfig().
L2gammaAlgo* L2gammaAlgo::mL2input [protected] |
pointer to algorithm evaluating a lower threshold which we simply want to evaluate a higher threshold
Definition at line 206 of file L2gammaAlgo.h.
Referenced by doEvent(), init(), initRun(), and L2gammaAlgo().
float L2gammaAlgo::mPatchAdcThreshold[MAX_TOWERS] [protected] |
Thresholds on the 3x3 patch of towers centered on the rdo channel. The threshold is calculated as T= E_T + sum_i ( ped_i/g_i ) and will be applied to the sum ADC_i/g_i > T
Definition at line 240 of file L2gammaAlgo.h.
ushort L2gammaAlgo::mPatchStat[MAX_TOWERS] [protected] |
bitwise "or" of _all_ stat and fail bits of towers w/in the 3x3 tower patch
Definition at line 256 of file L2gammaAlgo.h.
Referenced by initRun().
ushort L2gammaAlgo::mTowerAdcThreshold[MAX_TOWERS] [protected] |
High tower threshold expressed in terms of ADC for each of the 720 rdo channels
Definition at line 234 of file L2gammaAlgo.h.
Referenced by doEvent(), initRun(), and printPatchConfig().
1.5.9