CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ShortenedTrackValidation::trackComparator Class Reference

Public Member Functions

void book (const TFileDirectory &fs)
 
void fill (const reco::Track &tk1, const reco::Track &tk2)
 
 trackComparator ()
 
 ~trackComparator ()=default
 

Private Attributes

TH2D * h2_Charge
 
TH2D * h2_chi2ndof
 
TH2D * h2_d0
 
TH2D * h2_dz
 
TH2D * h2_Eta
 
TH2D * h2_nHit
 
TH2D * h2_nhpxb
 
TH2D * h2_nhpxe
 
TH2D * h2_nhTEC
 
TH2D * h2_nhTIB
 
TH2D * h2_nhTID
 
TH2D * h2_nhTOB
 
TH2D * h2_P
 
TH2D * h2_Phi
 
TH2D * h2_Pt
 
TH2D * h2_QoverPZoom
 
TH2D * h2_trkAlgo
 
TH2D * h2_trkOriAlgo
 
TH2D * h2_vx
 
TH2D * h2_vy
 
TH2D * h2_vz
 

Detailed Description

Definition at line 233 of file ShortenedTrackValidation.cc.

Constructor & Destructor Documentation

◆ trackComparator()

ShortenedTrackValidation::trackComparator::trackComparator ( )
inline

Definition at line 235 of file ShortenedTrackValidation.cc.

235 {}

◆ ~trackComparator()

ShortenedTrackValidation::trackComparator::~trackComparator ( )
default

Member Function Documentation

◆ book()

void ShortenedTrackValidation::trackComparator::book ( const TFileDirectory fs)
inline

Definition at line 239 of file ShortenedTrackValidation.cc.

References reco::TrackBase::algoSize, CREATE_HIST_2D, compareTotals::fs, h2_Charge, h2_chi2ndof, h2_d0, h2_dz, h2_Eta, h2_nHit, h2_nhpxb, h2_nhpxe, h2_nhTEC, h2_nhTIB, h2_nhTID, h2_nhTOB, h2_P, h2_Phi, h2_Pt, h2_QoverPZoom, h2_trkAlgo, h2_trkOriAlgo, h2_vx, h2_vy, h2_vz, and M_PI.

239  {
240  h2_chi2ndof = CREATE_HIST_2D(h2_chi2ndof, 100, 0.0, 10.0, fs);
242  h2_trkOriAlgo =
244  h2_P = CREATE_HIST_2D(h2_P, 100, 0.0, 200.0, fs);
245  h2_Pt = CREATE_HIST_2D(h2_Pt, 100, 0.0, 100.0, fs);
246  h2_nHit = CREATE_HIST_2D(h2_nHit, 50, -0.5, 49.5, fs);
247  h2_Charge = CREATE_HIST_2D(h2_Charge, 3, -1.5, 1.5, fs);
248  h2_QoverPZoom = CREATE_HIST_2D(h2_QoverPZoom, 100, -0.1, 0.1, fs);
249  h2_Eta = CREATE_HIST_2D(h2_Eta, 100, -3., 3., fs);
250  h2_Phi = CREATE_HIST_2D(h2_Phi, 100, -M_PI, M_PI, fs);
251  h2_vx = CREATE_HIST_2D(h2_vx, 100, -0.5, 0.5, fs);
252  h2_vy = CREATE_HIST_2D(h2_vy, 100, -0.5, 0.5, fs);
253  h2_vz = CREATE_HIST_2D(h2_vz, 100, -20.0, 20.0, fs);
254  h2_d0 = CREATE_HIST_2D(h2_d0, 100, -0.5, 0.5, fs);
255  h2_dz = CREATE_HIST_2D(h2_dz, 100, -20.0, 20.0, fs);
256  h2_nhpxb = CREATE_HIST_2D(h2_nhpxb, 10, -0.5, 9.5, fs);
257  h2_nhpxe = CREATE_HIST_2D(h2_nhpxe, 10, -0.5, 9.5, fs);
258  h2_nhTIB = CREATE_HIST_2D(h2_nhTIB, 20, -0.5, 19.5, fs);
259  h2_nhTID = CREATE_HIST_2D(h2_nhTID, 20, -0.5, 19.5, fs);
260  h2_nhTOB = CREATE_HIST_2D(h2_nhTOB, 20, -0.5, 19.5, fs);
261  h2_nhTEC = CREATE_HIST_2D(h2_nhTEC, 20, -0.5, 19.5, fs);
262  }
#define M_PI
#define CREATE_HIST_2D(varname, nbins, first, last, fs)

◆ fill()

void ShortenedTrackValidation::trackComparator::fill ( const reco::Track tk1,
const reco::Track tk2 
)
inline

Definition at line 265 of file ShortenedTrackValidation.cc.

References reco::TrackBase::algo(), reco::TrackBase::charge(), reco::TrackBase::d0(), reco::TrackBase::dz(), reco::TrackBase::eta(), h2_Charge, h2_chi2ndof, h2_d0, h2_dz, h2_Eta, h2_nHit, h2_nhpxb, h2_nhpxe, h2_nhTEC, h2_nhTIB, h2_nhTID, h2_nhTOB, h2_P, h2_Phi, h2_Pt, h2_QoverPZoom, h2_trkAlgo, h2_trkOriAlgo, h2_vx, h2_vy, h2_vz, reco::TrackBase::hitPattern(), reco::TrackBase::normalizedChi2(), reco::TrackBase::numberOfValidHits(), reco::HitPattern::numberOfValidPixelBarrelHits(), reco::HitPattern::numberOfValidPixelEndcapHits(), reco::HitPattern::numberOfValidStripTECHits(), reco::HitPattern::numberOfValidStripTIBHits(), reco::HitPattern::numberOfValidStripTIDHits(), reco::HitPattern::numberOfValidStripTOBHits(), reco::TrackBase::originalAlgo(), reco::TrackBase::p(), reco::TrackBase::phi(), reco::TrackBase::pt(), reco::TrackBase::qoverp(), reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

265  {
266  h2_chi2ndof->Fill(tk1.normalizedChi2(), tk2.normalizedChi2());
267  h2_trkAlgo->Fill(static_cast<float>(tk1.algo()), static_cast<float>(tk2.algo()));
268  h2_trkOriAlgo->Fill(static_cast<float>(tk1.originalAlgo()), static_cast<float>(tk2.originalAlgo()));
269  h2_P->Fill(tk1.p(), tk2.p());
270  h2_Pt->Fill(tk1.pt(), tk2.p());
271  h2_nHit->Fill(tk1.numberOfValidHits(), tk2.numberOfValidHits());
272  h2_Charge->Fill(tk1.charge(), tk2.charge());
273  h2_QoverPZoom->Fill(tk1.qoverp(), tk2.qoverp());
274  h2_Eta->Fill(tk1.eta(), tk2.eta());
275  h2_Phi->Fill(tk1.phi(), tk2.phi());
276  h2_vx->Fill(tk1.vx(), tk2.vx());
277  h2_vy->Fill(tk1.vy(), tk2.vy());
278  h2_vz->Fill(tk1.vz(), tk2.vz());
279  h2_d0->Fill(tk1.d0(), tk2.d0());
280  h2_dz->Fill(tk2.dz(), tk2.dz());
287  }
double qoverp() const
q / p
Definition: TrackBase.h:599
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:798
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:655
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
int numberOfValidStripTIBHits() const
Definition: HitPattern.h:847
int numberOfValidStripTECHits() const
Definition: HitPattern.h:859
double pt() const
track transverse momentum
Definition: TrackBase.h:637
TrackAlgorithm originalAlgo() const
Definition: TrackBase.h:548
int charge() const
track electric charge
Definition: TrackBase.h:596
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:661
int numberOfValidPixelEndcapHits() const
Definition: HitPattern.h:839
int numberOfValidStripTIDHits() const
Definition: HitPattern.h:851
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
TrackAlgorithm algo() const
Definition: TrackBase.h:547
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:611
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Definition: TrackBase.h:593
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
int numberOfValidPixelBarrelHits() const
Definition: HitPattern.h:835
int numberOfValidStripTOBHits() const
Definition: HitPattern.h:855

Member Data Documentation

◆ h2_Charge

TH2D* ShortenedTrackValidation::trackComparator::h2_Charge
private

Definition at line 296 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_chi2ndof

TH2D* ShortenedTrackValidation::trackComparator::h2_chi2ndof
private

Definition at line 290 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_d0

TH2D* ShortenedTrackValidation::trackComparator::h2_d0
private

Definition at line 303 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_dz

TH2D* ShortenedTrackValidation::trackComparator::h2_dz
private

Definition at line 304 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_Eta

TH2D* ShortenedTrackValidation::trackComparator::h2_Eta
private

Definition at line 298 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nHit

TH2D* ShortenedTrackValidation::trackComparator::h2_nHit
private

Definition at line 295 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhpxb

TH2D* ShortenedTrackValidation::trackComparator::h2_nhpxb
private

Definition at line 305 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhpxe

TH2D* ShortenedTrackValidation::trackComparator::h2_nhpxe
private

Definition at line 306 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhTEC

TH2D* ShortenedTrackValidation::trackComparator::h2_nhTEC
private

Definition at line 310 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhTIB

TH2D* ShortenedTrackValidation::trackComparator::h2_nhTIB
private

Definition at line 307 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhTID

TH2D* ShortenedTrackValidation::trackComparator::h2_nhTID
private

Definition at line 308 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_nhTOB

TH2D* ShortenedTrackValidation::trackComparator::h2_nhTOB
private

Definition at line 309 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_P

TH2D* ShortenedTrackValidation::trackComparator::h2_P
private

Definition at line 293 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_Phi

TH2D* ShortenedTrackValidation::trackComparator::h2_Phi
private

Definition at line 299 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_Pt

TH2D* ShortenedTrackValidation::trackComparator::h2_Pt
private

Definition at line 294 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_QoverPZoom

TH2D* ShortenedTrackValidation::trackComparator::h2_QoverPZoom
private

Definition at line 297 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_trkAlgo

TH2D* ShortenedTrackValidation::trackComparator::h2_trkAlgo
private

Definition at line 291 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_trkOriAlgo

TH2D* ShortenedTrackValidation::trackComparator::h2_trkOriAlgo
private

Definition at line 292 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_vx

TH2D* ShortenedTrackValidation::trackComparator::h2_vx
private

Definition at line 300 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_vy

TH2D* ShortenedTrackValidation::trackComparator::h2_vy
private

Definition at line 301 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().

◆ h2_vz

TH2D* ShortenedTrackValidation::trackComparator::h2_vz
private

Definition at line 302 of file ShortenedTrackValidation.cc.

Referenced by book(), and fill().