CMS 3D CMS Logo

ElectronTkIsolation.h
Go to the documentation of this file.
1 #ifndef EgammaIsolationAlgos_ElectronTkIsolation_h
2 #define EgammaIsolationAlgos_ElectronTkIsolation_h
3 //*****************************************************************************
4 // File: ElectronTkIsolation.h
5 // ----------------------------------------------------------------------------
6 // OrigAuth: Matthias Mozer
7 // Institute: IIHE-VUB
8 //=============================================================================
9 //*****************************************************************************
10 
15 
16 #include <string>
17 #include <vector>
18 
20 public:
21  //constructors
23  double intRadius,
24  double ptLow,
25  double lip,
26  double drb,
28  reco::TrackBase::Point beamPoint)
32  stripBarrel_(0.0),
33  stripEndcap_(0.0),
34  ptLow_(ptLow),
35  lip_(lip),
36  drb_(drb),
38  beamPoint_(beamPoint) {
40  setDzOption("vz");
41  }
42 
44  double intRadiusBarrel,
45  double intRadiusEndcap,
46  double stripBarrel,
47  double stripEndcap,
48  double ptLow,
49  double lip,
50  double drb,
52  reco::TrackBase::Point beamPoint)
58  ptLow_(ptLow),
59  lip_(lip),
60  drb_(drb),
62  beamPoint_(beamPoint) {
64  setDzOption("vz");
65  }
66 
68  double intRadiusBarrel,
69  double intRadiusEndcap,
70  double stripBarrel,
71  double stripEndcap,
72  double ptLow,
73  double lip,
74  double drb,
75  const reco::TrackCollection*,
76  reco::TrackBase::Point beamPoint,
77  const std::string&);
78 
79  //destructor
81 
82  //methods
83 
84  void setDzOption(const std::string& s) {
85  if (!s.compare("dz"))
87  else if (!s.compare("vz"))
89  else if (!s.compare("bs"))
91  else if (!s.compare("vtx"))
93  else
95  }
96 
97  int getNumberTracks(const reco::GsfElectron*) const;
98  double getPtTracks(const reco::GsfElectron*) const;
99  std::pair<int, double> getIso(const reco::GsfElectron*) const;
100  std::pair<int, double> getIso(const reco::Track*) const;
101 
102 private:
103  bool passAlgo(const reco::TrackBase& trk) const;
104  void setAlgosToReject();
105  double extRadius_;
108  double stripBarrel_;
109  double stripEndcap_;
110  double ptLow_;
111  double lip_;
112  double drb_;
113  std::vector<int> algosToReject_; //vector is sorted
116 
118 };
119 
120 #endif
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
Trktree trk
Definition: Trktree.cc:2
ElectronTkIsolation(double extRadius, double intRadius, double ptLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint)
bool passAlgo(const reco::TrackBase &trk) const
void setDzOption(const std::string &s)
std::vector< int > algosToReject_
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
trackCollection
Definition: JetHT_cfg.py:51
const reco::TrackCollection * trackCollection_
ElectronTkIsolation(double extRadius, double intRadiusBarrel, double intRadiusEndcap, double stripBarrel, double stripEndcap, double ptLow, double lip, double drb, const reco::TrackCollection *trackCollection, reco::TrackBase::Point beamPoint)
int getNumberTracks(const reco::GsfElectron *) const
std::pair< int, double > getIso(const reco::GsfElectron *) const
reco::TrackBase::Point beamPoint_
double getPtTracks(const reco::GsfElectron *) const