|
ATLAS Offline Software
|
Go to the documentation of this file.
7 #include "GaudiKernel/PhysicalConstants.h"
10 #include "GaudiKernel/ITHistSvc.h"
26 ATH_CHECK(
book(TH2D(
"DriftRadiusVsTdc",
"DriftRadiusVsTdc", 100, 0., 680., 100, 0., 15.),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
27 ATH_CHECK(
book(TH2D(
"DriftdRdtVsTdc",
"DriftdRdtVsTdc", 100, 0., 680., 100, 0., 0.6),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
28 ATH_CHECK(
book(TH2D(
"DriftTimeVsDriftRadius",
"DriftTimeVsDriftRadius", 100, 0., 15., 100, 0., 680.),
"MdtCalibDbAlgTest",
"MdtCalibDbAlgTest"));
29 return StatusCode::SUCCESS;
35 return StatusCode::SUCCESS;
40 const EventContext& ctx = Gaudi::Hive::currentContext();
53 const float driftV =
m_calibrationTool->getCalibConstants(ctx, mdt->identify())->rtRelation->rt()->driftVelocity(tdcAdj);
54 std::optional<double>
driftTime =
m_calibrationTool->getCalibConstants(ctx, mdt->identify())->rtRelation->tr()->driftTime(mdt->driftRadius());
55 const float f_driftTime =
static_cast<float>(
driftTime.value_or(0.));
64 hist(
"DriftRadiusVsTdc")->Fill(tdcAdj, mdt->driftRadius());
65 hist(
"DriftdRdtVsTdc")->Fill(tdcAdj, driftV);
66 hist(
"DriftTimeVsDriftRadius")->Fill(mdt->driftRadius(), f_driftTime);
70 return StatusCode::SUCCESS;
MuonVal::ScalarBranch< float > & m_out_driftdRdt
MuonVal::ScalarBranch< float > & m_out_tubeLength
MuonVal::ScalarBranch< float > & m_out_driftTime
StatusCode init(OWNER *instance)
Initialize method.
MuonVal::ScalarBranch< Identifier > & m_out_identifier
StatusCode book(const TH1 &hist, const std::string &tDir="", const std::string &stream="")
Simplify the booking and registering (into THistSvc) of histograms.
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
SG::ReadHandleKey< xAOD::MdtDriftCircleContainer > m_MdtKey
#define ATH_MSG_VERBOSE(x)
MuonVal::ScalarBranch< float > & m_out_globalPosZ
MuonVal::ScalarBranch< float > & m_out_tdc
::StatusCode StatusCode
StatusCode definition for legacy code.
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
Eigen::Matrix< double, 3, 1 > Vector3D
MuonVal::ScalarBranch< float > & m_out_driftRadius
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
MdtCalibDbAlgTest(const std::string &name, ISvcLocator *pSvcLocator)
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
https://gitlab.cern.ch/atlas/athena/-/blob/master/MuonSpectrometer/MuonReconstruction/MuonRecEvent/Mu...