23 {
24 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getPassedChambers(): Start");
25 double ext_x = extVec[0];
26 double ext_y = extVec[1];
27 double ext_z = extVec[2];
28 std::set<std::string> passed_chambers;
29 SG::ReadCondHandle<MuonGM::MuonDetectorManager> DetectorManagerHandle{
m_DetectorManagerKey,Gaudi::Hive::currentContext()};
30 const MuonGM::MuonDetectorManager* muonMgr = DetectorManagerHandle.
cptr();
31 if(muonMgr==nullptr){
32 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
33 return passed_chambers;
34 }
35 for(int iStationName = 41 ; iStationName <= 48 ; iStationName++){
36 if ( (iStationName==41 || iStationName==42) &&
38 if ( (iStationName==43 || iStationName==44) &&
40 if ((iStationName==45 || iStationName==46) &&
42 if ( iStationName==48 &&
44 if ( iStationName==47 &&
46 bool endcap = (iStationName%2==0);
48 if(endcap && iStationName==42)
maxEta = 4;
49 else if(endcap && (iStationName==44 || iStationName==46))
maxEta = 5;
50 for(
int iStationEta = -maxEta ; iStationEta <=
maxEta ; iStationEta++){
51 if(iStationEta==0)continue;
52 if(ext_z > 0 && iStationEta < 0)continue;
53 if(ext_z < 0 && iStationEta > 0)continue;
55 iStationPhi <= muonMgr->tgcIdHelper()->stationPhiMax(endcap) ; iStationPhi++){
56 if(iStationName==48 && iStationPhi>21)continue;
57 TGC::TgcChamber tgcChamber; tgcChamber.
initChamber(iStationEta, iStationPhi, iStationName);
61
63 const Trk::TrapezoidBounds*
tb =
static_cast<const Trk::TrapezoidBounds*
>(&detEle->
bounds());
65 if(std::abs(trkLocVec3D.x())>1000.)continue;
66 if(std::abs(trkLocVec3D.y())>1500.)continue;
69 }
70 }
71 }
72
73 ATH_MSG_DEBUG(
"TgcRawDataMonitorTool::getPassedChambers(): End");
74 ATH_MSG_DEBUG(
"Number of passed TGC chambers: " << passed_chambers.size());
75 return passed_chambers;
76}
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
const TgcIdHelper * tgcIdHelper() const
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const_pointer_type cptr()
void initChamber(const std::string &chamber_name)
const std::string & cham_name() const
Identifier elementID(int stationName, int stationEta, int stationPhi) const
static int stationPhiMin(bool endcap)
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D