Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-12 04:16:15

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       COND_SERIALIZABLE;
0100     };
0101 
0102     class EgParams {
0103     public:
0104       // EG LSB
0105       double lsb_;
0106 
0107       // Et threshold on EG seed tower
0108       double seedThreshold_;
0109 
0110       // Et threshold on EG neighbour tower(s)
0111       double neighbourThreshold_;
0112 
0113       // Et threshold on HCAL for H/E computation
0114       double hcalThreshold_;
0115 
0116       // EG maximum value of HCAL Et
0117       double maxHcalEt_;
0118 
0119       // Et threshold to remove the H/E cut from the EGammas
0120       double maxPtHOverE_;
0121 
0122       // Range of jet isolation for EG (in rank!) (Stage1Layer2)
0123       int minPtJetIsolation_;
0124       int maxPtJetIsolation_;
0125 
0126       // Range of 3x3 HoE isolation for EG (in rank!) (Stage1Layer2)
0127       int minPtHOverEIsolation_;
0128       int maxPtHOverEIsolation_;
0129 
0130       // isolation area in eta is seed tower +/- <=egIsoAreaNrTowersPhi
0131       unsigned isoAreaNrTowersEta_;
0132 
0133       // isolation area in phi is seed tower +/- <=egIsoAreaNrTowersPhi
0134       unsigned isoAreaNrTowersPhi_;
0135 
0136       // veto region is seed tower +/- <=egIsoVetoNrTowersPhi
0137       unsigned isoVetoNrTowersPhi_;
0138 
0139       EgParams()
0140           : lsb_(0),
0141             seedThreshold_(0),
0142             neighbourThreshold_(0),
0143             hcalThreshold_(0),
0144             maxHcalEt_(0),
0145             maxPtHOverE_(0),
0146             minPtJetIsolation_(0),
0147             maxPtJetIsolation_(0),
0148             minPtHOverEIsolation_(0),
0149             maxPtHOverEIsolation_(0),
0150             isoAreaNrTowersEta_(0),
0151             isoAreaNrTowersPhi_(0),
0152             isoVetoNrTowersPhi_(0) { /* no-op */ }
0153 
0154       COND_SERIALIZABLE;
0155     };
0156 
0157     class TauParams {
0158     public:
0159       // Tau LSB
0160       double lsb_;
0161 
0162       // Et threshold on tau seed tower
0163       double seedThreshold_;
0164 
0165       // Et threshold on tau neighbour towers
0166       double neighbourThreshold_;
0167 
0168       // Et limit when to switch off tau veto requirement
0169       double maxPtTauVeto_;
0170 
0171       // Et limit when to switch off tau isolation requirement
0172       double minPtJetIsolationB_;
0173 
0174       // Et jet isolation limit for Taus (Stage1Layer2)
0175       double maxJetIsolationB_;
0176 
0177       // Relative jet isolation cut for Taus (Stage1Layer2)
0178       double maxJetIsolationA_;
0179 
0180       // Eta min and max for Iso-Tau collections (Stage1Layer2)
0181       int isoEtaMin_;
0182       int isoEtaMax_;
0183 
0184       // isolation area in eta is seed tower +/- <=tauIsoAreaNrTowersEta
0185       unsigned isoAreaNrTowersEta_;
0186 
0187       // isolation area in phi is seed tower +/- <=tauIsoAreaNrTowersPhi
0188       unsigned isoAreaNrTowersPhi_;
0189 
0190       // veto region is seed tower +/- <=tauIsoVetoNrTowersPhi
0191       unsigned isoVetoNrTowersPhi_;
0192 
0193       TauParams()
0194           : lsb_(0),
0195             seedThreshold_(0),
0196             neighbourThreshold_(0),
0197             maxPtTauVeto_(0),
0198             minPtJetIsolationB_(0),
0199             maxJetIsolationB_(0),
0200             maxJetIsolationA_(0),
0201             isoEtaMin_(0),
0202             isoEtaMax_(0),
0203             isoAreaNrTowersEta_(0),
0204             isoAreaNrTowersPhi_(0),
0205             isoVetoNrTowersPhi_(0) { /* no-op */ }
0206 
0207       COND_SERIALIZABLE;
0208     };
0209 
0210     class JetParams {
0211     public:
0212       // Jet LSB
0213       double lsb_;
0214 
0215       // Et threshold on jet seed tower/region
0216       double seedThreshold_;
0217 
0218       // Et threshold on neighbouring towers/regions
0219       double neighbourThreshold_;
0220 
0221       JetParams() : lsb_(0), seedThreshold_(0), neighbourThreshold_(0) { /* no-op */ }
0222 
0223       COND_SERIALIZABLE;
0224     };
0225 
0226     CaloParams() : pnode_(0) { version_ = Version; }
0227     ~CaloParams() {}
0228 
0229   protected:
0230     unsigned version_;
0231 
0232     std::vector<Node> pnode_;
0233 
0234     TowerParams towerp_;
0235 
0236     // Region LSB
0237     double regionLsb_;
0238 
0239     EgParams egp_;
0240     TauParams taup_;
0241     JetParams jetp_;
0242 
0243     /* Sums */
0244 
0245     // EtSum LSB
0246     double etSumLsb_;
0247 
0248     // minimum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0249     std::vector<int> etSumEtaMin_;
0250 
0251     // maximum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0252     std::vector<int> etSumEtaMax_;
0253 
0254     // minimum eta for EtSums (index is particular EtSum.  ETT=1, HTT=2, MET=3, MHT=4, other values reserved).
0255     std::vector<double> etSumEtThreshold_;
0256 
0257     COND_SERIALIZABLE;
0258   };
0259 
0260 }  // namespace l1t
0261 #endif