70 {
71
73
74
75 const TrigConf::L1Menu *
l1menu =
nullptr;
77
78
80
81
82 uint32_t rodId = rob->rod_source_id();
83
84 if( rodId == miRodId ) {
85
86
87 MuCTPI_RIO* muCTPI_RIO = new MuCTPI_RIO;
88
89
91 const uint32_t ndata = rob->rod_ndata();
92 const uint32_t detev_type = rob->rod_detev_type();
93 const uint32_t lvl1_type = rob->rod_lvl1_trigger_type();
94 const uint32_t lvl1_id = rob->rod_lvl1_id();
95 const uint32_t run_no = rob->rod_run_no();
96 const uint32_t nstatus = rob->rod_nstatus();
98 rob->rod_status( it_statusData );
99
103 << " (dec " << bcid << ")");
105 << MSG::dec << " (dec " << detev_type << ")");
107 << " (dec " << lvl1_id << ")");
109 << " (dec " << lvl1_type << ")");
113 for ( uint32_t i = 0;
i < nstatus; ++
i , ++it_statusData) {
114 ATH_MSG_VERBOSE(
"Status word # " << i <<
": 0x" << MSG::hex << (*it_statusData) << MSG::dec
115 << " (dec " << (*it_statusData) << ")");
117 }
126
128
130 rob->rod_data( it_data );
131
132
133 int nMultWords = 0;
134 for( uint32_t i = 0;
i < ndata; ++
i ) {
135 if( ((*it_data) & 0x20000000) != 0 ) nMultWords++;
136 ++it_data;
137 }
138
139 rob->rod_data( it_data );
140
141 it_data+=(nMultWords-1)/2;
142
143 ATH_MSG_DEBUG(
" 0x" << MSG::hex << std::setw( 8 ) << *it_data
144 << " (candidate multiplicity)");
145
146
149 sum[ i ] = ( *it_data >> ( i * 3 ) ) & 0x1F;
150 muCTPI_RIO->
setSum( sum );
151
152
153 uint16_t g_bcId = ( (*it_data) & 0x001C0000 ) >> 18;
155
156 it_data+=(nMultWords+1)/2;
157
158
159 for( uint32_t i = nMultWords;
i < ndata; ++
i, ++it_data ) {
160
161 ATH_MSG_DEBUG(
" 0x" << MSG::hex << std::setw( 8 ) << *it_data);
162
163
166
167
168 bool accepted = true;
169 if ( ( tmpWord & 0x04000000 ) == 0 )
170 accepted = false;
171
172
173 uint32_t roiWord = ( tmpWord & 0x00003FFF ) + ( ( tmpWord & 0x03FE0000 ) >> 3 );
174
176 << " : ROI=" << std::setw( 8 ) << roiWord);
177
178
181
182 uint16_t pTVal = thisRoI.getThresholdValue();
183 uint16_t pTNumber = thisRoI.getThresholdNumber();
185 uint16_t secId = thisRoI.sectorID();
187 uint16_t hemisphere = thisRoI.subsysID();
188 double eta = thisRoI.eta();
189 double phi = thisRoI.phi();
190 bool first = thisRoI.firstCandidate();
191 bool duplicatedRoI = thisRoI.padOverflow();
192 bool duplicatedSector = thisRoI.sectorOverflow();
193
194
195 muCTPI_RIO->
setRoI(
bcId, pTVal,pTNumber,
eta,
phi, secId, sysId, hemisphere, roiNumber,
196 accepted, first, duplicatedRoI, duplicatedSector );
197 }
198
199
201
202 return StatusCode::SUCCESS;
203
204 } else {
205
206 ATH_MSG_WARNING(
"Expected source ID 0x" << MSG::hex << miRodId <<
" but found 0x"
207 << rodId << MSG::dec);
208 return StatusCode::FAILURE;
209
210 }
211}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
uint16_t bcId(uint32_t data)
const ServiceHandle< StoreGateSvc > & detStore() const
void headerBCID(uint32_t val)
Set the BCID specified in the header.
void headerLVL1ID(uint32_t val)
Set the LVL1 ID specified in the header.
void headerNumberStatusWords(uint32_t val)
Set the number of status words as it was specified in the trailer
void headerRunNumber(uint32_t val)
Set the run number specified in the header.
std::vector< uint32_t > & headerStatusWords()
Get the status words from the payload.
void headerSourceId(uint32_t val)
Set the ROD ID specidied in the header.
void headerDetectorEventType(uint32_t val)
Set the event type specified in the header.
void setSum(const uint16_t *sum)
Set the multiplicity sum.
void setRoI(const uint16_t bcId, const uint16_t pTval, const uint16_t pTnum, const double eta, const double phi, const uint16_t secID, const uint16_t sysId, const uint16_t hemisphere, const uint16_t roiNum, const bool accepted, const bool first, const bool duplicatedRoI, const bool duplicatedSector)
Add a muon RoI to the object
void setBCID(const uint16_t bcId)
Function setting the BCID of the object.
void headerNumberDataWords(uint32_t val)
Set the number of data words as it was specified in the trailer
void headerLVL1TriggerType(uint32_t val)
Set the LVL1 trigger type specified in the header.
const DataType * PointerType
retrieve(aClass, aKey=None)
setTeId setLumiBlock setRoiId setRoiSubsystem roiNumber
setEventNumber setTimeStamp bcid