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 
10 
11 namespace reco {
12 
13  namespace helper {
14 
15  class JetIDHelper {
16 
17  public :
18  // construction
20  JetIDHelper( edm::ParameterSet const & pset );
22 
24 
25  void initValues ();
26 
27  // interface
28  void calculate( const edm::Event& event, const reco::CaloJet &jet, const int iDbg = 0 );
29 
30  // member access
31 
32  // these require RecHits, so can not be evaluated from AOD
33  double fHPD() const { return fHPD_;}
34  double fRBX() const { return fRBX_;}
35  int n90Hits() const { return n90Hits_;}
36  double fSubDetector1() const { return fSubDetector1_;}
37  double fSubDetector2() const { return fSubDetector2_;}
38  double fSubDetector3() const { return fSubDetector3_;}
39  double fSubDetector4() const { return fSubDetector4_;}
40  double fEB() const { return fEB_;}
41  double fEE() const { return fEE_;}
42  double fHB() const { return fHB_;}
43  double fHE() const { return fHE_;}
44  double fHO() const { return fHO_;}
45  double fLong() const { return fLong_;}
46  double fShort() const { return fShort_;}
47  double fLSbad() const { return fLS_;}
48  double fHFOOT() const { return fHFOOT_;}
49  // these are tower based
50  double restrictedEMF() const { return restrictedEMF_;}
51  int nHCALTowers() const { return nHCALTowers_;}
52  int nECALTowers() const { return nECALTowers_;}
53  // tower based approximations / inferior options
54  double approximatefHPD() const { return approximatefHPD_;}
55  double approximatefRBX() const { return approximatefRBX_;}
56  int hitsInN90() const { return hitsInN90_;}
57 
58  struct subtower { // contents of a sub-detector's tower
59  double E;
60  int Nhit;
61 
62  subtower( double xE, int xN ) { E = xE; Nhit = xN; }
63  };
64 
65 
66  private:
67 
68 
69  // helper functions
71  std::vector< double > &energies,
72  std::vector< double > &subdet_energies,
73  std::vector< double > &Ecal_energies, std::vector< double > &Hcal_energies,
74  std::vector< double > &HO_energies,
75  std::vector< double > &HPD_energies, std::vector< double > &RBX_energies,
76  double& LS_bad_energy, double& HF_OOT_energy, const int iDbg = 0);
77 
78  void classifyJetTowers( const edm::Event& event, const reco::CaloJet &jet,
79  std::vector< subtower > &subtowers,
80  std::vector< subtower > &Ecal_subtowers,
81  std::vector< subtower > &Hcal_subtowers,
82  std::vector< subtower > &HO_subtowers,
83  std::vector< double > &HPD_energies,
84  std::vector< double > &RBX_energies,
85  const int iDbg = 0);
86 
87  unsigned int nCarrying( double fraction, std::vector< double > descending_energies );
88  unsigned int hitsInNCarrying( double fraction, std::vector< subtower > descending_towers );
89 
90  enum Region{
93 
94  int HBHE_oddness( int iEta, int depth );
95  Region HBHE_region( int iEta, int depth );
96  // tower-based. -1 means can't figure it out
97  int HBHE_oddness( int iEta );
98  Region region( int iEta );
99 
100 
101  double fHPD_;
102  double fRBX_;
103  int n90Hits_;
118 
120  double fLS_, fHFOOT_;
121 
128 
130  };
131  }
132 }
133 #endif
Region region(int iEta)
Definition: JetIDHelper.cc:595
double fHE() const
Definition: JetIDHelper.h:43
double fHB() const
Definition: JetIDHelper.h:42
Jets made from CaloTowers.
Definition: CaloJet.h:30
edm::InputTag eeRecHitsColl_
Definition: JetIDHelper.h:127
edm::InputTag ebRecHitsColl_
Definition: JetIDHelper.h:126
double fLSbad() const
Definition: JetIDHelper.h:47
int nHCALTowers() const
Definition: JetIDHelper.h:51
double approximatefRBX() const
Definition: JetIDHelper.h:55
double fLong() const
Definition: JetIDHelper.h:45
int nECALTowers() const
Definition: JetIDHelper.h:52
double fHPD() const
Definition: JetIDHelper.h:33
double fSubDetector4() const
Definition: JetIDHelper.h:39
double restrictedEMF() const
Definition: JetIDHelper.h:50
double fSubDetector1() const
Definition: JetIDHelper.h:36
edm::InputTag hbheRecHitsColl_
Definition: JetIDHelper.h:123
static int sanity_checks_left_
Definition: JetIDHelper.h:129
double approximatefHPD() const
Definition: JetIDHelper.h:54
double fEB() const
Definition: JetIDHelper.h:40
unsigned int hitsInNCarrying(double fraction, std::vector< subtower > descending_towers)
Definition: JetIDHelper.cc:209
edm::InputTag hfRecHitsColl_
Definition: JetIDHelper.h:125
double fEE() const
Definition: JetIDHelper.h:41
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:124
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
unsigned int nCarrying(double fraction, std::vector< double > descending_energies)
Definition: JetIDHelper.cc:192
double fSubDetector3() const
Definition: JetIDHelper.h:38
double fShort() const
Definition: JetIDHelper.h:46
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:37
double fHO() const
Definition: JetIDHelper.h:44
double fHFOOT() const
Definition: JetIDHelper.h:48
void calculate(const edm::Event &event, const reco::CaloJet &jet, const int iDbg=0)
Definition: JetIDHelper.cc:86
double fRBX() const
Definition: JetIDHelper.h:34