 |
ATLAS Offline Software
|
#include <MuonClusterOnTrackCreator.h>
|
| 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.} |
| |
Definition at line 30 of file MuonClusterOnTrackCreator.h.
◆ ~MuonClusterOnTrackCreator()
| virtual Muon::MuonClusterOnTrackCreator::~MuonClusterOnTrackCreator |
( |
| ) |
|
|
virtualdefault |
◆ calibratedClusterMMG()
Definition at line 256 of file MuonClusterOnTrackCreator.cxx.
257 const EventContext& ctx{Gaudi::Hive::currentContext()};
261 ATH_MSG_WARNING(
"RIO does not have associated detectorElement! Skipping cluster calibration");
275 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
286 std::vector<NSWCalib::CalibratedStrip> calibratedStrips;
288 if (
sc != StatusCode::SUCCESS) {
289 ATH_MSG_WARNING(
"Could not calibrate the MM Cluster in the RIO on track creator");
299 if (rotAuthor == IMMClusterBuilderTool::RIO_Author::unKnownAuthor) {
300 ATH_MSG_WARNING(
"Could not calibrate the MM Cluster in the RIO on track creator");
315 double a_impact =
ld.angleXZ() < 0 ? -M_PI_2 -
ld.angleXZ() : M_PI_2 -
ld.angleXZ();
316 double x_projected = localposition3D.x() -
std::tan(a_impact) * localposition3D.z();
324 MMClusterOnTrack* cluster =
new MMClusterOnTrack(mmPRD, std::move(locpar), std::move(loce), lp[
Trk::locY], {}, {});
325 cluster->setAuthor(rotAuthor);
◆ calibratedClusterSTG()
Definition at line 332 of file MuonClusterOnTrackCreator.cxx.
337 ATH_MSG_WARNING(
"RIO does not have associated detectorElement! Skipping cluster calibration");
353 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
369 double a_impact =
ld.angleXZ() < 0 ? -M_PI_2 -
ld.angleXZ() : M_PI_2 -
ld.angleXZ();
370 double x_projected = localposition3D.x() -
std::tan(a_impact) * localposition3D.z();
378 ATH_MSG_VERBOSE(
"generating sTgcClusterOnTrack in MuonClusterBuilder");
379 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
Definition at line 41 of file MuonClusterOnTrackCreator.cxx.
43 MuonClusterOnTrack* MClT =
nullptr;
62 double positionAlongStrip{0};
63 double positionAlongZ{0};
68 ATH_MSG_WARNING(
"Extrapolated GlobalPosition not on detector surface! Distance " << lpos.z());
71 positionAlongZ = lpos.z();
92 mat(0, 0) = fixedError * fixedError;
100 double timeAlongStrip = 0;
102 timeAlongStrip =
re->distanceToEtaReadout(GP) / 1000. * SIG_VEL;
104 timeAlongStrip =
re->distanceToPhiReadout(GP) / 1000. * SIG_VEL;
106 if (positionAlongZ) timeAlongStrip = 0;
109 double assignedTimFromPrd = 0;
111 assignedTimFromPrd =
re->distanceToEtaReadout(clusPos) / 1000. * SIG_VEL;
113 assignedTimFromPrd =
re->distanceToPhiReadout(clusPos) / 1000. * SIG_VEL;
117 double real_TOF_onRPCgap = GP.mag() / 1000. * C_VEL;
118 double nominal_TOF_onRPCgap = clusPos.mag() / 1000. * C_VEL;
121 double correct_time_tot = real_TOF_onRPCgap
122 - nominal_TOF_onRPCgap
124 - assignedTimFromPrd;
126 MClT =
new RpcClusterOnTrack(MClus, std::move(locpar), std::move(loce),
127 positionAlongStrip, MClus->time() - correct_time_tot);
129 ATH_MSG_DEBUG(
" correct_time_along_strip " << timeAlongStrip <<
" assignedTimFromPrd "
130 << assignedTimFromPrd <<
" real_TOF_onRPCgap " << real_TOF_onRPCgap
131 <<
" nominal_TOF_onRPCgap " << nominal_TOF_onRPCgap <<
" MClus->time() "
132 << MClus->time() <<
" correct_time_tot " << correct_time_tot);
145 if (idHelper.measuresPhi(RIO.
identify())) {
146 const int stripNo = idHelper.channel(RIO.
identify());
160 double Sn2 = Sn * Sn;
161 double Cs2 = 1. - Sn2;
163 double V0 = stripWidth * stripWidth / 12;
165 double V1 = stripLength * stripLength / 12;
166 mat(0, 0) = (Cs2 *
V0 + Sn2 *
V1);
167 mat.fillSymmetric(1, 0, (Sn * std::sqrt(Cs2) * (V0 - V1)));
168 mat(1, 1) = (Sn2 *
V0 + Cs2 *
V1);
178 MClT =
new TgcClusterOnTrack(MClus, std::move(locpar), std::move(loce),
193 MClus->detectorElement()->isEtaZero(MClus->identify(), lp)) {
205 MClT =
new sTgcClusterOnTrack(MClus, std::move(locpar),
206 std::move(loce), positionAlongStrip);
214 MClT =
new MMClusterOnTrack(mmPRD, std::move(locpar), std::move(loce),
215 positionAlongStrip, {}, {});
◆ createRIO_OnTrack() [2/2]
◆ initialize()
| StatusCode MuonClusterOnTrackCreator::initialize |
( |
| ) |
|
|
overridevirtual |
◆ m_calibToolNSW
| ToolHandle<Muon::INSWCalibTool> Muon::MuonClusterOnTrackCreator::m_calibToolNSW {this, "NSWCalibTool", ""} |
|
private |
◆ m_clusterBuilderToolMM
◆ 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_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
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
const Amg::MatrixX & localCovariance() const
return const ref to the error matrix
TechnologyIndex
enum to classify the different layers in the muon spectrometer
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
Gaudi::Property< bool > m_doFixedErrorRpcEta
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Amg::Vector3D toLocal(const Amg::Transform3D &toLocalTrans, const Amg::Vector3D &dir)
Rotates a direction vector into a local frame: x-axis : Parallell to the radial direction of the dete...
::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.
represents the three-dimensional global direction with respect to a planar surface frame.
Identifier identify() const
return the identifier
Gaudi::Property< bool > m_doFixedErrorTgcPhi
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
const boost::regex re(r_e)
Gaudi::Property< double > m_fixedErrorTgcPhi
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
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 ...
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
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...