71 const std::vector<TrajectoryMeasurement> &tmColl = trajectory->
measurements();
72 for(std::vector<TrajectoryMeasurement>::const_iterator itTraj = tmColl.begin();
73 itTraj != tmColl.end();
76 if (!itTraj->updatedState().isValid())
continue;
81 if(!hit->isValid() || hit->geographicalId().det() !=
DetId::Tracker)
continue;
84 const DetId& hit_detId = hit->geographicalId();
85 unsigned int IntRawDetID = (hit_detId.
rawId());
86 unsigned int IntSubDetID = (hit_detId.
subdetId());
88 if(IntSubDetID == 0)
continue;
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();
120 float resXErr =
std::sqrt( errHit.xx() + errTrk.
xx() );
121 float resYErr =
std::sqrt( errHit.yy() + errTrk.
yy() );
123 hitStruct.
resX = res.
x();
124 hitStruct.
resY = res.
y();
135 float resXprime(999.
F), resYprime(999.
F);
136 float resXatTrkY(999.
F);
137 float resXprimeErr(999.
F), resYprimeErr(999.
F);
141 float uOrientation(-999.
F), vOrientation(-999.
F);
142 float resXTopol(999.
F), resYTopol(999.
F);
143 float resXatTrkYTopol(999.
F);
145 const Surface& surface = hit->detUnit()->surface();
146 const BoundPlane& boundplane = hit->detUnit()->surface();
147 const Bounds& bound = boundplane.bounds();
152 LocalPoint lPModule(0.,0.,0.), lUDirection(1.,0.,0.), lVDirection(0.,1.,0.);
154 gUDirection = surface.
toGlobal(lUDirection),
155 gVDirection = surface.
toGlobal(lVDirection);
161 uOrientation =
deltaPhi(gUDirection.barePhi(),gPModule.
barePhi()) >= 0. ? +1.
F : -1.
F;
162 vOrientation = gVDirection.z() - gPModule.
z() >= 0 ? +1.F : -1.F;
164 resXatTrkYTopol = res.
x();
166 resXprimeErr = resXErr;
167 resYprimeErr = resYErr;
170 if (rectangularBound!=
NULL) {
172 length = rectangularBound->
length();
173 width = rectangularBound->
width();
178 <<
"[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPB, TIB and TOB";
183 uOrientation = gUDirection.perp() - gPModule.
perp() >= 0 ? +1.F : -1.F;
184 vOrientation =
deltaPhi(gVDirection.barePhi(),gPModule.
barePhi()) >= 0. ? +1.
F : -1.
F;
186 resXatTrkYTopol = res.
x();
188 resXprimeErr = resXErr;
189 resYprimeErr = resYErr;
192 if (rectangularBound!=
NULL) {
194 length = rectangularBound->
length();
195 width = rectangularBound->
width();
200 <<
"[TrackerValidationVariables] Cannot cast bounds to RectangularPlaneBounds as expected for TPE";
206 uOrientation =
deltaPhi(gUDirection.barePhi(),gPModule.
barePhi()) >= 0. ? +1.
F : -1.
F;
207 vOrientation = gVDirection.perp() - gPModule.
perp() >= 0. ? +1.F : -1.F;
209 if (!dynamic_cast<const RadialStripTopology*>(&detUnit.
type().
topology()))
continue;
218 if (measHitErr.
uu()<0. ||
219 measHitErr.
vv()<0. ||
220 measTrkErr.
uu()<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();
238 resXTopol = (phiTrk-phiHit)*r_0;
242 resXatTrkYTopol = lPTrk.
x() - LocalHitPosCor.
x();
246 float cosPhiHit(
cos(phiHit)), cosPhiTrk(
cos(phiTrk)),
247 sinPhiHit(
sin(phiHit)), sinPhiTrk(
sin(phiTrk));
249 resYTopol = measTrkPos.
y()*localStripLengthTrk - measHitPos.
y()*localStripLengthHit + l_0*(1/cosPhiTrk - 1/cosPhiHit);
254 + sinPhiTrk*sinPhiTrk/
pow(cosPhiTrk,4)*measTrkErr.
uu() );
255 resYprimeErr =
std::sqrt(measHitErr.
vv()*localStripLengthHit*localStripLengthHit
256 + measTrkErr.
vv()*localStripLengthTrk*localStripLengthTrk + helpSummand );
260 if (trapezoidalBound!=
NULL) {
261 hitStruct.
inside = trapezoidalBound->inside(lPTrk);
262 length = trapezoidalBound->length();
263 width = trapezoidalBound->width();
274 <<
"[TrackerValidationVariables] Cannot cast bounds to TrapezoidalPlaneBounds as expected for TID and TEC";
278 edm::LogWarning(
"TrackerValidationVariables") <<
"@SUB=TrackerValidationVariables::fillHitQuantities"
279 <<
"No valid tracker subdetector " << IntSubDetID;
283 resXprime = resXTopol*uOrientation;
284 resXatTrkY = resXatTrkYTopol;
285 resYprime = resYTopol*vOrientation;
304 v_avhitout.push_back(hitStruct);
311 std::vector<AVTrackStruct> & v_avtrackout)
318 LogDebug(
"TrackerValidationVariables") <<
"TrajTrack collection size " << TrajTracksMap->size();
324 iPair != TrajTracksMap->end();
327 trajectory = &(*(*iPair).key);
328 track = &(*(*iPair).val);
332 trackStruct.
p = track->
p();
333 trackStruct.
pt = track->
pt();
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();
344 double theLocalMagFieldInInverseGeV = magneticField->inInverseGeV(gPoint).z();
345 trackStruct.
kappa = -track->
charge()*theLocalMagFieldInInverseGeV/track->
pt();
347 trackStruct.
d0 = track->
d0();
348 trackStruct.
dz = track->
dz();
354 v_avtrackout.push_back(trackStruct);
364 LogDebug(
"TrackerValidationVariables") <<
"trajColl->size(): " << trajCollectionHandle->size() ;
366 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)
virtual const GeomDetType & type() const
friend struct const_iterator
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
virtual float detHeight() const =0
std::vector< AVHitStruct > hits
LocalError positionError() const
uint32_t rawId() const
get the raw id
virtual bool inside(const Local2DPoint &p) const
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
double chi2() const
chi-squared of the fit
edm::EDGetTokenT< std::vector< Trajectory > > trajCollectionToken_
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 float width() const
Width along local X.
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 &, const edm::EventSetup &, std::vector< AVTrackStruct > &v_avtrackout)
edm::EDGetTokenT< TrajTrackAssociationCollection > trajTracksToken_
virtual float originToIntersection() const =0
virtual const Topology & topology() const =0
double vy() const
y coordinate of the reference point on track
virtual float length() const
Lenght along local Y.
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