|
ATLAS Offline Software
|
seeded segment finder that gets its data directly from storegate for a give set of Identifiers or IdentifierHashes
More...
#include <MuonSeededSegmentFinder.h>
|
| MuonSeededSegmentFinder (const std::string &, const std::string &, const IInterface *) |
| constructor More...
|
|
| ~MuonSeededSegmentFinder ()=default |
| destructor More...
|
|
StatusCode | initialize () |
| AlgTool initilize. More...
|
|
std::unique_ptr< Trk::SegmentCollection > | find (const EventContext &ctx, const Trk::TrackParameters &pars, const std::set< Identifier > &chIds) const |
| find segments in a set of chambers starting from seeding TrackParameters More...
|
|
std::unique_ptr< Trk::SegmentCollection > | find (const EventContext &ctx, const Trk::TrackParameters &pars, const std::set< IdentifierHash > &chIdHs) const |
| find segments in a set of chambers starting from seeding TrackParameters (version with Hashes) More...
|
|
std::unique_ptr< Trk::SegmentCollection > | find (const EventContext &ctx, const Trk::TrackParameters &pars, const std::vector< const MdtPrepData * > &mdtPrds) const |
| find segments in a set of MdtPrepData starting from seeding TrackParameters More...
|
|
void | extractMdtPrdCols (const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const MdtPrepDataCollection * > &target) const |
| retrieve MDT PRD collections for the given hashes More...
|
|
void | extractRpcPrdCols (const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const RpcPrepDataCollection * > &target) const |
| retrieve RPC PRD collections for the given hashes More...
|
|
void | extractTgcPrdCols (const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const TgcPrepDataCollection * > &target) const |
| retrieve TGC PRD collections for the given hashes More...
|
|
void | extractCscPrdCols (const std::set< IdentifierHash > &chIdHs, std::vector< const CscPrepDataCollection * > &target) const |
| retrieve CSC PRD collections for the given hashes More...
|
|
void | extractsTgcPrdCols (const EventContext &ctx, const std::set< IdentifierHash > &chIdHs, std::vector< const sTgcPrepDataCollection * > &target) const |
| retrieve STGC PRD collections for the given hashes More...
|
|
void | extractMMPrdCols (const std::set< IdentifierHash > &chIdHs, std::vector< const MMPrepDataCollection * > &target) const |
| retrieve MM PRD collections for the given hashes More...
|
|
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
|
ToolHandle< Muon::IMuonSegmentMaker > | m_segMaker |
| actual segment maker with hole search More...
|
|
ToolHandle< Muon::IMuonSegmentMaker > | m_segMakerNoHoles |
| actual segment maker no hole search More...
|
|
ToolHandle< Trk::IPropagator > | m_propagator |
| propagator More...
|
|
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > | m_mdtRotCreator |
| IMdtDriftCircleOnTrackCreator. More...
|
|
Trk::MagneticFieldProperties | m_magFieldProperties |
| magnetic field properties More...
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer |
| EDM printer tool. More...
|
|
SG::ReadHandleKey< Muon::MdtPrepDataContainer > | m_key_mdt {this, "MdtPrepDataContainer", "MDT_DriftCircles", "MDT PRDs"} |
|
SG::ReadHandleKey< Muon::CscPrepDataContainer > | m_key_csc {this, "CscPrepDataContainer", "CSC_Clusters", "CSC PRDS"} |
|
SG::ReadHandleKey< Muon::TgcPrepDataContainer > | m_key_tgc {this, "TgcPrepDataContainer", "TGC_Measurements", "TGC PRDs"} |
|
SG::ReadHandleKey< Muon::RpcPrepDataContainer > | m_key_rpc {this, "RpcPrepDataContainer", "RPC_Measurements", "RPC PRDs"} |
|
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > | m_key_stgc {this, "sTgcPrepDataContainer", "STGC_Measurements", "sTGC PRDs"} |
|
SG::ReadHandleKey< Muon::MMPrepDataContainer > | m_key_mm {this, "MMPrepDataContainer", "MM_Measurements", "MM PRDs"} |
|
Gaudi::Property< double > | m_adcCut {this, "AdcCut", 50} |
|
Gaudi::Property< double > | m_maxSigma {this, "MdtSigmaFromTrack", 3} |
|
seeded segment finder that gets its data directly from storegate for a give set of Identifiers or IdentifierHashes
Definition at line 30 of file MuonSeededSegmentFinder.h.
◆ MuonSeededSegmentFinder()
Muon::MuonSeededSegmentFinder::MuonSeededSegmentFinder |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
◆ ~MuonSeededSegmentFinder()
Muon::MuonSeededSegmentFinder::~MuonSeededSegmentFinder |
( |
| ) |
|
|
default |
◆ extractCscPrdCols()
retrieve CSC PRD collections for the given hashes
Definition at line 247 of file MuonSeededSegmentFinder.cxx.
254 if (cscPrdContainer->empty())
return;
257 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
258 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
259 for (; chit != chit_end; ++chit) {
260 const auto* collptr = cscPrdContainer->indexFindPtr(*chit);
261 if (collptr ==
nullptr || collptr->empty()) {
continue; }
267 target.push_back(collptr);
◆ extractMdtPrdCols()
retrieve MDT PRD collections for the given hashes
Definition at line 186 of file MuonSeededSegmentFinder.cxx.
191 if (mdtPrdContainer->empty())
return;
194 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
195 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
196 for (; chit != chit_end; ++chit) {
197 const auto* collptr = mdtPrdContainer->indexFindPtr(*chit);
198 if (collptr ==
nullptr || collptr->empty()) {
continue; }
203 target.push_back(collptr);
◆ extractMMPrdCols()
retrieve MM PRD collections for the given hashes
Definition at line 306 of file MuonSeededSegmentFinder.cxx.
315 if (h_mmPrdCont.isValid()) {
316 mmPrdContainer = h_mmPrdCont.cptr();
321 if (mmPrdContainer->
empty())
return;
324 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
325 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
326 for (; chit != chit_end; ++chit) {
327 const auto* collptr = mmPrdContainer->
indexFindPtr(*chit);
328 if (collptr ==
nullptr || collptr->empty()) {
continue; }
332 target.push_back(collptr);
◆ extractPrds() [1/2]
retrieve the MdtPrepDataCollections for the give Identifiers
Definition at line 124 of file MuonSeededSegmentFinder.cxx.
127 if (MuonDetMgr ==
nullptr) {
128 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
133 std::set<IdentifierHash> chIdHs;
136 std::set<Identifier>::const_iterator chit = chIds.begin();
137 std::set<Identifier>::const_iterator chit_end = chIds.end();
138 for (; chit != chit_end; ++chit) {
153 std::vector<const MdtPrepData*> mdtPrds =
extractPrds(ctx, chIdHs);
◆ extractPrds() [2/2]
retrieve the MdtPrepDataCollections for the give Identifier Hashes
Definition at line 158 of file MuonSeededSegmentFinder.cxx.
162 if (h_mdtPrdCont.isValid()) {
163 mdtPrdContainer = h_mdtPrdCont.cptr();
170 std::vector<const MdtPrepData*> mdtPrds;
173 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
174 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
175 for (; chit != chit_end; ++chit) {
176 const auto* collptr = mdtPrdContainer->
indexFindPtr(*chit);
177 if (collptr ==
nullptr) {
continue; }
180 mdtPrds.insert(mdtPrds.end(), collptr->begin(), collptr->end());
◆ extractRpcPrdCols()
retrieve RPC PRD collections for the given hashes
Definition at line 207 of file MuonSeededSegmentFinder.cxx.
211 if (rpcPrdContainer->empty())
return;
214 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
215 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
216 for (; chit != chit_end; ++chit) {
217 const auto* collptr = rpcPrdContainer->indexFindPtr(*chit);
218 if (collptr ==
nullptr || collptr->empty()) {
continue; }
223 target.push_back(collptr);
◆ extractsTgcPrdCols()
retrieve STGC PRD collections for the given hashes
Definition at line 274 of file MuonSeededSegmentFinder.cxx.
283 if (h_stgcPrdCont.isValid()) {
284 stgcPrdContainer = h_stgcPrdCont.cptr();
289 if (stgcPrdContainer->
empty())
return;
292 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
293 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
294 for (; chit != chit_end; ++chit) {
295 const auto* collptr = stgcPrdContainer->
indexFindPtr(*chit);
296 if (collptr ==
nullptr || collptr->empty()) {
continue; }
301 target.push_back(collptr);
◆ extractTgcPrdCols()
retrieve TGC PRD collections for the given hashes
Definition at line 227 of file MuonSeededSegmentFinder.cxx.
231 if (tgcPrdContainer->empty())
return;
234 std::set<IdentifierHash>::const_iterator chit = chIdHs.begin();
235 std::set<IdentifierHash>::const_iterator chit_end = chIdHs.end();
236 for (; chit != chit_end; ++chit) {
237 const auto* collptr = tgcPrdContainer->indexFindPtr(*chit);
238 if (collptr ==
nullptr || collptr->empty()) {
continue; }
243 target.push_back(collptr);
◆ find() [1/3]
find segments in a set of chambers starting from seeding TrackParameters
Definition at line 49 of file MuonSeededSegmentFinder.cxx.
52 std::vector<const MdtPrepData*> mdtPrds =
extractPrds(ctx, chIds);
54 if (mdtPrds.empty()) {
◆ find() [2/3]
find segments in a set of chambers starting from seeding TrackParameters (version with Hashes)
Definition at line 63 of file MuonSeededSegmentFinder.cxx.
66 std::vector<const MdtPrepData*> mdtPrds =
extractPrds(ctx, chIdHs);
68 if (mdtPrds.empty()) {
◆ find() [3/3]
find segments in a set of MdtPrepData starting from seeding TrackParameters
Definition at line 77 of file MuonSeededSegmentFinder.cxx.
80 bool doHoleSearch =
true;
83 std::vector<const MdtDriftCircleOnTrack*> mdtROTs;
84 mdtROTs.reserve(mdtPrds.size());
87 if (mdtROTs.empty()) {
93 double roadWidthEta = 1.;
94 if (
pars.covariance()) {
97 if (trackError < 0.2) trackError = 0.2;
98 roadWidthEta = 5. * trackError;
103 std::vector<std::vector<const MdtDriftCircleOnTrack*> > mdtROTsVec;
104 mdtROTsVec.push_back(mdtROTs);
105 std::vector<std::vector<const MuonClusterOnTrack*> > clusterROTsVec;
109 doHoleSearch ?
m_segMaker->find(road, mdtROTsVec, clusterROTsVec, segments.get(),
true)
110 :
m_segMakerNoHoles->find(road, mdtROTsVec, clusterROTsVec, segments.get(),
true);
113 std::for_each(mdtROTs.begin(), mdtROTs.end(), MuonDeleteObject<const MdtDriftCircleOnTrack>());
118 ATH_MSG_DEBUG(
" Number of segments found: " << segments->size());
◆ handleMdtPrd()
select and calibrate a single MdtPrepData
Definition at line 357 of file MuonSeededSegmentFinder.cxx.
360 if (mdtPrd.adc() <
m_adcCut)
return nullptr;
376 double distanceToWire = exPars->parameters()[
Trk::locR];
377 double posAlongWire = exPars->parameters()[
Trk::locZ];
379 double errorR = exPars->covariance() ? fabs(
Amg::error(*exPars->covariance(),
Trk::locR)) : 500.;
380 double errorZ = exPars->covariance() ? fabs(
Amg::error(*exPars->covariance(),
Trk::locZ)) : 300.;
383 bool isOnSurface = surf.
isOnSurface(exPars->position(),
true, 5 * errorR, 5 * errorZ);
392 double roadWidthR = 5 * errorR + 4 * tubeRadius;
393 double roadWidthZ = 5 * errorZ + 100.;
396 double nSigmaFromTrack = fabs(fabs(distanceToWire) - mdtPrd.localPosition()[
Trk::locR]) / sqrt(errorR * errorR + driftdr * driftdr);
399 std::string boundCheckStr = isOnSurface ?
" onSurface" :
" outOfSurface";
401 << roadWidthR <<
" z " << posAlongWire <<
" range " << halfTubeLength + roadWidthZ << boundCheckStr;
405 if (nSigmaFromTrack >
m_maxSigma || fabs(posAlongWire) > halfTubeLength + roadWidthZ) {
412 if (doHoleSearch && fabs(posAlongWire) < halfTubeLength + roadWidthZ) doHoleSearch =
false;
417 const MdtDriftCircleOnTrack* mdtROT =
m_mdtRotCreator->createRIO_OnTrack(mdtPrd, exPars->position(), &
momentum);
430 double error = driftdr;
432 double fullError = sqrt(errorR * errorR +
error *
error);
433 double radialPull =
residual / fullError;
435 if (fabs(radialPull) < 5)
437 else if (fabs(radialPull) > 5 &&
residual > 0)
440 hitType =
"outOfTime";
◆ initialize()
StatusCode Muon::MuonSeededSegmentFinder::initialize |
( |
| ) |
|
◆ selectAndCalibrate()
select a set of Mdt hits and calibrate them
Definition at line 336 of file MuonSeededSegmentFinder.cxx.
339 ATH_MSG_VERBOSE(
" in selectAndCalibrate, get PRDs " << mdtPrdCols.size());
342 std::vector<const MdtPrepData*>::const_iterator mit = mdtPrdCols.begin();
343 std::vector<const MdtPrepData*>::const_iterator mit_end = mdtPrdCols.end();
344 for (; mit != mit_end; ++mit) {
347 const MdtDriftCircleOnTrack* mdt =
handleMdtPrd(ctx,
pars, **mit, doHoleSearch);
352 mdtROTs.push_back(mdt);
354 ATH_MSG_VERBOSE(
" calibrated " << mdtROTs.size() <<
" prds out of " << mdtPrdCols.size());
◆ m_adcCut
Gaudi::Property<double> Muon::MuonSeededSegmentFinder::m_adcCut {this, "AdcCut", 50} |
|
private |
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 93 of file MuonSeededSegmentFinder.h.
◆ m_idHelperSvc
◆ m_key_csc
◆ m_key_mdt
◆ m_key_mm
◆ m_key_rpc
◆ m_key_stgc
◆ m_key_tgc
◆ m_magFieldProperties
◆ m_maxSigma
Gaudi::Property<double> Muon::MuonSeededSegmentFinder::m_maxSigma {this, "MdtSigmaFromTrack", 3} |
|
private |
◆ m_mdtRotCreator
◆ m_printer
Initial value:{this, "Printer",
"Muon::MuonEDMPrinterTool/MuonEDMPrinterTool"}
EDM printer tool.
Definition at line 106 of file MuonSeededSegmentFinder.h.
◆ m_propagator
Initial value:{this, "Propagator",
"Trk::RungeKuttaPropagator/AtlasRungeKuttaPropagator"}
propagator
Definition at line 100 of file MuonSeededSegmentFinder.h.
◆ m_segMaker
Initial value:{
this, "SegmentMaker", "Muon::DCMathSegmentMaker/DCMathSegmentMaker"}
actual segment maker with hole search
Definition at line 96 of file MuonSeededSegmentFinder.h.
◆ m_segMakerNoHoles
Initial value:{
this, "SegmentMakerNoHoles", "Muon::DCMathSegmentMaker/DCMathSegmentMaker"}
actual segment maker no hole search
Definition at line 98 of file MuonSeededSegmentFinder.h.
The documentation for this class was generated from the following files:
Encapsulates the information required by the find() method of the muon segment makers.
std::unique_ptr< Trk::SegmentCollection > find(const EventContext &ctx, const Trk::TrackParameters &pars, const std::set< Identifier > &chIds) const
find segments in a set of chambers starting from seeding TrackParameters
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_key_csc
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
ToolHandle< Trk::IPropagator > m_propagator
propagator
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_key_stgc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
EDM printer tool.
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
ToolHandle< Muon::IMdtDriftCircleOnTrackCreator > m_mdtRotCreator
IMdtDriftCircleOnTrackCreator.
std::vector< const MdtPrepData * > extractPrds(const EventContext &ctx, const std::set< Identifier > &chIds) const
retrieve the MdtPrepDataCollections for the give Identifiers
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method checks if the provided GlobalPosition is inside the assigned straw radius,...
const MdtDriftCircleOnTrack * handleMdtPrd(const EventContext &ctx, const Trk::TrackParameters &pars, const MdtPrepData &mdtPrd, bool &doHoleSearch) const
select and calibrate a single MdtPrepData
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
#define ATH_MSG_VERBOSE(x)
bool empty() const
return true if container is empty
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_key_tgc
double getActiveTubeLength(const int tubeLayer, const int tube) const
Gaudi::Property< double > m_maxSigma
Gaudi::Property< double > m_adcCut
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_key_mdt
ToolHandle< Muon::IMuonSegmentMaker > m_segMaker
actual segment maker with hole search
@ NoField
Field is set to 0., 0., 0.,.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_key_mm
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
void selectAndCalibrate(const EventContext &ctx, const Trk::TrackParameters &pars, const std::vector< const MdtPrepData * > &mdtPrdCols, std::vector< const MdtDriftCircleOnTrack * > &mdtROTs, bool &doHoleSearch) const
select a set of Mdt hits and calibrate them
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
virtual const Trk::Surface & surface() const override final
Return surface associated with this detector element.
IdentifierHash identifyHash() const override final
Returns the IdentifierHash of the MuonStation, i.e.
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_key_rpc
Trk::MagneticFieldProperties m_magFieldProperties
magnetic field properties
ToolHandle< Muon::IMuonSegmentMaker > m_segMakerNoHoles
actual segment maker no hole search