Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:24:25

0001 #ifndef RecoLocalCalo_HcalRecAlgos_HFRecHitAuxSetter_h_
0002 #define RecoLocalCalo_HcalRecAlgos_HFRecHitAuxSetter_h_
0003 
0004 #include "DataFormats/HcalRecHit/interface/HFRecHit.h"
0005 #include "DataFormats/HcalRecHit/interface/HFPreRecHit.h"
0006 
0007 //
0008 // Set rechit "auxiliary words" for the dual-anode HF reco
0009 //
0010 struct HFRecHitAuxSetter {
0011   // We will store up to three 8-bit ADC values
0012   static const unsigned MASK_ADC = 0xffffff;
0013   static const unsigned OFF_ADC = 0;
0014 
0015   // Which byte is used by the sample of interest.
0016   // Normally 0, 1, or 2. Value of 3 means that
0017   // something went wrong, and SOI was not stored
0018   // in the HFPreRecHit.
0019   static const unsigned MASK_SOI = 0x3;
0020   static const unsigned OFF_SOI = 24;
0021 
0022   // CAPID for the sample of interest.
0023   // Will be correct only if the SOI value
0024   // is less than 3.
0025   static const unsigned MASK_CAPID = 0x3;
0026   static const unsigned OFF_CAPID = 26;
0027 
0028   // Anode status value. It is assumed that
0029   // the possible anode status values are
0030   // defined in the HFAnodeStatus.h header.
0031   static const unsigned MASK_STATUS = 0xf;
0032   static const unsigned OFF_STATUS = 28;
0033 
0034   // Main function for setting the aux words.
0035   //
0036   // "soiPhase" argument tells us the byte into
0037   // which the sample of interest should be placed
0038   // in the aux word. "soiPhase" should be 0, 1, or 2.
0039   // The number of presamples stored will normally
0040   // be equal "soiPhase" and the number of postsamples
0041   // (2 - soiPhase).
0042   //
0043   static void setAux(const HFPreRecHit& prehit, const unsigned anodeStates[2], unsigned soiPhase, HFRecHit* rechit);
0044 };
0045 
0046 #endif  // RecoLocalCalo_HcalRecAlgos_HFRecHitAuxSetter_h_