Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:34

0001 #ifndef SIMCALORIMETRY_HCALZEROSUPPRESSIONPRODUCERS_HCALZSALGOREALISTIC_H
0002 #define SIMCALORIMETRY_HCALZEROSUPPRESSIONPRODUCERS_HCALZSALGOREALISTIC_H 1
0003 
0004 #include "SimCalorimetry/HcalZeroSuppressionProducers/interface/HcalZeroSuppressionAlgo.h"
0005 
0006 /** \class HcalZSAlgoRealistic
0007  *
0008  * Simple amplitude-based zero suppression algorithm.  For each digi, add
0009  * up consecutive 2 samples in a slice of 10 time samples, beginning with
0010  * (start) sample. If any of the sums are greater then the threshold, keep the
0011  * event.
0012  *
0013  * For Run3 and Run4 HB and HE only 1TS is used 
0014  *
0015  *
0016  */
0017 class HcalZSAlgoRealistic : public HcalZeroSuppressionAlgo {
0018 public:
0019   HcalZSAlgoRealistic(bool markAndPass,
0020                       bool use1ts,
0021                       std::pair<int, int> HBsearchTS,
0022                       std::pair<int, int> HEsearchTS,
0023                       std::pair<int, int> HOsearchTS,
0024                       std::pair<int, int> HFsearchTS);
0025   HcalZSAlgoRealistic(bool markAndPass,
0026                       bool use1ts,
0027                       int levelHB,
0028                       int levelHE,
0029                       int levelHO,
0030                       int levelHF,
0031                       std::pair<int, int> HBsearchTS,
0032                       std::pair<int, int> HEsearchTS,
0033                       std::pair<int, int> HOsearchTS,
0034                       std::pair<int, int> HFsearchTS);
0035   ~HcalZSAlgoRealistic() override = default;
0036 
0037 protected:
0038   // these need to be overloads instead of templates to avoid linking issues
0039   // when calling private member function templates
0040   bool shouldKeep(const HBHEDataFrame &digi) const override;
0041   bool shouldKeep(const HODataFrame &digi) const override;
0042   bool shouldKeep(const HFDataFrame &digi) const override;
0043   bool shouldKeep(const QIE10DataFrame &digi) const override;
0044   bool shouldKeep(const QIE11DataFrame &digi) const override;
0045 
0046 private:
0047   bool usingDBvalues, use1ts_;
0048   int thresholdHB_, thresholdHE_, thresholdHO_, thresholdHF_;
0049   std::pair<int, int> HBsearchTS_, HEsearchTS_, HOsearchTS_, HFsearchTS_;
0050   template <class Digi>
0051   bool keepMe(const Digi &inp, int start, int finish, int threshold, uint32_t zsmask) const;
0052 };
0053 
0054 #endif