Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
#include <MuonRecoValidationTool.h>
|
| MuonRecoValidationTool (const std::string &, const std::string &, const IInterface *) |
| default AlgTool constructor More...
|
|
| ~MuonRecoValidationTool ()=default |
| destructor More...
|
|
virtual StatusCode | initialize () override |
| initialize method, method taken from bass-class AlgTool More...
|
|
bool | addTrackParticle (const xAOD::TrackParticle &indetTrackParticle, const MuonSystemExtension &muonSystemExtention) const override |
| add a new TrackParticle with it's muon system extension More...
|
|
bool | add (const MuonSystemExtension::Intersection &intersection, const MuonSegment &segment, int stage) const override |
| add a new segment More...
|
|
bool | add (const MuonSystemExtension::Intersection &intersection, const MuonHough::MuonLayerHough::Maximum &maximum) const override |
| add a new hough maximum More...
|
|
bool | add (const MuonSystemExtension::Intersection &intersection, const Trk::PrepRawData &prd, float expos, float expos_err) const override |
| add a new prd More...
|
|
bool | addTimeMeasurement (const MuonSystemExtension::Intersection &intersection, const Trk::MeasurementBase &meas) const override |
| add a new time measurement More...
|
|
bool | addTimeMeasurement (const MuonSystemExtension::Intersection &intersection, const Identifier &id, const Amg::Vector3D &gpos, float time, float errorTime) const override |
| add a new time measurement More...
|
|
bool | addTimeMeasurements (const xAOD::TrackParticle &indetTrackParticle, const MuGirlNS::StauHits &stauHits) const override |
| add StauHits to ntuple More...
|
|
bool | addMuonCandidate (const xAOD::TrackParticle &indetTrackParticle, const MuonCandidate *candidate, Trk::Track *combinedTrack, int ntimes, float beta, float chi2ndof, int stage) const override |
| add a new muon candidate More...
|
|
virtual void | handle (const Incident &inc) override |
| incident service handle for EndEvent More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 46 of file MuonRecoValidationTool.h.
◆ StoreGateSvc_t
◆ MuonRecoValidationTool()
Muon::MuonRecoValidationTool::MuonRecoValidationTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonRecoValidationTool()
Muon::MuonRecoValidationTool::~MuonRecoValidationTool |
( |
| ) |
|
|
default |
◆ add() [1/3]
add a new hough maximum
Implements Muon::IMuonRecoValidationTool.
Definition at line 400 of file MuonRecoValidationTool.cxx.
418 std::set<Identifier>
ids;
420 MuonHough::HitVec::const_iterator hit = maximum.
hits.begin();
421 MuonHough::HitVec::const_iterator hit_end = maximum.
hits.end();
422 for (; hit != hit_end; ++hit) {
425 for (
const auto& prd : (*hit)->tgc->etaCluster)
ids.insert(prd->identify());
426 }
else if ((*hit)->prd) {
427 ids.insert((*hit)->prd->identify());
◆ add() [2/3]
add a new segment
Implements Muon::IMuonRecoValidationTool.
Definition at line 319 of file MuonRecoValidationTool.cxx.
320 const EventContext& ctx = Gaudi::Hive::currentContext();
332 float t0Error =
segment.hasFittedT0() ?
segment.errorTime() : -99999;
337 std::set<Identifier>
ids;
338 std::vector<const MuonClusterOnTrack*>
clusters;
362 std::shared_ptr<Trk::TrackParameters> exPars(
376 std::shared_ptr<Trk::AtaPlane> ataPlane = std::dynamic_pointer_cast<Trk::AtaPlane>(exPars);
◆ add() [3/3]
◆ addMuonCandidate()
◆ addTimeMeasurement() [1/2]
◆ addTimeMeasurement() [2/2]
add a new time measurement
Implements Muon::IMuonRecoValidationTool.
Definition at line 237 of file MuonRecoValidationTool.cxx.
239 float segmentTimeCorrection = 0.;
242 if (seg && seg->hasFittedT0()) {
250 seg->globalPosition().z(), seg->time() - segmentTimeCorrection, seg->errorTime());
253 std::set<Identifier>
ids;
254 std::vector<const MuonClusterOnTrack*>
clusters;
264 const RpcClusterOnTrack* rpc =
dynamic_cast<const RpcClusterOnTrack*
>(&meas);
286 double correct_time_along_strip = 0;
294 double av_correct_time_along_strip = 0;
296 av_correct_time_along_strip = rpc_readout_element->
distanceToEtaReadout(posi) / 1000. * SIG_VEL;
298 av_correct_time_along_strip = rpc_readout_element->
distanceToPhiReadout(posi) / 1000. * SIG_VEL;
302 double real_TOF_onRPCgap = GP.mag() / 1000. * C_VEL;
303 double nominal_TOF_onRPCgap = posi.mag() / 1000. * C_VEL;
306 double correct_time_tot = real_TOF_onRPCgap - nominal_TOF_onRPCgap + correct_time_along_strip - av_correct_time_along_strip;
310 rpc->globalPosition().z(), rpc->time(), 2., correct_time_along_strip, av_correct_time_along_strip,
311 real_TOF_onRPCgap, nominal_TOF_onRPCgap, correct_time_tot);
◆ addTimeMeasurements()
◆ addTrackParticle()
add a new TrackParticle with it's muon system extension
Implements Muon::IMuonRecoValidationTool.
Definition at line 106 of file MuonRecoValidationTool.cxx.
118 truthParticleLinkAcc(
"truthParticleLink");
119 if (truthParticleLinkAcc.isAvailable(indetTrackParticle)) {
120 const ElementTruthLink_t link = truthParticleLinkAcc(indetTrackParticle);
121 if (link.isValid()) {
122 pdg = (*link)->pdgId();
124 beta = (*link)->p4().Beta();
142 const std::vector<Muon::MuonSystemExtension::Intersection>& layerIntersections = muonSystemExtension.layerIntersections();
143 ATH_MSG_DEBUG(
"Adding ID track: pt " << indetTrackParticle.
pt() <<
" eta " << indetTrackParticle.
eta() <<
" phi "
144 << indetTrackParticle.
phi() <<
" layers " << layerIntersections.size());
146 for (std::vector<Muon::MuonSystemExtension::Intersection>::const_iterator
it = layerIntersections.begin();
147 it != layerIntersections.end(); ++
it) {
◆ clear()
void Muon::MuonRecoValidationTool::clear |
( |
| ) |
|
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extract()
Definition at line 462 of file MuonRecoValidationTool.cxx.
465 std::vector<const Trk::MeasurementBase*>::const_iterator mit =
segment.containedMeasurements().begin();
466 std::vector<const Trk::MeasurementBase*>::const_iterator mit_end =
segment.containedMeasurements().end();
467 for (; mit != mit_end; ++mit) {
470 if (!
id.is_valid())
continue;
475 const MuonClusterOnTrack* clus =
dynamic_cast<const MuonClusterOnTrack*
>(*mit);
479 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(*mit);
480 if (!crot || crot->containedROTs().empty())
continue;
481 clusters.insert(
clusters.end(), crot->containedROTs().begin(), crot->containedROTs().end());
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ getBarcode()
int Muon::MuonRecoValidationTool::getBarcode |
( |
const std::set< Identifier > & |
ids | ) |
const |
|
private |
◆ getIndex()
◆ handle()
void Muon::MuonRecoValidationTool::handle |
( |
const Incident & |
inc | ) |
|
|
overridevirtual |
incident service handle for EndEvent
Definition at line 97 of file MuonRecoValidationTool.cxx.
99 if (inc.type() == IncidentType::EndEvent) {
◆ initialize()
StatusCode Muon::MuonRecoValidationTool::initialize |
( |
| ) |
|
|
overridevirtual |
initialize method, method taken from bass-class AlgTool
Definition at line 56 of file MuonRecoValidationTool.cxx.
59 ATH_MSG_ERROR(
"This tool cannot be used in multi-threaded mode");
60 return StatusCode::FAILURE;
75 SmartIF<ITHistSvc> thistSvc{service(
"THistSvc")};
78 m_tree =
new TTree(
"data",
"RecoValidation");
87 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ interfaceID()
static const InterfaceID& Muon::IMuonRecoValidationTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
AlgTool and IAlgTool interface methods.
Definition at line 27 of file IMuonRecoValidationTool.h.
28 static const InterfaceID IID_IMuonRecoValidationTool(
"Muon::IMuonRecoValidationTool", 1, 0);
29 return IID_IMuonRecoValidationTool;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_candidateCounter
std::atomic<unsigned int> Muon::MuonRecoValidationTool::m_candidateCounter |
|
mutableprivate |
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 104 of file MuonRecoValidationTool.h.
◆ m_evtStore
◆ m_extrapolator
◆ m_hitSummaryTool
◆ m_hitTimingTool
◆ m_idHelperSvc
◆ m_incidentSvc
ServiceHandle<IIncidentSvc> Muon::MuonRecoValidationTool::m_incidentSvc |
|
private |
◆ m_isMC
bool Muon::MuonRecoValidationTool::m_isMC |
|
private |
◆ m_matchingTool
◆ m_ntuple
◆ m_segmentHitSummaryTool
◆ m_trackParticleIndexLookup
◆ m_trackParticles
◆ m_tree
TTree* Muon::MuonRecoValidationTool::m_tree = nullptr |
|
private |
◆ m_truthSummaryTool
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
virtual double pt() const override final
The transverse momentum ( ) of the particle.
double segErrorYZ
error from segment on angle in bending plane
std::vector< float > * phi
double pullXZ
pull on angle in non-bending plane
std::vector< float > * pt
void fill(int sector_, int chIndex_)
MuonValidationTruthBlock truth
MuonValidationCandidateBlock candidateBlock
std::string find(const std::string &s)
return a remapped string
void fill(int type_, unsigned int gasgapId_, float r_, float z_, float time_, float err_, float timeProp_=0., float avTimeProp_=0., float tof_=0., float avTof_=0., float timeCor_=0., int stage_=0)
double resCY
residual on combined local position Y and angle YZ
double exErrorX
error from extrapolation on residual in non-bending plane
std::vector< int > * ntrigEtaHits
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
RegionDescriptor m_descriptor
double dangleXZ
angular residual in the Local coordinate non-bending plane
MuonValidationTrackBlock track
MuonValidationTrackBlock track
void fill(int pdg_, int barcode_, float beta_=1.)
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
std::vector< ALFA_RawData_p1 > t0
constexpr int INVALID_PARTICLE_ID
double segErrorXZ
error from segment on angle in non-bending plane
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< int > * quality
std::vector< SG::VarHandleKeyArray * > m_vhka
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
Helper class to provide constant type-safe access to aux data.
MuonValidationResidualBlock combinedYZ
#define ATH_MSG_VERBOSE(x)
MuonValidationResidualBlock residuals
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
void combinedTrack(long int ICH, double *pv0, double *covi, double BMAG, double *par, double *covo)
MuonValidationHoughBlock houghBlock
MuonValidationResidualBlock xresiduals
std::vector< float > * t0
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< float > * t0Error
MuonValidationResidualBlock residuals
double pullY
pull on residual in bending plane
std::vector< float > * maximum
double distanceToPhiReadout(const Amg::Vector3D &P) const
void fill(const Trk::MeasurementBase &hit, const MuonSystemExtension::Intersection &intersection, Trk::ParamDefs par)
Class to represent RPC measurements.
virtual const MuonGM::RpcReadoutElement * detectorElement() const override final
Returns the detector element corresponding to this PRD.
MuonValidationTrackParticleBlock trackParticleBlock
MuonValidationTrackBlock track
std::vector< float > * eta
int quality
hit count summary
MuonValidationTruthBlock truth
MuonValidationResidualBlock yresiduals
double segErrorX
error from segment on residual in non-bending plane
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
MuonValidationResidualBlock angleYZ
std::vector< float > * t0TrigError
const MuonLayerHough * hough
double exErrorY
error from extrapolation on residual in bending plane
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
ElementLink implementation for ROOT usage.
Identifier identify() const
return the identifier
void fill(int ntimes_, float beta_, float chi2ndof_, int nseg_, int nprec_, int ntrigPhi_, int ntrigEta_, int stage_)
float qOverP() const
Returns the parameter.
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 ...
Amg::Vector3D stripPos(const Identifier &id) const
const Amg::Vector2D & localPosition() const
return the local position reference
double resY
residual track - segment in Local coordinate in bending plane
Eigen::Matrix< double, 3, 1 > Vector3D
double dangleYZ
angular residual in the Local coordinate bending plane
std::vector< int > * ntrigPhiHits
std::vector< int > * nmdtHits
MuonValidationHitBlock hitBlock
double segErrorY
error from segment on residual in bending plane
MuonValidationTruthBlock truth
double exErrorXZ
error from extrapolation on angle in non-bending plane
double pullYZ
pull on angle in bending plane
std::vector< float > * t0Trig
#define ATH_MSG_WARNING(x)
double pullX
pull on residual in non-bending plane
std::vector< int > * stage
double pullCY
pull on combined local position Y and angle YZ
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
MuonValidationTruthBlock truth
MuonValidationSegmentBlock segmentBlock
MuonValidationTimeBlock timeBlock
MuonValidationTrackBlock track
double distanceToEtaReadout(const Amg::Vector3D &P) const
double exErrorYZ
error from extrapolation on angle in bending plane
MuonValidationResidualBlock angleXZ
void init(const std::string &prefix, TTree *, bool write=true)
void fillResPull(float res_, float pull_, int status=1)
MuonValidationTruthBlock truth
double resX
residual track - segment in Local coordinate non-bending plane
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float calculateTof(float beta, float dist)
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)
MuonValidationTrackBlock track