67 const std::vector<TrajectoryMeasurement> &tmColl = trajectory->
measurements();
68 for(std::vector<TrajectoryMeasurement>::const_iterator itTraj = tmColl.begin();
69 itTraj != tmColl.end();
72 if (!itTraj->updatedState().isValid())
continue;
77 if(!hit->isValid() || hit->geographicalId().det() !=
DetId::Tracker)
continue;
80 const DetId& hit_detId = hit->geographicalId();
81 unsigned int IntRawDetID = (hit_detId.
rawId());
82 unsigned int IntSubDetID = (hit_detId.
subdetId());
84 if(IntSubDetID == 0)
continue;
103 if(errHit.xx()<0. || errHit.yy()<0. || errTrk.
xx()<0. || errTrk.
yy()<0.){
104 edm::LogError(
"TrackerValidationVariables") <<
"@SUB=TrackerValidationVariables::fillHitQuantities"
105 <<
"One of the squared error methods gives negative result"
106 <<
"\n\terrHit.xx()\terrHit.yy()\terrTrk.xx()\terrTrk.yy()"
107 <<
"\n\t" << errHit.xx()
108 <<
"\t" << errHit.yy()
109 <<
"\t" << errTrk.
xx()
110 <<
"\t" << errTrk.
yy();
116 float resXErr =
std::sqrt( errHit.xx() + errTrk.
xx() );
117 float resYErr =
std::sqrt( errHit.yy() + errTrk.
yy() );
119 hitStruct.
resX = res.
x();
120 hitStruct.
resY = res.
y();
131 float resXprime(999.
F), resYprime(999.
F);
132 float resXatTrkY(999.
F);
133 float resXprimeErr(999.
F), resYprimeErr(999.
F);
137 float uOrientation(-999.
F), vOrientation(-999.
F);
138 float resXTopol(999.
F), resYTopol(999.
F);
139 float resXatTrkYTopol(999.
F);
141 const Surface& surface = hit->detUnit()->surface();
142 const BoundPlane& boundplane = hit->detUnit()->surface();
143 const Bounds& bound = boundplane.bounds();
148 LocalPoint lPModule(0.,0.,0.), lUDirection(1.,0.,0.), lVDirection(0.,1.,0.);
150 gUDirection = surface.
toGlobal(lUDirection),
151 gVDirection = surface.
toGlobal(lVDirection);
157 uOrientation =
deltaPhi(gUDirection.phi(),gPModule.
phi()) >= 0. ? +1.
F : -1.
F;
158 vOrientation = gVDirection.z() - gPModule.
z() >= 0 ? +1.F : -1.F;
160 resXatTrkYTopol = res.
x();
162 resXprimeErr = resXErr;
163 resYprimeErr = resYErr;
166 if (rectangularBound!=
NULL) {
167 hitStruct.
inside = rectangularBound->inside(lPTrk);
168 length = rectangularBound->length();
169 width = rectangularBound->width();
174 <<
"[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPB, TIB and TOB";
179 uOrientation = gUDirection.perp() - gPModule.
perp() >= 0 ? +1.F : -1.F;
180 vOrientation =
deltaPhi(gVDirection.phi(),gPModule.
phi()) >= 0. ? +1.
F : -1.
F;
182 resXatTrkYTopol = res.
x();
184 resXprimeErr = resXErr;
185 resYprimeErr = resYErr;
188 if (rectangularBound!=
NULL) {
189 hitStruct.
inside = rectangularBound->inside(lPTrk);
190 length = rectangularBound->length();
191 width = rectangularBound->width();
196 <<
"[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPE";
202 uOrientation =
deltaPhi(gUDirection.phi(),gPModule.
phi()) >= 0. ? +1.
F : -1.
F;
203 vOrientation = gVDirection.perp() - gPModule.
perp() >= 0. ? +1.F : -1.F;
205 if (!dynamic_cast<const RadialStripTopology*>(&detUnit.
type().
topology()))
continue;
214 if (measHitErr.
uu()<0. ||
215 measHitErr.
vv()<0. ||
216 measTrkErr.
uu()<0. ||
218 edm::LogError(
"TrackerValidationVariables") <<
"@SUB=TrackerValidationVariables::fillHitQuantities"
219 <<
"One of the squared error methods gives negative result"
220 <<
"\n\tmeasHitErr.uu()\tmeasHitErr.vv()\tmeasTrkErr.uu()\tmeasTrkErr.vv()"
221 <<
"\n\t" << measHitErr.
uu()
222 <<
"\t" << measHitErr.
vv()
223 <<
"\t" << measTrkErr.
uu()
224 <<
"\t" << measTrkErr.
vv();
234 resXTopol = (phiTrk-phiHit)*r_0;
238 resXatTrkYTopol = lPTrk.
x() - LocalHitPosCor.
x();
242 float cosPhiHit(
cos(phiHit)), cosPhiTrk(
cos(phiTrk)),
243 sinPhiHit(
sin(phiHit)), sinPhiTrk(
sin(phiTrk));
245 resYTopol = measTrkPos.
y()*localStripLengthTrk - measHitPos.
y()*localStripLengthHit + l_0*(1/cosPhiTrk - 1/cosPhiHit);
250 + sinPhiTrk*sinPhiTrk/
pow(cosPhiTrk,4)*measTrkErr.
uu() );
251 resYprimeErr =
std::sqrt(measHitErr.
vv()*localStripLengthHit*localStripLengthHit
252 + measTrkErr.
vv()*localStripLengthTrk*localStripLengthTrk + helpSummand );
256 if (trapezoidalBound!=
NULL) {
257 hitStruct.
inside = trapezoidalBound->inside(lPTrk);
258 length = trapezoidalBound->length();
259 width = trapezoidalBound->width();
270 <<
"[TrackerValidationVariables] Cannot cast bounds to TrapezoidalPlaneBounds as expected for TID and TEC";
274 edm::LogWarning(
"TrackerValidationVariables") <<
"@SUB=TrackerValidationVariables::fillHitQuantities"
275 <<
"No valid tracker subdetector " << IntSubDetID;
279 resXprime = resXTopol*uOrientation;
280 resXatTrkY = resXatTrkYTopol;
281 resYprime = resYTopol*vOrientation;
300 v_avhitout.push_back(hitStruct);
309 event.getByLabel(TrjTrackTag, TrajTracksMap);
310 LogDebug(
"TrackerValidationVariables") <<
"TrajTrack collection size " << TrajTracksMap->size();
316 iPair != TrajTracksMap->end();
319 trajectory = &(*(*iPair).key);
320 track = &(*(*iPair).val);
324 trackStruct.
p = track->
p();
325 trackStruct.
pt = track->
pt();
327 trackStruct.
px = track->
px();
328 trackStruct.
py = track->
py();
329 trackStruct.
pz = track->
pz();
330 trackStruct.
eta = track->
eta();
331 trackStruct.
phi = track->
phi();
336 double theLocalMagFieldInInverseGeV =
magneticField_->inInverseGeV(gPoint).z();
337 trackStruct.
kappa = -track->
charge()*theLocalMagFieldInInverseGeV/track->
pt();
339 trackStruct.
d0 = track->
d0();
340 trackStruct.
dz = track->
dz();
346 v_avtrackout.push_back(trackStruct);
356 LogDebug(
"TrackerValidationVariables") <<
"trajColl->size(): " << trajCollectionHandle->size() ;
358 for (std::vector<Trajectory>::const_iterator it = trajCollectionHandle->begin(), itEnd = trajCollectionHandle->end();
TrackerValidationVariables()
double p() const
momentum vector magnitude
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
virtual float localStripLength(const LocalPoint &) const =0
double d0() const
dxy parameter in perigee convention (d0 = - dxy)
friend struct const_iterator
edm::ESHandle< TrackerGeometry > tkGeom_
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
LocalVector localDirection() const
LocalPoint localPosition() const
Sin< T >::type sin(const T &t)
Geom::Phi< T > phi() const
double phi() const
azimuthal angle of momentum vector
unsigned short numberOfLostHits() const
number of cases where track crossed a layer without getting a hit.
void fillHitQuantities(const Trajectory *trajectory, std::vector< AVHitStruct > &v_avhitout)
virtual LocalPoint localPosition(float strip) const =0
double px() const
x coordinate of momentum vector
const edm::ParameterSet conf_
virtual float detHeight() const =0
std::vector< AVHitStruct > hits
LocalError positionError() const
uint32_t rawId() const
get the raw id
DataContainer const & measurements() const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
virtual MeasurementError measurementError(const LocalPoint &, const LocalError &) const =0
double eta() const
pseudorapidity of momentum vector
edm::ESHandle< MagneticField > magneticField_
double chi2() const
chi-squared of the fit
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
double ndof() const
number of degrees of freedom of the fit
double pt() const
track transverse momentum
Cos< T >::type cos(const T &t)
double ptError() const
error on Pt (set to 1000 TeV if charge==0 for safety)
~TrackerValidationVariables()
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual float angularWidth() const =0
unsigned short numberOfValidHits() const
number of valid hits found
const LocalTrajectoryError & localError() const
virtual const GeomDetType & type() const =0
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
double pz() const
z coordinate of momentum vector
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...
double vz() const
z coordinate of the reference point on track
virtual float stripAngle(float strip) const =0
void fillTrackQuantities(const edm::Event &, std::vector< AVTrackStruct > &v_avtrackout)
virtual float originToIntersection() const =0
virtual const Topology & topology() const =0
double vy() const
y coordinate of the reference point on track
int charge() const
track electric charge
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Power< A, B >::type pow(const A &a, const B &b)
double py() const
y coordinate of momentum vector
double vx() const
x coordinate of the reference point on track
GlobalVector globalDirection() const