|
ATLAS Offline Software
|
#include <MuonClusterOnTrackCreator.h>
|
| MuonClusterOnTrackCreator (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~MuonClusterOnTrackCreator ()=default |
|
virtual StatusCode | initialize () override |
|
virtual MuonClusterOnTrack * | createRIO_OnTrack (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP) const override |
| Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter. More...
|
|
virtual MuonClusterOnTrack * | createRIO_OnTrack (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const override |
| Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a prediction of the global position and direction. More...
|
|
virtual MuonClusterOnTrack * | correct (const Trk::PrepRawData &RIO, const Trk::TrackParameters &TP, const EventContext &) const override |
| Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and the predicted Trk::TrackParameter at the measurement surface. More...
|
|
virtual MuonClusterOnTrack * | correct (const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const override |
| Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a prediction of the global position and direction. 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 |
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
ToolHandle< Muon::INSWCalibTool > | m_calibToolNSW {this, "NSWCalibTool", ""} |
|
ToolHandle< Muon::IMMClusterBuilderTool > | m_clusterBuilderToolMM {this, "MMClusterBuilder", "Muon::SimpleMMClusterBuilderTool/SimpleMMClusterBuilderTool"} |
|
Gaudi::Property< bool > | m_doFixedErrorTgcEta {this, "DoFixedErrorTgcEta", false} |
|
Gaudi::Property< bool > | m_doFixedErrorRpcEta {this, "DoFixedErrorRpcEta", false} |
|
Gaudi::Property< bool > | m_doFixedErrorTgcPhi {this, "DoFixedErrorTgcPhi", false} |
|
Gaudi::Property< bool > | m_doFixedErrorRpcPhi {this, "DoFixedErrorRpcPhi", false} |
|
Gaudi::Property< double > | m_fixedErrorTgcEta {this, "FixedErrorTgcEta", 5.} |
|
Gaudi::Property< double > | m_fixedErrorRpcEta {this, "FixedErrorRpcEta", 5.} |
|
Gaudi::Property< double > | m_fixedErrorTgcPhi {this, "FixedErrorTgcPhi", 5.} |
|
Gaudi::Property< double > | m_fixedErrorRpcPhi {this, "FixedErrorRpcPhi", 5.} |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 30 of file MuonClusterOnTrackCreator.h.
◆ StoreGateSvc_t
◆ MuonClusterOnTrackCreator()
MuonClusterOnTrackCreator::MuonClusterOnTrackCreator |
( |
const std::string & |
ty, |
|
|
const std::string & |
na, |
|
|
const IInterface * |
pa |
|
) |
| |
Definition at line 33 of file MuonClusterOnTrackCreator.cxx.
36 declareInterface<IMuonClusterOnTrackCreator>(
this);
37 declareInterface<IRIO_OnTrackCreator>(
this);
◆ ~MuonClusterOnTrackCreator()
virtual Muon::MuonClusterOnTrackCreator::~MuonClusterOnTrackCreator |
( |
| ) |
|
|
virtualdefault |
◆ calibratedClusterMMG()
Definition at line 270 of file MuonClusterOnTrackCreator.cxx.
271 const EventContext& ctx{Gaudi::Hive::currentContext()};
275 ATH_MSG_WARNING(
"RIO does not have associated detectorElement! Skipping cluster calibration");
289 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
300 std::vector<NSWCalib::CalibratedStrip> calibratedStrips;
302 if (
sc != StatusCode::SUCCESS) {
303 ATH_MSG_WARNING(
"Could not calibrate the MM Cluster in the RIO on track creator");
313 if (rotAuthor == IMMClusterBuilderTool::RIO_Author::unKnownAuthor) {
314 ATH_MSG_WARNING(
"Could not calibrate the MM Cluster in the RIO on track creator");
329 double a_impact =
ld.angleXZ() < 0 ? -M_PI_2 -
ld.angleXZ() : M_PI_2 -
ld.angleXZ();
330 double x_projected = localposition3D.x() -
std::tan(a_impact) * localposition3D.z();
338 MMClusterOnTrack* cluster =
new MMClusterOnTrack(mmPRD, std::move(locpar), std::move(loce), lp[
Trk::locY], {}, {});
339 cluster->setAuthor(rotAuthor);
◆ calibratedClusterSTG()
Definition at line 346 of file MuonClusterOnTrackCreator.cxx.
351 ATH_MSG_WARNING(
"RIO does not have associated detectorElement! Skipping cluster calibration");
367 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
383 double a_impact =
ld.angleXZ() < 0 ? -M_PI_2 -
ld.angleXZ() : M_PI_2 -
ld.angleXZ();
384 double x_projected = localposition3D.x() -
std::tan(a_impact) * localposition3D.z();
392 ATH_MSG_VERBOSE(
"generating sTgcClusterOnTrack in MuonClusterBuilder");
393 MuonClusterOnTrack* cluster =
new sTgcClusterOnTrack(stgPRD, std::move(locpar), std::move(loce), lp[
Trk::locY]);
◆ correct() [1/2]
◆ correct() [2/2]
◆ createRIO_OnTrack() [1/2]
Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter.
- Parameters
-
RIO | Trk::PrepRawData object to be calibrated |
GP | Predicted intersect position of the muon with the measurement plane |
- Returns
- a pointer to a new Muon::MuonClusterOnTrack object, zero if calibration failed. The ownership of the new Muon::MuonClusterOnTrack is passed to the client calling the tool
Implements Muon::IMuonClusterOnTrackCreator.
Definition at line 51 of file MuonClusterOnTrackCreator.cxx.
54 MuonClusterOnTrack* MClT =
nullptr;
59 ATH_MSG_WARNING(
"RIO does not have associated detectorElement!, cannot produce ROT");
82 double positionAlongStrip{0};
83 double positionAlongZ{0};
88 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
91 positionAlongZ = lpos.z();
108 double fixedError = 1.;
120 mat(0, 0) = fixedError * fixedError;
128 double correct_time_along_strip = 0;
134 if (positionAlongZ) correct_time_along_strip = 0;
137 double av_correct_time_along_strip = 0;
139 av_correct_time_along_strip = rpc_readout_element->
distanceToEtaReadout(posi) / 1000. * SIG_VEL;
141 av_correct_time_along_strip = rpc_readout_element->
distanceToPhiReadout(posi) / 1000. * SIG_VEL;
145 double real_TOF_onRPCgap = GP.mag() / 1000. * C_VEL;
146 double nominal_TOF_onRPCgap = posi.mag() / 1000. * C_VEL;
149 double correct_time_tot = real_TOF_onRPCgap - nominal_TOF_onRPCgap + correct_time_along_strip - av_correct_time_along_strip;
151 MClT =
new RpcClusterOnTrack(MClus, std::move(locpar), std::move(loce), positionAlongStrip, MClus->time() - correct_time_tot);
153 ATH_MSG_DEBUG(
" correct_time_along_strip " << correct_time_along_strip <<
" av_correct_time_along_strip "
154 << av_correct_time_along_strip <<
" real_TOF_onRPCgap " << real_TOF_onRPCgap
155 <<
" nominal_TOF_onRPCgap " << nominal_TOF_onRPCgap <<
" MClus->time() "
156 << MClus->time() <<
" correct_time_tot " << correct_time_tot);
168 if (idHelper.measuresPhi(RIO.
identify())) {
169 const int stripNo = idHelper.channel(RIO.
identify());
183 double Sn2 = Sn * Sn;
184 double Cs2 = 1. - Sn2;
186 double V0 = stripWidth * stripWidth / 12;
188 double V1 = stripLength * stripLength / 12;
189 mat(0, 0) = (Cs2 *
V0 + Sn2 *
V1);
190 mat.fillSymmetric(1, 0, (Sn * std::sqrt(Cs2) * (V0 - V1)));
191 mat(1, 1) = (Sn2 *
V0 + Cs2 *
V1);
201 MClT =
new TgcClusterOnTrack(MClus, std::move(locpar), std::move(loce), positionAlongStrip);
214 MClus->detectorElement()->isEtaZero(MClus->identify(), lp)) {
225 MClT =
new sTgcClusterOnTrack(MClus, std::move(locpar), std::move(loce), positionAlongStrip);
234 MClT =
new MMClusterOnTrack(mmPRD, std::move(locpar), std::move(loce), positionAlongStrip, {}, {});
◆ createRIO_OnTrack() [2/2]
◆ 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]
◆ 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
◆ initialize()
StatusCode MuonClusterOnTrackCreator::initialize |
( |
| ) |
|
|
overridevirtual |
◆ 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()
const InterfaceID & Muon::IMuonClusterOnTrackCreator::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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_calibToolNSW
ToolHandle<Muon::INSWCalibTool> Muon::MuonClusterOnTrackCreator::m_calibToolNSW {this, "NSWCalibTool", ""} |
|
private |
◆ m_clusterBuilderToolMM
◆ m_detStore
◆ m_doFixedErrorRpcEta
Gaudi::Property<bool> Muon::MuonClusterOnTrackCreator::m_doFixedErrorRpcEta {this, "DoFixedErrorRpcEta", false} |
|
private |
◆ m_doFixedErrorRpcPhi
Gaudi::Property<bool> Muon::MuonClusterOnTrackCreator::m_doFixedErrorRpcPhi {this, "DoFixedErrorRpcPhi", false} |
|
private |
◆ m_doFixedErrorTgcEta
Gaudi::Property<bool> Muon::MuonClusterOnTrackCreator::m_doFixedErrorTgcEta {this, "DoFixedErrorTgcEta", false} |
|
private |
◆ m_doFixedErrorTgcPhi
Gaudi::Property<bool> Muon::MuonClusterOnTrackCreator::m_doFixedErrorTgcPhi {this, "DoFixedErrorTgcPhi", false} |
|
private |
◆ m_evtStore
◆ m_fixedErrorRpcEta
Gaudi::Property<double> Muon::MuonClusterOnTrackCreator::m_fixedErrorRpcEta {this, "FixedErrorRpcEta", 5.} |
|
private |
◆ m_fixedErrorRpcPhi
Gaudi::Property<double> Muon::MuonClusterOnTrackCreator::m_fixedErrorRpcPhi {this, "FixedErrorRpcPhi", 5.} |
|
private |
◆ m_fixedErrorTgcEta
Gaudi::Property<double> Muon::MuonClusterOnTrackCreator::m_fixedErrorTgcEta {this, "FixedErrorTgcEta", 5.} |
|
private |
◆ m_fixedErrorTgcPhi
Gaudi::Property<double> Muon::MuonClusterOnTrackCreator::m_fixedErrorTgcPhi {this, "FixedErrorTgcPhi", 5.} |
|
private |
◆ m_idHelperSvc
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
virtual MuonClusterOnTrack * createRIO_OnTrack(const Trk::PrepRawData &RIO, const Amg::Vector3D &GP) const override
Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and a predicted Trk::TrackParameter.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Gaudi::Property< bool > m_doFixedErrorRpcPhi
ToolHandle< Muon::IMMClusterBuilderTool > m_clusterBuilderToolMM
Gaudi::Property< double > m_fixedErrorRpcPhi
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
double stripLength() const
Returns the length of each strip which is equal to the height of the chamber.
An RpcReadoutElement corresponds to a single RPC module; therefore typicaly a barrel muon station con...
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override final
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
#define ATH_MSG_VERBOSE(x)
Amg::Vector3D stripDir(int gasGap, int strip) const
Returns the direction of a strip.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
std::pair< double, ParamDefs > DefinedParameter
virtual void setOwner(IDataHandleHolder *o)=0
Gaudi::Property< bool > m_doFixedErrorRpcEta
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
double distanceToPhiReadout(const Amg::Vector3D &P) const
::StatusCode StatusCode
StatusCode definition for legacy code.
An sTgcReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station c...
Gaudi::Property< double > m_fixedErrorTgcEta
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
This module defines the arguments passed from the BATCH driver to the BATCH worker.
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
represents the three-dimensional global direction with respect to a planar surface frame.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Identifier identify() const
return the identifier
Gaudi::Property< bool > m_doFixedErrorTgcPhi
Amg::Vector3D stripPos(const Identifier &id) const
const Amg::Vector2D & localPosition() const
return the local position reference
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Eigen::Matrix< double, 3, 1 > Vector3D
double stripPitch(int gasGap, int strip) const
Returns the pitch of the given strip in gasGap i.
const Amg::Vector3D & momentum() const
Access method for the momentum.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override final
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
#define ATH_MSG_WARNING(x)
ToolHandle< Muon::INSWCalibTool > m_calibToolNSW
Gaudi::Property< double > m_fixedErrorTgcPhi
Amg::Vector3D toLocal(const Trk::Surface &surf, const Amg::Vector3D &dir)
Rotates a direction vector into a local frame: x-axis : Parallell to the radial direction of the dete...
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
MuonClusterOnTrack * calibratedClusterSTG(const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const
Gaudi::Property< bool > m_doFixedErrorTgcEta
virtual MuonClusterOnTrack * correct(const Trk::PrepRawData &RIO, const Trk::TrackParameters &TP, const EventContext &) const override
Create new Muon::MuonClusterOnTrack from a Trk::PrepRawData and the predicted Trk::TrackParameter at ...
double distanceToEtaReadout(const Amg::Vector3D &P) const
MuonClusterOnTrack * calibratedClusterMMG(const Trk::PrepRawData &RIO, const Amg::Vector3D &GP, const Amg::Vector3D &GD) const
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Gaudi::Property< double > m_fixedErrorRpcEta
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const TrkDetElementBase * detectorElement() const =0
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...