17 if (!MuonDetMgr) {
return false; }
19 if (!cscSdoContainer.
isValid()) {
23 unsigned int n_sdo{0};
24 for (
const auto& coll : *cscSdoContainer) {
32 std::vector<CscSimData::Deposit> deposits;
35 int truth_barcode = deposits[0].first.barcode();
36 double truth_localPosX = deposits[0].second.zpos();
37 double truth_localPosY = deposits[0].second.ypos();
38 double truth_charge = deposits[0].second.charge();
44 ATH_MSG_ERROR(
"CSCSDOVariables::fillVariables() - Failed to retrieve CscReadoutElement for " <<
idHelperSvc()->toString(
id));
48 Amg::Vector2D hit_on_surface(truth_localPosX, truth_localPosY);
62 ATH_MSG_DEBUG(
"CSC SDO localPosX=" << std::setw(9) << std::setprecision(2) << truth_localPosX
63 <<
", localPosY=" << std::setw(9) << std::setprecision(2) << truth_localPosY
64 <<
", truth charge=" << std::setw(8) << std::setprecision(5) << truth_charge);
void deposits(std::vector< Deposit > &deposits) const
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const CscReadoutElement * getCscReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
CscIdentifierBranch m_csc_sdo_id
ScalarBranch< unsigned int > & m_csc_nsdo
VectorBranch< int > & m_csc_sdo_word
VectorBranch< float > & m_csc_sdo_localPosY
CscSDOVariables(MuonTesterTree &tree, const std::string &container_name, MSG::Level msglvl)
ThreeVectorBranch m_CSC_dig_globalPos
bool declare_keys() override final
VectorBranch< int > & m_csc_sdo_barcode
bool fill(const EventContext &ctx) override final
The fill method checks if enough information is provided such that the branch is cleared from the inf...
VectorBranch< double > & m_csc_sdo_charge
VectorBranch< float > & m_csc_sdo_localPosX
SG::ReadHandleKey< CscSimDataCollection > m_key
const MuonGM::MuonDetectorManager * getDetMgr(const EventContext &ctx) const
const Muon::IMuonIdHelperSvc * idHelperSvc() const
PrdTesterModule(MuonTesterTree &tree, const std::string &grp_name, MSG::Level msglvl)
bool declare_dependency(Key &key)
Declares the ReadHandle/ ReadCondHandleKey as data dependency of the algorithm.
TTree * tree() override final
Returns the underlying TTree object.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const override
This method calls the inside() method of the Bounds.
virtual bool isOnSurface(const Amg::Vector3D &glopo, const BoundaryCheck &bchk=true, double tol1=0., double tol2=0.) const override final
This method returns true if the GlobalPosition is on the Surface for both, within or without check of...
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const override final
Specified for PlaneSurface: LocalToGlobal method without dynamic memory allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D