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 {
69 public:
70  typedef std::vector<const reco::Candidate> InputCollection;
71  TCMETAlgo();
72  virtual ~TCMETAlgo();
74  TH2D* getResponseFunction_fit ( );
75  TH2D* getResponseFunction_mode ( );
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 
111 
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 
162  class TH2D* response_function_;
163  class TH2D* showerRF_;
166 
167  bool isMuon(const reco::TrackRef& trackRef);
168  bool isElectron(const reco::TrackRef& trackRef);
169  bool isGoodTrack(const reco::TrackRef trackRef);
170  bool closeToElectron( const reco::TrackRef );
171  void correctMETforMuon(const reco::TrackRef, reco::MuonRef& muonRef);
172  void correctMETforMuon(reco::MuonRef& muonRef);
173  void correctMETforTrack( const reco::TrackRef , TH2D* rf, const TVector3& );
174  void correctSumEtForTrack( const reco::TrackRef , TH2D* rf, const TVector3& );
175  class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef);
176  void findGoodShowerTracks(std::vector<int>& goodShowerTracks);
177  bool nearGoodShowerTrack( const reco::TrackRef , const std::vector<int>& goodShowerTracks );
178  int nExpectedInnerHits(const reco::TrackRef);
179  int nExpectedOuterHits(const reco::TrackRef);
180  int nLayers(const reco::TrackRef);
181  bool isValidVertex();
182  void findDuplicateTracks();
183  int vetoTrack( int i1 , int i2 );
184 };
185 
186 //____________________________________________________________________________||
187 #endif // TCMETAlgo_h
188 
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:179
double eVetoDeltaPhi_
Definition: TCMETAlgo.h:148
TH2D * getResponseFunction_fit()
Definition: TCMETAlgo.cc:3575
double met_y_
Definition: TCMETAlgo.h:82
TH2D * getResponseFunction_noshower()
Definition: TCMETAlgo.cc:2200
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:567
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:512
double corner_
Definition: TCMETAlgo.h:146
void correctSumEtForTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:753
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const reco::VertexCollection * vertexColl_
Definition: TCMETAlgo.h:165
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:561
class TH2D * showerRF_
Definition: TCMETAlgo.h:163
bool usePvtxd0_
Definition: TCMETAlgo.h:158
double maxpt_eta25_
Definition: TCMETAlgo.h:120
TH2D * getResponseFunction_shower()
Definition: TCMETAlgo.cc:827
edm::Handle< reco::BeamSpot > beamSpotHandle_
Definition: TCMETAlgo.h:93
bool isMuon(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:573
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:532
bool isElectron(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:585
double maxeta_
Definition: TCMETAlgo.h:140
bool isValidVertex()
Definition: TCMETAlgo.cc:467
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:410
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:42
bool isGoodTrack(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:603
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: TCMETAlgo.h:100
double radius_
Definition: TCMETAlgo.h:144
bool hasValidVertex_
Definition: TCMETAlgo.h:164
void correct_MET_for_Tracks()
Definition: TCMETAlgo.cc:345
double maxchi2_tight_
Definition: TCMETAlgo.h:131
TH2D * getResponseFunction_mode()
Definition: TCMETAlgo.cc:5051
double met_x_
Definition: TCMETAlgo.h:81
double usedeltaRRejection_
Definition: TCMETAlgo.h:136
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:254
void correctMETforMuon(const reco::TrackRef, reco::MuonRef &muonRef)
Definition: TCMETAlgo.cc:698
class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:776
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:724
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:172
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:449
double maxchi2_
Definition: TCMETAlgo.h:141
fixed size matrix
bool isCosmics_
Definition: TCMETAlgo.h:155
class TH2D * response_function_
Definition: TCMETAlgo.h:162
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:65
edm::EDGetTokenT< reco::GsfElectronCollection > electronToken_
Definition: TCMETAlgo.h:101
void initialize_MET_with_PFClusters(edm::Event &event)
Definition: TCMETAlgo.cc:207
bool checkTrackPropagation_
Definition: TCMETAlgo.h:159
double hOverECut_
Definition: TCMETAlgo.h:151
bool closeToElectron(const reco::TrackRef)
Definition: TCMETAlgo.cc:478
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:556
double maxd0cut_
Definition: TCMETAlgo.h:130
bool vetoDuplicates_
Definition: TCMETAlgo.h:122
void correct_MET_for_Muons()
Definition: TCMETAlgo.cc:264
Definition: event.py:1
double maxPtErr_tight_
Definition: TCMETAlgo.h:133