Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:51:16

0001 ///
0002 /// \class l1t::CaloParams
0003 ///
0004 /// Description: Placeholder for calorimeter trigger parameters
0005 ///
0006 /// Implementation:
0007 ///
0008 ///
0009 /// \author: Jim Brooke
0010 ///
0011 
0012 #ifndef CaloParams_h
0013 #define CaloParams_h
0014 
0015 #include <memory>
0016 #include <iostream>
0017 #include <vector>
0018 #include <cmath>
0019 
0020 #include "CondFormats/Serialization/interface/Serializable.h"
0021 #include "CondFormats/L1TObjects/interface/LUT.h"
0022 
0023 namespace l1t {
0024 
0025   class CaloParams {
0026   public:
0027     enum { Version = 2 };
0028 
0029     class Node {
0030     public:
0031       std::string type_;
0032       unsigned version_;
0033       l1t::LUT LUT_;
0034       std::vector<double> dparams_;
0035       std::vector<unsigned> uparams_;
0036       std::vector<int> iparams_;
0037       std::vector<std::string> sparams_;
0038       Node() {
0039         type_ = "unspecified";
0040         version_ = 1;
0041       }
0042       COND_SERIALIZABLE;
0043     };
0044 
0045     class TowerParams {
0046     public:
0047       /* Towers */
0048 
0049       // LSB of HCAL scale
0050       double lsbH_;
0051 
0052       // LSB of ECAL scale
0053       double lsbE_;
0054 
0055       // LSB of ECAL+HCAL sum scale
0056       double lsbSum_;
0057 
0058       // number of bits for HCAL encoding
0059       int nBitsH_;
0060 
0061       // number of bits for ECAL encoding
0062       int nBitsE_;
0063 
0064       // number of bits for ECAL+HCAL sum encoding
0065       int nBitsSum_;
0066 
0067       // number of bits for ECAL/HCAL ratio encoding
0068       int nBitsRatio_;
0069 
0070       // bitmask for storing HCAL Et in  object
0071       int maskH_;
0072 
0073       // bitmask for storing ECAL ET in  object
0074       int maskE_;
0075 
0076       // bitmask for storing ECAL+HCAL sum in  object
0077       int maskSum_;
0078 
0079       // bitmask for storing ECAL/HCAL ratio in  object
0080       int maskRatio_;
0081 
0082       // turn encoding on/off
0083       bool doEncoding_;
0084 
0085       TowerParams()
0086           : lsbH_(0),
0087             lsbE_(0),
0088             lsbSum_(0),
0089             nBitsH_(0),
0090             nBitsE_(0),
0091             nBitsSum_(0),
0092             nBitsRatio_(0),
0093             maskH_(0),
0094             maskE_(0),
0095             maskSum_(0),
0096             maskRatio_(0),
0097             doEncoding_(false) { /* no-op */
0098       }
0099 
0100       COND_SERIALIZABLE;
0101     };
0102 
0103     class EgParams {
0104     public:
0105       // EG LSB
0106       double lsb_;
0107 
0108       // Et threshold on EG seed tower
0109       double seedThreshold_;
0110 
0111       // Et threshold on EG neighbour tower(s)
0112       double neighbourThreshold_;
0113 
0114       // Et threshold on HCAL for H/E computation
0115       double hcalThreshold_;
0116 
0117       // EG maximum value of HCAL Et
0118       double maxHcalEt_;
0119 
0120       // Et threshold to remove the H/E cut from the EGammas
0121       double maxPtHOverE_;
0122 
0123       // Range of jet isolation for EG (in rank!) (Stage1Layer2)
0124       int minPtJetIsolation_;
0125       int maxPtJetIsolation_;
0126 
0127       // Range of 3x3 HoE isolation for EG (in rank!) (Stage1Layer2)
0128       int minPtHOverEIsolation_;
0129       int maxPtHOverEIsolation_;
0130 
0131       // isolation area in eta is seed tower +/- <=egIsoAreaNrTowersPhi
0132       unsigned isoAreaNrTowersEta_;
0133 
0134       // isolation area in phi is seed tower +/- <=egIsoAreaNrTowersPhi
0135       unsigned isoAreaNrTowersPhi_;
0136 
0137       // veto region is seed tower +/- <=egIsoVetoNrTowersPhi
0138       unsigned isoVetoNrTowersPhi_;
0139 
0140       EgParams()
0141           : lsb_(0),
0142             seedThreshold_(0),
0143             neighbourThreshold_(0),
0144             hcalThreshold_(0),
0145             maxHcalEt_(0),
0146             maxPtHOverE_(0),
0147             minPtJetIsolation_(0),
0148             maxPtJetIsolation_(0),
0149             minPtHOverEIsolation_(0),
0150             maxPtHOverEIsolation_(0),
0151             isoAreaNrTowersEta_(0),
0152             isoAreaNrTowersPhi_(0),
0153             isoVetoNrTowersPhi_(0) { /* no-op */
0154       }
0155 
0156       COND_SERIALIZABLE;
0157     };
0158 
0159     class TauParams {
0160     public:
0161       // Tau LSB
0162       double lsb_;
0163 
0164       // Et threshold on tau seed tower
0165       double seedThreshold_;
0166 
0167       // Et threshold on tau neighbour towers
0168       double neighbourThreshold_;
0169 
0170       // Et limit when to switch off tau veto requirement
0171       double maxPtTauVeto_;
0172 
0173       // Et limit when to switch off tau isolation requirement
0174       double minPtJetIsolationB_;
0175 
0176       // Et jet isolation limit for Taus (Stage1Layer2)
0177       double maxJetIsolationB_;
0178 
0179       // Relative jet isolation cut for Taus (Stage1Layer2)
0180       double maxJetIsolationA_;
0181 
0182       // Eta min and max for Iso-Tau collections (Stage1Layer2)
0183       int isoEtaMin_;
0184       int isoEtaMax_;
0185 
0186       // isolation area in eta is seed tower +/- <=tauIsoAreaNrTowersEta
0187       unsigned isoAreaNrTowersEta_;
0188 
0189       // isolation area in phi is seed tower +/- <=tauIsoAreaNrTowersPhi
0190       unsigned isoAreaNrTowersPhi_;
0191 
0192       // veto region is seed tower +/- <=tauIsoVetoNrTowersPhi
0193       unsigned isoVetoNrTowersPhi_;
0194 
0195       TauParams()
0196           : lsb_(0),
0197             seedThreshold_(0),
0198             neighbourThreshold_(0),
0199             maxPtTauVeto_(0),
0200             minPtJetIsolationB_(0),
0201             maxJetIsolationB_(0),
0202             maxJetIsolationA_(0),
0203             isoEtaMin_(0),
0204             isoEtaMax_(0),
0205             isoAreaNrTowersEta_(0),
0206             isoAreaNrTowersPhi_(0),
0207             isoVetoNrTowersPhi_(0) { /* no-op */
0208       }
0209 
0210       COND_SERIALIZABLE;
0211     };
0212 
0213     class JetParams {
0214     public:
0215       // Jet LSB
0216       double lsb_;
0217 
0218       // Et threshold on jet seed tower/region
0219       double seedThreshold_;
0220 
0221       // Et threshold on neighbouring towers/regions
0222       double neighbourThreshold_;
0223 
0224       JetParams() : lsb_(0), seedThreshold_(0), neighbourThreshold_(0) { /* no-op */
0225       }
0226 
0227       COND_SERIALIZABLE;
0228     };
0229 
0230     CaloParams() : pnode_(0) { version_ = Version; }
0231     ~CaloParams() {}
0232 
0233   protected:
0234     unsigned version_;
0235 
0236     std::vector<Node> pnode_;
0237 
0238     TowerParams towerp_;
0239 
0240     // Region LSB
0241     double regionLsb_;
0242 
0243     EgParams egp_;
0244     TauParams taup_;
0245     JetParams jetp_;
0246 
0247     /* Sums */
0248 
0249     // EtSum LSB
0250     double etSumLsb_;
0251 
0252     // minimum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0253     std::vector<int> etSumEtaMin_;
0254 
0255     // maximum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0256     std::vector<int> etSumEtaMax_;
0257 
0258     // minimum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0259     std::vector<double> etSumEtThreshold_;
0260 
0261     COND_SERIALIZABLE;
0262   };
0263 
0264 }  // namespace l1t
0265 #endif