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 // $Id: EgammaHLTHcalIsolation.h,v 1.4 2010/08/12 15:25:02 sharper Exp $
20 // modifed by Sam Harper (RAL) 27/7/10
21 
22 //the class aims to as closely as possible emulate the RECO HCAL isolation
23 //which uses CaloTowers
24 //now CaloTowers are just rec-hits with E>Ethres except for tower 28 depth 3
25 //which equally splits the energy between tower 28 and 29
26 
29 
31 
38 
40 
42 class HcalChannelQuality;
43 
45 {
46 
47  public:
48 
49  EgammaHLTHcalIsolation(float eMinHB,float eMinHE,float etMinHB,float etMinHE,
50  float innerCone,float outerCone,int depth) :
51  eMinHB_(eMinHB),eMinHE_(eMinHE),etMinHB_(etMinHB),etMinHE_(etMinHE),
52  innerCone_(innerCone),outerCone_(outerCone),depth_(depth),
53  useRecoveredHcalHits_(1),hcalAcceptSeverityLevel_(9){}//{std::cout <<"innerCone "<<innerCone<<" outerCone "<<outerCone<<std::endl;}
54 
55  //first is the sum E, second is the sum Et
56  std::pair<float,float> getSum(float candEta,float candPhi,
57  const HBHERecHitCollection* hbhe, const CaloGeometry* geometry,
58  const HcalSeverityLevelComputer* hcalSevLvlAlgo=NULL,
59  const HcalChannelQuality* dbHcalChStatus=NULL)const;
60  float getESum(float candEta,float candPhi,
61  const HBHERecHitCollection* hbhe,
62  const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).first;}
63  float getEtSum(float candEta,float candPhi,
64  const HBHERecHitCollection* hbhe,
65  const CaloGeometry* geometry)const{return getSum(candEta,candPhi,hbhe,geometry).second;}
66  float getESum(float candEta,float candPhi,
67  const HBHERecHitCollection* hbhe,
68  const CaloGeometry* geometry,
69  const HcalSeverityLevelComputer* hcalSevLvlAlgo,
70  const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
71  hcalSevLvlAlgo,dbHcalChStatus).first;}
72  float getEtSum(float candEta,float candPhi,
73  const HBHERecHitCollection* hbhe,
74  const CaloGeometry* geometry,
75  const HcalSeverityLevelComputer* hcalSevLvlAlgo,
76  const HcalChannelQuality* dbHcalChStatus)const{return getSum(candEta,candPhi,hbhe,geometry,
77  hcalSevLvlAlgo,dbHcalChStatus).second;}
78 
79  //this is the effective depth of the rec-hit, basically converts 3 depth towers to 2 depths and all barrel to depth 1
80  //this is defined when making the calotowers
81  static int getEffectiveDepth(const HcalDetId id);
82 
83  private:
84  bool acceptHit_(const HcalDetId id,const GlobalPoint& pos,const float hitEnergy,
85  const float candEta,const float candPhi)const;
86  bool passMinE_(float energy,const HcalDetId id)const;
87  bool passMinEt_(float et,const HcalDetId id)const;
88  bool passDepth_(const HcalDetId id)const;
89  //inspired from CaloTowersCreationAlgo::hcalChanStatusForCaloTower, we dont distingush from good from recovered and prob channels
90  bool passCleaning_(const CaloRecHit* hit,const HcalSeverityLevelComputer* hcalSevLvlComp,
91  const HcalChannelQuality* hcalChanStatus)const;
92 
93  private:
94 
95  // ---------- member data --------------------------------
96  // Parameters of isolation cone geometry.
97  float eMinHB_;
98  float eMinHE_;
99  float etMinHB_;
100  float etMinHE_;
101  float innerCone_;
102  float outerCone_;
103  int depth_;
104 
105  //cleaning parameters
108 };
109 
110 
111 #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