 |
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, V, H > &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 |
|
|
void | clear () |
| clear ntuples More...
|
|
void | extract (const MuonSegment &segment, std::set< Identifier > &ids, std::vector< const MuonClusterOnTrack * > &clusters) const |
|
int | getIndex (const MuonSystemExtension::Intersection &intersection) const |
|
int | getUniqueID (const std::set< Identifier > &ids) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
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 401 of file MuonRecoValidationTool.cxx.
419 std::set<Identifier>
ids;
421 MuonHough::HitVec::const_iterator hit = maximum.
hits.begin();
422 MuonHough::HitVec::const_iterator hit_end = maximum.
hits.end();
423 for (; hit != hit_end; ++hit) {
426 for (
const auto& prd : (*hit)->tgc->etaCluster)
ids.insert(prd->identify());
427 }
else if ((*hit)->prd) {
428 ids.insert((*hit)->prd->identify());
◆ add() [2/3]
add a new segment
Implements Muon::IMuonRecoValidationTool.
Definition at line 320 of file MuonRecoValidationTool.cxx.
321 const EventContext& ctx = Gaudi::Hive::currentContext();
333 float t0Error =
segment.hasFittedT0() ?
segment.errorTime() : -99999;
338 std::set<Identifier>
ids;
339 std::vector<const MuonClusterOnTrack*>
clusters;
363 std::shared_ptr<Trk::TrackParameters> exPars(
377 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 238 of file MuonRecoValidationTool.cxx.
240 float segmentTimeCorrection = 0.;
243 if (seg && seg->hasFittedT0()) {
251 seg->globalPosition().z(), seg->time() - segmentTimeCorrection, seg->errorTime());
254 std::set<Identifier>
ids;
255 std::vector<const MuonClusterOnTrack*>
clusters;
265 const RpcClusterOnTrack* rpc =
dynamic_cast<const RpcClusterOnTrack*
>(&meas);
287 double correct_time_along_strip = 0;
295 double av_correct_time_along_strip = 0;
297 av_correct_time_along_strip = rpc_readout_element->
distanceToEtaReadout(posi) / 1000. * SIG_VEL;
299 av_correct_time_along_strip = rpc_readout_element->
distanceToPhiReadout(posi) / 1000. * SIG_VEL;
303 double real_TOF_onRPCgap = GP.mag() / 1000. * C_VEL;
304 double nominal_TOF_onRPCgap = posi.mag() / 1000. * C_VEL;
307 double correct_time_tot = real_TOF_onRPCgap - nominal_TOF_onRPCgap + correct_time_along_strip - av_correct_time_along_strip;
311 rpc->globalPosition().z(), rpc->time(), 2., correct_time_along_strip, av_correct_time_along_strip,
312 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 107 of file MuonRecoValidationTool.cxx.
119 truthParticleLinkAcc(
"truthParticleLink");
120 if (truthParticleLinkAcc.isAvailable(indetTrackParticle)) {
121 const ElementTruthLink_t link = truthParticleLinkAcc(indetTrackParticle);
122 if (link.isValid()) {
123 pdg = (*link)->pdgId();
125 beta = (*link)->p4().Beta();
143 const std::vector<Muon::MuonSystemExtension::Intersection>& layerIntersections = muonSystemExtension.layerIntersections();
144 ATH_MSG_DEBUG(
"Adding ID track: pt " << indetTrackParticle.
pt() <<
" eta " << indetTrackParticle.
eta() <<
" phi "
145 << indetTrackParticle.
phi() <<
" layers " << layerIntersections.size());
147 for (std::vector<Muon::MuonSystemExtension::Intersection>::const_iterator
it = layerIntersections.begin();
148 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 463 of file MuonRecoValidationTool.cxx.
466 std::vector<const Trk::MeasurementBase*>::const_iterator mit =
segment.containedMeasurements().begin();
467 std::vector<const Trk::MeasurementBase*>::const_iterator mit_end =
segment.containedMeasurements().end();
468 for (; mit != mit_end; ++mit) {
471 if (!
id.is_valid())
continue;
476 const MuonClusterOnTrack* clus =
dynamic_cast<const MuonClusterOnTrack*
>(*mit);
480 const CompetingMuonClustersOnTrack* crot =
dynamic_cast<const CompetingMuonClustersOnTrack*
>(*mit);
481 if (!crot || crot->containedROTs().empty())
continue;
482 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
◆ getIndex()
◆ getUniqueID()
int Muon::MuonRecoValidationTool::getUniqueID |
( |
const std::set< Identifier > & |
ids | ) |
const |
|
private |
◆ handle()
void Muon::MuonRecoValidationTool::handle |
( |
const Incident & |
inc | ) |
|
|
overridevirtual |
incident service handle for EndEvent
Definition at line 98 of file MuonRecoValidationTool.cxx.
100 if (inc.type() == IncidentType::EndEvent) {
◆ initialize()
StatusCode Muon::MuonRecoValidationTool::initialize |
( |
| ) |
|
|
overridevirtual |
initialize method, method taken from bass-class AlgTool
Definition at line 57 of file MuonRecoValidationTool.cxx.
60 ATH_MSG_ERROR(
"This tool cannot be used in multi-threaded mode");
61 return StatusCode::FAILURE;
76 SmartIF<ITHistSvc> thistSvc{service(
"THistSvc")};
79 m_tree =
new TTree(
"data",
"RecoValidation");
88 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
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
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
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
ChIndex chIndex(const std::string &index)
convert ChIndex name string to enum
MuonValidationTrackBlock track
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
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 ...
constexpr int toInt(const ParamDefs p)
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
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