|
ATLAS Offline Software
|
#include <TrigT1TGCRecRoiTool.h>
|
| TrigT1TGCRecRoiTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~TrigT1TGCRecRoiTool () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | roiData (const unsigned int &roiWord, TrigT1MuonRecRoiData &data) const override |
|
virtual StatusCode | RoIsize (const unsigned int &roiWord, double &etaMin, double &etaMax, double &phiMin, double &phiMax) const override |
|
virtual bool | dumpRoiMap (const std::string &filename) const override |
|
bool | etaDimLow (const TrigT1MuonRecRoiData &, double &, double &) const override |
|
bool | etaDimHigh (const TrigT1MuonRecRoiData &, double &, double &) const override |
|
|
bool | getSLBparameters (const unsigned int &roIWord, MuonTGC_Cabling::TGCId &tgcId, unsigned int §orID, unsigned int &roiNumber, unsigned int &r, unsigned int &phi, int &wireSLBId, int &block) const |
|
std::unique_ptr< MuonTGC_Cabling::TGCChannelId > | getWireASDOut (const MuonTGC_Cabling::TGCId &tgcId, unsigned int sectorID, int wireSLBId, int block, int phi, int offset) const |
|
std::unique_ptr< MuonTGC_Cabling::TGCChannelId > | getStripASDOut (const MuonTGC_Cabling::TGCId &tgcId, unsigned int sectorID, int wireSLBId, int block, int phi, int wireOffset, int stripOffset=DummyOffset) const |
|
void | getWireInfo (double &eta, double &phi, Identifier &wireId, std::unique_ptr< MuonTGC_Cabling::TGCChannelId > w_asdout, EdgeType edge=NonEdge) const |
|
void | getStripInfo (double &eta, double &phi, Identifier &stripId, std::unique_ptr< MuonTGC_Cabling::TGCChannelId > s_asdout, EdgeType edge=NonEdge) const |
|
|
BooleanProperty | m_useRun3Config {this,"UseRun3Config",false,"use Run 3 config"} |
|
BooleanProperty | m_patchForRoIWord {this,"PatchForRoIWord",false,"apply a patch to RoI word"} |
|
BooleanProperty | m_useConditionData {this,"UseConditionData",true,"use condition data"} |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey {this, "DetectorManagerKey","MuonDetectorManager","Key of input MuonDetectorManager condition data"} |
|
ServiceHandle< MuonTGC_CablingSvc > | m_cabling {this, "TGCCablingSvc", "MuonTGC_CablingSvc"} |
|
Definition at line 26 of file TrigT1TGCRecRoiTool.h.
◆ DummyOffset
◆ EdgeType
Enumerator |
---|
NonEdge | |
LowerREdge | |
UpperREdge | |
LowerPhiEdge | |
UpperPhiEdge | |
Definition at line 48 of file TrigT1TGCRecRoiTool.h.
◆ TrigT1TGCRecRoiTool()
LVL1::TrigT1TGCRecRoiTool::TrigT1TGCRecRoiTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~TrigT1TGCRecRoiTool()
LVL1::TrigT1TGCRecRoiTool::~TrigT1TGCRecRoiTool |
( |
| ) |
|
|
virtual |
◆ dumpRoiMap()
bool LVL1::TrigT1TGCRecRoiTool::dumpRoiMap |
( |
const std::string & |
filename | ) |
const |
|
overridevirtual |
Definition at line 441 of file TrigT1TGCRecRoiTool.cxx.
443 const unsigned int maxSubsystem = 2;
444 const unsigned int maxTriggerSectorEndcap = 48;
445 const unsigned int maxTriggerSectorForward = 24;
447 const unsigned int maxEndcapR = 37;
448 const unsigned int maxForwardR = 16;
450 const unsigned int maxEndcapPhi = 4;
451 const unsigned int maxForwardPhi = 4;
453 std::ofstream roi_map;
458 roi_map <<
"Endcap"<< std::endl;
459 roi_map <<
"# side sector roi etaMin etaMax phiMin phiMax"<< std::endl;
460 roi_map <<
"# ------------------------------------------------------------------------"<< std::endl;
462 for(
unsigned int sector=0;sector < maxTriggerSectorEndcap; sector++){
463 for (
unsigned int r=0;
r<maxEndcapR;
r++){
464 for (
unsigned int phi=0;
phi<maxEndcapPhi;
phi++){
465 int roi = (
r<<2) + phi;
466 int sectorAddress = sector<<1;
467 sectorAddress |= 0x80;
468 sectorAddress |= (
side==0)?(0
x1):(0x0);
469 unsigned long int roiWord = (
m_useRun3Config) ? (roi+(sectorAddress<<21)) : ((roi<<2)+(sectorAddress<<14));
470 TrigT1MuonRecRoiData
data;
472 roi_map << std::setw(8) <<
side <<
" "
473 << std::setw(8) << sector <<
" "
474 << std::setw(8) << roi <<
" "
475 << std::setw(12) <<
data.etaMin() <<
" "
476 << std::setw(12) <<
data.etaMax() <<
" "
477 << std::setw(12) <<
data.phiMin() <<
" "
478 << std::setw(12) <<
data.phiMax() << std::endl;
483 roi_map <<
"Forward"<< std::endl;
484 roi_map <<
"# side sector roi etaMin etaMax phiMin phiMax"<< std::endl;
485 roi_map <<
"# ------------------------------------------------------------------------"<< std::endl;
487 for(
unsigned int sector=0;sector < maxTriggerSectorForward; sector++){
488 for (
unsigned int r=0;
r<maxForwardR;
r++){
489 for (
unsigned int phi=0;
phi<maxForwardPhi;
phi++){
490 int roi = (
r<<2) + phi;
491 int sectorAddress = sector<<1;
492 sectorAddress |= 0x80;
493 sectorAddress |= (
side==0)?(0
x1):(0x0);
494 unsigned long int roiWord = (
m_useRun3Config) ? (roi+(sectorAddress<<21)) : ((roi<<2)+(sectorAddress<<14));
495 TrigT1MuonRecRoiData
data;
497 roi_map << std::setw(8) <<
side <<
" "
498 << std::setw(8) << sector <<
" "
499 << std::setw(8) << roi <<
" "
500 << std::setw(12) <<
data.etaMin() <<
" "
501 << std::setw(12) <<
data.etaMax() <<
" "
502 << std::setw(12) <<
data.phiMin() <<
" "
503 << std::setw(12) <<
data.phiMax() << std::endl;
◆ etaDimHigh()
◆ etaDimLow()
◆ getSLBparameters()
bool LVL1::TrigT1TGCRecRoiTool::getSLBparameters |
( |
const unsigned int & |
roIWord, |
|
|
MuonTGC_Cabling::TGCId & |
tgcId, |
|
|
unsigned int & |
sectorID, |
|
|
unsigned int & |
roiNumber, |
|
|
unsigned int & |
r, |
|
|
unsigned int & |
phi, |
|
|
int & |
wireSLBId, |
|
|
int & |
block |
|
) |
| const |
|
private |
Definition at line 96 of file TrigT1TGCRecRoiTool.cxx.
108 wireSLBId = block = 0;
115 unsigned int t_sectorID;
123 t_sectorID = getBitMaskValue(&
roiWord,ForwardSectorIDMask());
129 isOK = (t_sectorID<32) && (
roiNumber<64);
131 isOK = (t_sectorID<24) && (
roiNumber<64);
135 r = getBitMaskValue(&
roiWord,ForwardRMask());
136 phi = getBitMaskValue(&
roiWord,ForwardPhiMask());
141 int sec = (t_sectorID + 2 )%32;
143 sectorID = 3*oct + sec%3;
145 sectorID = (t_sectorID )%24;
148 }
else if (sysID>1) {
152 t_sectorID = getBitMaskValue(&
roiWord,EndcapSectorIDMask());
156 isOK = (t_sectorID<48) && (
roiNumber<148);
159 r = getBitMaskValue(&
roiWord,EndcapRMask());
160 phi = getBitMaskValue(&
roiWord,EndcapPhiMask());
165 sectorID = (t_sectorID + 2 )%48;
167 sectorID = (t_sectorID )%48;
172 <<
" roi word = " << std::hex <<
roiWord
173 <<
" sysID = " << std::dec << sysID );
179 <<
" roi word = " << std::hex <<
roiWord
180 <<
" sysID = " << std::dec << sysID
181 <<
" subSysID = " << std::dec << subSysID
183 <<
" trigger sectorID = " << std::dec << t_sectorID
184 <<
" sectorID = " << std::dec << sectorID
185 <<
" roiNumber = " << std::dec <<
roiNumber );
189 <<
" sysID = " << std::dec << sysID
190 <<
" subSysID = " << std::dec << subSysID
192 <<
" trigger sectorID = " << std::dec << t_sectorID
193 <<
" sectorID = " << std::dec << sectorID
194 <<
" roiNumber = " << std::dec <<
roiNumber );
◆ getStripASDOut()
Definition at line 222 of file TrigT1TGCRecRoiTool.cxx.
230 if(stripOffset==
DummyOffset) stripOffset = wireOffset;
237 w_slbin.setSector(sectorID);
238 w_slbin.setId(wireSLBId);
239 w_slbin.setChannel(41+wireOffset+8*block);
242 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> w_asdout(tgcCabling->
getASDOutChannel(&w_slbin));
245 int stripSLBId = w_asdout->getChamber();
251 s_slbin.setSector(sectorID);
252 s_slbin.setId(stripSLBId);
253 s_slbin.setChannel(41+stripOffset+8*phi);
255 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> s_asdout(tgcCabling->
getASDOutChannel(&s_slbin));
◆ getStripInfo()
Definition at line 307 of file TrigT1TGCRecRoiTool.cxx.
315 int subsystemNumber = (s_asdout->
isAside())? 1 : -1;
316 int wireOrStrip = (s_asdout->
isStrip())? 1 : 0;
325 if (
status==
false)
return;
329 if(muonMgr==
nullptr){
330 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
337 s_pos = tgcstrip -> channelPos(stripId);
346 double halfWidth = (shortWidth + longWidth)/4.;
347 double r = s_pos.perp();
348 double phi = s_pos.phi();
349 double dPhi = atan2(halfWidth,
r);
◆ getWireASDOut()
Definition at line 201 of file TrigT1TGCRecRoiTool.cxx.
212 w_slbin.setSector(sectorID);
213 w_slbin.setId(wireSLBId);
214 w_slbin.setChannel(41+
offset+8*block);
217 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> w_asdout(tgcCabling->
getASDOutChannel(&w_slbin));
◆ getWireInfo()
Definition at line 259 of file TrigT1TGCRecRoiTool.cxx.
267 int subsystemNumber = (w_asdout->
isAside())? 1 : -1;
268 int wireOrStrip = (w_asdout->
isStrip())? 1 : 0;
277 if (
status==
false)
return;
281 if(muonMgr==
nullptr){
282 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
289 w_pos = tgcwire -> channelPos(wireId);
297 double r = w_pos.perp();
298 double phi = w_pos.phi();
◆ initialize()
StatusCode LVL1::TrigT1TGCRecRoiTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ roiData()
Definition at line 33 of file TrigT1TGCRecRoiTool.cxx.
41 <<
"Can not get SLBparameters "
42 <<
" roi word = " << std::hex <<
roiWord );
43 return StatusCode::FAILURE;
47 <<
"This roiWord is not of TGC" );
48 return StatusCode::FAILURE;
54 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> w_asdout =
56 if (w_asdout ==
nullptr) {
58 <<
"Cannot get ASD out for Wire " );
59 return StatusCode::FAILURE;
62 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> s_asdout =
64 if (s_asdout ==
nullptr) {
66 <<
"Cannot get ASD out for Strip " );
67 return StatusCode::FAILURE;
73 getWireInfo(w_eta,w_phi,wireId,std::move(w_asdout));
80 ATH_MSG_DEBUG(
"(eta,phi)=" <<
" (" << w_eta <<
","<< s_phi <<
")" );
81 ATH_MSG_DEBUG(
"channelId_eta=" << wireId <<
" channelId_phi=" << stripId );
90 data.set_phiMin(phiMin);
91 data.set_phiMax(phiMax);
93 return StatusCode::SUCCESS;
◆ RoIsize()
StatusCode LVL1::TrigT1TGCRecRoiTool::RoIsize |
( |
const unsigned int & |
roiWord, |
|
|
double & |
etaMin, |
|
|
double & |
etaMax, |
|
|
double & |
phiMin, |
|
|
double & |
phiMax |
|
) |
| const |
|
overridevirtual |
Definition at line 358 of file TrigT1TGCRecRoiTool.cxx.
366 int wireSLBId, block;
367 double w_eta,w_phi,s_eta,s_phi;
370 for(
int i=0;
i<2;
i++) {
376 return StatusCode::FAILURE;
381 <<
"This roiWord is not of TGC" );
382 return StatusCode::FAILURE;
388 if(wireOffset==1) wireOffset = 3;
390 if(wireOffset==8) wireOffset = 4;
394 if(wireOffset==1) wireOffset = 4;
396 if(wireOffset==8) wireOffset = 5;
400 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> w_asdout =
401 getWireASDOut(tgcId,sectorID,wireSLBId,block,phi,wireOffset);
403 std::unique_ptr<MuonTGC_Cabling::TGCChannelId> s_asdout =
406 if (w_asdout!=
nullptr) {
412 if (s_asdout!=
nullptr) {
417 getStripInfo(s_eta,s_phi,stripId,std::move(s_asdout),stripEdge);
418 if (
i==0) phiMin=s_phi;
429 double temp=phiMin; phiMin=phiMax; phiMax=temp;
432 if(phiMin<-3. && phiMax>3.) {
435 double temp=phiMin; phiMin=phiMax; phiMax=temp;
438 return StatusCode::SUCCESS;
◆ m_cabling
◆ m_DetectorManagerKey
◆ m_idHelperSvc
◆ m_patchForRoIWord
BooleanProperty LVL1::TrigT1TGCRecRoiTool::m_patchForRoIWord {this,"PatchForRoIWord",false,"apply a patch to RoI word"} |
|
private |
◆ m_useConditionData
BooleanProperty LVL1::TrigT1TGCRecRoiTool::m_useConditionData {this,"UseConditionData",true,"use condition data"} |
|
private |
◆ m_useRun3Config
BooleanProperty LVL1::TrigT1TGCRecRoiTool::m_useRun3Config {this,"UseRun3Config",false,"use Run 3 config"} |
|
private |
The documentation for this class was generated from the following files:
char data[hepevt_bytes_allocation_ATLAS]
void setRegionType(RegionType region)
SideType getSideType(void) const
RegionType getRegionType(void) const
void setSideType(SideType side)
const TgcReadoutElement * getTgcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
A TgcReadoutElement corresponds to a single TGC chamber; therefore typically a TGC station contains s...
virtual TGCChannelId * getASDOutChannel(const TGCChannelId *slb_in) const
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
double stripLongWidth(int, int) const
setTeId setLumiBlock setRoiId setRoiSubsystem roiNumber
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
double stripShortWidth(int, int) const
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
virtual int getSectorModule() const