![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
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, TGCIdBase &tgcIdBase, unsigned int §orID, unsigned int &roiNumber, unsigned int &r, unsigned int &phi, int &wireSLBId, int &block) const |
|
std::unique_ptr< TGCIdBase > | getWireASDOut (const TGCIdBase &tgcIdBase, unsigned int sectorID, int wireSLBId, int block, int phi, int offset) const |
|
std::unique_ptr< TGCIdBase > | getStripASDOut (const TGCIdBase &tgcIdBase, 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< TGCIdBase > w_asdout, EdgeType edge=NonEdge) const |
|
void | getStripInfo (double &eta, double &phi, Identifier &stripId, std::unique_ptr< TGCIdBase > 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"} |
|
const ITGCcablingSvc * | m_cabling {nullptr} |
|
Definition at line 23 of file TrigT1TGCRecRoiTool.h.
◆ DummyOffset
◆ EdgeType
Enumerator |
---|
NonEdge | |
LowerREdge | |
UpperREdge | |
LowerPhiEdge | |
UpperPhiEdge | |
Definition at line 45 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 458 of file TrigT1TGCRecRoiTool.cxx.
460 const unsigned int maxSubsystem = 2;
461 const unsigned int maxTriggerSectorEndcap = 48;
462 const unsigned int maxTriggerSectorForward = 24;
464 const unsigned int maxEndcapR = 37;
465 const unsigned int maxForwardR = 16;
467 const unsigned int maxEndcapPhi = 4;
468 const unsigned int maxForwardPhi = 4;
470 std::ofstream roi_map;
475 roi_map <<
"Endcap"<< std::endl;
476 roi_map <<
"# side sector roi etaMin etaMax phiMin phiMax"<< std::endl;
477 roi_map <<
"# ------------------------------------------------------------------------"<< std::endl;
479 for(
unsigned int sector=0;sector < maxTriggerSectorEndcap; sector++){
480 for (
unsigned int r=0;
r<maxEndcapR;
r++){
481 for (
unsigned int phi=0;
phi<maxEndcapPhi;
phi++){
482 int roi = (
r<<2) +
phi;
483 int sectorAddress = sector<<1;
484 sectorAddress |= 0x80;
485 sectorAddress |= (
side==0)?(0
x1):(0x0);
486 unsigned long int roiWord = (
m_useRun3Config) ? (roi+(sectorAddress<<21)) : ((roi<<2)+(sectorAddress<<14));
487 TrigT1MuonRecRoiData
data;
489 roi_map << std::setw(8) <<
side <<
" "
490 << std::setw(8) << sector <<
" "
491 << std::setw(8) << roi <<
" "
492 << std::setw(12) <<
data.etaMin() <<
" "
493 << std::setw(12) <<
data.etaMax() <<
" "
494 << std::setw(12) <<
data.phiMin() <<
" "
495 << std::setw(12) <<
data.phiMax() << std::endl;
500 roi_map <<
"Forward"<< std::endl;
501 roi_map <<
"# side sector roi etaMin etaMax phiMin phiMax"<< std::endl;
502 roi_map <<
"# ------------------------------------------------------------------------"<< std::endl;
504 for(
unsigned int sector=0;sector < maxTriggerSectorForward; sector++){
505 for (
unsigned int r=0;
r<maxForwardR;
r++){
506 for (
unsigned int phi=0;
phi<maxForwardPhi;
phi++){
507 int roi = (
r<<2) +
phi;
508 int sectorAddress = sector<<1;
509 sectorAddress |= 0x80;
510 sectorAddress |= (
side==0)?(0
x1):(0x0);
511 unsigned long int roiWord = (
m_useRun3Config) ? (roi+(sectorAddress<<21)) : ((roi<<2)+(sectorAddress<<14));
512 TrigT1MuonRecRoiData
data;
514 roi_map << std::setw(8) <<
side <<
" "
515 << std::setw(8) << sector <<
" "
516 << std::setw(8) << roi <<
" "
517 << std::setw(12) <<
data.etaMin() <<
" "
518 << std::setw(12) <<
data.etaMax() <<
" "
519 << std::setw(12) <<
data.phiMin() <<
" "
520 << std::setw(12) <<
data.phiMax() << std::endl;
◆ etaDimHigh()
◆ etaDimLow()
◆ getSLBparameters()
bool LVL1::TrigT1TGCRecRoiTool::getSLBparameters |
( |
const unsigned int & |
roIWord, |
|
|
TGCIdBase & |
tgcIdBase, |
|
|
unsigned int & |
sectorID, |
|
|
unsigned int & |
roiNumber, |
|
|
unsigned int & |
r, |
|
|
unsigned int & |
phi, |
|
|
int & |
wireSLBId, |
|
|
int & |
block |
|
) |
| const |
|
private |
Definition at line 101 of file TrigT1TGCRecRoiTool.cxx.
114 wireSLBId = block = 0;
121 unsigned int t_sectorID;
129 t_sectorID = getBitMaskValue(&
roiWord,ForwardSectorIDMask());
135 isOK = (t_sectorID<32) && (
roiNumber<64);
137 isOK = (t_sectorID<24) && (
roiNumber<64);
141 r = getBitMaskValue(&
roiWord,ForwardRMask());
142 phi = getBitMaskValue(&
roiWord,ForwardPhiMask());
147 int sec = (t_sectorID + 2 )%32;
149 sectorID = 3*oct + sec%3;
151 sectorID = (t_sectorID )%24;
154 }
else if (sysID>1) {
158 t_sectorID = getBitMaskValue(&
roiWord,EndcapSectorIDMask());
162 isOK = (t_sectorID<48) && (
roiNumber<148);
165 r = getBitMaskValue(&
roiWord,EndcapRMask());
166 phi = getBitMaskValue(&
roiWord,EndcapPhiMask());
171 sectorID = (t_sectorID + 2 )%48;
173 sectorID = (t_sectorID )%48;
178 <<
" roi word = " << std::hex <<
roiWord
179 <<
" sysID = " << std::dec << sysID );
185 <<
" roi word = " << std::hex <<
roiWord
186 <<
" sysID = " << std::dec << sysID
187 <<
" subSysID = " << std::dec << subSysID
189 <<
" trigger sectorID = " << std::dec << t_sectorID
190 <<
" sectorID = " << std::dec << sectorID
191 <<
" roiNumber = " << std::dec <<
roiNumber );
195 <<
" sysID = " << std::dec << sysID
196 <<
" subSysID = " << std::dec << subSysID
198 <<
" trigger sectorID = " << std::dec << t_sectorID
199 <<
" sectorID = " << std::dec << sectorID
200 <<
" roiNumber = " << std::dec <<
roiNumber );
◆ getStripASDOut()
std::unique_ptr< TGCIdBase > LVL1::TrigT1TGCRecRoiTool::getStripASDOut |
( |
const TGCIdBase & |
tgcIdBase, |
|
|
unsigned int |
sectorID, |
|
|
int |
wireSLBId, |
|
|
int |
block, |
|
|
int |
phi, |
|
|
int |
wireOffset, |
|
|
int |
stripOffset = DummyOffset |
|
) |
| const |
|
private |
Definition at line 228 of file TrigT1TGCRecRoiTool.cxx.
238 if(stripOffset==
DummyOffset) stripOffset = wireOffset;
246 w_slbin.setSector(sectorID);
247 w_slbin.setId(wireSLBId);
248 w_slbin.setChannel(41+wireOffset+8*block);
251 std::unique_ptr<TGCIdBase> w_asdout( tgcCabling->
getASDOutChannel(&w_slbin) );
254 int stripSLBId = w_asdout->getChamber();
261 s_slbin.setSector(sectorID);
262 s_slbin.setId(stripSLBId);
263 s_slbin.setChannel(41+stripOffset+8*
phi);
265 std::unique_ptr<TGCIdBase> s_asdout( tgcCabling->
getASDOutChannel (&s_slbin) );
◆ getStripInfo()
Definition at line 318 of file TrigT1TGCRecRoiTool.cxx.
328 int subsystemNumber = (s_asdout->
isAside())? 1 : -1;
329 int wireOrStrip = (s_asdout->
isStrip())? 1 : 0;
338 if (
status==
false)
return;
342 if(muonMgr==
nullptr){
343 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
350 s_pos = tgcstrip -> channelPos(stripId);
359 double halfWidth = (shortWidth + longWidth)/4.;
360 double r = s_pos.perp();
361 double phi = s_pos.phi();
362 double dPhi = atan2(halfWidth,
r);
◆ getWireASDOut()
std::unique_ptr< TGCIdBase > LVL1::TrigT1TGCRecRoiTool::getWireASDOut |
( |
const TGCIdBase & |
tgcIdBase, |
|
|
unsigned int |
sectorID, |
|
|
int |
wireSLBId, |
|
|
int |
block, |
|
|
int |
phi, |
|
|
int |
offset |
|
) |
| const |
|
private |
Definition at line 206 of file TrigT1TGCRecRoiTool.cxx.
219 w_slbin.setSector(sectorID);
220 w_slbin.setId(wireSLBId);
221 w_slbin.setChannel(41+
offset+8*block);
224 std::unique_ptr<TGCIdBase> w_asdout( tgcCabling->
getASDOutChannel (&w_slbin) );
◆ getWireInfo()
Definition at line 269 of file TrigT1TGCRecRoiTool.cxx.
278 int subsystemNumber = (w_asdout->
isAside())? 1 : -1;
279 int wireOrStrip = (w_asdout->
isStrip())? 1 : 0;
288 if (
status==
false)
return;
292 if(muonMgr==
nullptr){
293 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object.");
300 w_pos = tgcwire -> channelPos(wireId);
308 double r = w_pos.perp();
309 double phi = w_pos.phi();
◆ initialize()
StatusCode LVL1::TrigT1TGCRecRoiTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ roiData()
Definition at line 37 of file TrigT1TGCRecRoiTool.cxx.
46 <<
"Can not get SLBparameters "
47 <<
" roi word = " << std::hex <<
roiWord );
48 return StatusCode::FAILURE;
52 <<
"This roiWord is not of TGC" );
53 return StatusCode::FAILURE;
59 std::unique_ptr<TGCIdBase> w_asdout =
61 if (w_asdout ==
nullptr) {
63 <<
"Cannot get ASD out for Wire " );
64 return StatusCode::FAILURE;
67 std::unique_ptr<TGCIdBase> s_asdout =
69 if (s_asdout ==
nullptr) {
71 <<
"Cannot get ASD out for Strip " );
72 return StatusCode::FAILURE;
78 getWireInfo(w_eta,w_phi,wireId,std::move(w_asdout));
85 ATH_MSG_DEBUG(
"(eta,phi)=" <<
" (" << w_eta <<
","<< s_phi <<
")" );
86 ATH_MSG_DEBUG(
"channelId_eta=" << wireId <<
" channelId_phi=" << stripId );
95 data.set_phiMin(phiMin);
96 data.set_phiMax(phiMax);
98 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 373 of file TrigT1TGCRecRoiTool.cxx.
382 int wireSLBId, block;
383 double w_eta,w_phi,s_eta,s_phi;
386 for(
int i=0;
i<2;
i++) {
392 return StatusCode::FAILURE;
397 <<
"This roiWord is not of TGC" );
398 return StatusCode::FAILURE;
404 if(wireOffset==1) wireOffset = 3;
406 if(wireOffset==8) wireOffset = 4;
410 if(wireOffset==1) wireOffset = 4;
412 if(wireOffset==8) wireOffset = 5;
416 std::unique_ptr<TGCIdBase> w_asdout =
419 std::unique_ptr<TGCIdBase> s_asdout =
422 if (w_asdout!=
nullptr) {
428 if (s_asdout!=
nullptr) {
433 getStripInfo(s_eta,s_phi,stripId,std::move(s_asdout),stripEdge);
434 if (
i==0) phiMin=s_phi;
445 double temp=phiMin; phiMin=phiMax; phiMax=temp;
448 if(phiMin<-3. && phiMax>3.) {
451 double temp=phiMin; phiMin=phiMax; phiMax=temp;
454 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]
RegionType getRegionType(void) const
virtual int getChannel(void) const
Scalar phi() const
phi method
virtual bool getOfflineIDfromOnlineID(Identifier &offlineID, const int subsystemNumber, const int octantNumber, const int moduleNumber, const int layerNumber, const int rNumber, const int wireOrStrip, const int channelNumber) const =0
int getChamber(void) const
virtual void setSideType(SideType vside)
virtual TGCIdBase * getASDOutChannel(const TGCIdBase *slb_in) const =0
virtual void setRegionType(RegionType vregion)
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...
SideType getSideType(void) const
virtual const TGCCablingBase * getTGCCabling() const =0
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
bool isBackward(void) const
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)
int getOctant(void) const
virtual int getSectorModule(void) const