|
|
#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 &) |
|
Definition at line 49 of file TrackDetectorAssociator.h.
◆ AssociatorParameters
◆ Direction
◆ TrackDetectorAssociator()
TrackDetectorAssociator::TrackDetectorAssociator |
( |
| ) |
|
◆ ~TrackDetectorAssociator()
TrackDetectorAssociator::~TrackDetectorAssociator |
( |
| ) |
|
◆ addTAMuonSegmentMatch()
Definition at line 843 of file TrackDetectorAssociator.cc.
853 LogTrace(
"TrackAssociator") <<
"Segment global position: " << segmentGlobalPosition
854 <<
" \t (R_xy,eta,phi): " << segmentGlobalPosition.
perp() <<
","
855 << segmentGlobalPosition.
eta() <<
"," << segmentGlobalPosition.
phi() <<
"\n";
857 LogTrace(
"TrackAssociator") <<
"\teta hit: " << segmentGlobalPosition.
eta()
859 <<
"\tphi hit: " << segmentGlobalPosition.
phi()
864 bool isDTWithoutY =
false;
865 const DTRecSegment4D* dtseg = dynamic_cast<const DTRecSegment4D*>(segment);
866 if (dtseg && (!dtseg->
hasZed()))
898 muonSegment.
hasZed =
true;
899 muonSegment.
hasPhi =
true;
904 if ((dtseg->
hasPhi()) && (!isDTWithoutY)) {
913 LogTrace(
"TrackAssociator") <<
" Phi t0: " << dtseg->
phiSegment()->
t0() <<
" hits: " << phiHits;
927 muonSegment.
hasZed =
false;
929 muonSegment.
hasPhi =
false;
932 matchedChamber.
segments.push_back(muonSegment);
References relativeConstraints::chamber, reco::deltaPhi(), PV3DBase< T, PVType, FrameType >::eta(), 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(), funct::pow(), 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(), mathSSE::sqrt(), 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 154 of file TrackDetectorAssociator.cc.
References iEvent.
Referenced by BetaCalculatorECAL::addInfoToCandidate(), 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 1007 of file TrackDetectorAssociator.cc.
1017 if (
track.extra().isNull()) {
1019 throw cms::Exception(
"FatalError") <<
"No TrackExtra information is available and association is done with "
1020 "something else than InsideOut track.\n"
1021 <<
"Either change the parameter or provide needed data!\n";
1022 LogTrace(
"TrackAssociator") <<
"Track Extras not found\n";
1027 LogTrace(
"TrackAssociator") <<
"Track Extras found\n";
1032 LogTrace(
"TrackAssociator") <<
"inner track state (rho, z, phi):" <<
track.innerPosition().Rho() <<
", "
1033 <<
track.innerPosition().z() <<
", " <<
track.innerPosition().phi() <<
"\n";
1034 LogTrace(
"TrackAssociator") <<
"innerFreeState (rho, z, phi):" << innerState.
position().
perp() <<
", "
1037 LogTrace(
"TrackAssociator") <<
"outer track state (rho, z, phi):" <<
track.outerPosition().Rho() <<
", "
1038 <<
track.outerPosition().z() <<
", " <<
track.outerPosition().phi() <<
"\n";
1039 LogTrace(
"TrackAssociator") <<
"outerFreeState (rho, z, phi):" << outerState.
position().
perp() <<
", "
1044 switch (direction) {
1058 switch (direction) {
1071 if (
track.innerPosition().Dot(
track.innerMomentum()) < 0 &&
1072 track.outerPosition().Dot(
track.outerMomentum()) < 0) {
1075 if (
track.innerPosition().R() <
track.outerPosition().R())
References Calorimetry_cff::bField, Exception, reco::get(), edm::EventSetup::get(), iEvent, trajectoryStateTransform::initialFreeState(), trajectoryStateTransform::innerFreeState(), LogTrace, trajectoryStateTransform::outerFreeState(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), mps_fire::result, HLT_2018_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 161 of file TrackDetectorAssociator.cc.
170 <<
"Configuration error! No subdetector was selected for the track association.";
173 info.stateAtIP = *innerState;
215 LogTrace(
"TrackAssociator") <<
"Using outerState as trackOrigin at Rho=" << outerState->
position().
perp()
216 <<
" Z=" << outerState->
position().
z() <<
"\n";
218 }
else if (innerState) {
219 LogTrace(
"TrackAssociator") <<
"Using innerState as trackOrigin at Rho=" << innerState->
position().
perp()
220 <<
" Z=" << innerState->
position().
z() <<
"\n";
225 if (trackOrigin.momentum().mag() == 0)
References Exception, HLT_2018_cff::fillCaloTowers, iEvent, info(), init, edm::isNotFinite(), LogTrace, PV3DBase< T, PVType, FrameType >::mag(), CosmicsPD_Skims::maxZ, HLT_2018_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 339 of file TrackDetectorAssociator.cc.
343 std::vector<GlobalPoint> trajectory;
346 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = ecalTrajectoryStates.begin();
347 itr != ecalTrajectoryStates.end();
349 trajectory.push_back(
itr->position());
350 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = hcalTrajectoryStates.begin();
351 itr != hcalTrajectoryStates.end();
353 trajectory.push_back(
itr->position());
355 if (trajectory.empty()) {
356 LogTrace(
"TrackAssociator") <<
"HCAL trajectory is empty; moving on\n";
357 info.isGoodCalo =
false;
360 info.isGoodCalo =
true;
366 throw cms::Exception(
"FatalError") <<
"Unable to find CaloTowers in event!\n";
368 std::set<DetId> caloTowerIdsInRegion;
369 if (
parameters.accountForTrajectoryChangeCalo) {
377 LogTrace(
"TrackAssociator") <<
"Towers in the region: " << caloTowerIdsInRegion.size();
379 auto caloTowerIdsInAConeBegin = caloTowerIdsInRegion.begin();
380 auto caloTowerIdsInAConeEnd = caloTowerIdsInRegion.end();
381 std::set<DetId> caloTowerIdsInAConeTmp;
383 caloTowerIdsInAConeTmp =
385 caloTowerIdsInAConeBegin = caloTowerIdsInAConeTmp.begin();
386 caloTowerIdsInAConeEnd = caloTowerIdsInAConeTmp.end();
388 LogTrace(
"TrackAssociator") <<
"Towers in the cone: "
389 <<
std::distance(caloTowerIdsInAConeBegin, caloTowerIdsInAConeEnd);
392 const std::vector<DetId>& crossedCaloTowerIds =
info.crossedTowerIds;
393 LogTrace(
"TrackAssociator") <<
"Towers crossed: " << crossedCaloTowerIds.size();
396 for (std::vector<DetId>::const_iterator
itr = crossedCaloTowerIds.begin();
itr != crossedCaloTowerIds.end();
itr++) {
398 if (
tower != (*caloTowers).end())
401 LogTrace(
"TrackAssociator") <<
"Crossed CaloTower is not found for DetId: " << (*itr).rawId();
404 for (std::set<DetId>::const_iterator
itr = caloTowerIdsInAConeBegin;
itr != caloTowerIdsInAConeEnd;
itr++) {
406 if (
tower != (*caloTowers).end())
409 LogTrace(
"TrackAssociator") <<
"CaloTower from the cone is not found for DetId: " << (*itr).rawId();
References eleHcalExtractorBlocks_cff::caloTowers, HLT_2018_cff::distance, iEvent, info(), CachedTrajectory::IpToHcal, LogTrace, and hgcalTowerProducer_cfi::tower.
◆ fillCaloTruth()
◆ fillEcal()
Definition at line 265 of file TrackDetectorAssociator.cc.
270 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
271 itr != trajectoryStates.end();
273 LogTrace(
"TrackAssociator") <<
"ECAL trajectory point (rho, z, phi): " <<
itr->position().perp() <<
", "
274 <<
itr->position().z() <<
", " <<
itr->position().phi();
276 std::vector<GlobalPoint> coreTrajectory;
277 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
278 itr != trajectoryStates.end();
280 coreTrajectory.push_back(
itr->position());
282 if (coreTrajectory.empty()) {
283 LogTrace(
"TrackAssociator") <<
"ECAL track trajectory is empty; moving on\n";
284 info.isGoodEcal =
false;
287 info.isGoodEcal =
true;
293 throw cms::Exception(
"FatalError") <<
"Unable to find EBRecHitCollection in the event!\n";
298 throw cms::Exception(
"FatalError") <<
"Unable to find EERecHitCollection in event!\n";
300 std::set<DetId> ecalIdsInRegion;
301 if (
parameters.accountForTrajectoryChangeCalo) {
308 LogTrace(
"TrackAssociator") <<
"ECAL hits in the region: " << ecalIdsInRegion.size();
311 LogTrace(
"TrackAssociator") <<
"ECAL hits in the cone: " << ecalIdsInRegion.size();
313 const std::vector<DetId>& crossedEcalIds =
info.crossedEcalIds;
314 LogTrace(
"TrackAssociator") <<
"ECAL crossed hits " << crossedEcalIds.size();
317 for (std::vector<DetId>::const_iterator
itr = crossedEcalIds.begin();
itr != crossedEcalIds.end();
itr++) {
318 std::vector<EcalRecHit>::const_iterator ebHit = (*EBRecHits).find(*
itr);
319 std::vector<EcalRecHit>::const_iterator eeHit = (*EERecHits).find(*
itr);
320 if (ebHit != (*EBRecHits).end())
321 info.crossedEcalRecHits.push_back(&*ebHit);
322 else if (eeHit != (*EERecHits).end())
323 info.crossedEcalRecHits.push_back(&*eeHit);
325 LogTrace(
"TrackAssociator") <<
"Crossed EcalRecHit is not found for DetId: " <<
itr->rawId();
327 for (std::set<DetId>::const_iterator
itr = ecalIdsInRegion.begin();
itr != ecalIdsInRegion.end();
itr++) {
328 std::vector<EcalRecHit>::const_iterator ebHit = (*EBRecHits).find(*
itr);
329 std::vector<EcalRecHit>::const_iterator eeHit = (*EERecHits).find(*
itr);
330 if (ebHit != (*EBRecHits).end())
331 info.ecalRecHits.push_back(&*ebHit);
332 else if (eeHit != (*EERecHits).end())
333 info.ecalRecHits.push_back(&*eeHit);
335 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 436 of file TrackDetectorAssociator.cc.
441 std::vector<GlobalPoint> coreTrajectory;
442 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
443 itr != trajectoryStates.end();
445 coreTrajectory.push_back(
itr->position());
447 if (coreTrajectory.empty()) {
448 LogTrace(
"TrackAssociator") <<
"HCAL trajectory is empty; moving on\n";
449 info.isGoodHcal =
false;
452 info.isGoodHcal =
true;
458 throw cms::Exception(
"FatalError") <<
"Unable to find HBHERecHits in event!\n";
460 std::set<DetId> idsInRegion;
461 if (
parameters.accountForTrajectoryChangeCalo) {
469 LogTrace(
"TrackAssociator") <<
"HCAL hits in the region: " << idsInRegion.size() <<
"\n"
472 auto idsInAConeBegin = idsInRegion.begin();
473 auto idsInAConeEnd = idsInRegion.end();
474 std::set<DetId> idsInAConeTmp;
477 idsInAConeBegin = idsInAConeTmp.begin();
478 idsInAConeEnd = idsInAConeTmp.end();
480 LogTrace(
"TrackAssociator") <<
"HCAL hits in the cone: " <<
std::distance(idsInAConeBegin, idsInAConeEnd) <<
"\n"
481 <<
DetIdInfo::info(std::set<DetId>(idsInAConeBegin, idsInAConeEnd),
nullptr);
483 const std::vector<DetId>& crossedIds =
info.crossedHcalIds;
484 LogTrace(
"TrackAssociator") <<
"HCAL hits crossed: " << crossedIds.size() <<
"\n"
488 for (std::vector<DetId>::const_iterator
itr = crossedIds.begin();
itr != crossedIds.end();
itr++) {
490 if (
hit != (*collection).end())
491 info.crossedHcalRecHits.push_back(&*
hit);
493 LogTrace(
"TrackAssociator") <<
"Crossed HBHERecHit is not found for DetId: " <<
itr->rawId();
495 for (std::set<DetId>::const_iterator
itr = idsInAConeBegin;
itr != idsInAConeEnd;
itr++) {
497 if (
hit != (*collection).end())
498 info.hcalRecHits.push_back(&*
hit);
500 LogTrace(
"TrackAssociator") <<
"HBHERecHit from the cone is not found for DetId: " <<
itr->rawId();
References universalConfigTemplate::collection, HLT_2018_cff::distance, iEvent, DetIdInfo::info(), info(), CachedTrajectory::IpToHcal, and LogTrace.
◆ fillHO()
Definition at line 504 of file TrackDetectorAssociator.cc.
509 std::vector<GlobalPoint> coreTrajectory;
510 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
511 itr != trajectoryStates.end();
513 coreTrajectory.push_back(
itr->position());
515 if (coreTrajectory.empty()) {
516 LogTrace(
"TrackAssociator") <<
"HO trajectory is empty; moving on\n";
517 info.isGoodHO =
false;
520 info.isGoodHO =
true;
526 throw cms::Exception(
"FatalError") <<
"Unable to find HORecHits in event!\n";
528 std::set<DetId> idsInRegion;
529 if (
parameters.accountForTrajectoryChangeCalo) {
537 LogTrace(
"TrackAssociator") <<
"idsInRegion.size(): " << idsInRegion.size();
539 auto idsInAConeBegin = idsInRegion.begin();
540 auto idsInAConeEnd = idsInRegion.end();
541 std::set<DetId> idsInAConeTmp;
544 idsInAConeBegin = idsInAConeTmp.begin();
545 idsInAConeEnd = idsInAConeTmp.end();
547 LogTrace(
"TrackAssociator") <<
"idsInACone.size(): " <<
std::distance(idsInAConeBegin, idsInAConeEnd);
549 const std::vector<DetId>& crossedIds =
info.crossedHOIds;
552 for (std::vector<DetId>::const_iterator
itr = crossedIds.begin();
itr != crossedIds.end();
itr++) {
554 if (
hit != (*collection).end())
555 info.crossedHORecHits.push_back(&*
hit);
557 LogTrace(
"TrackAssociator") <<
"Crossed HORecHit is not found for DetId: " <<
itr->rawId();
560 for (std::set<DetId>::const_iterator
itr = idsInAConeBegin;
itr != idsInAConeEnd;
itr++) {
562 if (
hit != (*collection).end())
563 info.hoRecHits.push_back(&*
hit);
565 LogTrace(
"TrackAssociator") <<
"HORecHit from the cone is not found for DetId: " <<
itr->rawId();
References universalConfigTemplate::collection, HLT_2018_cff::distance, iEvent, info(), CachedTrajectory::IpToHO, and LogTrace.
◆ fillMuon()
◆ fillPreshower()
Definition at line 413 of file TrackDetectorAssociator.cc.
416 std::vector<GlobalPoint> trajectory;
418 for (std::vector<SteppingHelixStateInfo>::const_iterator
itr = trajectoryStates.begin();
419 itr != trajectoryStates.end();
421 trajectory.push_back(
itr->position());
423 if (trajectory.empty()) {
424 LogTrace(
"TrackAssociator") <<
"Preshower trajectory is empty; moving on\n";
428 std::set<DetId> idsInRegion =
431 LogTrace(
"TrackAssociator") <<
"Number of Preshower Ids in the region: " << idsInRegion.size();
433 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 622 of file TrackDetectorAssociator.cc.
632 if (
delta.second > 0)
636 LogTrace(
"TrackAssociator") <<
"Selection range: (dThetaPlus, dThetaMinus, dPhiPlus, dPhiMinus, dRPreselection): "
References 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 642 of file TrackDetectorAssociator.cc.
654 if (!trajectoryPoint.
isValid())
656 if (!trajectoryPoint.
isValid()) {
658 <<
"trajectory position at HCAL is not valid. Assume the track cannot reach muon detectors and skip it";
663 LogTrace(
"TrackAssociator") <<
"muon direction: " << direction
664 <<
"\n\t and corresponding point: " << trajectoryPoint.
position() <<
"\n";
672 LogTrace(
"TrackAssociator") <<
"Number of chambers to check: " << muonIdsInRegion.size();
673 for (std::set<DetId>::const_iterator detId = muonIdsInRegion.begin(); detId != muonIdsInRegion.end(); detId++) {
676 if (!stateOnSurface.
isValid()) {
677 LogTrace(
"TrackAssociator") <<
"Failed to propagate the track; moving on\n\t"
678 <<
"Element is not crosssed: " <<
DetIdInfo::info(*detId,
nullptr) <<
"\n";
687 if (
const CSCChamber* cscChamber = dynamic_cast<const CSCChamber*>(geomDet)) {
690 LogTrace(
"TrackAssociator") <<
"Failed to get CSCChamberSpecs from CSCChamber; moving on\n";
694 if (!layerGeometry) {
695 LogTrace(
"TrackAssociator") <<
"Failed to get CSCLayerGeometry from CSCChamberSpecs; moving on\n";
700 LogTrace(
"TrackAssociator") <<
"Failed to get CSCWireTopology from CSCLayerGeometry; moving on\n";
708 float yOfFirstWire = fabs(wireTopology->
wireAngle()) > 1.E-06 ? -0.5 * length : wireTopology->
yOfWire(1);
710 float yCOWPOffset = yOfFirstWire + 0.5 * length;
713 float tangent = (wideWidth - narrowWidth) / (2. * length);
715 float yPrime = localPoint.
y() + fabs(yOfFirstWire);
717 float halfWidthAtYPrime = 0.5 * narrowWidth + yPrime * tangent;
718 distanceX = fabs(localPoint.
x()) - halfWidthAtYPrime;
719 distanceY = fabs(localPoint.
y() - yCOWPOffset) - 0.5 * length;
732 match.tState = stateOnSurface;
733 match.localDistanceX = distanceX;
734 match.localDistanceY = distanceY;
739 <<
"\n\tdistanceX: " << distanceX <<
"\t distanceY: " << distanceY
740 <<
"\t sigmaX: " <<
sigmaX <<
"\t sigmaY: " <<
sigmaY <<
"\n";
References Surface::bounds(), 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(), fftjetvertexadder_cfi::sigmaX, fftjetvertexadder_cfi::sigmaY, 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_
◆ ecalDetIdAssociator_
◆ hcalDetIdAssociator_
◆ hoDetIdAssociator_
◆ ivProp_
const Propagator* TrackDetectorAssociator::ivProp_ |
|
private |
◆ muonDetIdAssociator_
◆ preshowerDetIdAssociator_
◆ theCaloGeometry_
◆ theMagneticFeildWatcher_
◆ 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
virtual LocalPoint localPosition() const =0
void setPropagationStep(float s=20.)
void fillHcal(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
DetId geographicalId() const
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 &)
static FreeTrajectoryState getFreeTrajectoryState(const edm::EventSetup &, const reco::Track &)
get FreeTrajectoryState from different track representations
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.
edm::ESWatcher< IdealMagneticFieldRecord > theMagneticFeildWatcher_
Vector3DBase unit() const
FreeTrajectoryState const * freeState(bool withErrors=true) const
SteppingHelixStateInfo getStateAtHO()
const Propagator * ivProp_
edm::ESHandle< CaloGeometry > theCaloGeometry_
static std::string info(const DetId &, const TrackerTopology *tTopo)
bool propagateAll(const SteppingHelixStateInfo &initialState)
propagate through the whole detector, returns true if successful
edm::ESHandle< DetIdAssociator > ecalDetIdAssociator_
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
edm::Ref< GEMSegmentCollection > GEMSegmentRef
virtual LocalVector localDirection() const =0
Local direction.
math::XYZPoint segmentGlobalPosition
edm::ESHandle< DetIdAssociator > hcalDetIdAssociator_
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()
double minZ(bool withTolerance=true) const
void fillMuon(const edm::Event &, TrackDetMatchInfo &, const AssociatorParameters &)
std::pair< float, float > trajectoryDelta(TrajectorType)
C::const_iterator const_iterator
constant access iterator type
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void applyRadX0Correction(bool applyRadX0Correction)
XYZVectorD XYZVector
spatial vector with cartesian internal representation
float segmentLocalErrorDxDz
float segmentLocalErrorXX
void setMaxHORadius(float r=800.)
edm::ESHandle< DetIdAssociator > muonDetIdAssociator_
math::XYZPoint getPoint(const GlobalPoint &point)
virtual std::set< DetId > getDetIdsCloseToAPoint(const GlobalPoint &, const int iN=0) const
edm::ESHandle< DetIdAssociator > preshowerDetIdAssociator_
edm::ESHandle< DetIdAssociator > hoDetIdAssociator_
std::vector< std::pair< float, float > >::iterator itr
void init(const edm::EventSetup &)
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
double wideWidthOfPlane() 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 std::vector< SteppingHelixStateInfo > & getPreshowerTrajectory() const
const CSCWireTopology * wireTopology() const
float yOfWire(float wire, float x=0.) const
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
Power< A, B >::type pow(const A &a, const B &b)
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
edm::ESHandle< DetIdAssociator > caloDetIdAssociator_
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 &)
edm::ESHandle< GlobalTrackingGeometry > theTrackingGeometry_