test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
112 
113 
115  int nLayers_;
118  double vertexZ_;
119  double vertexRho_;
120  double vertexMaxDZ_;
121  double maxpt_eta25_;
122  double maxpt_eta20_;
124  double dupMinPt_;
125  double dupDPhi_;
126  double dupDCotTh_;
127  std::vector<int> duplicateTracks_;
128 
129  double d0cuta_;
130  double d0cutb_;
131  double maxd0cut_;
139  double minpt_;
140  double maxpt_;
141  double maxeta_;
142  double maxchi2_;
143  double minhits_;
144  double maxPtErr_;
145  double radius_;
146  double zdist_;
147  double corner_;
148  double eVetoDeltaR_;
152  double hOverECut_;
153  std::vector<int> trkQuality_;
154  std::vector<int> trkAlgos_;
155 
161 
162 
163  class TH2D* response_function_;
164  class TH2D* showerRF_;
167 
168  bool isMuon(const reco::TrackRef& trackRef);
169  bool isElectron(const reco::TrackRef& trackRef);
170  bool isGoodTrack(const reco::TrackRef trackRef);
171  bool closeToElectron( const reco::TrackRef );
172  void correctMETforMuon(const reco::TrackRef, reco::MuonRef& muonRef);
173  void correctMETforMuon(reco::MuonRef& muonRef);
174  void correctMETforTrack( const reco::TrackRef , TH2D* rf, const TVector3& );
175  void correctSumEtForTrack( const reco::TrackRef , TH2D* rf, const TVector3& );
176  class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef);
177  void findGoodShowerTracks(std::vector<int>& goodShowerTracks);
178  bool nearGoodShowerTrack( const reco::TrackRef , const std::vector<int>& goodShowerTracks );
179  int nExpectedInnerHits(const reco::TrackRef);
180  int nExpectedOuterHits(const reco::TrackRef);
181  int nLayers(const reco::TrackRef);
182  bool isValidVertex();
183  void findDuplicateTracks();
184  int vetoTrack( int i1 , int i2 );
185 };
186 
187 //____________________________________________________________________________||
188 #endif // TCMETAlgo_h
189 
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:146
reco::MET CalculateTCMET(edm::Event &event, const edm::EventSetup &setup)
Definition: TCMETAlgo.cc:172
double eVetoDeltaPhi_
Definition: TCMETAlgo.h:149
TH2D * getResponseFunction_fit()
Definition: TCMETAlgo.cc:3582
double met_y_
Definition: TCMETAlgo.h:82
TH2D * getResponseFunction_noshower()
Definition: TCMETAlgo.cc:2207
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:573
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > tcmetDepValueMapToken_
Definition: TCMETAlgo.h:111
double vertexRho_
Definition: TCMETAlgo.h:119
double dupDCotTh_
Definition: TCMETAlgo.h:126
double dupMinPt_
Definition: TCMETAlgo.h:124
int vertexNdof_
Definition: TCMETAlgo.h:117
bool nearGoodShowerTrack(const reco::TrackRef, const std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:516
double corner_
Definition: TCMETAlgo.h:147
void correctSumEtForTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:760
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
const reco::VertexCollection * vertexColl_
Definition: TCMETAlgo.h:166
double eVetoDeltaR_
Definition: TCMETAlgo.h:148
bool usePFClusters_
Definition: TCMETAlgo.h:114
edm::EDGetTokenT< reco::PFClusterCollection > clustersHFEMToken_
Definition: TCMETAlgo.h:108
edm::EDGetTokenT< reco::TrackCollection > trackToken_
Definition: TCMETAlgo.h:103
int nExpectedOuterHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:566
class TH2D * showerRF_
Definition: TCMETAlgo.h:164
bool usePvtxd0_
Definition: TCMETAlgo.h:159
double maxpt_eta25_
Definition: TCMETAlgo.h:121
TH2D * getResponseFunction_shower()
Definition: TCMETAlgo.cc:834
edm::Handle< reco::BeamSpot > beamSpotHandle_
Definition: TCMETAlgo.h:93
bool isMuon(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:580
bool electronVetoCone_
Definition: TCMETAlgo.h:158
double maxpt_eta20_
Definition: TCMETAlgo.h:122
double eVetoMinElectronPt_
Definition: TCMETAlgo.h:151
edm::EDGetTokenT< reco::VertexCollection > vertexToken_
Definition: TCMETAlgo.h:105
double vertexZ_
Definition: TCMETAlgo.h:118
void findGoodShowerTracks(std::vector< int > &goodShowerTracks)
Definition: TCMETAlgo.cc:536
bool isElectron(const reco::TrackRef &trackRef)
Definition: TCMETAlgo.cc:592
double maxeta_
Definition: TCMETAlgo.h:141
int maxTrackAlgo_
Definition: TCMETAlgo.h:136
bool isValidVertex()
Definition: TCMETAlgo.cc:471
int nLayers_
Definition: TCMETAlgo.h:115
bool correctShowerTracks_
Definition: TCMETAlgo.h:157
edm::Handle< reco::TrackCollection > trackHandle_
Definition: TCMETAlgo.h:92
void findDuplicateTracks()
Definition: TCMETAlgo.cc:414
double d0cuta_
Definition: TCMETAlgo.h:129
std::vector< const reco::Candidate > InputCollection
Definition: TCMETAlgo.h:70
std::vector< int > trkQuality_
Definition: TCMETAlgo.h:153
double d0cutb_
Definition: TCMETAlgo.h:130
Definition: MET.h:39
bool isGoodTrack(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:610
edm::EDGetTokenT< reco::MuonCollection > muonToken_
Definition: TCMETAlgo.h:100
double radius_
Definition: TCMETAlgo.h:145
bool hasValidVertex_
Definition: TCMETAlgo.h:165
void correct_MET_for_Tracks()
Definition: TCMETAlgo.cc:349
double maxchi2_tight_
Definition: TCMETAlgo.h:132
TH2D * getResponseFunction_mode()
Definition: TCMETAlgo.cc:5058
double met_x_
Definition: TCMETAlgo.h:81
double usedeltaRRejection_
Definition: TCMETAlgo.h:137
double sumEt_
Definition: TCMETAlgo.h:83
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
edm::Handle< reco::MuonCollection > muonHandle_
Definition: TCMETAlgo.h:90
std::vector< int > trkAlgos_
Definition: TCMETAlgo.h:154
edm::EDGetTokenT< edm::View< reco::MET > > metToken_
Definition: TCMETAlgo.h:102
void initialize_MET_with_CaloMET(edm::Event &event)
Definition: TCMETAlgo.cc:258
void correctMETforMuon(const reco::TrackRef, reco::MuonRef &muonRef)
Definition: TCMETAlgo.cc:705
class TVector3 propagateTrackToCalorimeterFace(const reco::TrackRef trackRef)
Definition: TCMETAlgo.cc:783
double minhits_
Definition: TCMETAlgo.h:143
edm::EDGetTokenT< reco::PFClusterCollection > clustersECALToken_
Definition: TCMETAlgo.h:106
double deltaRShower_
Definition: TCMETAlgo.h:138
edm::EDGetTokenT< reco::PFClusterCollection > clustersHFHADToken_
Definition: TCMETAlgo.h:109
void correctMETforTrack(const reco::TrackRef, TH2D *rf, const TVector3 &)
Definition: TCMETAlgo.cc:731
int nLayersTight_
Definition: TCMETAlgo.h:116
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:14
double maxpt_
Definition: TCMETAlgo.h:140
int nMinOuterHits_
Definition: TCMETAlgo.h:135
double eVetoDeltaCotTheta_
Definition: TCMETAlgo.h:150
string const
Definition: compareJSON.py:14
virtual ~TCMETAlgo()
Definition: TCMETAlgo.cc:165
edm::EDGetTokenT< reco::PFClusterCollection > clustersHCALToken_
Definition: TCMETAlgo.h:107
edm::EDGetTokenT< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapToken_
Definition: TCMETAlgo.h:110
int vetoTrack(int i1, int i2)
Definition: TCMETAlgo.cc:453
double maxchi2_
Definition: TCMETAlgo.h:142
bool isCosmics_
Definition: TCMETAlgo.h:156
class TH2D * response_function_
Definition: TCMETAlgo.h:163
edm::Handle< reco::GsfElectronCollection > electronHandle_
Definition: TCMETAlgo.h:91
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:200
bool checkTrackPropagation_
Definition: TCMETAlgo.h:160
double hOverECut_
Definition: TCMETAlgo.h:152
bool closeToElectron(const reco::TrackRef)
Definition: TCMETAlgo.cc:482
double vertexMaxDZ_
Definition: TCMETAlgo.h:120
std::vector< int > duplicateTracks_
Definition: TCMETAlgo.h:127
double dupDPhi_
Definition: TCMETAlgo.h:125
double maxPtErr_
Definition: TCMETAlgo.h:144
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::Handle< edm::ValueMap< reco::MuonMETCorrectionData > > muonDepValueMapHandle_
Definition: TCMETAlgo.h:95
double minpt_
Definition: TCMETAlgo.h:139
double minhits_tight_
Definition: TCMETAlgo.h:133
int nExpectedInnerHits(const reco::TrackRef)
Definition: TCMETAlgo.cc:560
double maxd0cut_
Definition: TCMETAlgo.h:131
bool vetoDuplicates_
Definition: TCMETAlgo.h:123
void correct_MET_for_Muons()
Definition: TCMETAlgo.cc:268
double maxPtErr_tight_
Definition: TCMETAlgo.h:134