Loading [MathJax]/extensions/tex2jax.js
 |
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/PhysicalConstants.h"
10 #include "GaudiKernel/ITHistSvc.h"
23 ATH_CHECK(
book(TH2D(
"DriftRadiusVsTime",
"DriftRadiusVsTime", 680, 0., 680., 100, 0., 15.),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
24 ATH_CHECK(
book(TH2D(
"DriftVelocityVsTime",
"DriftVelocityVsTime", 680, 0., 680., 140, -0.1, 0.6),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
25 ATH_CHECK(
book(TH2D(
"DriftTimeVsRadius",
"DriftTimeVsRadius", 100, 0., 15., 680, 0., 680.),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
26 ATH_CHECK(
book(TH2D(
"DriftTimeClosure",
"DriftTimeClosure", 680, 0., 680., 680, 0., 680.),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
28 return StatusCode::SUCCESS;
34 return StatusCode::SUCCESS;
38 const EventContext& ctx = Gaudi::Hive::currentContext();
54 const float driftV =
m_calibrationTool->getCalibConstants(ctx, mdt->identify())->rtRelation->rt()->driftVelocity(tdcAdj);
55 std::optional<double>
driftTime =
m_calibrationTool->getCalibConstants(ctx, mdt->identify())->rtRelation->tr()->driftTime(mdt->driftRadius());
56 const float f_driftTime =
static_cast<float>(
driftTime.value_or(0.));
71 hist(
"DriftRadiusVsTime")->Fill(tdcAdj, mdt->driftRadius());
72 hist(
"DriftVelocityVsTime")->Fill(tdcAdj, driftV);
73 hist(
"DriftTimeVsRadius")->Fill(mdt->driftRadius(), f_driftTime);
74 hist(
"DriftTimeClosure")->Fill(tdcAdj, f_driftTime);
78 return StatusCode::SUCCESS;
MuonVal::ScalarBranch< float > & m_out_tubeLength
MuonVal::ScalarBranch< float > & m_out_driftTime
StatusCode init(OWNER *instance)
Initialize method.
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
MuonVal::ScalarBranch< uint8_t > & m_out_stPhi
virtual StatusCode initialize() override
double activeTubeLength(const IdentifierHash &hash) const
MuonVal::ScalarBranch< float > & m_out_tdcAdj
SG::ReadHandleKey< ActsGeometryContext > m_geoCtxKey
MuonVal::ScalarBranch< float > & m_out_globalPos
MuonVal::ScalarBranch< uint8_t > & m_out_tube
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_MdtKey
#define ATH_MSG_VERBOSE(x)
MuonVal::ScalarBranch< float > & m_out_globalPosZ
@ MdtStatusDriftTime
The tube produced a vaild measurement.
MuonVal::ScalarBranch< float > & m_out_tdc
unsigned int multilayer() const
Returns the multi layer of the MdtReadoutElement.
MuonVal::ScalarBranch< uint8_t > & m_out_stIndex
::StatusCode StatusCode
StatusCode definition for legacy code.
MuonVal::ScalarBranch< float > & m_out_driftVelocity
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
MuonVal::ScalarBranch< float > & m_out_globalPosY
Lightweight algorithm to read xAOD MDT sim hits and (fast-digitised) drift circles from SG and fill a...
ToolHandle< IMdtCalibrationTool > m_calibrationTool
pointer to MdtCalibSvc
MuonVal::MuonTesterTree m_tree
MuonVal::ScalarBranch< uint8_t > & m_out_ml
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< float > & m_out_driftRadius
int stationName() const
Returns the stationName (BIS, BOS, etc) encoded into the integer.
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MuonVal::ScalarBranch< uint8_t > & m_out_tl
virtual StatusCode finalize() override
virtual StatusCode execute() override
bool fill(const EventContext &ctx)
Fills the tree per call.
StatusCode write()
Finally write the TTree objects.
Amg::Vector3D globalTubePos(const ActsGeometryContext &ctx, const Identifier &measId) const
Returns the global position of the tube center.
TH1 * hist(const std::string &histName, const std::string &tDir="", const std::string &stream="")
Simplify the retrieval of registered histograms of any type.
MuonVal::ScalarBranch< float > & m_out_globalPosX
int stationEta() const
Returns the stationEta (positive A site, negative O site)
MuonVal::ScalarBranch< int16_t > & m_out_stEta
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...
int stationPhi() const
Returns the stationPhi (1-8) -> sector (2*phi - (isSmall))