CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
JetIDHelper.h
Go to the documentation of this file.
1 #ifndef RecoJets_JetProducers_interface_JetIDHelper_h
2 #define RecoJets_JetProducers_interface_JetIDHelper_h
3 
4 #include <atomic>
5 
11 
12 namespace reco {
13 
14  namespace helper {
15 
16  class JetIDHelper {
17 
18  public :
19  // construction
21  JetIDHelper( edm::ParameterSet const & pset );
23 
25 
26  void initValues ();
27 
28  // interface
29  void calculate( const edm::Event& event, const reco::CaloJet &jet, const int iDbg = 0 );
30 
31  // member access
32 
33  // these require RecHits, so can not be evaluated from AOD
34  double fHPD() const { return fHPD_;}
35  double fRBX() const { return fRBX_;}
36  int n90Hits() const { return n90Hits_;}
37  double fSubDetector1() const { return fSubDetector1_;}
38  double fSubDetector2() const { return fSubDetector2_;}
39  double fSubDetector3() const { return fSubDetector3_;}
40  double fSubDetector4() const { return fSubDetector4_;}
41  double fEB() const { return fEB_;}
42  double fEE() const { return fEE_;}
43  double fHB() const { return fHB_;}
44  double fHE() const { return fHE_;}
45  double fHO() const { return fHO_;}
46  double fLong() const { return fLong_;}
47  double fShort() const { return fShort_;}
48  double fLSbad() const { return fLS_;}
49  double fHFOOT() const { return fHFOOT_;}
50  // these are tower based
51  double restrictedEMF() const { return restrictedEMF_;}
52  int nHCALTowers() const { return nHCALTowers_;}
53  int nECALTowers() const { return nECALTowers_;}
54  // tower based approximations / inferior options
55  double approximatefHPD() const { return approximatefHPD_;}
56  double approximatefRBX() const { return approximatefRBX_;}
57  int hitsInN90() const { return hitsInN90_;}
58 
59  struct subtower { // contents of a sub-detector's tower
60  double E;
61  int Nhit;
62 
63  subtower( double xE, int xN ) { E = xE; Nhit = xN; }
64  };
65 
66 
67  private:
68 
69 
70  // helper functions
72  std::vector< double > &energies,
73  std::vector< double > &subdet_energies,
74  std::vector< double > &Ecal_energies, std::vector< double > &Hcal_energies,
75  std::vector< double > &HO_energies,
76  std::vector< double > &HPD_energies, std::vector< double > &RBX_energies,
77  double& LS_bad_energy, double& HF_OOT_energy, const int iDbg = 0);
78 
79  void classifyJetTowers( const edm::Event& event, const reco::CaloJet &jet,
80  std::vector< subtower > &subtowers,
81  std::vector< subtower > &Ecal_subtowers,
82  std::vector< subtower > &Hcal_subtowers,
83  std::vector< subtower > &HO_subtowers,
84  std::vector< double > &HPD_energies,
85  std::vector< double > &RBX_energies,
86  const int iDbg = 0);
87 
88  unsigned int nCarrying( double fraction, const std::vector< double >& descending_energies );
89  unsigned int hitsInNCarrying( double fraction, const std::vector< subtower >& descending_towers );
90 
91  enum Region{
94 
95  int HBHE_oddness( int iEta, int depth );
96  Region HBHE_region( int iEta, int depth );
97  // tower-based. -1 means can't figure it out
98  int HBHE_oddness( int iEta );
99  Region region( int iEta );
100 
101 
102  double fHPD_;
103  double fRBX_;
104  int n90Hits_;
119 
121  double fLS_, fHFOOT_;
122 
129 
130  static std::atomic<int> sanity_checks_left_;
131  };
132  }
133 }
134 #endif
Region region(int iEta)
Definition: JetIDHelper.cc:595
double fHE() const
Definition: JetIDHelper.h:44
double fHB() const
Definition: JetIDHelper.h:43
Jets made from CaloTowers.
Definition: CaloJet.h:29
edm::InputTag eeRecHitsColl_
Definition: JetIDHelper.h:128
edm::InputTag ebRecHitsColl_
Definition: JetIDHelper.h:127
double fLSbad() const
Definition: JetIDHelper.h:48
int nHCALTowers() const
Definition: JetIDHelper.h:52
double approximatefRBX() const
Definition: JetIDHelper.h:56
double fLong() const
Definition: JetIDHelper.h:46
int nECALTowers() const
Definition: JetIDHelper.h:53
double fHPD() const
Definition: JetIDHelper.h:34
unsigned int nCarrying(double fraction, const std::vector< double > &descending_energies)
Definition: JetIDHelper.cc:192
double fSubDetector4() const
Definition: JetIDHelper.h:40
double restrictedEMF() const
Definition: JetIDHelper.h:51
double fSubDetector1() const
Definition: JetIDHelper.h:37
edm::InputTag hbheRecHitsColl_
Definition: JetIDHelper.h:124
static std::atomic< int > sanity_checks_left_
Definition: JetIDHelper.h:130
double approximatefHPD() const
Definition: JetIDHelper.h:55
double fEB() const
Definition: JetIDHelper.h:41
edm::InputTag hfRecHitsColl_
Definition: JetIDHelper.h:126
double fEE() const
Definition: JetIDHelper.h:42
void fillDescription(edm::ParameterSetDescription &iDesc)
Definition: JetIDHelper.cc:72
void classifyJetTowers(const edm::Event &event, const reco::CaloJet &jet, std::vector< subtower > &subtowers, std::vector< subtower > &Ecal_subtowers, std::vector< subtower > &Hcal_subtowers, std::vector< subtower > &HO_subtowers, std::vector< double > &HPD_energies, std::vector< double > &RBX_energies, const int iDbg=0)
Definition: JetIDHelper.cc:457
edm::InputTag hoRecHitsColl_
Definition: JetIDHelper.h:125
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
Region HBHE_region(int iEta, int depth)
Definition: JetIDHelper.cc:579
double fSubDetector3() const
Definition: JetIDHelper.h:39
double fShort() const
Definition: JetIDHelper.h:47
int HBHE_oddness(int iEta, int depth)
Definition: JetIDHelper.cc:572
void classifyJetComponents(const edm::Event &event, const reco::CaloJet &jet, std::vector< double > &energies, std::vector< double > &subdet_energies, std::vector< double > &Ecal_energies, std::vector< double > &Hcal_energies, std::vector< double > &HO_energies, std::vector< double > &HPD_energies, std::vector< double > &RBX_energies, double &LS_bad_energy, double &HF_OOT_energy, const int iDbg=0)
Definition: JetIDHelper.cc:225
double fSubDetector2() const
Definition: JetIDHelper.h:38
double fHO() const
Definition: JetIDHelper.h:45
double fHFOOT() const
Definition: JetIDHelper.h:49
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
unsigned int hitsInNCarrying(double fraction, const std::vector< subtower > &descending_towers)
Definition: JetIDHelper.cc:209
double fRBX() const
Definition: JetIDHelper.h:35