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

This algorithm builds TileRawChannels from TileHits. More...

#include <TileHitToRawChannel.h>

Inheritance diagram for TileHitToRawChannel:

Public Member Functions

 TileHitToRawChannel (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor.
virtual ~TileHitToRawChannel ()
 Destructor.
virtual StatusCode initialize () override
 initialize method
virtual StatusCode execute () override
 execute method
virtual StatusCode finalize () override
 finalize method
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

SG::ReadHandleKey< TileHitContainerm_hitContainerKey
SG::WriteHandleKey< TileRawChannelContainerm_rawChannelContainerKey
SG::ReadCondHandleKey< TileSamplingFractionm_samplingFractionKey
 Name of TileSamplingFraction in condition store.
std::string m_infoName
 name of the TileInfo object
double m_deltaT
 if true, keep only hits in deltaT range
bool m_calibrateEnergy
 if true, amplitude is converted to pCb
TileRawChannelUnit::UNIT m_rChUnit
 Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h)
TileFragHash::TYPE m_rChType
 Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h)
const TileIDm_tileID
 Pointer to TileID helper.
const TileTBIDm_tileTBID
 Pointer to TileID helper.
const TileHWIDm_tileHWID
 Pointer to TileHWID helper.
const TileInfom_tileInfo
 Pointer to TileInfo.
const TileCablingServicem_cabling
 Pointer to the TileCablingService instance.
std::vector< HWIdentifier * > m_all_ids
 Vector to store all the drawer ids.
bool m_tileNoise
 If true => generate noise for the TileRawChannel creation.
bool m_tileThresh
 If true => apply threshold on the conversion to raw channels.
double m_threshHi
 Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used for low gain)
double m_ampMaxHi
 Value of the maximum amplitude to be stored as a high gain channel.
ServiceHandle< TileCablingSvcm_cablingSvc
 Name of Tile cabling service.
ServiceHandle< IAthRNGSvcm_atRndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number generator engine to use.
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "Tile_DigitsMaker", ""}
 Random Stream Name.
SG::ReadCondHandleKey< TileEMScalem_emScaleKey
 Name of TileEMScale in condition store.
ToolHandle< TileCondToolNoiseSamplem_tileToolNoiseSample
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

Detailed Description

This algorithm builds TileRawChannels from TileHits.

TileRawChannel amplitude, time and quality are obtianed from the TileHits. Noise is applied to the amplitude.

TileHitToRawChannell takes as input the TileRawChanels in a TileRawChannel container and combine them in order to create TileCells (For barrel and ext.barrel, two RawChanels feed into each cell; for the Gap cells, there is only one PMT.) Calibrations constants are applied, and the total energy in the cell, the mean time of the energy deposition, and the quality of the measurement are returned.

Definition at line 77 of file TileHitToRawChannel.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

◆ TileHitToRawChannel()

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

Constructor.

Definition at line 51 of file TileHitToRawChannel.cxx.

52 : AthAlgorithm(name, pSvcLocator)
55 , m_tileID(nullptr)
56 , m_tileTBID(nullptr)
57 , m_tileHWID(nullptr)
58 , m_tileInfo(nullptr)
59 , m_cabling(nullptr)
60 , m_tileNoise(false)
61 , m_tileThresh(false)
62 , m_threshHi(0.0)
63 , m_ampMaxHi(0.0)
64{
65 declareProperty("TileInfoName", m_infoName = "TileInfo");
66 declareProperty("DeltaT", m_deltaT = -1.0); // keep hits only within deltaT;
67 declareProperty("calibrateEnergy", m_calibrateEnergy = false); // convert or not to pCb
68}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
bool m_tileThresh
If true => apply threshold on the conversion to raw channels.
double m_ampMaxHi
Value of the maximum amplitude to be stored as a high gain channel.
double m_threshHi
Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used fo...
TileFragHash::TYPE m_rChType
Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h)
std::string m_infoName
name of the TileInfo object
const TileCablingService * m_cabling
Pointer to the TileCablingService instance.
bool m_calibrateEnergy
if true, amplitude is converted to pCb
double m_deltaT
if true, keep only hits in deltaT range
const TileInfo * m_tileInfo
Pointer to TileInfo.
const TileID * m_tileID
Pointer to TileID helper.
const TileTBID * m_tileTBID
Pointer to TileID helper.
bool m_tileNoise
If true => generate noise for the TileRawChannel creation.
const TileHWID * m_tileHWID
Pointer to TileHWID helper.
TileRawChannelUnit::UNIT m_rChUnit
Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h)

◆ ~TileHitToRawChannel()

TileHitToRawChannel::~TileHitToRawChannel ( )
virtual

Destructor.

Definition at line 70 of file TileHitToRawChannel.cxx.

70 {
71 std::vector<HWIdentifier *>::iterator itr = m_all_ids.begin();
72 std::vector<HWIdentifier *>::iterator last = m_all_ids.end();
73
74 for (; itr != last; ++itr) {
75 delete[] (*itr);
76 }
77}
std::vector< HWIdentifier * > m_all_ids
Vector to store all the drawer ids.

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 TileHitToRawChannel::execute ( )
overridevirtual

execute method

Definition at line 164 of file TileHitToRawChannel.cxx.

164 {
165
166 ATH_MSG_DEBUG( "Executing TileHitToRawChannel" );
167
168 const EventContext& ctx = Gaudi::Hive::currentContext();
169
170 ATHRNG::RNGWrapper* rngWrapper = m_atRndmGenSvc->getEngine(this, m_randomStreamName);
171 rngWrapper->setSeed( m_randomStreamName, ctx );
172
173 SG::ReadCondHandle<TileSamplingFraction> samplingFraction(m_samplingFractionKey, ctx);
174 ATH_CHECK( samplingFraction.isValid() );
175
176 SG::ReadCondHandle<TileEMScale> emScale(m_emScaleKey, ctx);
177 ATH_CHECK( emScale.isValid() );
178
179 // step1: read hits from TES
180 SG::ReadHandle<TileHitContainer> hitContainer(m_hitContainerKey, ctx);
181 ATH_CHECK( hitContainer.isValid() );
182
183 //Zero sums for monitoring.
184 int nChan = 0;
185 int nChLG = 0;
186 int nChHG = 0;
187 double eHitTot = 0.;
188 double eCh = 0.;
189 double eChLG = 0.;
190 double eChHG = 0.;
191
192 // prepare arrays for all channels in one drawer (collection)
193 const int nChMax = 48;
194 double random[nChMax];
195 memset(random, 0, sizeof(random));
196 HWIdentifier * adc_ids;
197 int adc_gain[nChMax];
198 double adc_ampl[nChMax];
199 double adc_time[nChMax];
200 double adc_qual[nChMax];
201
202 IdContext drawer_context = m_tileHWID->drawer_context();
203
204 // step2: form raw channels, and put them in container
205 auto rawChannelContainer = std::make_unique<TileMutableRawChannelContainer>(true, m_rChType, m_rChUnit);
206 ATH_CHECK( rawChannelContainer->status() );
207
208 // iterate over all collections in a container
209 for (const TileHitCollection* hitCollection : *hitContainer) {
210
211 HWIdentifier drawer_id = m_tileHWID->drawer_id(hitCollection->identify());
212 int ros = m_tileHWID->ros(drawer_id);
213 int drawer = m_tileHWID->drawer(drawer_id);
214 int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
215 if (m_cabling->connected(ros, drawer)) {
216 ATH_MSG_VERBOSE( "ROS " << ros
217 << " drawer " << drawer
218 << " is connected" );
219 } else {
220 continue;
221 }
222 int ch;
223
224 ATH_MSG_VERBOSE( MSG::hex
225 << "Collection = 0x" << hitCollection->identify() << MSG::dec
226 << " : ROS=" << ros
227 << ", drawer=" << drawer );
228
229 IdentifierHash idhash;
230 /* int result = */m_tileHWID->get_hash(drawer_id, idhash, &drawer_context);
231 adc_ids = m_all_ids[idhash];
232
233 // If tileNoise is requested, generate random numbers to give noise
234 if (m_tileNoise) {
235
236 RandGaussQ::shootArray(*rngWrapper, nChMax, random, 0.0, 1.0);
237
238 for (ch = 0; ch < nChMax; ++ch) {
239 adc_gain[ch] = TileID::HIGHGAIN;
240 adc_ampl[ch] = random[ch] * m_tileToolNoiseSample->getHfn(drawerIdx, ch, TileID::HIGHGAIN, TileRawChannelUnit::ADCcounts, ctx)
241 * m_tileInfo->getNoiseScaleFactor();
242
243 }
244 } else {
245 memset(adc_gain, -1, sizeof(adc_gain)); /* TileID::INVALID */
246 memset(adc_ampl, 0, sizeof(adc_ampl));
247 }
248
249 memset(adc_time, 0, sizeof(adc_time));
250 memset(adc_qual, 0, sizeof(adc_qual));
251
252 // iterate over all hits in a collection
253 for (const TileHit* tile_hit : *hitCollection) {
254
255 // Get hit Identifier (= identifier of pmt)
256 Identifier pmt_id = tile_hit->pmt_ID();
257 HWIdentifier channel_id = tile_hit->pmt_HWID();
258
259 // index for array is the channel number
260 ch = m_tileHWID->channel(channel_id);
261
262 /* Get hit amplitude and convert to energy (cell-dependent) */
263 double e_hit = tile_hit->energy();
264 double time = tile_hit->time();
265 if (m_deltaT > 0.0) {
266 if (fabs(time) >= m_deltaT) { // reset first hit if it's outside deltaT window
267 e_hit = 0.0;
268 time = 0.0;
269 }
270 double etime = e_hit * time;
271 for (int i = tile_hit->size() - 1; i > 0; --i) { // don't use first hit (i=0)
272 double en = tile_hit->energy(i);
273 double ti = tile_hit->time(i);
274 if (fabs(ti) < m_deltaT && en > 0.0) {
275 e_hit += en;
276 etime += en * ti;
277 }
278 }
279 if (e_hit > 0.0)
280 time = etime / e_hit;
281 else
282 continue; // go to next hit, do not create channels with zero energy
283 }
284 adc_time[ch] = time;
285 double hit_calib = samplingFraction->getSamplingFraction(drawerIdx, ch);
286 double e_ch = e_hit * hit_calib;
287
288 /* Convert to amplitude of channel (assuming high gain) */
289 /* need to divide here, because "calib" converts amp to energy */
291 double amp_ch = e_ch / emScale->calibrateChannel(drawerIdx, ch, gain, 1., m_rChUnit
293 double noise;
294 // If high saturates, convert adc_id to low-gain value and recalculate.
295 if (adc_ampl[ch] + amp_ch + m_tileToolNoiseSample->getPed(drawerIdx, ch, gain, TileRawChannelUnit::ADCcounts, ctx) > m_ampMaxHi) {
296
298 amp_ch = e_ch / emScale->calibrateChannel(drawerIdx, ch, gain, 1., m_rChUnit
300
301 // If Noise is requested,
302 // recalculate noise using the SAME random number as for high.
303 if (m_tileNoise) {
304 adc_ampl[ch] = random[ch] * m_tileToolNoiseSample->getHfn(drawerIdx, ch, TileID::LOWGAIN, TileRawChannelUnit::ADCcounts, ctx)
305 * m_tileInfo->getNoiseScaleFactor();
306 }
307 }
308
309 adc_gain[ch] = gain;
310 noise = adc_ampl[ch];
311 adc_ampl[ch] += amp_ch; // add real amplitude to the noise
312
313 ATH_MSG_VERBOSE( "ch=" << ch << ((gain == TileID::HIGHGAIN) ? " Hi" :" Lo")
314 << " pmt=" << m_tileID->to_string(pmt_id, -1)
315 << " adc=" << m_tileHWID->to_string(channel_id, -1) << "/" << gain
316 << " noise=" << noise
317 << " amp=" << amp_ch
318 << " tot=" << adc_ampl[ch]);
319
320 ++nChan;
321 eHitTot += e_hit;
322 eCh += e_ch;
323 }
324
325 // store raw channels for one drawer
326
327 for (int ch = 0; ch < nChMax; ++ch) {
328
329 int gain = adc_gain[ch];
330
331 // without noise most of channels do not exist
332 // select only valid channels
333 if (gain != -1) {
334
335 HWIdentifier adc_id = adc_ids[ch];
336 double amp = adc_ampl[ch];
337
338 bool lrcGood = true;
339 double thresh = -99999;
340
341 if (TileID::HIGHGAIN != gain) {
342 // change ADC ID (channel switched to low gain)
343 adc_id = m_tileHWID->adc_id(m_tileHWID->channel_id(adc_id), gain);
344
345 } else {
346 // Apply threshold cut to small signals (always high gain)
347 if (m_tileThresh) {
349 if (thresh < 0) {
350 if (fabs(amp) < fabs(thresh))
351 lrcGood = false;
352 } else {
353 if (amp < thresh)
354 lrcGood = false;
355 }
356 }
357 }
358
359 if (lrcGood) {
360
361 auto rawChannel = std::make_unique<TileRawChannel>(adc_id, amp, adc_time[ch], adc_qual[ch]);
362 ATH_CHECK( rawChannelContainer->push_back(std::move(rawChannel)) );
363
364 if (TileID::HIGHGAIN == gain) {
365 ++nChHG;
366 eChHG += amp;
367 } else {
368 ++nChLG;
369 eChLG += amp;
370 }
371
372 ATH_MSG_VERBOSE( "Accept RC thr=" << ((thresh < 0) ? "+" : "" ) << thresh
373 << ", id=" << m_tileHWID->to_string(adc_id)
374 << ", amp=" << amp );
375
376 } else {
377
378 ATH_MSG_VERBOSE( "Reject RC thr=" << ((thresh < 0) ? "+" : "") << thresh
379 << ", id=" << m_tileHWID->to_string(adc_id)
380 << ", amp=" << amp );
381 }
382 }
383 }
384 }
385
386
387 // Execution completed.
388 if (msgLvl(MSG::DEBUG)) {
389 msg(MSG::DEBUG) << "TileHitToRawChannel execution completed." << endmsg;
390 msg(MSG::DEBUG) << " nChan=" << nChan
391 << " eHitTot=" << eHitTot
392 << " eneTot=" << eCh
393 << " nchLG=" << nChLG
394 << " eChLG=" << eChLG
395 << " nchHG=" << nChHG
396 << " eChHG=" << eChHG << endmsg;
397 }
398
399
400 SG::WriteHandle<TileRawChannelContainer> rawChannelCnt(m_rawChannelContainerKey, ctx);
401 ATH_CHECK( rawChannelCnt.record(std::move(rawChannelContainer)) );
402
403 return StatusCode::SUCCESS;
404}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:169
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
ServiceHandle< IAthRNGSvc > m_atRndmGenSvc
Random number generator engine to use.
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
time(flags, cells_name, *args, **kw)

◆ 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 TileHitToRawChannel::finalize ( )
overridevirtual

finalize method

Definition at line 406 of file TileHitToRawChannel.cxx.

406 {
407
408 ATH_MSG_INFO( "TileHitToRawChannel::finalize() end." );
409
410 return StatusCode::SUCCESS;
411}
#define ATH_MSG_INFO(x)

◆ initialize()

StatusCode TileHitToRawChannel::initialize ( )
overridevirtual

initialize method

Definition at line 82 of file TileHitToRawChannel.cxx.

82 {
85 : TileRawChannelUnit::PicoCoulombs;
86
87 // retrieve TileID helper and TileInfo from det store
88
90
92
94
96
97 ATH_CHECK( m_samplingFractionKey.initialize() );
98 ATH_CHECK( m_emScaleKey.initialize() );
99
100 ATH_CHECK( m_tileToolNoiseSample.retrieve() );
101
102 if (m_tileNoise) {
103 ATH_CHECK(m_atRndmGenSvc.retrieve());
104 }
105
106 ATH_CHECK( m_cablingSvc.retrieve() );
107 m_cabling = m_cablingSvc->cablingService();
108
109 // Get needed parameters from TileInfo
110 m_ampMaxHi = m_tileInfo->ADCmax();
111
112 /* Get TileNoise flag from TileInfo
113 (true => generate noise in RC's). */
114 m_tileNoise = m_tileInfo->TileNoise();
115
116 /* Get TileZeroSuppress flag from TileInfo
117 (true => apply threshold cut for RC's). */
118 m_tileThresh = m_tileInfo->TileZeroSuppress();
119
120 m_threshHi = m_tileInfo->ThresholdRawChannel(TileID::HIGHGAIN);
121
122 if (m_tileThresh) {
123 ATH_MSG_INFO( "ampMaxHi=" << m_ampMaxHi
124 << ", tileNoise=" << ((m_tileNoise) ? "true" : "false")
125 << ", tileThresh=" << "true, thresh_hi=" << m_threshHi );
126 } else {
127 ATH_MSG_INFO( "ampMaxHi=" << m_ampMaxHi
128 << ", tileNoise=" << ((m_tileNoise) ? "true" : "false")
129 << ", tileThresh=" << "false" );
130 }
131
132
133 IdContext drawer_context = m_tileHWID->drawer_context();
134 int ndrawers = m_tileHWID->drawer_hash_max();
135 int nchannels = 48;
136
137 m_all_ids.reserve(ndrawers);
138
139 for (int dr = 0; dr < ndrawers; ++dr) {
140
141 HWIdentifier drawer_id;
142 /* int result = */m_tileHWID->get_id(dr, drawer_id, &drawer_context);
143
144 HWIdentifier * adc_ids = new HWIdentifier[nchannels];
145 if (m_tileHWID->ros(drawer_id) > 0) { // protection against BEAM ROD
146 for (int ch = 0; ch < nchannels; ++ch) {
147 adc_ids[ch] = m_tileHWID->adc_id(drawer_id, ch, TileID::HIGHGAIN);
148 }
149 }
150 m_all_ids.push_back(adc_ids);
151 }
152
153 ATH_CHECK( m_hitContainerKey.initialize() );
154 ATH_CHECK( m_rawChannelContainerKey.initialize() );
155
156 ATH_MSG_INFO( "TileHitToRawChannel initialization completed" );
157
158 return StatusCode::SUCCESS;
159}
const ServiceHandle< StoreGateSvc > & detStore() const
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
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_ERROR(x)
#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_all_ids

std::vector<HWIdentifier *> TileHitToRawChannel::m_all_ids
private

Vector to store all the drawer ids.

Definition at line 116 of file TileHitToRawChannel.h.

◆ m_ampMaxHi

double TileHitToRawChannel::m_ampMaxHi
private

Value of the maximum amplitude to be stored as a high gain channel.

For larger amplitudes, the channel is converted to low gain

Definition at line 121 of file TileHitToRawChannel.h.

◆ m_atRndmGenSvc

ServiceHandle<IAthRNGSvc> TileHitToRawChannel::m_atRndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Random number generator engine to use.

Definition at line 129 of file TileHitToRawChannel.h.

129{this, "RndmSvc", "AthRNGSvc", ""};

◆ m_cabling

const TileCablingService* TileHitToRawChannel::m_cabling
private

Pointer to the TileCablingService instance.

Definition at line 114 of file TileHitToRawChannel.h.

◆ m_cablingSvc

ServiceHandle<TileCablingSvc> TileHitToRawChannel::m_cablingSvc
private
Initial value:
{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}

Name of Tile cabling service.

Definition at line 126 of file TileHitToRawChannel.h.

126 { this,
127 "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};

◆ m_calibrateEnergy

bool TileHitToRawChannel::m_calibrateEnergy
private

if true, amplitude is converted to pCb

Definition at line 105 of file TileHitToRawChannel.h.

◆ m_deltaT

double TileHitToRawChannel::m_deltaT
private

if true, keep only hits in deltaT range

Definition at line 104 of file TileHitToRawChannel.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_emScaleKey

SG::ReadCondHandleKey<TileEMScale> TileHitToRawChannel::m_emScaleKey
private
Initial value:
{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}

Name of TileEMScale in condition store.

Definition at line 136 of file TileHitToRawChannel.h.

136 {this,
137 "TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"};

◆ 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_hitContainerKey

SG::ReadHandleKey<TileHitContainer> TileHitToRawChannel::m_hitContainerKey
private
Initial value:
{this,"TileHitContainer","TileHitCnt",
"input Tile hit container key"}

Definition at line 90 of file TileHitToRawChannel.h.

90 {this,"TileHitContainer","TileHitCnt",
91 "input Tile hit container key"};

◆ m_infoName

std::string TileHitToRawChannel::m_infoName
private

name of the TileInfo object

Definition at line 103 of file TileHitToRawChannel.h.

◆ m_randomStreamName

Gaudi::Property<std::string> TileHitToRawChannel::m_randomStreamName {this, "RandomStreamName", "Tile_DigitsMaker", ""}
private

Random Stream Name.

Definition at line 131 of file TileHitToRawChannel.h.

131{this, "RandomStreamName", "Tile_DigitsMaker", ""};

◆ m_rawChannelContainerKey

SG::WriteHandleKey<TileRawChannelContainer> TileHitToRawChannel::m_rawChannelContainerKey
private
Initial value:
{this,"TileRawChannelContainer",
"TileRawChannelCnt",
"Output Tile raw channel container key"}

Definition at line 93 of file TileHitToRawChannel.h.

93 {this,"TileRawChannelContainer",
94 "TileRawChannelCnt",
95 "Output Tile raw channel container key"};

◆ m_rChType

TileFragHash::TYPE TileHitToRawChannel::m_rChType
private

Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h)

Definition at line 108 of file TileHitToRawChannel.h.

◆ m_rChUnit

TileRawChannelUnit::UNIT TileHitToRawChannel::m_rChUnit
private

Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h)

Definition at line 107 of file TileHitToRawChannel.h.

◆ m_samplingFractionKey

SG::ReadCondHandleKey<TileSamplingFraction> TileHitToRawChannel::m_samplingFractionKey
private
Initial value:
{this,
"TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"}

Name of TileSamplingFraction in condition store.

Definition at line 99 of file TileHitToRawChannel.h.

99 {this,
100 "TileSamplingFraction", "TileSamplingFraction", "Input Tile sampling fraction"};

◆ m_threshHi

double TileHitToRawChannel::m_threshHi
private

Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used for low gain)

Definition at line 120 of file TileHitToRawChannel.h.

◆ m_tileHWID

const TileHWID* TileHitToRawChannel::m_tileHWID
private

Pointer to TileHWID helper.

Definition at line 112 of file TileHitToRawChannel.h.

◆ m_tileID

const TileID* TileHitToRawChannel::m_tileID
private

Pointer to TileID helper.

Definition at line 110 of file TileHitToRawChannel.h.

◆ m_tileInfo

const TileInfo* TileHitToRawChannel::m_tileInfo
private

Pointer to TileInfo.

Definition at line 113 of file TileHitToRawChannel.h.

◆ m_tileNoise

bool TileHitToRawChannel::m_tileNoise
private

If true => generate noise for the TileRawChannel creation.

Definition at line 118 of file TileHitToRawChannel.h.

◆ m_tileTBID

const TileTBID* TileHitToRawChannel::m_tileTBID
private

Pointer to TileID helper.

Definition at line 111 of file TileHitToRawChannel.h.

◆ m_tileThresh

bool TileHitToRawChannel::m_tileThresh
private

If true => apply threshold on the conversion to raw channels.

Definition at line 119 of file TileHitToRawChannel.h.

◆ m_tileToolNoiseSample

ToolHandle<TileCondToolNoiseSample> TileHitToRawChannel::m_tileToolNoiseSample
private
Initial value:
{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"}

Definition at line 139 of file TileHitToRawChannel.h.

139 {this,
140 "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"};

◆ 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: