CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Attributes
TrackerValidationVariables Class Reference

#include <TrackerValidationVariables.h>

Classes

struct  AVHitStruct
 
struct  AVTrackStruct
 

Public Member Functions

void fillHitQuantities (const Trajectory *trajectory, std::vector< AVHitStruct > &v_avhitout)
 
void fillHitQuantities (const edm::Event &, std::vector< AVHitStruct > &v_avhitout)
 
void fillTrackQuantities (const edm::Event &, const edm::EventSetup &, std::vector< AVTrackStruct > &v_avtrackout)
 
 TrackerValidationVariables ()
 
 TrackerValidationVariables (const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
 
 ~TrackerValidationVariables ()
 

Private Attributes

edm::EDGetTokenT< std::vector
< Trajectory > > 
trajCollectionToken_
 
edm::EDGetTokenT
< TrajTrackAssociationCollection
trajTracksToken_
 

Detailed Description

Definition at line 20 of file TrackerValidationVariables.h.

Constructor & Destructor Documentation

TrackerValidationVariables::TrackerValidationVariables ( )

Definition at line 49 of file TrackerValidationVariables.cc.

50 {
51 
52 }
TrackerValidationVariables::TrackerValidationVariables ( const edm::ParameterSet config,
edm::ConsumesCollector &&  iC 
)
TrackerValidationVariables::~TrackerValidationVariables ( )

Definition at line 61 of file TrackerValidationVariables.cc.

62 {
63 
64 }

Member Function Documentation

void TrackerValidationVariables::fillHitQuantities ( const Trajectory trajectory,
std::vector< AVHitStruct > &  v_avhitout 
)

Definition at line 67 of file TrackerValidationVariables.cc.

References RadialStripTopology::angularWidth(), PV3DBase< T, PVType, FrameType >::barePhi(), funct::cos(), SiPixelRawToDigiRegional_cfi::deltaPhi, RadialStripTopology::detHeight(), TrackerValidationVariables::AVHitStruct::eta, PV3DBase< T, PVType, FrameType >::eta(), Exception, F(), TrajectoryStateOnSurface::globalDirection(), RectangularPlaneBounds::inside(), TrackerValidationVariables::AVHitStruct::inside, RectangularPlaneBounds::length(), TrackerValidationVariables::AVHitStruct::localAlpha, TrackerValidationVariables::AVHitStruct::localBeta, TrajectoryStateOnSurface::localDirection(), TrajectoryStateOnSurface::localError(), RadialStripTopology::localPosition(), TrajectoryStateOnSurface::localPosition(), RadialStripTopology::localStripLength(), TrackerValidationVariables::AVHitStruct::localX, TrackerValidationVariables::AVHitStruct::localXnorm, TrackerValidationVariables::AVHitStruct::localY, TrackerValidationVariables::AVHitStruct::localYnorm, RadialStripTopology::measurementError(), RadialStripTopology::measurementPosition(), Trajectory::measurements(), NULL, RadialStripTopology::originToIntersection(), PV3DBase< T, PVType, FrameType >::perp(), TrackerValidationVariables::AVHitStruct::phi, PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, LocalTrajectoryError::positionError(), funct::pow(), TrackerValidationVariables::AVHitStruct::rawDetId, DetId::rawId(), TrackerValidationVariables::AVHitStruct::resErrX, TrackerValidationVariables::AVHitStruct::resErrY, TrackerValidationVariables::AVHitStruct::resX, TrackerValidationVariables::AVHitStruct::resXatTrkY, TrackerValidationVariables::AVHitStruct::resXprime, TrackerValidationVariables::AVHitStruct::resXprimeErr, TrackerValidationVariables::AVHitStruct::resY, TrackerValidationVariables::AVHitStruct::resYprime, TrackerValidationVariables::AVHitStruct::resYprimeErr, funct::sin(), mathSSE::sqrt(), RadialStripTopology::stripAngle(), DetId::subdetId(), StripSubdetector::TEC, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Surface::toGlobal(), GeomDetType::topology(), DetId::Tracker, GeomDet::type(), MeasurementError::uu(), MeasurementError::vv(), RectangularPlaneBounds::width(), create_public_lumi_plots::width, PV2DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV2DBase< T, PVType, FrameType >::y(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by MonitorTrackResiduals::analyze(), fillHitQuantities(), and fillTrackQuantities().

68 {
69  TrajectoryStateCombiner tsoscomb;
70 
71  const std::vector<TrajectoryMeasurement> &tmColl = trajectory->measurements();
72  for(std::vector<TrajectoryMeasurement>::const_iterator itTraj = tmColl.begin();
73  itTraj != tmColl.end();
74  ++itTraj) {
75 
76  if (!itTraj->updatedState().isValid()) continue;
77 
78  TrajectoryStateOnSurface tsos = tsoscomb( itTraj->forwardPredictedState(), itTraj->backwardPredictedState() );
80 
81  if(!hit->isValid() || hit->geographicalId().det() != DetId::Tracker) continue;
82 
83  AVHitStruct hitStruct;
84  const DetId& hit_detId = hit->geographicalId();
85  unsigned int IntRawDetID = (hit_detId.rawId());
86  unsigned int IntSubDetID = (hit_detId.subdetId());
87 
88  if(IntSubDetID == 0) continue;
89 
90  //first calculate residuals in cartesian coordinates in the local module coordinate system
91 
92  LocalPoint lPHit = hit->localPosition();
93  LocalPoint lPTrk = tsos.localPosition();
94  LocalVector lVTrk = tsos.localDirection();
95 
96  hitStruct.localAlpha = atan2(lVTrk.x(), lVTrk.z()); // wrt. normal tg(alpha)=x/z
97  hitStruct.localBeta = atan2(lVTrk.y(), lVTrk.z()); // wrt. normal tg(beta)= y/z
98 
99  LocalError errHit = hit->localPositionError();
100  // no need to add APE to hitError anymore
101  // AlgebraicROOTObject<2>::SymMatrix mat = asSMatrix<2>(hit->parametersError());
102  // LocalError errHit = LocalError( mat(0,0),mat(0,1),mat(1,1) );
103  LocalError errTrk = tsos.localError().positionError();
104 
105  //check for negative error values: track error can have negative value, if matrix inversion fails (very rare case)
106  //hit error should always give positive values
107  if(errHit.xx()<0. || errHit.yy()<0. || errTrk.xx()<0. || errTrk.yy()<0.){
108  edm::LogError("TrackerValidationVariables") << "@SUB=TrackerValidationVariables::fillHitQuantities"
109  << "One of the squared error methods gives negative result"
110  << "\n\terrHit.xx()\terrHit.yy()\terrTrk.xx()\terrTrk.yy()"
111  << "\n\t" << errHit.xx()
112  << "\t" << errHit.yy()
113  << "\t" << errTrk.xx()
114  << "\t" << errTrk.yy();
115  continue;
116  }
117 
118  align::LocalVector res = lPTrk - lPHit;
119 
120  float resXErr = std::sqrt( errHit.xx() + errTrk.xx() );
121  float resYErr = std::sqrt( errHit.yy() + errTrk.yy() );
122 
123  hitStruct.resX = res.x();
124  hitStruct.resY = res.y();
125  hitStruct.resErrX = resXErr;
126  hitStruct.resErrY = resYErr;
127 
128  // hitStruct.localX = lPhit.x();
129  // hitStruct.localY = lPhit.y();
130  // EM: use predictions for local coordinates
131  hitStruct.localX = lPTrk.x();
132  hitStruct.localY = lPTrk.y();
133 
134  // now calculate residuals taking global orientation of modules and radial topology in TID/TEC into account
135  float resXprime(999.F), resYprime(999.F);
136  float resXatTrkY(999.F);
137  float resXprimeErr(999.F), resYprimeErr(999.F);
138 
139  if(hit->detUnit()){ // is it a single physical module?
140  const GeomDetUnit& detUnit = *(hit->detUnit());
141  float uOrientation(-999.F), vOrientation(-999.F);
142  float resXTopol(999.F), resYTopol(999.F);
143  float resXatTrkYTopol(999.F);
144 
145  const Surface& surface = hit->detUnit()->surface();
146  const BoundPlane& boundplane = hit->detUnit()->surface();
147  const Bounds& bound = boundplane.bounds();
148 
149  float length = 0;
150  float width = 0;
151 
152  LocalPoint lPModule(0.,0.,0.), lUDirection(1.,0.,0.), lVDirection(0.,1.,0.);
153  GlobalPoint gPModule = surface.toGlobal(lPModule),
154  gUDirection = surface.toGlobal(lUDirection),
155  gVDirection = surface.toGlobal(lVDirection);
156 
157  if (IntSubDetID == PixelSubdetector::PixelBarrel ||
158  IntSubDetID == StripSubdetector::TIB ||
159  IntSubDetID == StripSubdetector::TOB) {
160 
161  uOrientation = deltaPhi(gUDirection.barePhi(),gPModule.barePhi()) >= 0. ? +1.F : -1.F;
162  vOrientation = gVDirection.z() - gPModule.z() >= 0 ? +1.F : -1.F;
163  resXTopol = res.x();
164  resXatTrkYTopol = res.x();
165  resYTopol = res.y();
166  resXprimeErr = resXErr;
167  resYprimeErr = resYErr;
168 
169  const RectangularPlaneBounds *rectangularBound = dynamic_cast<const RectangularPlaneBounds*>(&bound);
170  if (rectangularBound!=NULL) {
171  hitStruct.inside = rectangularBound->inside(lPTrk);
172  length = rectangularBound->length();
173  width = rectangularBound->width();
174  hitStruct.localXnorm = 2*hitStruct.localX/width;
175  hitStruct.localYnorm = 2*hitStruct.localY/length;
176  } else {
177  throw cms::Exception("Geometry Error")
178  << "[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPB, TIB and TOB";
179  }
180 
181  } else if (IntSubDetID == PixelSubdetector::PixelEndcap) {
182 
183  uOrientation = gUDirection.perp() - gPModule.perp() >= 0 ? +1.F : -1.F;
184  vOrientation = deltaPhi(gVDirection.barePhi(),gPModule.barePhi()) >= 0. ? +1.F : -1.F;
185  resXTopol = res.x();
186  resXatTrkYTopol = res.x();
187  resYTopol = res.y();
188  resXprimeErr = resXErr;
189  resYprimeErr = resYErr;
190 
191  const RectangularPlaneBounds *rectangularBound = dynamic_cast<const RectangularPlaneBounds*>(&bound);
192  if (rectangularBound!=NULL) {
193  hitStruct.inside = rectangularBound->inside(lPTrk);
194  length = rectangularBound->length();
195  width = rectangularBound->width();
196  hitStruct.localXnorm = 2*hitStruct.localX/width;
197  hitStruct.localYnorm = 2*hitStruct.localY/length;
198  } else {
199  throw cms::Exception("Geometry Error")
200  << "[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPE";
201  }
202 
203  } else if (IntSubDetID == StripSubdetector::TID ||
204  IntSubDetID == StripSubdetector::TEC) {
205 
206  uOrientation = deltaPhi(gUDirection.barePhi(),gPModule.barePhi()) >= 0. ? +1.F : -1.F;
207  vOrientation = gVDirection.perp() - gPModule.perp() >= 0. ? +1.F : -1.F;
208 
209  if (!dynamic_cast<const RadialStripTopology*>(&detUnit.type().topology()))continue;
210  const RadialStripTopology& topol = dynamic_cast<const RadialStripTopology&>(detUnit.type().topology());
211 
212  MeasurementPoint measHitPos = topol.measurementPosition(lPHit);
213  MeasurementPoint measTrkPos = topol.measurementPosition(lPTrk);
214 
215  MeasurementError measHitErr = topol.measurementError(lPHit,errHit);
216  MeasurementError measTrkErr = topol.measurementError(lPTrk,errTrk);
217 
218  if (measHitErr.uu()<0. ||
219  measHitErr.vv()<0. ||
220  measTrkErr.uu()<0. ||
221  measTrkErr.vv()<0.){
222  edm::LogError("TrackerValidationVariables") << "@SUB=TrackerValidationVariables::fillHitQuantities"
223  << "One of the squared error methods gives negative result"
224  << "\n\tmeasHitErr.uu()\tmeasHitErr.vv()\tmeasTrkErr.uu()\tmeasTrkErr.vv()"
225  << "\n\t" << measHitErr.uu()
226  << "\t" << measHitErr.vv()
227  << "\t" << measTrkErr.uu()
228  << "\t" << measTrkErr.vv();
229  continue;
230  }
231 
232  float localStripLengthHit = topol.localStripLength(lPHit);
233  float localStripLengthTrk = topol.localStripLength(lPTrk);
234  float phiHit = topol.stripAngle(measHitPos.x());
235  float phiTrk = topol.stripAngle(measTrkPos.x());
236  float r_0 = topol.originToIntersection();
237 
238  resXTopol = (phiTrk-phiHit)*r_0;
239 // resXTopol = (tan(phiTrk)-tan(phiHit))*r_0;
240 
241  LocalPoint LocalHitPosCor= topol.localPosition(MeasurementPoint(measHitPos.x(), measTrkPos.y()));
242  resXatTrkYTopol = lPTrk.x() - LocalHitPosCor.x();
243 
244 
245  //resYTopol = measTrkPos.y()*localStripLengthTrk - measHitPos.y()*localStripLengthHit;
246  float cosPhiHit(cos(phiHit)), cosPhiTrk(cos(phiTrk)),
247  sinPhiHit(sin(phiHit)), sinPhiTrk(sin(phiTrk));
248  float l_0 = r_0 - topol.detHeight()/2;
249  resYTopol = measTrkPos.y()*localStripLengthTrk - measHitPos.y()*localStripLengthHit + l_0*(1/cosPhiTrk - 1/cosPhiHit);
250 
251  resXprimeErr = std::sqrt(measHitErr.uu()+measTrkErr.uu())*topol.angularWidth()*r_0;
252  //resYprimeErr = std::sqrt(measHitErr.vv()*localStripLengthHit*localStripLengthHit + measTrkErr.vv()*localStripLengthTrk*localStripLengthTrk);
253  float helpSummand = l_0*l_0*topol.angularWidth()*topol.angularWidth()*(sinPhiHit*sinPhiHit/pow(cosPhiHit,4)*measHitErr.uu()
254  + sinPhiTrk*sinPhiTrk/pow(cosPhiTrk,4)*measTrkErr.uu() );
255  resYprimeErr = std::sqrt(measHitErr.vv()*localStripLengthHit*localStripLengthHit
256  + measTrkErr.vv()*localStripLengthTrk*localStripLengthTrk + helpSummand );
257 
258 
259  const TrapezoidalPlaneBounds *trapezoidalBound = dynamic_cast < const TrapezoidalPlaneBounds * >(& bound);
260  if (trapezoidalBound!=NULL) {
261  hitStruct.inside = trapezoidalBound->inside(lPTrk);
262  length = trapezoidalBound->length();
263  width = trapezoidalBound->width();
264  //float widthAtHalfLength = trapezoidalBound->widthAtHalfLength();
265 
266  // int yAxisOrientation=trapezoidalBound->yAxisOrientation();
267  // for trapezoidal shape modules, scale with as function of local y coordinate
268  // float widthAtlocalY=width-(1-yAxisOrientation*2*lPTrk.y()/length)*(width-widthAtHalfLength);
269  // hitStruct.localXnorm = 2*hitStruct.localX/widthAtlocalY;
270  hitStruct.localXnorm = 2*hitStruct.localX/width;
271  hitStruct.localYnorm = 2*hitStruct.localY/length;
272  } else {
273  throw cms::Exception("Geometry Error")
274  << "[TrackerValidationVariables] Cannot cast bounds to TrapezoidalPlaneBounds as expected for TID and TEC";
275  }
276 
277  } else {
278  edm::LogWarning("TrackerValidationVariables") << "@SUB=TrackerValidationVariables::fillHitQuantities"
279  << "No valid tracker subdetector " << IntSubDetID;
280  continue;
281  }
282 
283  resXprime = resXTopol*uOrientation;
284  resXatTrkY = resXatTrkYTopol;
285  resYprime = resYTopol*vOrientation;
286 
287  } else { // not a detUnit, so must be a virtual 2D-Module
288  // FIXME: at present only for det units residuals are calculated and filled in the hitStruct
289  // But in principle this method should also be useable for the gluedDets (2D modules in TIB, TID, TOB, TEC)
290  // In this case, only orientation should be taken into account for primeResiduals, but not the radial topology
291  // At present, default values (999.F) are given out
292  }
293 
294  hitStruct.resXprime = resXprime;
295  hitStruct.resXatTrkY = resXatTrkY;
296  hitStruct.resYprime = resYprime;
297  hitStruct.resXprimeErr = resXprimeErr;
298  hitStruct.resYprimeErr = resYprimeErr;
299 
300  hitStruct.rawDetId = IntRawDetID;
301  hitStruct.phi = tsos.globalDirection().phi();
302  hitStruct.eta = tsos.globalDirection().eta();
303 
304  v_avhitout.push_back(hitStruct);
305  }
306 }
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
Definition: Surface.h:106
float xx() const
Definition: LocalError.h:24
float vv() const
T y() const
Definition: PV2DBase.h:46
T perp() const
Definition: PV3DBase.h:72
virtual float localStripLength(const LocalPoint &) const =0
virtual const GeomDetType & type() const
Definition: GeomDet.cc:90
LocalVector localDirection() const
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
T y() const
Definition: PV3DBase.h:63
#define NULL
Definition: scimark2.h:8
virtual LocalPoint localPosition(float strip) const =0
virtual float detHeight() const =0
LocalError positionError() const
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
T barePhi() const
Definition: PV3DBase.h:68
virtual bool inside(const Local2DPoint &p) const
DataContainer const & measurements() const
Definition: Trajectory.h:250
virtual bool inside(const Local2DPoint &p) const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
float yy() const
Definition: LocalError.h:26
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
T sqrt(T t)
Definition: SSEVec.h:18
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float uu() const
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual float angularWidth() const =0
const LocalTrajectoryError & localError() const
virtual float width() const
Width along local X.
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
virtual float stripAngle(float strip) const =0
Definition: DetId.h:18
virtual float originToIntersection() const =0
virtual const Topology & topology() const =0
T eta() const
Definition: PV3DBase.h:76
virtual float length() const
Lenght along local Y.
Definition: Bounds.h:22
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:281
T x() const
Definition: PV2DBase.h:45
T x() const
Definition: PV3DBase.h:62
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
GlobalVector globalDirection() const
void TrackerValidationVariables::fillHitQuantities ( const edm::Event event,
std::vector< AVHitStruct > &  v_avhitout 
)

Definition at line 359 of file TrackerValidationVariables.cc.

References fillHitQuantities(), LogDebug, and trajCollectionToken_.

360 {
361  edm::Handle<std::vector<Trajectory> > trajCollectionHandle;
362  event.getByToken(trajCollectionToken_, trajCollectionHandle);
363 
364  LogDebug("TrackerValidationVariables") << "trajColl->size(): " << trajCollectionHandle->size() ;
365 
366  for (std::vector<Trajectory>::const_iterator it = trajCollectionHandle->begin(), itEnd = trajCollectionHandle->end();
367  it!=itEnd;
368  ++it) {
369 
370  fillHitQuantities(&(*it), v_avhitout);
371  }
372 }
#define LogDebug(id)
void fillHitQuantities(const Trajectory *trajectory, std::vector< AVHitStruct > &v_avhitout)
edm::EDGetTokenT< std::vector< Trajectory > > trajCollectionToken_
void TrackerValidationVariables::fillTrackQuantities ( const edm::Event event,
const edm::EventSetup eventSetup,
std::vector< AVTrackStruct > &  v_avtrackout 
)

Definition at line 309 of file TrackerValidationVariables.cc.

References TrackerValidationVariables::AVTrackStruct::charge, reco::TrackBase::charge(), TrackerValidationVariables::AVTrackStruct::chi2, reco::TrackBase::chi2(), TrackerValidationVariables::AVTrackStruct::chi2Prob, edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, TrackerValidationVariables::AVTrackStruct::d0, reco::TrackBase::d0(), TrackerValidationVariables::AVTrackStruct::dz, reco::TrackBase::dz(), TrackerValidationVariables::AVTrackStruct::eta, reco::TrackBase::eta(), fillHitQuantities(), edm::EventSetup::get(), TrackerValidationVariables::AVTrackStruct::hits, TrackerValidationVariables::AVTrackStruct::kappa, LogDebug, HLT_FULL_cff::magneticField, reco::TrackBase::ndof(), reco::TrackBase::normalizedChi2(), TrackerValidationVariables::AVTrackStruct::normchi2, TrackerValidationVariables::AVTrackStruct::numberOfLostHits, reco::TrackBase::numberOfLostHits(), TrackerValidationVariables::AVTrackStruct::numberOfValidHits, reco::TrackBase::numberOfValidHits(), TrackerValidationVariables::AVTrackStruct::p, reco::TrackBase::p(), TrackerValidationVariables::AVTrackStruct::phi, reco::TrackBase::phi(), TrackerValidationVariables::AVTrackStruct::pt, reco::TrackBase::pt(), TrackerValidationVariables::AVTrackStruct::ptError, reco::TrackBase::ptError(), TrackerValidationVariables::AVTrackStruct::px, reco::TrackBase::px(), TrackerValidationVariables::AVTrackStruct::py, reco::TrackBase::py(), TrackerValidationVariables::AVTrackStruct::pz, reco::TrackBase::pz(), trajTracksToken_, reco::TrackBase::vx(), reco::TrackBase::vy(), and reco::TrackBase::vz().

Referenced by TrackerOfflineValidation::analyze().

312 {
314  eventSetup.get<IdealMagneticFieldRecord>().get(magneticField);
315 
317  event.getByToken(trajTracksToken_, TrajTracksMap);
318  LogDebug("TrackerValidationVariables") << "TrajTrack collection size " << TrajTracksMap->size();
319 
320  const Trajectory* trajectory;
321  const reco::Track* track;
322 
323  for ( TrajTrackAssociationCollection::const_iterator iPair = TrajTracksMap->begin();
324  iPair != TrajTracksMap->end();
325  ++iPair) {
326 
327  trajectory = &(*(*iPair).key);
328  track = &(*(*iPair).val);
329 
330  AVTrackStruct trackStruct;
331 
332  trackStruct.p = track->p();
333  trackStruct.pt = track->pt();
334  trackStruct.ptError = track->ptError();
335  trackStruct.px = track->px();
336  trackStruct.py = track->py();
337  trackStruct.pz = track->pz();
338  trackStruct.eta = track->eta();
339  trackStruct.phi = track->phi();
340  trackStruct.chi2 = track->chi2();
341  trackStruct.chi2Prob= TMath::Prob(track->chi2(),track->ndof());
342  trackStruct.normchi2 = track->normalizedChi2();
343  GlobalPoint gPoint(track->vx(), track->vy(), track->vz());
344  double theLocalMagFieldInInverseGeV = magneticField->inInverseGeV(gPoint).z();
345  trackStruct.kappa = -track->charge()*theLocalMagFieldInInverseGeV/track->pt();
346  trackStruct.charge = track->charge();
347  trackStruct.d0 = track->d0();
348  trackStruct.dz = track->dz();
349  trackStruct.numberOfValidHits = track->numberOfValidHits();
350  trackStruct.numberOfLostHits = track->numberOfLostHits();
351 
352  fillHitQuantities(trajectory, trackStruct.hits);
353 
354  v_avtrackout.push_back(trackStruct);
355  }
356 }
#define LogDebug(id)
double p() const
momentum vector magnitude
Definition: TrackBase.h:610
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
Definition: TrackBase.h:592
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:556
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:640
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
Definition: TrackBase.h:821
tuple magneticField
void fillHitQuantities(const Trajectory *trajectory, std::vector< AVHitStruct > &v_avhitout)
double px() const
x coordinate of momentum vector
Definition: TrackBase.h:622
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:646
double chi2() const
chi-squared of the fit
Definition: TrackBase.h:544
double ndof() const
number of degrees of freedom of the fit
Definition: TrackBase.h:550
double pt() const
track transverse momentum
Definition: TrackBase.h:616
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
Definition: TrackBase.h:758
unsigned short numberOfValidHits() const
number of valid hits found
Definition: TrackBase.h:815
double pz() const
z coordinate of momentum vector
Definition: TrackBase.h:634
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:604
double vz() const
z coordinate of the reference point on track
Definition: TrackBase.h:664
edm::EDGetTokenT< TrajTrackAssociationCollection > trajTracksToken_
const T & get() const
Definition: EventSetup.h:56
double vy() const
y coordinate of the reference point on track
Definition: TrackBase.h:658
int charge() const
track electric charge
Definition: TrackBase.h:562
double py() const
y coordinate of momentum vector
Definition: TrackBase.h:628
double vx() const
x coordinate of the reference point on track
Definition: TrackBase.h:652

Member Data Documentation

edm::EDGetTokenT<std::vector<Trajectory> > TrackerValidationVariables::trajCollectionToken_
private

Definition at line 90 of file TrackerValidationVariables.h.

Referenced by fillHitQuantities(), and TrackerValidationVariables().

edm::EDGetTokenT<TrajTrackAssociationCollection> TrackerValidationVariables::trajTracksToken_
private

Definition at line 91 of file TrackerValidationVariables.h.

Referenced by fillTrackQuantities(), and TrackerValidationVariables().