CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MTVHistoProducerAlgoForTracker.h
Go to the documentation of this file.
1 #ifndef Validation_RecoTrack_MTVHistoProducerAlgoForTracker_h
2 #define Validation_RecoTrack_MTVHistoProducerAlgoForTracker_h
3 
4 /* \author B.Mangano, UCSD
5  *
6  * Concrete class implementing the MTVHistoProducerAlgo interface.
7  * To be used within the MTV to fill histograms for Tracker tracks.
8  */
9 
13 
18 
20 #include <TH1F.h>
21 #include <TH2F.h>
22 
23 
24 
26  public:
31 
32  void initialize(){};
33 
34  void bookSimHistos(DQMStore::IBooker& ibook);
35 
36  void bookRecoHistos(DQMStore::IBooker& ibook);
38 
39 
41 
42 
44  const TrackingParticle& tp,
45  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
46  double dxy, double dz, int nSimHits,
47  const reco::Track* track,
48  int numVertices,
49  double dR);
50 
52  const reco::GenParticle& tp,
53  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
54  double dxy, double dz, int nSimHits,
55  const reco::Track* track,
56  int numVertices);
57 
58 
60  const reco::Track& track,
61  const math::XYZPoint& bsPosition,
62  bool isMatched,
63  bool isSigMatched,
64  bool isChargeMatched,
65  int numAssocRecoTracks,
66  int numVertices,
67  int nSimHits,
68  double sharedFraction,
69  double dR);
70 
71  void fill_dedx_recoTrack_histos(int count, edm::RefToBase<reco::Track>& trackref, const std::vector< edm::ValueMap<reco::DeDxData> >& v_dEdx);
72  // void fill_dedx_recoTrack_histos(reco::TrackRef trackref, std::vector< edm::ValueMap<reco::DeDxData> > v_dEdx);
73 
75  const reco::Track& track);
76 
78  int assTracks,
79  int numRecoTracks,
80  int numSimTracks);
81 
82 
84  const TrackingParticle::Vector& momentumTP,
85  const TrackingParticle::Point& vertexTP,
86  int chargeTP,
87  const reco::Track& track,
88  const math::XYZPoint& bsPosition);
89 
90  void finalHistoFits(int counter);
91 
92 
94 
95 
96  private:
97 
99  void getRecoMomentum (const reco::Track& track, double& pt, double& ptError,
100  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
101  double& phi, double& phiError ) const;
103  void getRecoMomentum (const reco::GsfTrack& gsfTrack, double& pt, double& ptError,
104  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
105  double& phi, double& phiError) const;
106 
107  double getEta(double eta);
108 
109  double getPt(double pt);
110 
111 
112  //private data members
119 
126 
127  double minEta, maxEta; int nintEta; bool useFabsEta;
128  double minPt, maxPt; int nintPt; bool useInvPt; bool useLogPt;
129  double minHit, maxHit; int nintHit;
130  double minPu, maxPu; int nintPu;
132  double minPhi, maxPhi; int nintPhi;
133  double minDxy, maxDxy; int nintDxy;
134  double minDz, maxDz; int nintDz;
136  double minZpos, maxZpos; int nintZpos;
137  double mindr, maxdr; int nintdr;
138  double minDeDx, maxDeDx; int nintDeDx;
140 
141  //
147 
148 
149  //sim
150  std::vector<MonitorElement*> h_ptSIM, h_etaSIM, h_tracksSIM, h_vertposSIM, h_bunchxSIM;
151 
152  //1D
153  std::vector<MonitorElement*> h_tracks, h_fakes, h_hits, h_charge, h_algo;;
161 
167  std::vector<MonitorElement*> h_assoc2_ootpu_eta, h_assoc2_ootpu_vertcount;
168  std::vector<MonitorElement*> h_reco_ootpu_eta, h_reco_ootpu_vertcount;
169  std::vector<MonitorElement*> h_effic_PU_eta, h_effic_PU_vertcount, h_effic_PU_zpos;
170  std::vector<MonitorElement*> h_con_eta, h_con_vertcount, h_con_zpos;
171 
172 
173  // dE/dx
174  // in the future these might become an array
175  std::vector<MonitorElement*> h_dedx_estim1;
176  std::vector<MonitorElement*> h_dedx_estim2;
177  std::vector<MonitorElement*> h_dedx_nom1;
178  std::vector<MonitorElement*> h_dedx_nom2;
179  std::vector<MonitorElement*> h_dedx_sat1;
180  std::vector<MonitorElement*> h_dedx_sat2;
181 
182  //2D
183  std::vector<MonitorElement*> nrec_vs_nsim;
184  std::vector<MonitorElement*> nrecHit_vs_nsimHit_sim2rec;
185  std::vector<MonitorElement*> nrecHit_vs_nsimHit_rec2sim;
186 
187  //assoc hits
188  std::vector<MonitorElement*> h_assocFraction, h_assocSharedHit;
189 
190  //#hit vs eta: to be used with doProfileX
191  std::vector<MonitorElement*> nhits_vs_eta,
197 
198 
199  std::vector<MonitorElement*> h_hits_eta,
204 
205 
206  //---- second set of histograms (originally not used by the SeedGenerator)
207  //1D
209 
210  //2D
211  std::vector<MonitorElement*> chi2_vs_nhits, etares_vs_eta;
212  std::vector<MonitorElement*> h_ptshifteta;
213  std::vector<MonitorElement*> ptres_vs_phi, chi2_vs_phi, nhits_vs_phi, phires_vs_phi;
214 
215  //Profile2D
216  std::vector<MonitorElement*> ptmean_vs_eta_phi, phimean_vs_eta_phi;
217 
218  //assoc chi2
219  std::vector<MonitorElement*> h_assochi2, h_assochi2_prob;
220 
221  //chi2 and # lost hits vs eta: to be used with doProfileX
222  std::vector<MonitorElement*> chi2_vs_eta, nlosthits_vs_eta;
223  std::vector<MonitorElement*> h_chi2meanh, h_losthits_eta;
224  std::vector<MonitorElement*> h_hits_phi;
225  std::vector<MonitorElement*> h_chi2meanhitsh, h_chi2mean_vs_phi;
226 
227  //resolution of track params: to be used with fitslicesytool
230 
231  std::vector<MonitorElement*> h_dxyrmsh, h_ptrmsh, h_dzrmsh, h_phirmsh, h_cotThetarmsh;
233  std::vector<MonitorElement*> h_ptrmshPhi, h_phirmshPhi;
234  // std::vector<MonitorElement*> h_phimeanh,h_ptmeanhhi, h_phimeanhPhi;
235 
236  std::vector<MonitorElement*> h_dxymeanh, h_ptmeanh, h_dzmeanh, h_phimeanh, h_cotThetameanh;
238  std::vector<MonitorElement*> h_ptmeanhPhi, h_phimeanhPhi;
239 
240  //pulls of track params vs eta: to be used with fitslicesytool
242  std::vector<MonitorElement*> ptpull_vs_phi, phipull_vs_phi, thetapull_vs_phi;
244  std::vector<MonitorElement*> h_ptpullphi, h_phipullphi, h_thetapullphi;
246  std::vector<MonitorElement*> h_ptpullphimean, h_phipullphimean, h_thetapullphimean;
247 
248 };
249 
250 #endif
std::vector< MonitorElement * > h_looperhit
std::vector< MonitorElement * > h_loopratephi
std::vector< MonitorElement * > h_assoc2hit
std::vector< MonitorElement * > h_misidratepu
std::vector< MonitorElement * > h_dedx_estim2
std::vector< MonitorElement * > h_dzpulletamean
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > h_assoc2_itpu_sig_vertcount
std::vector< MonitorElement * > h_assochit
std::vector< MonitorElement * > h_efficPt
std::vector< MonitorElement * > h_fakes
std::vector< MonitorElement * > h_loopratedxy
std::vector< MonitorElement * > h_PXFhits_eta
std::vector< MonitorElement * > h_nchi2_prob
void fill_dedx_recoTrack_histos(int count, edm::RefToBase< reco::Track > &trackref, const std::vector< edm::ValueMap< reco::DeDxData > > &v_dEdx)
std::vector< MonitorElement * > h_looperpT
std::vector< MonitorElement * > h_pullDz
TrackingParticleSelector * TpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > ptpull_vs_phi
std::vector< MonitorElement * > h_assoczpos
std::vector< MonitorElement * > nPXFhits_vs_eta
std::vector< MonitorElement * > h_fake_vs_hit
std::vector< MonitorElement * > h_dzmeanh
std::vector< MonitorElement * > h_assoc2_ootpu_vertcount
std::vector< MonitorElement * > h_DThits_eta
std::vector< MonitorElement * > h_misidratephi
std::vector< MonitorElement * > h_simulzpos
std::vector< MonitorElement * > h_assochi2
std::vector< MonitorElement * > nrecHit_vs_nsimHit_rec2sim
std::vector< MonitorElement * > h_assoc2pT
std::vector< MonitorElement * > h_nmisslayers_inner
std::vector< MonitorElement * > h_simulpT
std::vector< MonitorElement * > h_RPChits_eta
std::vector< MonitorElement * > h_ptshifteta
void getRecoMomentum(const reco::Track &track, double &pt, double &ptError, double &qoverp, double &qoverpError, double &lambda, double &lambdaError, double &phi, double &phiError) const
retrieval of reconstructed momentum components from reco::Track (== mean values for GSF) ...
GenParticleCustomSelector * GpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > nTEChits_vs_eta
std::vector< MonitorElement * > h_fake_vs_dz
std::vector< MonitorElement * > h_hits
std::vector< MonitorElement * > h_effic_vs_vertpos
std::vector< MonitorElement * > nLayersWithMeas_vs_eta
std::vector< MonitorElement * > h_pullPhi
std::vector< MonitorElement * > h_fake_vs_dxy
std::vector< MonitorElement * > phipull_vs_phi
std::vector< MonitorElement * > h_dedx_sat1
std::vector< MonitorElement * > h_hits_eta
std::vector< MonitorElement * > h_thetapullphi
std::vector< MonitorElement * > nrec_vs_nsim
std::vector< MonitorElement * > h_ptrmshPt
std::vector< MonitorElement * > h_CSChits_eta
std::vector< MonitorElement * > h_algo
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > nTIDhits_vs_eta
std::vector< MonitorElement * > h_ptSIM
std::vector< MonitorElement * > h_dxypulletamean
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > h_pullDxy
std::vector< MonitorElement * > h_assoc2phi
std::vector< MonitorElement * > h_phipullphi
std::vector< MonitorElement * > h_nchi2
std::vector< MonitorElement * > h_assoc2pu
std::vector< MonitorElement * > h_fakeratePt
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > h_dxyrmsh
std::vector< MonitorElement * > h_dzrmshPt
std::vector< MonitorElement * > h_vertposSIM
std::vector< MonitorElement * > h_looperdxy
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > h_misidratepT
std::vector< MonitorElement * > h_ptpulleta
std::vector< MonitorElement * > h_effic_PU_eta
T eta() const
std::vector< MonitorElement * > h_assoc2_itpu_vertcount
std::vector< MonitorElement * > h_TIBhits_eta
std::vector< MonitorElement * > h_thetapullphimean
std::vector< MonitorElement * > h_cotThetameanhPt
std::vector< MonitorElement * > h_fakerate_vs_dr
void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, const reco::Track *track, int numVertices, double dR)
std::vector< MonitorElement * > h_phimeanhPhi
void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)
std::vector< MonitorElement * > h_misidratedz
std::vector< MonitorElement * > h_assoc2dz
std::vector< MonitorElement * > chi2_vs_phi
std::vector< MonitorElement * > h_LayersWithMeas_eta
std::vector< MonitorElement * > h_chi2mean_vs_phi
std::vector< MonitorElement * > h_assocphi
std::vector< MonitorElement * > h_cotThetarmsh
std::vector< MonitorElement * > phires_vs_phi
MTVHistoProducerAlgoForTracker(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::vector< MonitorElement * > dzres_vs_eta
std::vector< MonitorElement * > h_losthits_eta
std::vector< MonitorElement * > h_ptmeanhPhi
std::vector< MonitorElement * > h_misideta
std::vector< MonitorElement * > nlosthits_vs_eta
GenParticleCustomSelector * GpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > nSTRIPlayersWith1dMeas_vs_eta
std::vector< MonitorElement * > h_phimeanh
std::vector< MonitorElement * > h_recohit
std::vector< MonitorElement * > h_thetapulleta
math::XYZPointD Point
point in the space
std::vector< MonitorElement * > h_phipullphimean
std::vector< MonitorElement * > h_dedx_estim1
std::vector< MonitorElement * > h_hits_phi
std::vector< MonitorElement * > phires_vs_pt
std::vector< MonitorElement * > h_assoc2_itpu_eta
void fill_ResoAndPull_recoTrack_histos(int count, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, int chargeTP, const reco::Track &track, const math::XYZPoint &bsPosition)
std::vector< MonitorElement * > h_assocpu
std::vector< MonitorElement * > h_STRIPlayersWithMeas_eta
std::vector< MonitorElement * > nPXBhits_vs_eta
std::vector< MonitorElement * > h_looperpu
std::vector< MonitorElement * > h_assoc2dxy
std::vector< MonitorElement * > h_dxyrmshPt
std::vector< MonitorElement * > h_STRIPlayersWith1dMeas_eta
std::vector< MonitorElement * > h_pullQoverp
std::vector< MonitorElement * > h_simulpu
std::vector< MonitorElement * > h_fake_vs_phi
std::vector< MonitorElement * > h_ptpulletamean
std::vector< MonitorElement * > h_simuldr
std::vector< MonitorElement * > h_misidhit
std::vector< MonitorElement * > nSTRIPlayersWithMeas_vs_eta
std::vector< MonitorElement * > h_assoc2eta_sig
std::vector< MonitorElement * > nTOBhits_vs_eta
std::vector< MonitorElement * > ptpull_vs_eta
std::vector< MonitorElement * > etares_vs_eta
std::vector< MonitorElement * > h_recophi
std::vector< MonitorElement * > h_misidratehit
std::vector< MonitorElement * > h_assocpT
std::vector< MonitorElement * > h_ptpullphimean
std::vector< MonitorElement * > nSTRIPlayersWith2dMeas_vs_eta
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > h_chi2meanh
std::vector< MonitorElement * > h_TIDhits_eta
std::vector< MonitorElement * > h_tracksSIM
std::vector< MonitorElement * > h_effic
void fill_generic_recoTrack_histos(int count, const reco::Track &track, const math::XYZPoint &bsPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int nSimHits, double sharedFraction, double dR)
std::vector< MonitorElement * > nhits_vs_phi
std::vector< MonitorElement * > h_ptmeanhPt
std::vector< MonitorElement * > h_phirmsh
std::vector< MonitorElement * > nrecHit_vs_nsimHit_sim2rec
bool isMatched(TrackingRecHit const &hit)
void fill_simAssociated_recoTrack_histos(int count, const reco::Track &track)
std::vector< MonitorElement * > h_assochi2_prob
std::vector< MonitorElement * > h_effic_PU_zpos
std::vector< MonitorElement * > h_phirmshPt
std::vector< MonitorElement * > phimean_vs_eta_phi
std::vector< MonitorElement * > h_charge
std::vector< MonitorElement * > h_misidpu
std::vector< MonitorElement * > h_reco_ootpu_eta
std::vector< MonitorElement * > h_loopratehit
std::vector< MonitorElement * > h_loopereta
std::vector< MonitorElement * > h_misiddz
std::vector< MonitorElement * > h_assoc2_ootpu_eta
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< MonitorElement * > h_recodr
std::vector< MonitorElement * > dzpull_vs_eta
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > h_misiddxy
std::vector< MonitorElement * > h_bunchxSIM
std::vector< MonitorElement * > h_fakerate
std::vector< MonitorElement * > h_ptpullphi
std::vector< MonitorElement * > thetapull_vs_phi
TrackingParticleSelector * TpSelectorForEfficiencyVsPt
void bookRecoHistosForStandaloneRunning(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_simulvertpos
std::vector< MonitorElement * > h_STRIPlayersWith2dMeas_eta
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > h_effic_vs_phi
std::vector< MonitorElement * > h_ptrmsh
std::vector< MonitorElement * > h_chi2meanhitsh
std::vector< MonitorElement * > h_dxymeanhPt
std::vector< MonitorElement * > h_dzpulleta
std::vector< MonitorElement * > h_recopu
std::vector< MonitorElement * > h_misidpT
std::vector< MonitorElement * > h_nmisslayers_outer
std::vector< MonitorElement * > nPXLlayersWithMeas_vs_eta
std::vector< MonitorElement * > nTIBhits_vs_eta
std::vector< MonitorElement * > h_dxypulleta
std::vector< MonitorElement * > h_effic_vs_dz
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< MonitorElement * > h_phirmshPhi
std::vector< MonitorElement * > h_loopratepu
std::vector< MonitorElement * > h_eta
std::vector< MonitorElement * > h_effic_vs_dr
std::vector< MonitorElement * > h_effic_PU_vertcount
std::vector< MonitorElement * > h_pt
std::vector< MonitorElement * > h_PXBhits_eta
std::vector< MonitorElement * > h_phimeanhPt
std::vector< MonitorElement * > h_dedx_nom2
std::vector< MonitorElement * > cotThetares_vs_pt
std::vector< MonitorElement * > h_assoc2_itpu_sig_eta
std::vector< MonitorElement * > h_effic_vs_zpos
std::vector< MonitorElement * > h_etaSIM
std::vector< MonitorElement * > h_simulphi
void bookRecoHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_ptmeanh
std::vector< MonitorElement * > h_pullTheta
std::vector< MonitorElement * > ptmean_vs_eta_phi
std::vector< MonitorElement * > h_looperphi
std::vector< MonitorElement * > h_assoc2dr
std::vector< MonitorElement * > dxypull_vs_eta
std::vector< MonitorElement * > ptres_vs_eta
std::vector< MonitorElement * > h_cotThetameanh
std::vector< MonitorElement * > h_dzrmsh
static std::atomic< unsigned int > counter
std::vector< MonitorElement * > h_con_vertcount
GenParticleCustomSelector * generalGpSelector
std::vector< MonitorElement * > h_effic_vs_dxy
std::vector< MonitorElement * > phipull_vs_eta
std::vector< MonitorElement * > h_TOBhits_eta
GenParticleCustomSelector * GpSelectorForEfficiencyVsPt
std::vector< MonitorElement * > h_misidrate
std::vector< MonitorElement * > h_TEChits_eta
std::vector< MonitorElement * > h_simulhit
GenParticleCustomSelector * GpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_con_zpos
std::vector< MonitorElement * > h_dzmeanhPt
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > h_looperdz
std::vector< MonitorElement * > h_assocdxy
Monte Carlo truth information used for tracking validation.
std::vector< MonitorElement * > cotThetares_vs_eta
std::vector< MonitorElement * > h_assocFraction
void fill_generic_simTrack_histos(int counter, const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)
std::vector< MonitorElement * > h_fake_vs_pu
std::vector< MonitorElement * > h_loopratedz
std::vector< MonitorElement * > h_cotThetarmshPt
GenParticleCustomSelector * GpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > ptres_vs_pt
std::vector< MonitorElement * > h_dedx_sat2
math::XYZVectorD Vector
point in the space
std::vector< MonitorElement * > h_reco_ootpu_vertcount
std::vector< MonitorElement * > h_phipulleta
std::vector< MonitorElement * > h_assoceta
std::vector< MonitorElement * > h_looprate
std::vector< MonitorElement * > ptres_vs_phi
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_con_eta
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_dxymeanh
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > h_ptrmshPhi
std::vector< MonitorElement * > h_effic_vs_hit
std::vector< MonitorElement * > h_simuldxy
std::vector< MonitorElement * > h_assocdr
std::vector< MonitorElement * > h_assocvertpos
std::vector< MonitorElement * > h_loopratepT
std::vector< MonitorElement * > h_recoeta
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< MonitorElement * > chi2_vs_eta
std::vector< MonitorElement * > h_phipulletamean
void bookSimHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_PXLlayersWithMeas_eta
std::vector< MonitorElement * > h_effic_vs_pu
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< MonitorElement * > h_misidratedxy
std::vector< MonitorElement * > h_dedx_nom1
std::vector< MonitorElement * > h_losthits
TrackingParticleSelector * TpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_assoc2eta
std::vector< MonitorElement * > h_thetapulletamean
std::vector< MonitorElement * > h_misidphi
Definition: DDAxes.h:10
std::vector< MonitorElement * > dzres_vs_pt