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 bookSimHistos(DQMStore::IBooker& ibook) override;
33  void bookSimTrackHistos(DQMStore::IBooker& ibook) override;
34  void bookRecoHistos(DQMStore::IBooker& ibook) override;
35  void bookRecodEdxHistos(DQMStore::IBooker& ibook) override;
36 
37 
39 
40 
42  const TrackingParticle& tp,
43  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
44  double dxy, double dz, int nSimHits,
45  int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers,
46  const reco::Track* track,
47  int numVertices,
48  double dR);
49 
51  const reco::GenParticle& tp,
52  const TrackingParticle::Vector& momentumTP, const TrackingParticle::Point& vertexTP,
53  double dxy, double dz, int nSimHits,
54  const reco::Track* track,
55  int numVertices);
56 
57  void fill_simTrackBased_histos(int count, int numSimTracks);
58 
59 
61  const reco::Track& track,
62  const math::XYZPoint& bsPosition,
63  bool isMatched,
64  bool isSigMatched,
65  bool isChargeMatched,
66  int numAssocRecoTracks,
67  int numVertices,
68  int nSimHits,
69  double sharedFraction,
70  double dR);
71 
72  void fill_dedx_recoTrack_histos(int count, const edm::RefToBase<reco::Track>& trackref, const std::vector< const 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  private:
91 
93  void getRecoMomentum (const reco::Track& track, double& pt, double& ptError,
94  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
95  double& phi, double& phiError ) const;
97  void getRecoMomentum (const reco::GsfTrack& gsfTrack, double& pt, double& ptError,
98  double& qoverp, double& qoverpError, double& lambda, double& lambdaError,
99  double& phi, double& phiError) const;
100 
101  double getEta(double eta);
102 
103  double getPt(double pt);
104 
105 
106  //private data members
113 
120 
121  double minEta, maxEta; int nintEta; bool useFabsEta;
122  double minPt, maxPt; int nintPt; bool useInvPt; bool useLogPt;
123  double minHit, maxHit; int nintHit;
124  double minPu, maxPu; int nintPu;
126  double minPhi, maxPhi; int nintPhi;
127  double minDxy, maxDxy; int nintDxy;
128  double minDz, maxDz; int nintDz;
130  double minZpos, maxZpos; int nintZpos;
131  double mindr, maxdr; int nintdr;
132  double minChi2, maxChi2; int nintChi2;
133  double minDeDx, maxDeDx; int nintDeDx;
136 
137  //
143 
144 
145  //sim
146  std::vector<MonitorElement*> h_ptSIM, h_etaSIM, h_tracksSIM, h_vertposSIM, h_bunchxSIM;
147 
148  //1D
149  std::vector<MonitorElement*> h_tracks, h_fakes, h_hits, h_charge, h_algo;;
150  std::vector<MonitorElement*> h_recoeta, h_assoceta, h_assoc2eta, h_simuleta, h_loopereta, h_misideta, h_pileupeta;
160 
161  std::vector<MonitorElement*> h_assocvertpos, h_simulvertpos, h_assoczpos, h_simulzpos;
162  std::vector<MonitorElement*> h_assocdr, h_assoc2dr, h_simuldr, h_recodr, h_pileupdr;
163  std::vector<MonitorElement*> h_recochi2, h_assoc2chi2, h_looperchi2, h_misidchi2, h_pileupchi2;
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_con_eta, h_con_vertcount, h_con_zpos;
170 
171 
172  // dE/dx
173  // in the future these might become an array
174  std::vector<std::vector<MonitorElement*>> h_dedx_estim;
175  std::vector<std::vector<MonitorElement*>> h_dedx_nom;
176  std::vector<std::vector<MonitorElement*>> h_dedx_sat;
177 
178  //2D
179  std::vector<MonitorElement*> nrec_vs_nsim;
180  std::vector<MonitorElement*> nrecHit_vs_nsimHit_sim2rec;
181  std::vector<MonitorElement*> nrecHit_vs_nsimHit_rec2sim;
182 
183  //assoc hits
184  std::vector<MonitorElement*> h_assocFraction, h_assocSharedHit;
185 
186  //#hit vs eta: to be used with doProfileX
187  std::vector<MonitorElement*> nhits_vs_eta,
193 
194 
195  //---- second set of histograms (originally not used by the SeedGenerator)
196  //1D
198 
199  //2D
200  std::vector<MonitorElement*> chi2_vs_nhits, etares_vs_eta;
201  std::vector<MonitorElement*> h_ptshifteta;
202  std::vector<MonitorElement*> ptres_vs_phi, chi2_vs_phi, nhits_vs_phi, phires_vs_phi;
203 
204  //Profile2D
205  std::vector<MonitorElement*> ptmean_vs_eta_phi, phimean_vs_eta_phi;
206 
207  //assoc chi2
208  std::vector<MonitorElement*> h_assochi2, h_assochi2_prob;
209 
210  //chi2 and # lost hits vs eta: to be used with doProfileX
211  std::vector<MonitorElement*> chi2_vs_eta, nlosthits_vs_eta;
212 
213  //resolution of track params: to be used with fitslicesytool
216 
217  //pulls of track params vs eta: to be used with fitslicesytool
219  std::vector<MonitorElement*> ptpull_vs_phi, phipull_vs_phi, thetapull_vs_phi;
220 };
221 
222 #endif
std::vector< MonitorElement * > h_looperhit
std::vector< MonitorElement * > h_assoc2hit
std::vector< MonitorElement * > h_recodxy
std::vector< MonitorElement * > h_assoc2_itpu_sig_vertcount
std::vector< MonitorElement * > h_assochit
std::vector< MonitorElement * > h_fakes
std::vector< MonitorElement * > h_nchi2_prob
std::vector< MonitorElement * > h_looperpT
std::vector< MonitorElement * > h_pullDz
std::vector< MonitorElement * > h_misidlayer
TrackingParticleSelector * TpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > ptpull_vs_phi
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_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) ...
GenParticleCustomSelector * GpSelectorForEfficiencyVsPhi
std::vector< MonitorElement * > h_pileuphit
std::vector< MonitorElement * > h_pileupdr
std::vector< MonitorElement * > nTEChits_vs_eta
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 * > nrec_vs_nsim
std::vector< MonitorElement * > h_pileuppT
std::vector< MonitorElement * > h_algo
std::vector< MonitorElement * > h_assocdz
std::vector< MonitorElement * > nTIDhits_vs_eta
std::vector< MonitorElement * > h_ptSIM
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
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > h_misidchi2
std::vector< MonitorElement * > h_vertposSIM
std::vector< MonitorElement * > h_looperdxy
std::vector< MonitorElement * > h_simuleta
std::vector< MonitorElement * > h_assoc3Dlayer
std::vector< MonitorElement * > h_looper3Dlayer
void fill_recoAssociated_simTrack_histos(int count, const TrackingParticle &tp, const TrackingParticle::Vector &momentumTP, const TrackingParticle::Point &vertexTP, double dxy, double dz, int nSimHits, int nSimLayers, int nSimPixelLayers, int nSimStripMonoAndStereoLayers, const reco::Track *track, int numVertices, double dR)
std::vector< MonitorElement * > h_assoc2_itpu_vertcount
std::vector< MonitorElement * > h_reco3Dlayer
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
void bookSimHistos(DQMStore::IBooker &ibook) override
std::vector< MonitorElement * > h_assocphi
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
GenParticleCustomSelector * GpSelectorForEfficiencyVsVTXZ
std::vector< MonitorElement * > nSTRIPlayersWith1dMeas_vs_eta
std::vector< MonitorElement * > h_recohit
math::XYZPointD Point
point in the space
std::vector< MonitorElement * > h_looperlayer
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_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_assoc2dxy
std::vector< MonitorElement * > h_pullQoverp
std::vector< MonitorElement * > h_simulpu
std::vector< MonitorElement * > h_assoc2chi2
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_assocpT
std::vector< MonitorElement * > nSTRIPlayersWith2dMeas_vs_eta
std::vector< MonitorElement * > h_tracks
std::vector< MonitorElement * > h_tracksSIM
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_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_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_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 * > dzpull_vs_eta
void bookSimTrackHistos(DQMStore::IBooker &ibook) override
std::vector< MonitorElement * > h_simuldz
std::vector< MonitorElement * > h_misiddxy
std::vector< MonitorElement * > h_bunchxSIM
void fill_simTrackBased_histos(int count, int numSimTracks)
void bookRecodEdxHistos(DQMStore::IBooker &ibook) override
std::vector< MonitorElement * > thetapull_vs_phi
std::vector< MonitorElement * > h_recolayer
TrackingParticleSelector * TpSelectorForEfficiencyVsPt
std::vector< MonitorElement * > h_simulvertpos
std::vector< MonitorElement * > dxyres_vs_eta
std::vector< MonitorElement * > h_simulpixellayer
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
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
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_pileuppixellayer
std::vector< MonitorElement * > h_etaSIM
std::vector< MonitorElement * > h_simulphi
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
static std::atomic< unsigned int > counter
std::vector< MonitorElement * > h_con_vertcount
GenParticleCustomSelector * generalGpSelector
std::vector< MonitorElement * > phipull_vs_eta
GenParticleCustomSelector * GpSelectorForEfficiencyVsPt
std::vector< MonitorElement * > h_simulhit
std::vector< MonitorElement * > h_recopixellayer
GenParticleCustomSelector * GpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_con_zpos
std::vector< MonitorElement * > h_recopT
std::vector< MonitorElement * > h_pileup3Dlayer
std::vector< MonitorElement * > h_looperdz
std::vector< MonitorElement * > h_assocdxy
std::vector< MonitorElement * > h_misidpixellayer
Monte Carlo truth information used for tracking validation.
std::vector< MonitorElement * > h_pileuplayer
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)
void fill_dedx_recoTrack_histos(int count, const edm::RefToBase< reco::Track > &trackref, const std::vector< const edm::ValueMap< reco::DeDxData > * > &v_dEdx)
GenParticleCustomSelector * GpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_pileupdxy
std::vector< MonitorElement * > h_recodz
std::vector< MonitorElement * > ptres_vs_pt
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
TrackingParticleSelector * TpSelectorForEfficiencyVsVTXR
std::vector< MonitorElement * > h_con_eta
std::vector< MonitorElement * > h_assocSharedHit
std::vector< MonitorElement * > h_simul3Dlayer
void bookRecoHistos(DQMStore::IBooker &ibook) override
std::vector< MonitorElement * > nhits_vs_eta
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 * > chi2_vs_eta
std::vector< MonitorElement * > dxyres_vs_pt
std::vector< MonitorElement * > h_losthits
TrackingParticleSelector * TpSelectorForEfficiencyVsEta
std::vector< MonitorElement * > h_assoc2eta
std::vector< MonitorElement * > h_misidphi
std::vector< MonitorElement * > dzres_vs_pt
std::vector< MonitorElement * > h_pileuppu