test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EgammaHLTHcalIsolation.h
Go to the documentation of this file.
1 #ifndef EgammaHLTAlgos_EgammaHLTHcalIsolation_h
2 #define EgammaHLTAlgos_EgammaHLTHcalIsolation_h
3 // -*- C++ -*-
4 //
5 // Package: EgammaHLTAlgos
6 // Class : EgammaHLTHcalIsolation
7 //
16 //
17 // Original Author: Monica Vazquez Acosta - CERN
18 // Created: Tue Jun 13 12:18:35 CEST 2006
19 // modifed by Sam Harper (RAL) 27/7/10
20 
21 //the class aims to as closely as possible emulate the RECO HCAL isolation
22 //which uses CaloTowers
23 //now CaloTowers are just rec-hits with E>Ethres except for tower 28 depth 3
24 //which equally splits the energy between tower 28 and 29
25 
28 
30 
37 
39 
41 class HcalChannelQuality;
42 
44 {
45 
46  public:
47 
48  EgammaHLTHcalIsolation(float eMinHB,float eMinHE,float etMinHB,float etMinHE,
49  float innerCone,float outerCone,int depth) :
50  eMinHB_(eMinHB),eMinHE_(eMinHE),etMinHB_(etMinHB),etMinHE_(etMinHE),
51  innerCone_(innerCone),outerCone_(outerCone),depth_(depth),
52  useRecoveredHcalHits_(1),hcalAcceptSeverityLevel_(9){}//{std::cout <<"innerCone "<<innerCone<<" outerCone "<<outerCone<<std::endl;}
53 
54  //first is the sum E, second is the sum Et
55  std::pair<float,float> getSum(float candEta,float candPhi,
56  const HBHERecHitCollection* hbhe, const CaloGeometry* geometry,
57  const HcalSeverityLevelComputer* hcalSevLvlAlgo=NULL,
58  const HcalChannelQuality* dbHcalChStatus=NULL)const;
59  float getESum(float candEta,float candPhi,
60  const HBHERecHitCollection* hbhe,
61  const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).first;}
62  float getEtSum(float candEta,float candPhi,
63  const HBHERecHitCollection* hbhe,
64  const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).second;}
65  float getESum(float candEta,float candPhi,
66  const HBHERecHitCollection* hbhe,
67  const CaloGeometry* geometry,
68  const HcalSeverityLevelComputer* hcalSevLvlAlgo,
69  const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
70  hcalSevLvlAlgo,dbHcalChStatus).first;}
71  float getEtSum(float candEta,float candPhi,
72  const HBHERecHitCollection* hbhe,
73  const CaloGeometry* geometry,
74  const HcalSeverityLevelComputer* hcalSevLvlAlgo,
75  const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
76  hcalSevLvlAlgo,dbHcalChStatus).second;}
77 
78  //this is the effective depth of the rec-hit, basically converts 3 depth towers to 2 depths and all barrel to depth 1
79  //this is defined when making the calotowers
80  static int getEffectiveDepth(const HcalDetId id);
81 
82  private:
83  bool acceptHit_(const HcalDetId id,const GlobalPoint& pos,const float hitEnergy,
84  const float candEta,const float candPhi)const;
85  bool passMinE_(float energy,const HcalDetId id)const;
86  bool passMinEt_(float et,const HcalDetId id)const;
87  bool passDepth_(const HcalDetId id)const;
88  //inspired from CaloTowersCreationAlgo::hcalChanStatusForCaloTower, we dont distingush from good from recovered and prob channels
89  bool passCleaning_(const CaloRecHit* hit,const HcalSeverityLevelComputer* hcalSevLvlComp,
90  const HcalChannelQuality* hcalChanStatus)const;
91 
92  private:
93 
94  // ---------- member data --------------------------------
95  // Parameters of isolation cone geometry.
96  float eMinHB_;
97  float eMinHE_;
98  float etMinHB_;
99  float etMinHE_;
100  float innerCone_;
101  float outerCone_;
102  int depth_;
103 
104  //cleaning parameters
107 };
108 
109 
110 #endif
bool passDepth_(const HcalDetId id) const
EgammaHLTHcalIsolation(float eMinHB, float eMinHE, float etMinHB, float etMinHE, float innerCone, float outerCone, int depth)
std::pair< float, float > getSum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry, const HcalSeverityLevelComputer *hcalSevLvlAlgo=NULL, const HcalChannelQuality *dbHcalChStatus=NULL) const
bool passCleaning_(const CaloRecHit *hit, const HcalSeverityLevelComputer *hcalSevLvlComp, const HcalChannelQuality *hcalChanStatus) const
#define NULL
Definition: scimark2.h:8
bool passMinEt_(float et, const HcalDetId id) const
float getESum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry, const HcalSeverityLevelComputer *hcalSevLvlAlgo, const HcalChannelQuality *dbHcalChStatus) const
float getEtSum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry, const HcalSeverityLevelComputer *hcalSevLvlAlgo, const HcalChannelQuality *dbHcalChStatus) const
float getEtSum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry) const
static int getEffectiveDepth(const HcalDetId id)
ESHandle< TrackerGeometry > geometry
float getESum(float candEta, float candPhi, const HBHERecHitCollection *hbhe, const CaloGeometry *geometry) const
bool acceptHit_(const HcalDetId id, const GlobalPoint &pos, const float hitEnergy, const float candEta, const float candPhi) const
bool passMinE_(float energy, const HcalDetId id) const