ATLAS Offline Software
Loading...
Searching...
No Matches
TileCosmicsTrigger Class Reference

Simulates the trigger logic in the Tile standalone board. More...

#include <TileCosmicsTrigger.h>

Inheritance diagram for TileCosmicsTrigger:
Collaboration diagram for TileCosmicsTrigger:

Public Member Functions

 TileCosmicsTrigger (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TileCosmicsTrigger ()
StatusCode initialize ()
StatusCode execute ()
StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< std::string > m_connectedDrawers [8]
std::vector< std::string > m_connectedDrawers1
std::vector< std::string > m_connectedDrawers2
std::vector< std::string > m_connectedDrawers3
std::vector< std::string > m_connectedDrawers4
std::vector< std::string > m_connectedDrawers5
std::vector< std::string > m_connectedDrawers6
std::vector< std::string > m_connectedDrawers7
std::vector< std::string > m_connectedDrawers8
float m_TThreshold
int m_NBOARDS
int m_NDRAWERSPERBOARD
bool m_connectedTowers [NMAXTOWERS]
bool m_firedTowers [NMAXTOWERS]
float m_towerSum [NMAXTOWERS]
int m_boardOfTower [NMAXTOWERS]
const CaloLVL1_IDm_TT_ID
TileTTL1Hashm_TTHash
SG::ReadHandleKey< TileTTL1Containerm_ttl1ContainerKey {this, "TileTTL1Container", "TileTTL1Cnt", "Input TileTTL1Container name"}
SG::WriteHandleKey< TileTriggerContainerm_triggerContainerKey {this, "TileTriggerContainer","TileTriggerCnt", "Output TileTriggerContainer name"}
DataObjIDColl m_extendedExtraObjects
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static const int m_NMaxTowers = NMAXTOWERS

Detailed Description

Simulates the trigger logic in the Tile standalone board.

This class simulates the response of the Tile standalone cosmics trigger board. It reads the TileTTL1 objects created at digitization level and applies the board coincidence logic. The output is not just a flag, but a set of energies per board, so that the trigger logic can be applied for different thresholds at the analysis level.

Definition at line 57 of file TileCosmicsTrigger.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileCosmicsTrigger()

TileCosmicsTrigger::TileCosmicsTrigger ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 41 of file TileCosmicsTrigger.cxx.

42 : AthAlgorithm(name, pSvcLocator)
43 , m_TThreshold(5.0)
44 , m_NBOARDS(8)
46 //, m_NTOWERSPERDRAWER(8)
47 , m_TT_ID(0)
48 , m_TTHash(0)
49{
50 for (int iboard = 0; iboard < m_NBOARDS; iboard++) {
60 }
61
62//------------------------------------------------------------------
63// Setting default configuration
64// See talk by Christophe Clement March 1, 2007
65// -----------------------------------------------------------------
66// Board Connected to
67// 1 bottom LBA
68// 2 bottom EBA
69// 3 top LBA
70// 4 top EBA
71// 5 bottom LBC
72// 6 bottom EBC
73// 7 top LBC
74// 8 top EBC
75//-------------------------------------------------------------------
76
77 m_connectedDrawers1[0] = "LBA43";
78 m_connectedDrawers1[1] = "LBA44";
79 m_connectedDrawers1[2] = "LBA45";
80 m_connectedDrawers1[3] = "LBA46";
81 m_connectedDrawers1[4] = "LBA47";
82 m_connectedDrawers1[5] = "LBA48";
83 m_connectedDrawers1[6] = "LBA49";
84 m_connectedDrawers1[7] = "LBA50";
85 m_connectedDrawers1[8] = "LBA51";
86 m_connectedDrawers1[9] = "LBA52";
87 m_connectedDrawers1[10] = "LBA53";
88 m_connectedDrawers1[11] = "LBA54";
89
90 m_connectedDrawers2[0] = "EBA43";
91 m_connectedDrawers2[1] = "EBA44";
92 m_connectedDrawers2[2] = "EBA45";
93 m_connectedDrawers2[3] = "EBA46";
94 m_connectedDrawers2[4] = "EBA47";
95 m_connectedDrawers2[5] = "EBA48";
96 m_connectedDrawers2[6] = "EBA49";
97 m_connectedDrawers2[7] = "EBA50";
98 m_connectedDrawers2[8] = "EBA51";
99 m_connectedDrawers2[9] = "EBA52";
100 m_connectedDrawers2[10] = "EBA53";
101 m_connectedDrawers2[11] = "EBA54";
102
103 m_connectedDrawers3[0] = "LBA11";
104 m_connectedDrawers3[1] = "LBA12";
105 m_connectedDrawers3[2] = "LBA13";
106 m_connectedDrawers3[3] = "LBA14";
107 m_connectedDrawers3[4] = "LBA15";
108 m_connectedDrawers3[5] = "LBA16";
109 m_connectedDrawers3[6] = "LBA17";
110 m_connectedDrawers3[7] = "LBA18";
111 m_connectedDrawers3[8] = "LBA19";
112 m_connectedDrawers3[9] = "LBA20";
113 m_connectedDrawers3[10] = "LBA21";
114 m_connectedDrawers3[11] = "LBA22";
115
116 m_connectedDrawers4[0] = "EBA11";
117 m_connectedDrawers4[1] = "EBA12";
118 m_connectedDrawers4[2] = "EBA13";
119 m_connectedDrawers4[3] = "EBA14";
120 m_connectedDrawers4[4] = "EBA15";
121 m_connectedDrawers4[5] = "EBA16";
122 m_connectedDrawers4[6] = "EBA17";
123 m_connectedDrawers4[7] = "EBA18";
124 m_connectedDrawers4[8] = "EBA19";
125 m_connectedDrawers4[9] = "EBA20";
126 m_connectedDrawers4[10] = "EBA21";
127 m_connectedDrawers4[11] = "EBA22";
128
129 m_connectedDrawers5[0] = "LBC43";
130 m_connectedDrawers5[1] = "LBC44";
131 m_connectedDrawers5[2] = "LBC45";
132 m_connectedDrawers5[3] = "LBC46";
133 m_connectedDrawers5[4] = "LBC47";
134 m_connectedDrawers5[5] = "LBC48";
135 m_connectedDrawers5[6] = "LBC49";
136 m_connectedDrawers5[7] = "LBC50";
137 m_connectedDrawers5[8] = "LBC51";
138 m_connectedDrawers5[9] = "LBC52";
139 m_connectedDrawers5[10] = "LBC53";
140 m_connectedDrawers5[11] = "LBC54";
141
142 m_connectedDrawers6[0] = "EBC43";
143 m_connectedDrawers6[1] = "EBC44";
144 m_connectedDrawers6[2] = "EBC45";
145 m_connectedDrawers6[3] = "EBC46";
146 m_connectedDrawers6[4] = "EBC47";
147 m_connectedDrawers6[5] = "EBC48";
148 m_connectedDrawers6[6] = "EBC49";
149 m_connectedDrawers6[7] = "EBC50";
150 m_connectedDrawers6[8] = "EBC51";
151 m_connectedDrawers6[9] = "EBC52";
152 m_connectedDrawers6[10] = "EBC53";
153 m_connectedDrawers6[11] = "EBC54";
154
155 m_connectedDrawers7[0] = "LBC11";
156 m_connectedDrawers7[1] = "LBC12";
157 m_connectedDrawers7[2] = "LBC13";
158 m_connectedDrawers7[3] = "LBC14";
159 m_connectedDrawers7[4] = "LBC15";
160 m_connectedDrawers7[5] = "LBC16";
161 m_connectedDrawers7[6] = "LBC17";
162 m_connectedDrawers7[7] = "LBC18";
163 m_connectedDrawers7[8] = "LBC19";
164 m_connectedDrawers7[9] = "LBC20";
165 m_connectedDrawers7[10] = "LBC21";
166 m_connectedDrawers7[11] = "LBC22";
167
168 m_connectedDrawers8[0] = "EBC11";
169 m_connectedDrawers8[1] = "EBC12";
170 m_connectedDrawers8[2] = "EBC13";
171 m_connectedDrawers8[3] = "EBC14";
172 m_connectedDrawers8[4] = "EBC15";
173 m_connectedDrawers8[5] = "EBC16";
174 m_connectedDrawers8[6] = "EBC17";
175 m_connectedDrawers8[7] = "EBC18";
176 m_connectedDrawers8[8] = "EBC19";
177 m_connectedDrawers8[9] = "EBC20";
178 m_connectedDrawers8[10] = "EBC21";
179 m_connectedDrawers8[11] = "EBC22";
180
181 declareProperty("ConnectedDrawers1", m_connectedDrawers1);
182 declareProperty("ConnectedDrawers2", m_connectedDrawers2);
183 declareProperty("ConnectedDrawers3", m_connectedDrawers3);
184 declareProperty("ConnectedDrawers4", m_connectedDrawers4);
185 declareProperty("ConnectedDrawers5", m_connectedDrawers5);
186 declareProperty("ConnectedDrawers6", m_connectedDrawers6);
187 declareProperty("ConnectedDrawers7", m_connectedDrawers7);
188 declareProperty("ConnectedDrawers8", m_connectedDrawers8);
189 declareProperty("Threshold", m_TThreshold);
190
191 // fix coverity complaints about these not being initialized in constructor
192 for (int i = 0; i < m_NMaxTowers; i++) {
193 m_connectedTowers[i] = 0;
194 m_firedTowers[i] = 0;
195 m_towerSum[i] = 0.0;
196 m_boardOfTower[i] = 0;
197 }
198}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_connectedTowers[NMAXTOWERS]
std::vector< std::string > m_connectedDrawers[8]
std::vector< std::string > m_connectedDrawers2
std::vector< std::string > m_connectedDrawers1
int m_boardOfTower[NMAXTOWERS]
std::vector< std::string > m_connectedDrawers4
std::vector< std::string > m_connectedDrawers6
std::vector< std::string > m_connectedDrawers3
float m_towerSum[NMAXTOWERS]
bool m_firedTowers[NMAXTOWERS]
std::vector< std::string > m_connectedDrawers5
std::vector< std::string > m_connectedDrawers7
std::vector< std::string > m_connectedDrawers8
const CaloLVL1_ID * m_TT_ID
static const int m_NMaxTowers

◆ ~TileCosmicsTrigger()

TileCosmicsTrigger::~TileCosmicsTrigger ( )
virtual

Definition at line 200 of file TileCosmicsTrigger.cxx.

200 {
201}

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode TileCosmicsTrigger::execute ( )

Definition at line 308 of file TileCosmicsTrigger.cxx.

308 {
309
310 // step1: read TileTTL1s from TDS
311 SG::ReadHandle<TileTTL1Container> ttl1Container;
312 ATH_CHECK( ttl1Container.isValid() );
313 ATH_MSG_DEBUG( "Loaded TileTTL1Container: " << ttl1Container.key() );
314
315 SG::WriteHandle<TileTriggerContainer> triggerContainer (m_triggerContainerKey);
316 ATH_CHECK( triggerContainer.record(std::make_unique<TileTriggerContainer>()) );
317
318 // step2: reset towers
319 for (int i = 0; i < m_NMaxTowers; i++) {
320 m_firedTowers[i] = 0;
321 m_towerSum[i] = 0.;
322 }
323
324 int nbacktowers = 0;
325 int nchan = 0;
326
327 Identifier p_maxTowerID;
328 double p_maxTowerSum = 0;
329 std::vector<Identifier> p_boardTowerID;
330 std::vector<double> p_boardTowerSum;
331 std::vector<Identifier> p_backTowerID;
332 std::vector<double> p_backTowerSum;
333 p_boardTowerID.resize(m_NBOARDS);
334 p_boardTowerSum.resize(m_NBOARDS);
335 p_backTowerID.resize(NMAXTOWERS);
336 p_backTowerSum.resize(NMAXTOWERS);
337
338 // step3: check which towers fired the discriminator
339 TileTTL1Container::const_iterator it = ttl1Container->begin();
340 TileTTL1Container::const_iterator end = ttl1Container->end();
341
342 for (; it != end; ++it) {
343 const TileTTL1 * cinp = (*it);
344 Identifier id = cinp->TTL1_ID();
345
346 std::vector<float> samples = cinp->fsamples();
347 samples.resize(1);
348
349 ATH_MSG_VERBOSE( " ichan=" << nchan
350 << " " << m_TT_ID->pos_neg_z(id)
351 << " /"<< m_TT_ID->eta(id)
352 << " /" << m_TT_ID->phi(id)
353 << " peak =" << samples[0] );
354
355
356 if (samples[0] > m_TThreshold) {
357 int index = m_TTHash->operator()(m_TT_ID->tower_hash(id));
358 if (m_connectedTowers[index]) {
359 m_firedTowers[index] = 1;
360 m_towerSum[index] = samples[0];
361 if (samples[0] > p_maxTowerSum) {
362 p_maxTowerSum = samples[0];
363 p_maxTowerID = id;
364 }
365 }
366 }
367
368 nchan++;
369 if (nchan >= m_NMaxTowers) {
370 ATH_MSG_DEBUG( "Number of ttl1s exceeds maximum (" << m_NMaxTowers << "), ignore all the rest" );
371 break;
372 }
373 }
374
375 // step4: compute tower coincidence logic
376 int phi1, phi2;
377 phi1 = phi2 = 0;
378
379 Identifier id1;
380 Identifier id2;
381 // register maximum tower in each board
382 for (int i = 0; i < m_NMaxTowers; i++) {
383 if (m_firedTowers[i] == 0) continue;
384 id1 = m_TT_ID->tower_id(m_TTHash->identifier(i));
385 if (m_towerSum[i] > p_boardTowerSum[m_boardOfTower[i]]) {
386 id1 = m_TT_ID->tower_id(m_TTHash->identifier(i));
387 p_boardTowerID[m_boardOfTower[i]] = id1;
388 p_boardTowerSum[m_boardOfTower[i]] = m_towerSum[i];
389 }
390 }
391
392 // loop through all tower pairs for back-to-back coincidence
393 for (int i = 0; i < m_NMaxTowers - 1; i++) {
394 if (m_firedTowers[i] == 0) continue;
395 id1 = m_TT_ID->tower_id(m_TTHash->identifier(i));
396 for (int j = i + 1; j < m_NMaxTowers; j++) {
397 // check back-to-back trigger
398 if (m_firedTowers[j] == 0) continue;
399 id2 = m_TT_ID->tower_id(m_TTHash->identifier(j));
400 phi1 = m_TT_ID->phi(id1);
401 phi2 = m_TT_ID->phi(id2);
402 if ((std::max(phi1, phi2) - std::min(phi1, phi2)) != 32) continue;
403 if (m_TT_ID->pos_neg_z(id1) == m_TT_ID->pos_neg_z(id2)) continue;
404 p_backTowerID[nbacktowers] = id1;
405 p_backTowerSum[nbacktowers] = m_towerSum[i];
406 nbacktowers++;
407 p_backTowerID[nbacktowers] = id2;
408 p_backTowerSum[nbacktowers] = m_towerSum[j];
409 nbacktowers++;
410 }
411 }
412
413 p_backTowerID.resize(nbacktowers);
414 p_backTowerSum.resize(nbacktowers);
415
416 triggerContainer->push_back(std::make_unique<TileTrigger>(p_maxTowerID, p_maxTowerSum,
417 p_boardTowerID, p_boardTowerSum,
418 p_backTowerID, p_backTowerSum));
419
420 ATH_MSG_DEBUG( "TileTriggerContainer registered successfully (" << triggerContainer.key() << ")" );
421 // Execution completed.
422 ATH_MSG_DEBUG( "execute() completed successfully" );
423
424 return StatusCode::SUCCESS;
425}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
HWIdentifier id2
#define NMAXTOWERS
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
SG::WriteHandleKey< TileTriggerContainer > m_triggerContainerKey
const Identifier & TTL1_ID() const
Definition TileTTL1.cxx:66
const std::vector< float > & fsamples() const
Definition TileTTL1.cxx:77
str index
Definition DeMoScan.py:362

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ finalize()

StatusCode TileCosmicsTrigger::finalize ( )

Definition at line 431 of file TileCosmicsTrigger.cxx.

431 {
432
433 ATH_MSG_INFO( "finalize() completed successfully" );
434
435 return StatusCode::SUCCESS;
436}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode TileCosmicsTrigger::initialize ( )

Definition at line 207 of file TileCosmicsTrigger.cxx.

207 {
208
209
210// retrieve TileID helper from det store
211
213
214
215// convert string input into vector
216
217 m_TTHash = new TileTTL1Hash();
218 m_TTHash->initialize(m_TT_ID);
219 for (int i = 0; i < m_NMaxTowers; i++)
220 m_connectedTowers[i] = 0;
221
222 for (int idrawer = 0; idrawer < m_NDRAWERSPERBOARD; idrawer++) {
223 m_connectedDrawers[0][idrawer] = m_connectedDrawers1[idrawer];
224 m_connectedDrawers[1][idrawer] = m_connectedDrawers2[idrawer];
225 m_connectedDrawers[2][idrawer] = m_connectedDrawers3[idrawer];
226 m_connectedDrawers[3][idrawer] = m_connectedDrawers4[idrawer];
227 m_connectedDrawers[4][idrawer] = m_connectedDrawers5[idrawer];
228 m_connectedDrawers[5][idrawer] = m_connectedDrawers6[idrawer];
229 m_connectedDrawers[6][idrawer] = m_connectedDrawers7[idrawer];
230 m_connectedDrawers[7][idrawer] = m_connectedDrawers8[idrawer];
231 }
232 for (int iboard = 0; iboard < m_NBOARDS; iboard++) {
233 for (int idrawer = 0; idrawer < m_NDRAWERSPERBOARD; idrawer++) {
234 if (m_connectedDrawers[iboard][idrawer] == "") continue;
235 bool failure = 0;
236 int section = 0;
237 int side = 0;
238 // get section (long or extended barrel)
239 if (m_connectedDrawers[iboard][idrawer][0] == 'L'
240 || m_connectedDrawers[iboard][idrawer][0] == 'l') {
241 section = 1;
242 } else if (m_connectedDrawers[iboard][idrawer][0] == 'E'
243 || m_connectedDrawers[iboard][idrawer][0] == 'e') {
244 section = 2;
245 } else {
246 failure = 1;
247 }
248 // get side (positive or negative)
249 if (m_connectedDrawers[iboard][idrawer][2] == 'A'
250 || m_connectedDrawers[iboard][idrawer][2] == 'a') {
251 side = 1;
252 } else if (m_connectedDrawers[iboard][idrawer][2] == 'C'
253 || m_connectedDrawers[iboard][idrawer][2] == 'c') {
254 side = -1;
255 } else {
256 failure = 1;
257 }
258 int phi = -1 + atoi(m_connectedDrawers[iboard][idrawer].substr(3, m_connectedDrawers[iboard][idrawer].length() - 3).c_str());
259
260 if (phi < 0 || phi > 63) failure = 1;
261
262 if (failure) {
263 ATH_MSG_ERROR( "Invalid Tile Drawer " << m_connectedDrawers[iboard][idrawer] );
264 return StatusCode::FAILURE;
265 }
266 int mineta, maxeta;
267 if (section == 1) {
268 mineta = 0;
269 maxeta = 7;
270 } else {
271 mineta = 9;
272 maxeta = 14;
273 }
274 ATH_MSG_DEBUG( "Board " << iboard
275 << " Drawer " << idrawer
276 << " " << m_connectedDrawers[iboard][idrawer]
277 << " Section " << section
278 << " Side " << side
279 << " Phi " << phi );
280
281 for (int ieta = mineta; ieta <= maxeta; ieta++) {
282 Identifier ttid = m_TT_ID->tower_id(side, 1, 0, ieta, phi);
283 int index = m_TTHash->operator()(m_TT_ID->tower_hash(ttid));
285 m_boardOfTower[index] = iboard;
286 }
287 }
288 }
289
290 int nt = 0;
291 for (int i = 0; i < m_NMaxTowers; i++) {
292 ATH_MSG_DEBUG( "tower " << i << " connected " << m_connectedTowers[i] );
293 if (m_connectedTowers[i] == 1) nt++;
294 }
295
296 ATH_CHECK( m_ttl1ContainerKey.initialize() );
297 ATH_CHECK( m_triggerContainerKey.initialize() );
298
299 ATH_MSG_INFO( "Initialization completed, number of towers " << nt );
300
301 return StatusCode::SUCCESS;
302}
Scalar phi() const
phi method
#define ATH_MSG_ERROR(x)
#define CHECK(...)
Evaluate an expression and check for errors.
double length(const pvec &v)
void section(const std::string &sec)
const ServiceHandle< StoreGateSvc > & detStore() const
SG::ReadHandleKey< TileTTL1Container > m_ttl1ContainerKey
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
#define ATH_MSG_WARNING(x)
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_boardOfTower

int TileCosmicsTrigger::m_boardOfTower[NMAXTOWERS]
private

Definition at line 95 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers[8]
private

Definition at line 74 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers1

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers1
private

Definition at line 75 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers2

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers2
private

Definition at line 76 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers3

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers3
private

Definition at line 77 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers4

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers4
private

Definition at line 78 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers5

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers5
private

Definition at line 79 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers6

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers6
private

Definition at line 80 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers7

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers7
private

Definition at line 81 of file TileCosmicsTrigger.h.

◆ m_connectedDrawers8

std::vector<std::string> TileCosmicsTrigger::m_connectedDrawers8
private

Definition at line 82 of file TileCosmicsTrigger.h.

◆ m_connectedTowers

bool TileCosmicsTrigger::m_connectedTowers[NMAXTOWERS]
private

Definition at line 92 of file TileCosmicsTrigger.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_firedTowers

bool TileCosmicsTrigger::m_firedTowers[NMAXTOWERS]
private

Definition at line 93 of file TileCosmicsTrigger.h.

◆ m_NBOARDS

int TileCosmicsTrigger::m_NBOARDS
private

Definition at line 88 of file TileCosmicsTrigger.h.

◆ m_NDRAWERSPERBOARD

int TileCosmicsTrigger::m_NDRAWERSPERBOARD
private

Definition at line 89 of file TileCosmicsTrigger.h.

◆ m_NMaxTowers

const int TileCosmicsTrigger::m_NMaxTowers = NMAXTOWERS
staticprivate

Definition at line 87 of file TileCosmicsTrigger.h.

◆ m_towerSum

float TileCosmicsTrigger::m_towerSum[NMAXTOWERS]
private

Definition at line 94 of file TileCosmicsTrigger.h.

◆ m_triggerContainerKey

SG::WriteHandleKey<TileTriggerContainer> TileCosmicsTrigger::m_triggerContainerKey {this, "TileTriggerContainer","TileTriggerCnt", "Output TileTriggerContainer name"}
private

Definition at line 104 of file TileCosmicsTrigger.h.

104{this, "TileTriggerContainer","TileTriggerCnt", "Output TileTriggerContainer name"};

◆ m_TT_ID

const CaloLVL1_ID* TileCosmicsTrigger::m_TT_ID
private

Definition at line 100 of file TileCosmicsTrigger.h.

◆ m_TTHash

TileTTL1Hash* TileCosmicsTrigger::m_TTHash
private

Definition at line 101 of file TileCosmicsTrigger.h.

◆ m_TThreshold

float TileCosmicsTrigger::m_TThreshold
private

Definition at line 83 of file TileCosmicsTrigger.h.

◆ m_ttl1ContainerKey

SG::ReadHandleKey<TileTTL1Container> TileCosmicsTrigger::m_ttl1ContainerKey {this, "TileTTL1Container", "TileTTL1Cnt", "Input TileTTL1Container name"}
private

Definition at line 103 of file TileCosmicsTrigger.h.

103{this, "TileTTL1Container", "TileTTL1Cnt", "Input TileTTL1Container name"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: