00001 #ifndef BEMC_DSM_decoder_H 00002 #define BEMC_DSM_decoder_H 00003 00004 // rawDsmL0West and rawDsmL0East are the raw DSM level-0 inputs from the TRGD bank (i.e. from BTOW crates to BCE and BCW) 00005 // HighTower and PatchSum are the arrays to store the decoded values in the triggerPatch order (0 <= triggerPatch < 300) 00006 // See the StEmcDecoder for the conversions between triggerPatch, JetPatch and towers 00007 int BEMC_DSM_L0_decoder(const unsigned char* rawDsmL0West, const unsigned char* rawDsmL0East, int *HighTower, int* PatchSum); 00008 00009 // rawDsmL1[48] is the raw DSM level-1 input from the TRGD bank (i.e. from BCE and BCW to BC1) 00010 // HighTowerBits[nDSML1Boards][nDSMInputChannels] is the HT threshold bits '00' < th0 < '01' < th1 < '10' < th2 < '11' 00011 // PatchSum[nDSML1Boards][nDSMInputChannels] is the patch sums 00012 // nDSML1Boards = 6, nDSMInputChannels = 6 00013 int BEMC_DSM_L1_decoder(const unsigned short* rawDsmL1, int* HighTowerBits, int* PatchSum); 00014 00015 // rawDsmL2[8] is the raw DSM level-2 input from the TRGD bank (i.e. from BC1 to EM201) 00016 // HighTowerBits[12] is the HT threshold bits for all 12 JetPatches 00017 // PatchSumBits[12] is the PatchSum threshold bits for all 12 JetPatches 00018 // PatchSum[6] is the PatchSums for 6 pairs of JetPatches (JP 6+7, JP 8+9, JP 10+11, JP 0+1, JP 2+3, JP 4+5) 00019 int BEMC_DSM_L2_decoder(const unsigned short* rawDsmL2, int* HighTowerBits, int* PatchSumBits, int* PatchSum); 00020 00021 // rawDsmL3[8] is the raw DSM level-3 input from the TRGD bank (i.e. from EM201 to the last DSM) 00022 // HighTowerBits[1] is the HT threshold bits for the whole BEMC 00023 // PatchSumBits[1] is the PatchSum threshold bits for the whole BEMC 00024 // BackToBackBit[1] is the Back-To-Back bit for BEMC 00025 // JPsiTopoBit[1] is the J/Psi topology bit for BEMC 00026 // JetPatchTopoBit[1] is the jet patch topology bit for BEMC or EEMC 00027 int BEMC_DSM_L3_decoder(const unsigned short* rawDsmL3, int* HighTowerBits, int* PatchSumBits, int* BackToBackBit, int *JPsiTopoBit, int *JetPatchTopoBit); 00028 00029 int getFEEpedestal(float towerPedestal, float pedestalShift, bool debug = false); 00030 void simulateFEEaction(int adc, int ped, int bitConv, int &ht, int &pa, bool debug = false); 00031 void simulateFEELUT(int sum, int formula, int parameter0, int parameter1, int parameter2, int parameter3, int parameter4, int parameter5, int numberOfMaskedTowers, int pedestalShift, int &lut, bool debug = false); 00032 00033 #endif
1.5.9