|
|
#include <TrackDetectorAssociator.h>
|
TrackDetMatchInfo | associate (const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &) |
|
TrackDetMatchInfo | associate (const edm::Event &, const edm::EventSetup &, const GlobalVector &, const GlobalPoint &, const int, const AssociatorParameters &) |
| associate using 3-momentum, vertex and charge More...
|
|
TrackDetMatchInfo | associate (const edm::Event &, const edm::EventSetup &, const reco::Track &, const AssociatorParameters &, Direction direction=Any) |
| associate using reco::Track More...
|
|
TrackDetMatchInfo | associate (const edm::Event &, const edm::EventSetup &, const SimTrack &, const SimVertex &, const AssociatorParameters &) |
| associate using a simulated track More...
|
|
TrackDetMatchInfo | associate (const edm::Event &iEvent, const edm::EventSetup &iSetup, const AssociatorParameters ¶meters, const FreeTrajectoryState *innerState, const FreeTrajectoryState *outerState=nullptr) |
|
const CachedTrajectory & | getCachedTrajector () const |
| trajector information More...
|
|
void | setPropagator (const Propagator *) |
| use a user configured propagator More...
|
|
| TrackDetectorAssociator () |
|
void | useDefaultPropagator () |
| use the default propagator More...
|
|
| ~TrackDetectorAssociator () |
|
|
bool | addTAMuonSegmentMatch (TAMuonChamberMatch &, const RecSegment *, const AssociatorParameters &) |
|
void | fillCaloTowers (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillCaloTruth (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillEcal (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillHcal (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillHO (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillMuon (const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &) |
|
void | fillPreshower (const edm::Event &iEvent, TrackDetMatchInfo &info, const AssociatorParameters &) |
|
DetIdAssociator::MapRange | getMapRange (const std::pair< float, float > &delta, const float dR) |
|
math::XYZPoint | getPoint (const GlobalPoint &point) |
|
math::XYZPoint | getPoint (const LocalPoint &point) |
|
void | getTAMuonChamberMatches (std::vector< TAMuonChamberMatch > &matches, const AssociatorParameters ¶meters) |
|
math::XYZVector | getVector (const GlobalVector &vec) |
|
math::XYZVector | getVector (const LocalVector &vec) |
|
void | init (const edm::EventSetup &, const AssociatorParameters &) |
|
Definition at line 44 of file TrackDetectorAssociator.h.
◆ AssociatorParameters
◆ Direction
◆ TrackDetectorAssociator()
TrackDetectorAssociator::TrackDetectorAssociator |
( |
| ) |
|
|
explicit |
◆ ~TrackDetectorAssociator()
TrackDetectorAssociator::~TrackDetectorAssociator |
( |
| ) |
|
|
default |
◆ addTAMuonSegmentMatch()
Definition at line 791 of file TrackDetectorAssociator.cc.
801 LogTrace(
"TrackAssociator") <<
"Segment global position: " << segmentGlobalPosition
802 <<
" \t (R_xy,eta,phi): " << segmentGlobalPosition.
perp() <<
","
803 << segmentGlobalPosition.
eta() <<
"," << segmentGlobalPosition.
phi() <<
"\n";
805 LogTrace(
"TrackAssociator") <<
"\teta hit: " << segmentGlobalPosition.
eta()
807 <<
"\tphi hit: " << segmentGlobalPosition.
phi()
812 bool isDTWithoutY =
false;
813 const DTRecSegment4D* dtseg = dynamic_cast<const DTRecSegment4D*>(segment);
814 if (dtseg && (!dtseg->
hasZed()))
846 muonSegment.
hasZed =
true;
847 muonSegment.
hasPhi =
true;
850 muonSegment.
t0 = 0.f;
852 if ((dtseg->
hasPhi()) && (!isDTWithoutY)) {
861 LogTrace(
"TrackAssociator") <<
" Phi t0: " << dtseg->
phiSegment()->
t0() <<
" hits: " << phiHits;
875 muonSegment.
hasZed =
false;
877 muonSegment.
hasPhi =
false;
880 matchedChamber.
segments.push_back(muonSegment);
References funct::abs(), relativeConstraints::chamber, spr::deltaEta, reco::deltaPhi(), PV3DBase< T, PVType, FrameType >::eta(), f, TrajectoryStateOnSurface::freeState(), TrackingRecHit::geographicalId(), TAMuonSegmentMatch::hasPhi, DTRecSegment4D::hasPhi(), TAMuonSegmentMatch::hasZed, DTRecSegment4D::hasZed(), hfClusterShapes_cfi::hits, TAMuonChamberMatch::id, DTRecSegment2D::ist0Valid(), RecSegment::localDirection(), RecSegment::localDirectionError(), TrackingRecHit::localPosition(), TrackingRecHit::localPositionError(), LogTrace, M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), DTRecSegment4D::phiSegment(), FreeTrajectoryState::position(), DetId::rawId(), TAMuonSegmentMatch::segmentGlobalPosition, TAMuonSegmentMatch::segmentLocalDirection, TAMuonSegmentMatch::segmentLocalErrorDxDz, TAMuonSegmentMatch::segmentLocalErrorDyDz, TAMuonSegmentMatch::segmentLocalErrorXDxDz, TAMuonSegmentMatch::segmentLocalErrorXX, TAMuonSegmentMatch::segmentLocalErrorXY, TAMuonSegmentMatch::segmentLocalErrorYDyDz, TAMuonSegmentMatch::segmentLocalErrorYY, TAMuonSegmentMatch::segmentLocalPosition, TAMuonChamberMatch::segments, DTRecSegment2D::specificRecHits(), TAMuonSegmentMatch::t0, DTRecSegment2D::t0(), FrontierCondition_GT_autoExpress_cfi::t0, TAMuonChamberMatch::tState, LocalError::xx(), LocalError::xy(), and LocalError::yy().
◆ associate() [1/5]
propagate a track across the whole detector and find associated objects. Association is done in two modes 1) an object is associated to a track only if crossed by track 2) an object is associated to a track if it is withing an eta-phi cone of some radius with respect to a track. (the cone origin is at (0,0,0)) Trajectory bending in eta-phi is taking into account when matching is performed
associate using FreeTrajectoryState
Definition at line 110 of file TrackDetectorAssociator.cc.
References iEvent.
Referenced by BetaCalculatorECAL::addInfoToCandidate(), ValidIsoTrkCalib::analyze(), EopTreeWriter::analyze(), EcalCosmicsHists::analyze(), muonisolation::JetExtractor::deposit(), muonisolation::CaloExtractorByAssociator::deposits(), cms::MuonMETValueMapProducer::determine_deltax_deltay(), MuonIdProducer::fillMuonId(), InterestingTrackEcalDetIdProducer::produce(), HighPtTrackEcalDetIdProducer::produce(), and ReduceHcalRecHitCollectionProducer::produce().
◆ associate() [2/5]
◆ associate() [3/5]
associate using reco::Track
Definition at line 955 of file TrackDetectorAssociator.cc.
964 if (
track.extra().isNull()) {
966 throw cms::Exception(
"FatalError") <<
"No TrackExtra information is available and association is done with "
967 "something else than InsideOut track.\n"
968 <<
"Either change the parameter or provide needed data!\n";
969 LogTrace(
"TrackAssociator") <<
"Track Extras not found\n";
974 LogTrace(
"TrackAssociator") <<
"Track Extras found\n";
979 LogTrace(
"TrackAssociator") <<
"inner track state (rho, z, phi):" <<
track.innerPosition().Rho() <<
", "
980 <<
track.innerPosition().z() <<
", " <<
track.innerPosition().phi() <<
"\n";
981 LogTrace(
"TrackAssociator") <<
"innerFreeState (rho, z, phi):" << innerState.
position().
perp() <<
", "
984 LogTrace(
"TrackAssociator") <<
"outer track state (rho, z, phi):" <<
track.outerPosition().Rho() <<
", "
985 <<
track.outerPosition().z() <<
", " <<
track.outerPosition().phi() <<
"\n";
986 LogTrace(
"TrackAssociator") <<
"outerFreeState (rho, z, phi):" << outerState.
position().
perp() <<
", "
1005 switch (direction) {
1018 if (
track.innerPosition().Dot(
track.innerMomentum()) < 0 &&
1019 track.outerPosition().Dot(
track.outerMomentum()) < 0) {
1022 if (
track.innerPosition().Mag2() <
track.outerPosition().Mag2())
References funct::abs(), Calorimetry_cff::bField, Exception, edm::EventSetup::getData(), iEvent, trajectoryStateTransform::initialFreeState(), trajectoryStateTransform::innerFreeState(), LogTrace, trajectoryStateTransform::outerFreeState(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), mps_fire::result, HLT_FULL_cff::track, and PV3DBase< T, PVType, FrameType >::z().
◆ associate() [4/5]
◆ associate() [5/5]
associate using inner and outer most states of a track in the silicon tracker.
Definition at line 117 of file TrackDetectorAssociator.cc.
126 <<
"Configuration error! No subdetector was selected for the track association.";
129 info.stateAtIP = *innerState;
171 LogTrace(
"TrackAssociator") <<
"Using outerState as trackOrigin at Rho=" << outerState->
position().
perp()
172 <<
" Z=" << outerState->
position().
z() <<
"\n";
174 }
else if (innerState) {
175 LogTrace(
"TrackAssociator") <<
"Using innerState as trackOrigin at Rho=" << innerState->
position().
perp()
176 <<
" Z=" << innerState->
position().
z() <<
"\n";
181 if (trackOrigin.momentum().mag() == 0)
References funct::abs(), Exception, iEvent, info(), init, edm::isNotFinite(), LogTrace, PV3DBase< T, PVType, FrameType >::mag(), CosmicsPD_Skims::maxZ, HLT_FULL_cff::minR, CosmicGenFilterHelix_cff::minZ, SteppingHelixStateInfo::momentum(), or, PV3DBase< T, PVType, FrameType >::perp(), FreeTrajectoryState::position(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
◆ crossedIP()
bool TrackDetectorAssociator::crossedIP |
( |
const reco::Track & |
track | ) |
|
|
static |
◆ fillCaloTowers()
Definition at line 295 of file TrackDetectorAssociator.cc.
299 std::vector<GlobalPoint> trajectory;
302 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = ecalTrajectoryStates.begin();
303 itr != ecalTrajectoryStates.end();
305 trajectory.push_back(
itr->position());
306 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = hcalTrajectoryStates.begin();
307 itr != hcalTrajectoryStates.end();
309 trajectory.push_back(
itr->position());
311 if (trajectory.empty()) {
312 LogTrace(
"TrackAssociator") <<
"HCAL trajectory is empty; moving on\n";
313 info.isGoodCalo =
false;
316 info.isGoodCalo =
true;
322 throw cms::Exception(
"FatalError") <<
"Unable to find CaloTowers in event!\n";
324 std::set<DetId> caloTowerIdsInRegion;
325 if (
parameters.accountForTrajectoryChangeCalo) {
333 LogTrace(
"TrackAssociator") <<
"Towers in the region: " << caloTowerIdsInRegion.size();
335 auto caloTowerIdsInAConeBegin = caloTowerIdsInRegion.begin();
336 auto caloTowerIdsInAConeEnd = caloTowerIdsInRegion.end();
337 std::set<DetId> caloTowerIdsInAConeTmp;
339 caloTowerIdsInAConeTmp =
341 caloTowerIdsInAConeBegin = caloTowerIdsInAConeTmp.begin();
342 caloTowerIdsInAConeEnd = caloTowerIdsInAConeTmp.end();
344 LogTrace(
"TrackAssociator") <<
"Towers in the cone: "
345 <<
std::distance(caloTowerIdsInAConeBegin, caloTowerIdsInAConeEnd);
348 const std::vector<DetId>& crossedCaloTowerIds =
info.crossedTowerIds;
349 LogTrace(
"TrackAssociator") <<
"Towers crossed: " << crossedCaloTowerIds.size();
352 for (std::vector<DetId>::const_iterator
itr = crossedCaloTowerIds.begin();
itr != crossedCaloTowerIds.end();
itr++) {
354 if (
tower != (*caloTowers).end())
357 LogTrace(
"TrackAssociator") <<
"Crossed CaloTower is not found for DetId: " << (*itr).rawId();
360 for (std::set<DetId>::const_iterator
itr = caloTowerIdsInAConeBegin;
itr != caloTowerIdsInAConeEnd;
itr++) {
362 if (
tower != (*caloTowers).end())
365 LogTrace(
"TrackAssociator") <<
"CaloTower from the cone is not found for DetId: " << (*itr).rawId();
References eleHcalExtractorBlocks_cff::caloTowers, HLT_FULL_cff::distance, iEvent, info(), CachedTrajectory::IpToHcal, LogTrace, and hgcalTowerProducer_cfi::tower.
◆ fillCaloTruth()
◆ fillEcal()
Definition at line 221 of file TrackDetectorAssociator.cc.
226 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
227 itr != trajectoryStates.end();
229 LogTrace(
"TrackAssociator") <<
"ECAL trajectory point (rho, z, phi): " <<
itr->position().perp() <<
", "
230 <<
itr->position().z() <<
", " <<
itr->position().phi();
232 std::vector<GlobalPoint> coreTrajectory;
233 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
234 itr != trajectoryStates.end();
236 coreTrajectory.push_back(
itr->position());
238 if (coreTrajectory.empty()) {
239 LogTrace(
"TrackAssociator") <<
"ECAL track trajectory is empty; moving on\n";
240 info.isGoodEcal =
false;
243 info.isGoodEcal =
true;
249 throw cms::Exception(
"FatalError") <<
"Unable to find EBRecHitCollection in the event!\n";
254 throw cms::Exception(
"FatalError") <<
"Unable to find EERecHitCollection in event!\n";
256 std::set<DetId> ecalIdsInRegion;
257 if (
parameters.accountForTrajectoryChangeCalo) {
264 LogTrace(
"TrackAssociator") <<
"ECAL hits in the region: " << ecalIdsInRegion.size();
267 LogTrace(
"TrackAssociator") <<
"ECAL hits in the cone: " << ecalIdsInRegion.size();
269 const std::vector<DetId>& crossedEcalIds =
info.crossedEcalIds;
270 LogTrace(
"TrackAssociator") <<
"ECAL crossed hits " << crossedEcalIds.size();
273 for (std::vector<DetId>::const_iterator
itr = crossedEcalIds.begin();
itr != crossedEcalIds.end();
itr++) {
274 std::vector<EcalRecHit>::const_iterator ebHit = (*EBRecHits).find(*
itr);
275 std::vector<EcalRecHit>::const_iterator eeHit = (*EERecHits).find(*
itr);
276 if (ebHit != (*EBRecHits).end())
277 info.crossedEcalRecHits.push_back(&*ebHit);
278 else if (eeHit != (*EERecHits).end())
279 info.crossedEcalRecHits.push_back(&*eeHit);
281 LogTrace(
"TrackAssociator") <<
"Crossed EcalRecHit is not found for DetId: " <<
itr->rawId();
283 for (std::set<DetId>::const_iterator
itr = ecalIdsInRegion.begin();
itr != ecalIdsInRegion.end();
itr++) {
284 std::vector<EcalRecHit>::const_iterator ebHit = (*EBRecHits).find(*
itr);
285 std::vector<EcalRecHit>::const_iterator eeHit = (*EERecHits).find(*
itr);
286 if (ebHit != (*EBRecHits).end())
287 info.ecalRecHits.push_back(&*ebHit);
288 else if (eeHit != (*EERecHits).end())
289 info.ecalRecHits.push_back(&*eeHit);
291 LogTrace(
"TrackAssociator") <<
"EcalRecHit from the cone is not found for DetId: " <<
itr->rawId();
References filterRecHits_cfi::EBRecHits, filterRecHits_cfi::EERecHits, iEvent, info(), CachedTrajectory::IpToEcal, and LogTrace.
◆ fillHcal()
Definition at line 392 of file TrackDetectorAssociator.cc.
397 std::vector<GlobalPoint> coreTrajectory;
398 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
399 itr != trajectoryStates.end();
401 coreTrajectory.push_back(
itr->position());
403 if (coreTrajectory.empty()) {
404 LogTrace(
"TrackAssociator") <<
"HCAL trajectory is empty; moving on\n";
405 info.isGoodHcal =
false;
408 info.isGoodHcal =
true;
414 throw cms::Exception(
"FatalError") <<
"Unable to find HBHERecHits in event!\n";
416 std::set<DetId> idsInRegion;
417 if (
parameters.accountForTrajectoryChangeCalo) {
425 LogTrace(
"TrackAssociator") <<
"HCAL hits in the region: " << idsInRegion.size() <<
"\n"
428 auto idsInAConeBegin = idsInRegion.begin();
429 auto idsInAConeEnd = idsInRegion.end();
430 std::set<DetId> idsInAConeTmp;
433 idsInAConeBegin = idsInAConeTmp.begin();
434 idsInAConeEnd = idsInAConeTmp.end();
436 LogTrace(
"TrackAssociator") <<
"HCAL hits in the cone: " <<
std::distance(idsInAConeBegin, idsInAConeEnd) <<
"\n"
437 <<
DetIdInfo::info(std::set<DetId>(idsInAConeBegin, idsInAConeEnd),
nullptr);
439 const std::vector<DetId>& crossedIds =
info.crossedHcalIds;
440 LogTrace(
"TrackAssociator") <<
"HCAL hits crossed: " << crossedIds.size() <<
"\n"
444 for (std::vector<DetId>::const_iterator
itr = crossedIds.begin();
itr != crossedIds.end();
itr++) {
446 if (
hit != (*collection).end())
447 info.crossedHcalRecHits.push_back(&*
hit);
449 LogTrace(
"TrackAssociator") <<
"Crossed HBHERecHit is not found for DetId: " <<
itr->rawId();
451 for (std::set<DetId>::const_iterator
itr = idsInAConeBegin;
itr != idsInAConeEnd;
itr++) {
453 if (
hit != (*collection).end())
454 info.hcalRecHits.push_back(&*
hit);
456 LogTrace(
"TrackAssociator") <<
"HBHERecHit from the cone is not found for DetId: " <<
itr->rawId();
References universalConfigTemplate::collection, HLT_FULL_cff::distance, iEvent, DetIdInfo::info(), info(), CachedTrajectory::IpToHcal, and LogTrace.
◆ fillHO()
Definition at line 460 of file TrackDetectorAssociator.cc.
465 std::vector<GlobalPoint> coreTrajectory;
466 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
467 itr != trajectoryStates.end();
469 coreTrajectory.push_back(
itr->position());
471 if (coreTrajectory.empty()) {
472 LogTrace(
"TrackAssociator") <<
"HO trajectory is empty; moving on\n";
473 info.isGoodHO =
false;
476 info.isGoodHO =
true;
482 throw cms::Exception(
"FatalError") <<
"Unable to find HORecHits in event!\n";
484 std::set<DetId> idsInRegion;
485 if (
parameters.accountForTrajectoryChangeCalo) {
493 LogTrace(
"TrackAssociator") <<
"idsInRegion.size(): " << idsInRegion.size();
495 auto idsInAConeBegin = idsInRegion.begin();
496 auto idsInAConeEnd = idsInRegion.end();
497 std::set<DetId> idsInAConeTmp;
500 idsInAConeBegin = idsInAConeTmp.begin();
501 idsInAConeEnd = idsInAConeTmp.end();
503 LogTrace(
"TrackAssociator") <<
"idsInACone.size(): " <<
std::distance(idsInAConeBegin, idsInAConeEnd);
505 const std::vector<DetId>& crossedIds =
info.crossedHOIds;
508 for (std::vector<DetId>::const_iterator
itr = crossedIds.begin();
itr != crossedIds.end();
itr++) {
510 if (
hit != (*collection).end())
511 info.crossedHORecHits.push_back(&*
hit);
513 LogTrace(
"TrackAssociator") <<
"Crossed HORecHit is not found for DetId: " <<
itr->rawId();
516 for (std::set<DetId>::const_iterator
itr = idsInAConeBegin;
itr != idsInAConeEnd;
itr++) {
518 if (
hit != (*collection).end())
519 info.hoRecHits.push_back(&*
hit);
521 LogTrace(
"TrackAssociator") <<
"HORecHit from the cone is not found for DetId: " <<
itr->rawId();
References universalConfigTemplate::collection, HLT_FULL_cff::distance, iEvent, info(), CachedTrajectory::IpToHO, and LogTrace.
◆ fillMuon()
◆ fillPreshower()
Definition at line 369 of file TrackDetectorAssociator.cc.
372 std::vector<GlobalPoint> trajectory;
374 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
375 itr != trajectoryStates.end();
377 trajectory.push_back(
itr->position());
379 if (trajectory.empty()) {
380 LogTrace(
"TrackAssociator") <<
"Preshower trajectory is empty; moving on\n";
384 std::set<DetId> idsInRegion =
387 LogTrace(
"TrackAssociator") <<
"Number of Preshower Ids in the region: " << idsInRegion.size();
389 LogTrace(
"TrackAssociator") <<
"Number of Preshower Ids in crossed: " <<
info.crossedPreshowerIds.size();
References info(), and LogTrace.
◆ getCachedTrajector()
◆ getFreeTrajectoryState() [1/3]
◆ getFreeTrajectoryState() [2/3]
◆ getFreeTrajectoryState() [3/3]
◆ getMapRange()
Definition at line 572 of file TrackDetectorAssociator.cc.
582 if (
delta.second > 0)
586 LogTrace(
"TrackAssociator") <<
"Selection range: (dThetaPlus, dThetaMinus, dPhiPlus, dPhiMinus, dRPreselection): "
References funct::abs(), dumpMFGeometry_cfg::delta, DetIdAssociator::MapRange::dPhiMinus, DetIdAssociator::MapRange::dPhiPlus, HGC3DClusterGenMatchSelector_cfi::dR, DetIdAssociator::MapRange::dThetaMinus, DetIdAssociator::MapRange::dThetaPlus, and LogTrace.
◆ getPoint() [1/2]
◆ getPoint() [2/2]
◆ getTAMuonChamberMatches()
Definition at line 592 of file TrackDetectorAssociator.cc.
604 if (!trajectoryPoint.
isValid())
606 if (!trajectoryPoint.
isValid()) {
608 <<
"trajectory position at HCAL is not valid. Assume the track cannot reach muon detectors and skip it";
613 LogTrace(
"TrackAssociator") <<
"muon direction: " << direction
614 <<
"\n\t and corresponding point: " << trajectoryPoint.
position() <<
"\n";
622 LogTrace(
"TrackAssociator") <<
"Number of chambers to check: " << muonIdsInRegion.size();
623 for (std::set<DetId>::const_iterator detId = muonIdsInRegion.begin(); detId != muonIdsInRegion.end(); detId++) {
626 if (!stateOnSurface.
isValid()) {
627 LogTrace(
"TrackAssociator") <<
"Failed to propagate the track; moving on\n\t"
628 <<
"Element is not crosssed: " <<
DetIdInfo::info(*detId,
nullptr) <<
"\n";
633 float distanceX = 0.f;
634 float distanceY = 0.f;
635 if (
const CSCChamber* cscChamber = dynamic_cast<const CSCChamber*>(geomDet)) {
638 LogTrace(
"TrackAssociator") <<
"Failed to get CSCChamberSpecs from CSCChamber; moving on\n";
642 if (!layerGeometry) {
643 LogTrace(
"TrackAssociator") <<
"Failed to get CSCLayerGeometry from CSCChamberSpecs; moving on\n";
648 LogTrace(
"TrackAssociator") <<
"Failed to get CSCWireTopology from CSCLayerGeometry; moving on\n";
658 float yCOWPOffset = yOfFirstWire + 0.5f * length;
661 float tangent = (wideWidth - narrowWidth) / (2.
f * length);
663 float yPrime = localPoint.
y() +
std::abs(yOfFirstWire);
665 float halfWidthAtYPrime = 0.5f * narrowWidth + yPrime * tangent;
666 distanceX =
std::abs(localPoint.
x()) - halfWidthAtYPrime;
667 distanceY =
std::abs(localPoint.
y() - yCOWPOffset) - 0.5
f * length;
673 (distanceX * distanceX <
675 distanceY * distanceY <
679 match.tState = stateOnSurface;
680 match.localDistanceX = distanceX;
681 match.localDistanceY = distanceY;
686 <<
"\n\tdistanceX: " << distanceX <<
"\t distanceY: " << distanceY
687 <<
"\t sigmaX: " << distanceX /
sqrt(localError.
xx())
688 <<
"\t sigmaY: " << distanceY /
sqrt(localError.
yy()) <<
"\n";
References funct::abs(), Surface::bounds(), f, TrajectoryStateOnSurface::freeState(), CachedTrajectory::FullTrajectory, DetIdInfo::info(), TrajectoryStateOnSurface::isValid(), SteppingHelixStateInfo::isValid(), Bounds::length(), CSCWireTopology::lengthOfPlane(), TrajectoryStateOnSurface::localError(), LogTrace, match(), patCandidatesForDimuonsSequences_cff::matches, SteppingHelixStateInfo::momentum(), CSCWireTopology::narrowWidthOfPlane(), CSCChamberSpecs::oddLayerGeometry(), SteppingHelixStateInfo::position(), FreeTrajectoryState::position(), LocalTrajectoryError::positionError(), mathSSE::sqrt(), GeomDet::surface(), GloballyPositioned< T >::toLocal(), Vector3DBase< T, FrameTag >::unit(), CSCWireTopology::wideWidthOfPlane(), Bounds::width(), CSCWireTopology::wireAngle(), CSCLayerGeometry::wireTopology(), PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), PV3DBase< T, PVType, FrameType >::y(), CSCWireTopology::yOfWire(), and LocalError::yy().
◆ getVector() [1/2]
◆ getVector() [2/2]
◆ init()
◆ setPropagator()
void TrackDetectorAssociator::setPropagator |
( |
const Propagator * |
ptr | ) |
|
◆ useDefaultPropagator()
void TrackDetectorAssociator::useDefaultPropagator |
( |
| ) |
|
◆ cachedTrajectory_
◆ caloDetIdAssociator_
◆ defProp_
std::unique_ptr<Propagator> TrackDetectorAssociator::defProp_ |
|
private |
◆ ecalDetIdAssociator_
◆ hcalDetIdAssociator_
◆ hoDetIdAssociator_
◆ ivProp_
const Propagator* TrackDetectorAssociator::ivProp_ |
|
private |
◆ muonDetIdAssociator_
◆ preshowerDetIdAssociator_
◆ theCaloGeometry_
const CaloGeometry* TrackDetectorAssociator::theCaloGeometry_ |
|
private |
◆ theMagneticFieldWatcher_
◆ theTrackingGeometry_
◆ useDefaultPropagator_
bool TrackDetectorAssociator::useDefaultPropagator_ |
|
private |
bool check(const edm::EventSetup &iSetup)
GlobalVector momentum() const
const FiducialVolume & volume() const
get active detector volume
static bool crossedIP(const reco::Track &track)
std::vector< CaloTower >::const_iterator const_iterator
virtual float width() const =0
GlobalPoint position() const
float wireAngle() const override
float segmentLocalErrorYDyDz
double t0() const
Get the segment t0 (if recomputed, 0 is returned otherwise)
LocalError positionError() const
float getPropagationStep() const
constexpr bool isNotFinite(T x)
void setMaxDetectorRadius(float r=800.)
void setMinDetectorLength(float l=0.)
void setMinDetectorRadius(float r=0.)
void findPreshowerTrajectory(const FiducialVolume &)
math::XYZVector getVector(const GlobalVector &vec)
double minR(bool withTolerance=true) const
double lengthOfPlane() const
virtual bool selectAllInACone(const double dR) const
helper to see if getDetIdsInACone is useful
bool addTAMuonSegmentMatch(TAMuonChamberMatch &, const RecSegment *, const AssociatorParameters &)
void fillCaloTruth(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
SteppingHelixStateInfo getOuterState()
GlobalPoint position() const
std::unique_ptr< Propagator > defProp_
virtual LocalPoint localPosition() const =0
void setPropagationStep(float s=20.)
void fillHcal(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
DetId geographicalId() const
const DetIdAssociator * ecalDetIdAssociator_
edm::Ref< CSCSegmentCollection > CSCSegmentRef
void setMaxDetectorLength(float l=2200.)
virtual float length() const =0
void fillCaloTowers(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
double narrowWidthOfPlane() const
void findHcalTrajectory(const FiducialVolume &)
virtual std::set< DetId > getDetIdsInACone(const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory, const double dR) const
void setMaxHOLength(float l=2200.)
virtual std::vector< DetId > getCrossedDetIds(const std::set< DetId > &, const std::vector< GlobalPoint > &trajectory) const
float segmentLocalErrorXDxDz
const Plane & surface() const
The nominal surface of the GeomDet.
Vector3DBase unit() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
SteppingHelixStateInfo getStateAtHO()
const Propagator * ivProp_
static const double deltaEta
static std::string info(const DetId &, const TrackerTopology *tTopo)
bool propagateAll(const SteppingHelixStateInfo &initialState)
propagate through the whole detector, returns true if successful
void setPropagator(const Propagator *ptr)
double maxR(bool withTolerance=true) const
const Bounds & bounds() const
void propagate(SteppingHelixStateInfo &state, const Plane &plane)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
const DetIdAssociator * hcalDetIdAssociator_
edm::Ref< GEMSegmentCollection > GEMSegmentRef
virtual LocalVector localDirection() const =0
Local direction.
math::XYZPoint segmentGlobalPosition
float segmentLocalErrorYY
void findHOTrajectory(const FiducialVolume &)
void setPropagator(const Propagator *)
use a user configured propagator
void getTAMuonChamberMatches(std::vector< TAMuonChamberMatch > &matches, const AssociatorParameters ¶meters)
float segmentLocalErrorDyDz
virtual const GeomDet * getGeomDet(const DetId &) const =0
XYZPointD XYZPoint
point in space with cartesian internal representation
SteppingHelixStateInfo getStateAtEcal()
void init(const edm::EventSetup &, const AssociatorParameters &)
double minZ(bool withTolerance=true) const
void fillMuon(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
static FreeTrajectoryState getFreeTrajectoryState(const MagneticField *, const reco::Track &)
get FreeTrajectoryState from different track representations
std::pair< float, float > trajectoryDelta(TrajectorType)
C::const_iterator const_iterator
constant access iterator type
const DetIdAssociator * hoDetIdAssociator_
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
XYZVectorD XYZVector
spatial vector with cartesian internal representation
const DetIdAssociator * muonDetIdAssociator_
float segmentLocalErrorDxDz
float segmentLocalErrorXX
void setMaxHORadius(float r=800.)
math::XYZPoint getPoint(const GlobalPoint &point)
virtual std::set< DetId > getDetIdsCloseToAPoint(const GlobalPoint &, const int iN=0) const
const GlobalTrackingGeometry * theTrackingGeometry_
std::vector< std::pair< float, float > >::iterator itr
double wideWidthOfPlane() const
bool getData(T &iHolder) const
double maxZ(bool withTolerance=true) const
std::vector< TAMuonSegmentMatch > segments
distance sign convention: negative - crossed chamber, positive - missed chamber
void fillPreshower(const edm::Event &iEvent, TrackDetMatchInfo &info, const AssociatorParameters &)
std::pair< const_iterator, const_iterator > range
iterator range
void fillEcal(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
constexpr uint32_t rawId() const
get the raw id
bool hasZed() const
Does it have the Z projection?
const DetIdAssociator * preshowerDetIdAssociator_
const std::vector< SteppingHelixStateInfo > & getPreshowerTrajectory() const
const CSCWireTopology * wireTopology() const
edm::ESWatcher< IdealMagneticFieldRecord > theMagneticFieldWatcher_
const DetIdAssociator * caloDetIdAssociator_
float yOfWire(float wire, float x=0.) const
const CaloGeometry * theCaloGeometry_
LocalPoint toLocal(const GlobalPoint &gp) const
void setStateAtIP(const SteppingHelixStateInfo &state)
edm::Ref< ME0SegmentCollection > ME0SegmentRef
DetIdAssociator::MapRange getMapRange(const std::pair< float, float > &delta, const float dR)
SteppingHelixStateInfo getStateAtHcal()
edm::Ref< DTRecSegment4DCollection > DTRecSegment4DRef
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
bool useDefaultPropagator_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
math::XYZVector segmentLocalDirection
float segmentLocalErrorXY
math::XYZPoint segmentLocalPosition
bool hasPhi() const
Does it have the Phi projection?
CachedTrajectory cachedTrajectory_
const std::vector< SteppingHelixStateInfo > & getHOTrajectory() const
TrajectoryStateOnSurface tState
const std::vector< SteppingHelixStateInfo > & getHcalTrajectory() const
Abs< T >::type abs(const T &t)
TrackDetMatchInfo associate(const edm::Event &, const edm::EventSetup &, const FreeTrajectoryState &, const AssociatorParameters &)
const std::vector< SteppingHelixStateInfo > & getEcalTrajectory() const
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
const LocalTrajectoryError & localError() const
const DTChamberRecSegment2D * phiSegment() const
The superPhi segment: 0 if no phi projection available.
const CSCLayerGeometry * oddLayerGeometry(int iendcap) const
Accessors for LayerGeometry's.
Geom::Phi< T > phi() const
void fillHO(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
virtual LocalError localDirectionError() const =0
Error on the local direction.
virtual LocalError localPositionError() const =0
void findEcalTrajectory(const FiducialVolume &)