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 
61 
63 
64 #include "TH2D.h"
65 #include "TVector3.h"
66 
67 //____________________________________________________________________________||
68 class TCMETAlgo {
69 public:
70  typedef std::vector<const reco::Candidate> InputCollection;
71  TCMETAlgo();
72  virtual ~TCMETAlgo();
78  void configure(const edm::ParameterSet& iConfig, edm::ConsumesCollector&& iConsumesCollector);
79 
80 private:
81  double met_x_;
82  double met_y_;
83  double sumEt_;
84 
87  void correct_MET_for_Muons();
89 
97 
99 
112 
114  int nLayers_;
117  double vertexZ_;
118  double vertexRho_;
119  double vertexMaxDZ_;
120  double maxpt_eta25_;
121  double maxpt_eta20_;
123  double dupMinPt_;
124  double dupDPhi_;
125  double dupDCotTh_;
126  std::vector<int> duplicateTracks_;
127 
128  double d0cuta_;
129  double d0cutb_;
130  double maxd0cut_;
135  std::vector<reco::TrackBase::TrackAlgorithm> trackAlgos_;
138  double minpt_;
139  double maxpt_;
140  double maxeta_;
141  double maxchi2_;
142  double minhits_;
143  double maxPtErr_;
144  double radius_;
145  double zdist_;
146  double corner_;
147  double eVetoDeltaR_;
151  double hOverECut_;
152  std::vector<int> trkQuality_;
153  std::vector<reco::TrackBase::TrackAlgorithm> trkAlgos_;
154 
160 
161  class TH2D* response_function_;
162  class TH2D* showerRF_;
165 
166  bool isMuon(const reco::TrackRef& trackRef);
167  bool isElectron(const reco::TrackRef& trackRef);
168  bool isGoodTrack(const reco::TrackRef trackRef);
169  bool closeToElectron(const reco::TrackRef);
170  void correctMETforMuon(const reco::TrackRef, reco::MuonRef& muonRef);
171  void correctMETforMuon(reco::MuonRef& muonRef);
172  void correctMETforTrack(const reco::TrackRef, TH2D* rf, const TVector3&);
173  void correctSumEtForTrack(const reco::TrackRef, TH2D* rf, const TVector3&);
174  class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef);
175  void findGoodShowerTracks(std::vector<int>& goodShowerTracks);
176  bool nearGoodShowerTrack(const reco::TrackRef, const std::vector<int>& goodShowerTracks);
177  int nExpectedInnerHits(const reco::TrackRef);
178  int nExpectedOuterHits(const reco::TrackRef);
179  int nLayers(const reco::TrackRef);
182  int vetoTrack(int i1, int i2);
183 };
184 
185 //____________________________________________________________________________||
186 #endif // TCMETAlgo_h
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken_
Definition: TCMETAlgo.h:104
edm::Handle< edm::ValueMap< reco::MuonMETCorrectionData > > tcmetDepValueMapHandle_
Definition: TCMETAlgo.h:96
double zdist_
Definition: TCMETAlgo.h:145
reco::MET CalculateTCMET(edm::Event &event, const edm::EventSetup &setup)
Definition: TCMETAlgo.cc:170
double eVetoDeltaPhi_
Definition: TCMETAlgo.h:148
TH2D * getResponseFunction_fit()
Definition: TCMETAlgo.cc:3523
double met_y_
Definition: TCMETAlgo.h:82
TH2D * getResponseFunction_noshower()
Definition: TCMETAlgo.cc:2153
edm::Handle< reco::VertexCollection > vertexHandle_
Definition: TCMETAlgo.h:94
edm::ESHandle< MagneticField > magneticFieldHandle_
Definition: TCMETAlgo.h:98
int nLayers(const reco::TrackRef)
Definition: TCMETAlgo.cc:545
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcmetDepValueMapToken_
Definition: TCMETAlgo.h:110
double vertexRho_
Definition: TCMETAlgo.h:118
double dupDCotTh_
Definition: TCMETAlgo.h:125
double dupMinPt_
Definition: TCMETAlgo.h:123
std::vector< reco::TrackBase::TrackAlgorithm > trkAlgos_
Definition: TCMETAlgo.h:153
int vertexNdof_
Definition: TCMETAlgo.h:116
bool nearGoodShowerTrack(const reco::TrackRef, const std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:492
double corner_
Definition: TCMETAlgo.h:146
void correctSumEtForTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:725
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const reco::VertexCollection * vertexColl_
Definition: TCMETAlgo.h:164
double eVetoDeltaR_
Definition: TCMETAlgo.h:147
bool usePFClusters_
Definition: TCMETAlgo.h:113
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: TCMETAlgo.h:103
int nExpectedOuterHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:540
class TH2D * showerRF_
Definition: TCMETAlgo.h:162
bool usePvtxd0_
Definition: TCMETAlgo.h:158
double maxpt_eta25_
Definition: TCMETAlgo.h:120
TH2D * getResponseFunction_shower()
Definition: TCMETAlgo.cc:785
edm::Handle< reco::BeamSpot > beamSpotHandle_
Definition: TCMETAlgo.h:93
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
bool isMuon(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:548
bool electronVetoCone_
Definition: TCMETAlgo.h:157
double maxpt_eta20_
Definition: TCMETAlgo.h:121
double eVetoMinElectronPt_
Definition: TCMETAlgo.h:150
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: TCMETAlgo.h:105
double vertexZ_
Definition: TCMETAlgo.h:117
void findGoodShowerTracks(std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:511
bool isElectron(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:559
double maxeta_
Definition: TCMETAlgo.h:140
bool isValidVertex()
Definition: TCMETAlgo.cc:442
int nLayers_
Definition: TCMETAlgo.h:114
bool correctShowerTracks_
Definition: TCMETAlgo.h:156
edm::Handle< reco::TrackCollection > trackHandle_
Definition: TCMETAlgo.h:92
void findDuplicateTracks()
Definition: TCMETAlgo.cc:375
double d0cuta_
Definition: TCMETAlgo.h:128
std::vector< const reco::Candidate > InputCollection
Definition: TCMETAlgo.h:70
std::vector< int > trkQuality_
Definition: TCMETAlgo.h:152
double d0cutb_
Definition: TCMETAlgo.h:129
Definition: MET.h:41
bool isGoodTrack(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:577
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: TCMETAlgo.h:100
double radius_
Definition: TCMETAlgo.h:144
bool hasValidVertex_
Definition: TCMETAlgo.h:163
void correct_MET_for_Tracks()
Definition: TCMETAlgo.cc:319
double maxchi2_tight_
Definition: TCMETAlgo.h:131
TH2D * getResponseFunction_mode()
Definition: TCMETAlgo.cc:4995
double met_x_
Definition: TCMETAlgo.h:81
double usedeltaRRejection_
Definition: TCMETAlgo.h:136
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: TCMETAlgo.h:111
double sumEt_
Definition: TCMETAlgo.h:83
edm::Handle< reco::MuonCollection > muonHandle_
Definition: TCMETAlgo.h:90
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: TCMETAlgo.h:102
void initialize_MET_with_CaloMET(edm::Event &event)
Definition: TCMETAlgo.cc:240
void correctMETforMuon(const reco::TrackRef, reco::MuonRef &muonRef)
Definition: TCMETAlgo.cc:678
class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:740
double minhits_
Definition: TCMETAlgo.h:142
edm::EDGetTokenT< reco::PFClusterCollection > clustersECALToken_
Definition: TCMETAlgo.h:106
double deltaRShower_
Definition: TCMETAlgo.h:137
void correctMETforTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:702
int nLayersTight_
Definition: TCMETAlgo.h:115
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
double maxpt_
Definition: TCMETAlgo.h:139
int nMinOuterHits_
Definition: TCMETAlgo.h:134
double eVetoDeltaCotTheta_
Definition: TCMETAlgo.h:149
virtual ~TCMETAlgo()
Definition: TCMETAlgo.cc:164
edm::EDGetTokenT< reco::PFClusterCollection > clustersHCALToken_
Definition: TCMETAlgo.h:107
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapToken_
Definition: TCMETAlgo.h:109
int vetoTrack(int i1, int i2)
Definition: TCMETAlgo.cc:420
double maxchi2_
Definition: TCMETAlgo.h:141
fixed size matrix
bool isCosmics_
Definition: TCMETAlgo.h:155
class TH2D * response_function_
Definition: TCMETAlgo.h:161
edm::EDGetTokenT< reco::PFClusterCollection > clustersHFToken_
Definition: TCMETAlgo.h:108
edm::Handle< reco::GsfElectronCollection > electronHandle_
Definition: TCMETAlgo.h:91
std::vector< reco::TrackBase::TrackAlgorithm > trackAlgos_
Definition: TCMETAlgo.h:135
void configure(const edm::ParameterSet &iConfig, edm::ConsumesCollector &&iConsumesCollector)
Definition: TCMETAlgo.cc:62
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
Definition: TCMETAlgo.h:101
void initialize_MET_with_PFClusters(edm::Event &event)
Definition: TCMETAlgo.cc:196
bool checkTrackPropagation_
Definition: TCMETAlgo.h:159
double hOverECut_
Definition: TCMETAlgo.h:151
bool closeToElectron(const reco::TrackRef)
Definition: TCMETAlgo.cc:456
double vertexMaxDZ_
Definition: TCMETAlgo.h:119
std::vector< int > duplicateTracks_
Definition: TCMETAlgo.h:126
double dupDPhi_
Definition: TCMETAlgo.h:124
double maxPtErr_
Definition: TCMETAlgo.h:143
edm::Handle< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapHandle_
Definition: TCMETAlgo.h:95
double minpt_
Definition: TCMETAlgo.h:138
double minhits_tight_
Definition: TCMETAlgo.h:132
int nExpectedInnerHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:535
double maxd0cut_
Definition: TCMETAlgo.h:130
bool vetoDuplicates_
Definition: TCMETAlgo.h:122
void correct_MET_for_Muons()
Definition: TCMETAlgo.cc:249
Definition: event.py:1
double maxPtErr_tight_
Definition: TCMETAlgo.h:133