33 const std::vector< TriggerThreshold* >* theMuonConfig )
35 construct( roIWord, theRecRPCRoiSvc, theRecTGCRoiSvc, theMuonConfig );
41 const std::vector< TriggerThreshold* >* theMuonConfig )
43 construct( roIWord, theRecRPCRoiTool, theRecTGCRoiTool, theMuonConfig );
51 construct( roIWord, theRecRPCRoiTool, theRecTGCRoiTool,
l1menu );
58 const std::vector< TriggerThreshold* >* theMuonConfig )
61 m_firstCandidateFlag =
false;
62 m_sectorOflFlag =
false;
69 unsigned int sectorAddress = this->getBitMaskValue( &m_roiWord,
SectorAddressMask );
70 unsigned int sectorRoIOvl = this->getBitMaskValue( &m_roiWord,
RoIOvlMask );
73 if ( this->getBitMaskValue( &m_roiWord,
FirsCandMask ) == 1 ) {
74 m_firstCandidateFlag =
true;
78 if ( this->getBitMaskValue( &m_roiWord,
SectOflMask ) == 1 ) {
79 m_sectorOflFlag =
true;
83 if ( this->getBitMaskValue( &m_roiWord,
PadOflMask ) == 1 ) {
88 m_thresholdNumber = this->getBitMaskValue( &m_roiWord,
ThresNumMask );
92 unsigned int temp_sysID = this->getBitMaskValue( §orAddress,
SysIDMask );
94 if( temp_sysID & 0
x2 ) m_sysID = 1;
95 else if( temp_sysID & 0
x1 ) m_sysID = 2;
97 m_subSysID = this->getBitMaskValue( §orAddress,
SubSysIDMask );
100 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
BarrelRoIMask );
101 m_overlap = this->getBitMaskValue( §orRoIOvl,
BarrelOvlMask );
102 }
else if ( m_sysID == 2 ) {
104 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
ForwardRoIMask );
106 }
else if ( m_sysID == 1 ) {
108 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
EndcapRoIMask );
109 m_overlap = this->getBitMaskValue( §orRoIOvl,
EndcapOvlMask );
116 l_recMuonRoiSvc = theRecRPCRoiSvc;
118 l_recMuonRoiSvc = theRecTGCRoiSvc;
121 if( l_recMuonRoiSvc ) {
124 m_eta = l_recMuonRoiSvc->
eta();
125 m_phi = l_recMuonRoiSvc->
phi();
131 m_thresholdValue = 0;
132 for( std::vector< TriggerThreshold* >::const_iterator
it = theMuonConfig->begin();
133 it != theMuonConfig->end(); ++
it ) {
134 if( ( *it )->type() == L1DataDef::muonType() &&
135 ( *it )->thresholdNumber() + 1 ==
static_cast< int >( m_thresholdNumber ) ) {
138 m_thresholdValue =
static_cast< unsigned int >( ttv->
ptcut() );
147 const std::vector< TriggerThreshold* >* theMuonConfig )
150 m_firstCandidateFlag =
false;
151 m_sectorOflFlag =
false;
152 m_padOflFlag =
false;
158 unsigned int sectorAddress = this->getBitMaskValue( &m_roiWord,
SectorAddressMask );
159 unsigned int sectorRoIOvl = this->getBitMaskValue( &m_roiWord,
RoIOvlMask );
162 if ( this->getBitMaskValue( &m_roiWord,
FirsCandMask ) == 1 ) {
163 m_firstCandidateFlag =
true;
167 if ( this->getBitMaskValue( &m_roiWord,
SectOflMask ) == 1 ) {
168 m_sectorOflFlag =
true;
172 if ( this->getBitMaskValue( &m_roiWord,
PadOflMask ) == 1 ) {
177 m_thresholdNumber = this->getBitMaskValue( &m_roiWord,
ThresNumMask );
181 unsigned int temp_sysID = this->getBitMaskValue( §orAddress,
SysIDMask );
183 if( temp_sysID & 0
x2 ) m_sysID = 1;
184 else if( temp_sysID & 0
x1 ) m_sysID = 2;
186 m_subSysID = this->getBitMaskValue( §orAddress,
SubSysIDMask );
187 if ( m_sysID == 0 ) {
189 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
BarrelRoIMask );
190 m_overlap = this->getBitMaskValue( §orRoIOvl,
BarrelOvlMask );
191 }
else if ( m_sysID == 2 ) {
193 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
ForwardRoIMask );
195 }
else if ( m_sysID == 1 ) {
197 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
EndcapRoIMask );
198 m_overlap = this->getBitMaskValue( §orRoIOvl,
EndcapOvlMask );
202 if( theRecRPCRoiTool ) {
205 if( theRecRPCRoiTool->
roiData( roIWord, roiData ).isSuccess() ){
206 m_eta = roiData.
eta();
207 m_phi = roiData.
phi();
211 if( theRecTGCRoiTool ) {
214 if( theRecTGCRoiTool->
roiData( roIWord, roiData ).isSuccess() ){
215 m_eta = roiData.
eta();
216 m_phi = roiData.
phi();
224 m_thresholdValue = 0;
226 if( thr->type() == L1DataDef::muonType() &&
227 thr->thresholdNumber() + 1 ==
static_cast< int >( m_thresholdNumber ) ) {
230 m_thresholdValue =
static_cast< unsigned int >( ttv->
ptcut() );
242 m_firstCandidateFlag =
false;
243 m_sectorOflFlag =
false;
244 m_padOflFlag =
false;
250 unsigned int sectorAddress = this->getBitMaskValue( &m_roiWord,
SectorAddressMask );
251 unsigned int sectorRoIOvl = this->getBitMaskValue( &m_roiWord,
RoIOvlMask );
254 if ( this->getBitMaskValue( &m_roiWord,
FirsCandMask ) == 1 ) {
255 m_firstCandidateFlag =
true;
259 if ( this->getBitMaskValue( &m_roiWord,
SectOflMask ) == 1 ) {
260 m_sectorOflFlag =
true;
264 if ( this->getBitMaskValue( &m_roiWord,
PadOflMask ) == 1 ) {
269 m_thresholdNumber = this->getBitMaskValue( &m_roiWord,
ThresNumMask );
273 unsigned int temp_sysID = this->getBitMaskValue( §orAddress,
SysIDMask );
275 if( temp_sysID & 0
x2 ) m_sysID = 1;
276 else if( temp_sysID & 0
x1 ) m_sysID = 2;
278 m_subSysID = this->getBitMaskValue( §orAddress,
SubSysIDMask );
279 if ( m_sysID == 0 ) {
281 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
BarrelRoIMask );
282 m_overlap = this->getBitMaskValue( §orRoIOvl,
BarrelOvlMask );
283 }
else if ( m_sysID == 2 ) {
285 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
ForwardRoIMask );
287 }
else if ( m_sysID == 1 ) {
289 m_roiNumber = this->getBitMaskValue( §orRoIOvl,
EndcapRoIMask );
290 m_overlap = this->getBitMaskValue( §orRoIOvl,
EndcapOvlMask );
295 if( theRecRoiTool ) {
298 if( theRecRoiTool->
roiData( roIWord, roiData ).isSuccess() ){
299 m_eta = roiData.
eta();
300 m_phi = roiData.
phi();
305 m_thresholdValue = 0;
306 for( shared_ptr<TrigConf::L1Threshold> thr :
l1menu->thresholds(
"MU")) {
307 auto muonThr = std::dynamic_pointer_cast<TrigConf::L1Threshold_MU>(thr);
308 if( muonThr->mapping() + 1 == m_thresholdNumber ) {
309 m_thresholdValue = muonThr->ptBarrel();
340 unsigned int maskcopy;
346 while ( ( maskcopy & 0x00000001 ) == 0 ) {
347 maskcopy = maskcopy >> 1;
359 string hemisphere =
"-";
361 if ( this->sysID() == 0 ) {system =
"B";}
362 if ( this->sysID() == 1 ) {system =
"F";}
363 if ( this->sysID() > 1 ) {system =
"E";}
365 if ( this->subsysID() == 1 ) {hemisphere =
"+";}
367 out <<
" Addr: " << hemisphere << system <<
" "
368 << setw( 2 ) << ios::dec << this-> sectorID()
369 <<
" Pt/RoI: " << this->getThresholdNumber()
370 <<
" " << setw( 2 ) << this->getRoINumber() << std::setfill(
' ' )
371 <<
" Ovl: " << this->getOverlap()
372 <<
" pad/secOF: " << setw( 2 ) << this->padOverflow()
373 << setw( 2 ) << this->sectorOverflow()
374 <<
" First: " << this->firstCandidate();