1 #ifndef L2JETALGO2006_H
2 #define L2JETALGO2006_H
14 #ifdef IS_REAL_L2 //in l2-ana environmen
15 #include "L2VirtualAlgo.h"
17 #include "StTriggerUtilities/L2Emulator/L2algoUtil/L2VirtualAlgo.h"
23 #define MaxBtowRdo (L2EmcDb::BTOW_MAXFEE*L2EmcDb::BTOW_DATSIZE)
24 #define MaxEtowRdo (L2EmcDb::ETOW_MAXFEE*L2EmcDb::ETOW_DATSIZE)
26 enum {cl2jetMaxEtaBins=15, cl2jetMaxPhiBins=30};
31 enum {cl2jet_par_mxPhiBin=3, cl2jet_par_mxEtaBin=3};
37 unsigned short par_adcMask,par_pedOff;
44 int par_minPhiBinDiff;
46 float par_energyScale;
47 float par_diJetThrHigh;
48 float par_diJetThrLow;
57 enum { mxHA=128, mxJ=2};
63 int run_nEventOneJet, run_nEventDiJet, run_nEventRnd;
66 unsigned short db_btowThr[MaxBtowRdo];
67 unsigned short db_btowPedS[MaxBtowRdo];
68 unsigned short db_btowGainCorr[MaxBtowRdo];
69 unsigned short db_btowL2PhiBin[MaxBtowRdo];
70 unsigned short db_btowL2PatchBin[MaxBtowRdo];
73 unsigned short db_etowThr[MaxEtowRdo];
74 unsigned short db_etowPedS[MaxEtowRdo];
75 unsigned short db_etowGainCorr[MaxEtowRdo];
76 unsigned short db_etowL2PhiBin[MaxEtowRdo];
77 unsigned short db_etowL2PatchBin[MaxEtowRdo];
94 iphiBin=ietaBin=iene=0;
95 fphiBin=fetaBin=phiRad=eneGeV=0.;
102 int eve_patchEne[cl2jetMaxEtaBins*cl2jetMaxPhiBins];
103 int eve_phiEne[cl2jetMaxPhiBins+cl2jet_par_mxPhiBin-1];
104 L2Jet * eve_Jet[mxJ];
109 int projectAdc(
unsigned short *rawAdc,
int nRdo,
110 unsigned short *thr,
unsigned short *ped,
unsigned short *gainCorr,
111 unsigned short *phiBin,
unsigned short *patchBin,
114 void scanEta(
int iJ);
115 void weightedPhi(
int iJ);
116 void dumpPatchEneA();
117 void finishRunHisto();
118 bool paramsChanged(
int *rc_ints,
float *rc_floats);
123 int initRun(
int runNo,
int *rc_ints,
float *rc_floats);
124 bool doEvent(
int L0trg,
int inpEveId,
TrgDataType* trgData,
125 int bemcIn,
unsigned short *bemcData,
126 int eemcIn,
unsigned short *eemcData);