test
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 
12 
19 
22 
25 
26 
27 
29  public:
34 
35  void bookSimHistos(DQMStore::IBooker& ibook);
38  void bookRecoHistos(DQMStore::IBooker& ibook);
41  void bookSeedHistos(DQMStore::IBooker& ibook);
42 
43 
45  void fill_simTrackBased_histos(int numSimTracks);
46 
47 
49  const TrackingParticle& tp,
50  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
51  double dxy, double dz,
52  double dxyPV, double dzPV,
53  int nSimHits,
54  int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers,
55  const reco::Track* track,
56  int numVertices,
57  double dR,
58  const math::XYZPoint *pvPosition);
59 
61  const reco::GenParticle& tp,
62  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
63  double dxy, double dz, int nSimHits,
64  const reco::Track* track,
65  int numVertices);
66 
67 
69  const reco::Track& track,
70  const math::XYZPoint& bsPosition,
71  const math::XYZPoint *pvPosition,
72  bool isMatched,
73  bool isSigMatched,
74  bool isChargeMatched,
75  int numAssocRecoTracks,
76  int numVertices,
77  int nSimHits,
78  double sharedFraction,
79  double dR);
80 
81  void fill_dedx_recoTrack_histos(int count, const edm::RefToBase<reco::Track>& trackref, const std::vector< const edm::ValueMap<reco::DeDxData> *>& v_dEdx);
82 
84  const reco::Track& track);
85 
87  int assTracks,
88  int numRecoTracks,
89  int numSimTracks);
90 
91 
93  const TrackingParticle::Vector& momentumTP,
94  const TrackingParticle::Point& vertexTP,
95  int chargeTP,
96  const reco::Track& track,
97  const math::XYZPoint& bsPosition);
98 
99  void fill_seed_histos(int count, int seedsFitFailed, int seedsTotal);
100 
101  private:
102 
104  void getRecoMomentum (const reco::Track& track, double& pt, double& ptError,
105  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
106  double& phi, double& phiError ) const;
108  void getRecoMomentum (const reco::GsfTrack& gsfTrack, double& pt, double& ptError,
109  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
110  double& phi, double& phiError) const;
111 
112  double getEta(double eta);
113 
114  double getPt(double pt);
115 
116 
117  //private data members
118  std::unique_ptr<TrackingParticleSelector> generalTpSelector;
119  std::unique_ptr<TrackingParticleSelector> TpSelectorForEfficiencyVsEta;
120  std::unique_ptr<TrackingParticleSelector> TpSelectorForEfficiencyVsPhi;
121  std::unique_ptr<TrackingParticleSelector> TpSelectorForEfficiencyVsPt;
122  std::unique_ptr<TrackingParticleSelector> TpSelectorForEfficiencyVsVTXR;
123  std::unique_ptr<TrackingParticleSelector> TpSelectorForEfficiencyVsVTXZ;
124 
125  std::unique_ptr<GenParticleCustomSelector> generalGpSelector;
126  std::unique_ptr<GenParticleCustomSelector> GpSelectorForEfficiencyVsEta;
127  std::unique_ptr<GenParticleCustomSelector> GpSelectorForEfficiencyVsPhi;
128  std::unique_ptr<GenParticleCustomSelector> GpSelectorForEfficiencyVsPt;
129  std::unique_ptr<GenParticleCustomSelector> GpSelectorForEfficiencyVsVTXR;
130  std::unique_ptr<GenParticleCustomSelector> GpSelectorForEfficiencyVsVTXZ;
131 
132  double minEta, maxEta; int nintEta; bool useFabsEta;
133  double minPt, maxPt; int nintPt; bool useInvPt; bool useLogPt;
134  double minHit, maxHit; int nintHit;
135  double minPu, maxPu; int nintPu;
137  double minPhi, maxPhi; int nintPhi;
138  double minDxy, maxDxy; int nintDxy;
139  double minDz, maxDz; int nintDz;
141  double minZpos, maxZpos; int nintZpos;
142  double mindr, maxdr; int nintdr;
143  double minChi2, maxChi2; int nintChi2;
144  double minDeDx, maxDeDx; int nintDeDx;
147 
148  //
154 
155  double maxDzpvCum; int nintDzpvCum;
157 
158  //sim
160 
161  //1D
175 
178  std::vector<MonitorElement*> h_assocdr, h_assoc2dr, h_simuldr, h_recodr, h_looperdr, h_pileupdr;
179  std::vector<MonitorElement*> h_recochi2, h_assoc2chi2, h_looperchi2, h_misidchi2, h_pileupchi2;
183  std::vector<MonitorElement*> h_assoc2_ootpu_eta, h_assoc2_ootpu_vertcount;
184  std::vector<MonitorElement*> h_reco_ootpu_eta, h_reco_ootpu_vertcount;
185  std::vector<MonitorElement*> h_con_eta, h_con_vertcount, h_con_zpos;
186 
189 
192 
193  // dE/dx
194  // in the future these might become an array
195  std::vector<std::vector<MonitorElement*>> h_dedx_estim;
196  std::vector<std::vector<MonitorElement*>> h_dedx_nom;
197  std::vector<std::vector<MonitorElement*>> h_dedx_sat;
198 
199  //2D
200  std::vector<MonitorElement*> nrec_vs_nsim;
201  std::vector<MonitorElement*> nrecHit_vs_nsimHit_sim2rec;
202  std::vector<MonitorElement*> nrecHit_vs_nsimHit_rec2sim;
203 
204  //assoc hits
205  std::vector<MonitorElement*> h_assocFraction, h_assocSharedHit;
206 
207  //#hit vs eta: to be used with doProfileX
208  std::vector<MonitorElement*> nhits_vs_eta,
214 
215 
216  //---- second set of histograms (originally not used by the SeedGenerator)
217  //1D
219 
220  //2D
221  std::vector<MonitorElement*> chi2_vs_nhits, etares_vs_eta;
222  std::vector<MonitorElement*> h_ptshifteta;
223  std::vector<MonitorElement*> ptres_vs_phi, chi2_vs_phi, nhits_vs_phi, phires_vs_phi;
224 
225  //Profile2D
226  std::vector<MonitorElement*> ptmean_vs_eta_phi, phimean_vs_eta_phi;
227 
228  //assoc chi2
229  std::vector<MonitorElement*> h_assochi2, h_assochi2_prob;
230 
231  //chi2 and # lost hits vs eta: to be used with doProfileX
232  std::vector<MonitorElement*> chi2_vs_eta, nlosthits_vs_eta;
233 
234  //resolution of track params: to be used with fitslicesytool
237 
238  //pulls of track params vs eta: to be used with fitslicesytool
240  std::vector<MonitorElement*> ptpull_vs_phi, phipull_vs_phi, thetapull_vs_phi;
241 };
242 
243 #endif
std::vector< MonitorElement * > h_looperhit
std::vector< MonitorElement * > h_simul2_dzpvcut
std::vector< MonitorElement * > h_assoc2hit
std::vector< MonitorElement * > h_pileupdxypv
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > h_looperzpos
std::vector< MonitorElement * > h_assoc2_itpu_sig_vertcount
std::vector< MonitorElement * > h_assochit
void bookSimTrackPVAssociationHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_fakes
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsPt
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > h_looperpT
std::vector< MonitorElement * > h_pullDz
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_assoc_dzpvsigcut_pt
std::vector< MonitorElement * > h_misidlayer
std::vector< MonitorElement * > ptpull_vs_phi
void bookRecoPVAssociationHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_looperchi2
std::vector< MonitorElement * > h_assoczpos
std::vector< MonitorElement * > nPXFhits_vs_eta
std::vector< MonitorElement * > h_assoc2_ootpu_vertcount
std::vector< MonitorElement * > h_assoc2zpos
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsVTXR
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_looperpixellayer
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) ...
std::vector< MonitorElement * > h_simul_dzpvsigcut
std::vector< MonitorElement * > h_pileuphit
std::vector< MonitorElement * > h_pileupdr
std::vector< MonitorElement * > nTEChits_vs_eta
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_hits
std::vector< MonitorElement * > nLayersWithMeas_vs_eta
std::vector< MonitorElement * > h_pullPhi
std::vector< MonitorElement * > phipull_vs_phi
std::vector< std::vector< MonitorElement * > > h_dedx_estim
std::vector< MonitorElement * > h_assoc_dzpvcut_pt
std::vector< MonitorElement * > nrec_vs_nsim
std::vector< MonitorElement * > h_pileup_dzpvsigcut_pt
std::vector< MonitorElement * > h_pileuppT
std::vector< MonitorElement * > h_algo
std::vector< MonitorElement * > h_simul_dzpvcut_pt
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > h_recovertpos
std::vector< MonitorElement * > nTIDhits_vs_eta
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsVTXZ
void bookSimTrackHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > phires_vs_eta
std::vector< MonitorElement * > h_pullDxy
std::vector< MonitorElement * > h_assoc2phi
std::vector< MonitorElement * > h_nchi2
std::vector< MonitorElement * > h_assoc2pu
std::vector< MonitorElement * > h_misidchi2
std::vector< MonitorElement * > h_assoc2_dzpvcut
std::vector< MonitorElement * > h_looperdxy
std::vector< MonitorElement * > h_simuleta
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsPt
std::vector< MonitorElement * > h_assoc3Dlayer
std::vector< MonitorElement * > h_looper3Dlayer
std::vector< MonitorElement * > h_simul2_dzpvsigcut_pt
std::vector< MonitorElement * > h_reco_dzpvcut
std::vector< MonitorElement * > h_assoc2_itpu_vertcount
std::vector< MonitorElement * > h_reco3Dlayer
std::vector< MonitorElement * > h_loopervertpos
std::vector< MonitorElement * > h_looperdr
std::vector< MonitorElement * > h_pileupchi2
void fill_trackBased_histos(int count, int assTracks, int numRecoTracks, int numSimTracks)
std::vector< MonitorElement * > h_assoc2dz
std::vector< MonitorElement * > chi2_vs_phi
std::vector< MonitorElement * > h_assocdzpv
std::vector< MonitorElement * > h_assocphi
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > phires_vs_phi
MTVHistoProducerAlgoForTracker(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
std::vector< MonitorElement * > dzres_vs_eta
std::vector< MonitorElement * > h_misideta
std::vector< MonitorElement * > nlosthits_vs_eta
std::vector< MonitorElement * > nSTRIPlayersWith1dMeas_vs_eta
std::vector< MonitorElement * > h_recohit
std::vector< MonitorElement * > h_simul2_dzpvcut_pt
math::XYZPointD Point
point in the space
std::vector< MonitorElement * > h_looperlayer
std::vector< MonitorElement * > phires_vs_pt
void fill_seed_histos(int count, int seedsFitFailed, int seedsTotal)
std::vector< MonitorElement * > h_assoc2_dzpvsigcut
std::vector< MonitorElement * > h_assoc2_itpu_eta
void fill_generic_recoTrack_histos(int count, const reco::Track &track, const math::XYZPoint &bsPosition, const math::XYZPoint *pvPosition, bool isMatched, bool isSigMatched, bool isChargeMatched, int numAssocRecoTracks, int numVertices, int nSimHits, double sharedFraction, double dR)
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_assoc2layer
std::vector< MonitorElement * > h_assoc23Dlayer
std::vector< MonitorElement * > nPXBhits_vs_eta
std::vector< std::vector< MonitorElement * > > h_dedx_sat
std::vector< MonitorElement * > h_looperpu
std::vector< MonitorElement * > h_assoc2dxypv
std::vector< MonitorElement * > h_assoc2dxy
std::vector< MonitorElement * > h_pullQoverp
std::vector< MonitorElement * > h_simulpu
std::vector< MonitorElement * > h_assoc2chi2
std::vector< MonitorElement * > h_simuldzpv
std::vector< MonitorElement * > h_simuldr
std::vector< MonitorElement * > h_misidhit
std::vector< MonitorElement * > nSTRIPlayersWithMeas_vs_eta
std::vector< MonitorElement * > h_pileup_dzpvcut_pt
std::vector< MonitorElement * > h_reco_dzpvcut_pt
std::vector< MonitorElement * > h_assoc2eta_sig
void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, double dxyPV, double dzPV, int nSimHits, int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers, const reco::Track *track, int numVertices, double dR, const math::XYZPoint *pvPosition)
std::vector< MonitorElement * > nTOBhits_vs_eta
std::vector< MonitorElement * > ptpull_vs_eta
std::vector< MonitorElement * > etares_vs_eta
std::unique_ptr< GenParticleCustomSelector > GpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_recozpos
std::vector< MonitorElement * > h_recophi
std::vector< MonitorElement * > h_assocpT
std::unique_ptr< TrackingParticleSelector > generalTpSelector
std::vector< MonitorElement * > h_seedsFitFailedFraction
std::vector< MonitorElement * > nSTRIPlayersWith2dMeas_vs_eta
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > nhits_vs_phi
std::vector< MonitorElement * > h_assoc2pixellayer
std::vector< MonitorElement * > h_misid3Dlayer
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 * > phimean_vs_eta_phi
std::vector< MonitorElement * > h_looperdxypv
std::vector< MonitorElement * > h_charge
std::vector< MonitorElement * > h_misidpu
std::vector< MonitorElement * > h_reco_ootpu_eta
std::vector< MonitorElement * > h_loopereta
std::vector< MonitorElement * > h_misiddz
std::vector< MonitorElement * > h_pileupvertpos
std::vector< MonitorElement * > h_simullayer
std::vector< MonitorElement * > h_assoc2_ootpu_eta
std::vector< MonitorElement * > h_pileupphi
std::vector< MonitorElement * > chi2_vs_nhits
std::vector< MonitorElement * > h_recodr
std::vector< MonitorElement * > h_assoc2vertpos
std::vector< MonitorElement * > dzpull_vs_eta
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > h_misiddxy
std::vector< MonitorElement * > h_seedsFitFailed
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< MonitorElement * > h_recolayer
std::vector< MonitorElement * > h_assoc2_dzpvsigcut_pt
std::vector< MonitorElement * > h_simulvertpos
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > h_simuldxypv
std::vector< MonitorElement * > h_reco_dzpvsigcut_pt
std::vector< MonitorElement * > h_simulpixellayer
std::vector< MonitorElement * > h_simul_dzpvcut
std::vector< MonitorElement * > h_recopu
std::vector< MonitorElement * > h_assoc_dzpvsigcut
std::vector< MonitorElement * > h_misidpT
std::vector< MonitorElement * > h_nmisslayers_outer
std::vector< MonitorElement * > nPXLlayersWithMeas_vs_eta
std::vector< MonitorElement * > h_misiddzpv
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > nTIBhits_vs_eta
void fill_generic_simTrack_histos(const TrackingParticle::Vector &, const TrackingParticle::Point &vertex, int bx)
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< MonitorElement * > h_simul_dzpvsigcut_pt
std::vector< MonitorElement * > h_eta
std::vector< MonitorElement * > h_pt
std::vector< MonitorElement * > cotThetares_vs_pt
std::vector< MonitorElement * > h_assoc2_itpu_sig_eta
std::vector< MonitorElement * > h_recodzpv
std::vector< MonitorElement * > h_pileuppixellayer
std::vector< MonitorElement * > h_simulphi
std::vector< MonitorElement * > h_pileup_dzpvcut
void bookRecoHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_pullTheta
std::vector< MonitorElement * > h_looperdzpv
std::vector< MonitorElement * > ptmean_vs_eta_phi
std::vector< MonitorElement * > h_looperphi
std::unique_ptr< TrackingParticleSelector > TpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > h_recodxypv
std::vector< MonitorElement * > h_assoc2dr
std::vector< MonitorElement * > h_simul2_dzpvsigcut
std::vector< MonitorElement * > dxypull_vs_eta
void bookSeedHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > ptres_vs_eta
std::vector< MonitorElement * > h_con_vertcount
std::vector< MonitorElement * > phipull_vs_eta
std::vector< MonitorElement * > h_simulhit
std::vector< MonitorElement * > h_recopixellayer
std::vector< MonitorElement * > h_con_zpos
std::vector< MonitorElement * > h_pileup_dzpvsigcut
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > h_pileup3Dlayer
std::vector< MonitorElement * > h_looperdz
std::vector< MonitorElement * > h_pileupzpos
std::vector< MonitorElement * > h_misiddxypv
std::vector< MonitorElement * > h_assocdxy
std::vector< MonitorElement * > h_misidpixellayer
void bookRecodEdxHistos(DQMStore::IBooker &ibook)
Monte Carlo truth information used for tracking validation.
std::vector< MonitorElement * > h_pileuplayer
std::vector< MonitorElement * > cotThetares_vs_eta
std::vector< MonitorElement * > h_assocFraction
std::vector< MonitorElement * > h_reco_dzpvsigcut
std::vector< MonitorElement * > h_assoc2_dzpvcut_pt
void fill_dedx_recoTrack_histos(int count, const edm::RefToBase< reco::Track > &trackref, const std::vector< const edm::ValueMap< reco::DeDxData > * > &v_dEdx)
std::unique_ptr< GenParticleCustomSelector > generalGpSelector
std::vector< MonitorElement * > h_pileupdxy
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > ptres_vs_pt
std::vector< MonitorElement * > h_pileupdzpv
std::vector< MonitorElement * > h_pileupdz
math::XYZVectorD Vector
point in the space
std::vector< MonitorElement * > h_reco_ootpu_vertcount
std::vector< std::vector< MonitorElement * > > h_dedx_nom
std::vector< MonitorElement * > h_assoclayer
std::vector< MonitorElement * > h_recochi2
std::vector< MonitorElement * > h_assoceta
std::vector< MonitorElement * > ptres_vs_phi
std::vector< MonitorElement * > h_con_eta
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_simul3Dlayer
std::vector< MonitorElement * > nhits_vs_eta
std::vector< MonitorElement * > h_assoc2dzpv
std::vector< MonitorElement * > h_pileupeta
std::vector< MonitorElement * > h_simuldxy
std::vector< MonitorElement * > h_assocdr
std::vector< MonitorElement * > h_assocvertpos
std::vector< MonitorElement * > h_assocpixellayer
std::vector< MonitorElement * > h_recoeta
std::vector< MonitorElement * > thetapull_vs_eta
std::vector< MonitorElement * > h_assoc_dzpvcut
std::vector< MonitorElement * > chi2_vs_eta
void bookSimHistos(DQMStore::IBooker &ibook)
std::vector< MonitorElement * > h_assocdxypv
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< MonitorElement * > h_losthits
std::vector< MonitorElement * > h_assoc2eta
std::vector< MonitorElement * > h_misidphi
std::vector< MonitorElement * > dzres_vs_pt
std::vector< MonitorElement * > h_pileuppu