CMS 3D CMS Logo

TCMETAlgo.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: METAlgorithms
4 // Class: TCMETAlgo
5 //
6 //
7 
18 //
19 // Original Author: F. Golf
20 // Created: March 24, 2009
21 //
22 //
23 
24 //____________________________________________________________________________||
25 #ifndef TCMETAlgo_h
26 #define TCMETAlgo_h
27 
28 //____________________________________________________________________________||
29 #include <vector>
30 #include <string>
36 
41 
46 
58 
60 
62 
63 #include "TH2D.h"
64 #include "TVector3.h"
65 
66 //____________________________________________________________________________||
67 class TCMETAlgo {
68 public:
69  typedef std::vector<const reco::Candidate> InputCollection;
70  TCMETAlgo();
71  virtual ~TCMETAlgo();
77  void configure(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iConsumesCollector);
78 
79 private:
80  double met_x_;
81  double met_y_;
82  double sumEt_;
83 
86  void correct_MET_for_Muons();
88 
96 
98 
110 
112  int nLayers_;
115  double vertexZ_;
116  double vertexRho_;
117  double vertexMaxDZ_;
118  double maxpt_eta25_;
119  double maxpt_eta20_;
121  double dupMinPt_;
122  double dupDPhi_;
123  double dupDCotTh_;
124  std::vector<int> duplicateTracks_;
125 
126  double d0cuta_;
127  double d0cutb_;
128  double maxd0cut_;
133  std::vector<reco::TrackBase::TrackAlgorithm> trackAlgos_;
136  double minpt_;
137  double maxpt_;
138  double maxeta_;
139  double maxchi2_;
140  double minhits_;
141  double maxPtErr_;
142  double radius_;
143  double zdist_;
144  double corner_;
145  double eVetoDeltaR_;
149  double hOverECut_;
150  std::vector<int> trkQuality_;
151  std::vector<reco::TrackBase::TrackAlgorithm> trkAlgos_;
152 
158 
159  class TH2D* response_function_;
160  class TH2D* showerRF_;
163 
164  bool isMuon(const reco::TrackRef& trackRef);
165  bool isElectron(const reco::TrackRef& trackRef);
166  bool isGoodTrack(const reco::TrackRef trackRef);
167  bool closeToElectron(const reco::TrackRef);
168  void correctMETforMuon(const reco::TrackRef, reco::MuonRef& muonRef);
169  void correctMETforMuon(reco::MuonRef& muonRef);
170  void correctMETforTrack(const reco::TrackRef, TH2D* rf, const TVector3&);
171  void correctSumEtForTrack(const reco::TrackRef, TH2D* rf, const TVector3&);
172  class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef);
173  void findGoodShowerTracks(std::vector<int>& goodShowerTracks);
174  bool nearGoodShowerTrack(const reco::TrackRef, const std::vector<int>& goodShowerTracks);
175  int nExpectedInnerHits(const reco::TrackRef);
176  int nExpectedOuterHits(const reco::TrackRef);
177  int nLayers(const reco::TrackRef);
179  void findDuplicateTracks();
180  int vetoTrack(int i1, int i2);
181 };
182 
183 //____________________________________________________________________________||
184 #endif // TCMETAlgo_h
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: TCMETAlgo.h:103
edm::Handle< edm::ValueMap< reco::MuonMETCorrectionData > > tcmetDepValueMapHandle_
Definition: TCMETAlgo.h:95
double zdist_
Definition: TCMETAlgo.h:143
reco::MET CalculateTCMET(edm::Event &event, const edm::EventSetup &setup)
Definition: TCMETAlgo.cc:169
double eVetoDeltaPhi_
Definition: TCMETAlgo.h:146
TH2D * getResponseFunction_fit()
Definition: TCMETAlgo.cc:3522
double met_y_
Definition: TCMETAlgo.h:81
TH2D * getResponseFunction_noshower()
Definition: TCMETAlgo.cc:2152
edm::Handle< reco::VertexCollection > vertexHandle_
Definition: TCMETAlgo.h:93
edm::ESHandle< MagneticField > magneticFieldHandle_
Definition: TCMETAlgo.h:97
int nLayers(const reco::TrackRef)
Definition: TCMETAlgo.cc:544
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcmetDepValueMapToken_
Definition: TCMETAlgo.h:109
double vertexRho_
Definition: TCMETAlgo.h:116
double dupDCotTh_
Definition: TCMETAlgo.h:123
double dupMinPt_
Definition: TCMETAlgo.h:121
std::vector< reco::TrackBase::TrackAlgorithm > trkAlgos_
Definition: TCMETAlgo.h:151
int vertexNdof_
Definition: TCMETAlgo.h:114
bool nearGoodShowerTrack(const reco::TrackRef, const std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:491
double corner_
Definition: TCMETAlgo.h:144
void correctSumEtForTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:724
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const reco::VertexCollection * vertexColl_
Definition: TCMETAlgo.h:162
double eVetoDeltaR_
Definition: TCMETAlgo.h:145
bool usePFClusters_
Definition: TCMETAlgo.h:111
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: TCMETAlgo.h:102
int nExpectedOuterHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:539
class TH2D * showerRF_
Definition: TCMETAlgo.h:160
bool usePvtxd0_
Definition: TCMETAlgo.h:156
double maxpt_eta25_
Definition: TCMETAlgo.h:118
TH2D * getResponseFunction_shower()
Definition: TCMETAlgo.cc:784
edm::Handle< reco::BeamSpot > beamSpotHandle_
Definition: TCMETAlgo.h:92
bool isMuon(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:547
bool electronVetoCone_
Definition: TCMETAlgo.h:155
double maxpt_eta20_
Definition: TCMETAlgo.h:119
double eVetoMinElectronPt_
Definition: TCMETAlgo.h:148
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: TCMETAlgo.h:104
double vertexZ_
Definition: TCMETAlgo.h:115
void findGoodShowerTracks(std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:510
bool isElectron(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:558
double maxeta_
Definition: TCMETAlgo.h:138
bool isValidVertex()
Definition: TCMETAlgo.cc:441
int nLayers_
Definition: TCMETAlgo.h:112
bool correctShowerTracks_
Definition: TCMETAlgo.h:154
edm::Handle< reco::TrackCollection > trackHandle_
Definition: TCMETAlgo.h:91
void findDuplicateTracks()
Definition: TCMETAlgo.cc:374
double d0cuta_
Definition: TCMETAlgo.h:126
std::vector< const reco::Candidate > InputCollection
Definition: TCMETAlgo.h:69
std::vector< int > trkQuality_
Definition: TCMETAlgo.h:150
double d0cutb_
Definition: TCMETAlgo.h:127
Definition: MET.h:41
bool isGoodTrack(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:576
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: TCMETAlgo.h:99
double radius_
Definition: TCMETAlgo.h:142
bool hasValidVertex_
Definition: TCMETAlgo.h:161
void correct_MET_for_Tracks()
Definition: TCMETAlgo.cc:318
double maxchi2_tight_
Definition: TCMETAlgo.h:129
TH2D * getResponseFunction_mode()
Definition: TCMETAlgo.cc:4994
double met_x_
Definition: TCMETAlgo.h:80
double usedeltaRRejection_
Definition: TCMETAlgo.h:134
double sumEt_
Definition: TCMETAlgo.h:82
edm::Handle< reco::MuonCollection > muonHandle_
Definition: TCMETAlgo.h:89
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: TCMETAlgo.h:101
void initialize_MET_with_CaloMET(edm::Event &event)
Definition: TCMETAlgo.cc:239
void correctMETforMuon(const reco::TrackRef, reco::MuonRef &muonRef)
Definition: TCMETAlgo.cc:677
class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:739
double minhits_
Definition: TCMETAlgo.h:140
edm::EDGetTokenT< reco::PFClusterCollection > clustersECALToken_
Definition: TCMETAlgo.h:105
double deltaRShower_
Definition: TCMETAlgo.h:135
void correctMETforTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:701
int nLayersTight_
Definition: TCMETAlgo.h:113
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
double maxpt_
Definition: TCMETAlgo.h:137
int nMinOuterHits_
Definition: TCMETAlgo.h:132
double eVetoDeltaCotTheta_
Definition: TCMETAlgo.h:147
virtual ~TCMETAlgo()
Definition: TCMETAlgo.cc:163
edm::EDGetTokenT< reco::PFClusterCollection > clustersHCALToken_
Definition: TCMETAlgo.h:106
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapToken_
Definition: TCMETAlgo.h:108
int vetoTrack(int i1, int i2)
Definition: TCMETAlgo.cc:419
double maxchi2_
Definition: TCMETAlgo.h:139
fixed size matrix
bool isCosmics_
Definition: TCMETAlgo.h:153
class TH2D * response_function_
Definition: TCMETAlgo.h:159
edm::EDGetTokenT< reco::PFClusterCollection > clustersHFToken_
Definition: TCMETAlgo.h:107
edm::Handle< reco::GsfElectronCollection > electronHandle_
Definition: TCMETAlgo.h:90
std::vector< reco::TrackBase::TrackAlgorithm > trackAlgos_
Definition: TCMETAlgo.h:133
void configure(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumesCollector)
Definition: TCMETAlgo.cc:63
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
Definition: TCMETAlgo.h:100
void initialize_MET_with_PFClusters(edm::Event &event)
Definition: TCMETAlgo.cc:195
bool checkTrackPropagation_
Definition: TCMETAlgo.h:157
double hOverECut_
Definition: TCMETAlgo.h:149
bool closeToElectron(const reco::TrackRef)
Definition: TCMETAlgo.cc:455
double vertexMaxDZ_
Definition: TCMETAlgo.h:117
std::vector< int > duplicateTracks_
Definition: TCMETAlgo.h:124
double dupDPhi_
Definition: TCMETAlgo.h:122
double maxPtErr_
Definition: TCMETAlgo.h:141
edm::Handle< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapHandle_
Definition: TCMETAlgo.h:94
double minpt_
Definition: TCMETAlgo.h:136
double minhits_tight_
Definition: TCMETAlgo.h:130
int nExpectedInnerHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:534
double maxd0cut_
Definition: TCMETAlgo.h:128
bool vetoDuplicates_
Definition: TCMETAlgo.h:120
void correct_MET_for_Muons()
Definition: TCMETAlgo.cc:248
Definition: event.py:1
double maxPtErr_tight_
Definition: TCMETAlgo.h:131