|
ATLAS Offline Software
|
This algorithm builds TileRawChannels from TileHits. TileRawChannel amplitude, time and quality are obtianed from the TileHits. Noise is applied to the amplitude.
More...
#include <TileHitToRawChannel.h>
|
| TileHitToRawChannel (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor. More...
|
|
virtual | ~TileHitToRawChannel () |
| Destructor
More...
|
|
virtual StatusCode | initialize () override |
| initialize method
More...
|
|
virtual StatusCode | execute () override |
| execute method
More...
|
|
virtual StatusCode | finalize () override |
| finalize method
More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
SG::ReadHandleKey< TileHitContainer > | m_hitContainerKey |
|
SG::WriteHandleKey< TileRawChannelContainer > | m_rawChannelContainerKey |
|
SG::ReadCondHandleKey< TileSamplingFraction > | m_samplingFractionKey |
| Name of TileSamplingFraction in condition store. More...
|
|
std::string | m_infoName |
| name of the TileInfo object More...
|
|
double | m_deltaT |
| if true, keep only hits in deltaT range More...
|
|
bool | m_calibrateEnergy |
| if true, amplitude is converted to pCb More...
|
|
TileRawChannelUnit::UNIT | m_rChUnit |
| Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h) More...
|
|
TileFragHash::TYPE | m_rChType |
| Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h) More...
|
|
const TileID * | m_tileID |
| Pointer to TileID helper. More...
|
|
const TileTBID * | m_tileTBID |
| Pointer to TileID helper. More...
|
|
const TileHWID * | m_tileHWID |
| Pointer to TileHWID helper. More...
|
|
const TileInfo * | m_tileInfo |
| Pointer to TileInfo. More...
|
|
const TileCablingService * | m_cabling |
| Pointer to the TileCablingService instance. More...
|
|
std::vector< HWIdentifier * > | m_all_ids |
| Vector to store all the drawer ids. More...
|
|
bool | m_tileNoise |
| If true => generate noise for the TileRawChannel creation. More...
|
|
bool | m_tileThresh |
| If true => apply threshold on the conversion to raw channels. More...
|
|
double | m_threshHi |
| Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used for low gain) More...
|
|
double | m_ampMaxHi |
| Value of the maximum amplitude to be stored as a high gain channel. More...
|
|
ServiceHandle< TileCablingSvc > | m_cablingSvc |
| Name of Tile cabling service. More...
|
|
ServiceHandle< IAthRNGSvc > | m_atRndmGenSvc {this, "RndmSvc", "AthRNGSvc", ""} |
| Random number generator engine to use. More...
|
|
Gaudi::Property< std::string > | m_randomStreamName {this, "RandomStreamName", "Tile_DigitsMaker", ""} |
| Random Stream Name. More...
|
|
SG::ReadCondHandleKey< TileEMScale > | m_emScaleKey |
| Name of TileEMScale in condition store. More...
|
|
ToolHandle< TileCondToolNoiseSample > | m_tileToolNoiseSample |
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
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.
◆ StoreGateSvc_t
◆ TileHitToRawChannel()
TileHitToRawChannel::TileHitToRawChannel |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileHitToRawChannel()
TileHitToRawChannel::~TileHitToRawChannel |
( |
| ) |
|
|
virtual |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TileHitToRawChannel::execute |
( |
| ) |
|
|
overridevirtual |
execute method
Definition at line 167 of file TileHitToRawChannel.cxx.
171 const EventContext& ctx = Gaudi::Hive::currentContext();
196 const int nChMax = 48;
197 double random[nChMax];
198 memset(random, 0,
sizeof(random));
200 int adc_gain[nChMax];
201 double adc_ampl[nChMax];
202 double adc_time[nChMax];
203 double adc_qual[nChMax];
221 <<
" is connected" );
228 <<
"Collection = 0x" << hitCollection->identify() << MSG::dec
230 <<
", drawer=" <<
drawer );
239 RandGaussQ::shootArray(*rngWrapper, nChMax, random, 0.0, 1.0);
241 for (
ch = 0;
ch < nChMax; ++
ch) {
248 memset(adc_gain, -1,
sizeof(adc_gain));
249 memset(adc_ampl, 0,
sizeof(adc_ampl));
252 memset(adc_time, 0,
sizeof(adc_time));
253 memset(adc_qual, 0,
sizeof(adc_qual));
256 for (
const TileHit* tile_hit : *hitCollection) {
266 double e_hit = tile_hit->energy();
267 double time = tile_hit->time();
273 double etime = e_hit *
time;
274 for (
int i = tile_hit->size() - 1;
i > 0; --
i) {
275 double en = tile_hit->energy(
i);
276 double ti = tile_hit->time(
i);
283 time = etime / e_hit;
288 double hit_calib = samplingFraction->getSamplingFraction(drawerIdx,
ch);
289 double e_ch = e_hit * hit_calib;
294 double amp_ch = e_ch / emScale->calibrateChannel(drawerIdx,
ch,
gain, 1.,
m_rChUnit
301 amp_ch = e_ch / emScale->calibrateChannel(drawerIdx,
ch,
gain, 1.,
m_rChUnit
314 adc_ampl[
ch] += amp_ch;
319 <<
" noise=" <<
noise
321 <<
" tot=" << adc_ampl[
ch]);
330 for (
int ch = 0;
ch < nChMax; ++
ch) {
339 double amp = adc_ampl[
ch];
353 if (fabs(amp) < fabs(
thresh))
364 auto rawChannel = std::make_unique<TileRawChannel>(adc_id, amp, adc_time[
ch], adc_qual[
ch]);
377 <<
", amp=" << amp );
383 <<
", amp=" << amp );
394 <<
" eHitTot=" << eHitTot
396 <<
" nchLG=" << nChLG
397 <<
" eChLG=" << eChLG
398 <<
" nchHG=" << nChHG
399 <<
" eChHG=" << eChHG <<
endmsg;
406 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TileHitToRawChannel::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode TileHitToRawChannel::initialize |
( |
| ) |
|
|
overridevirtual |
initialize method
Definition at line 85 of file TileHitToRawChannel.cxx.
127 <<
", tileNoise=" << ((
m_tileNoise) ?
"true" :
"false")
128 <<
", tileThresh=" <<
"true, thresh_hi=" <<
m_threshHi );
131 <<
", tileNoise=" << ((
m_tileNoise) ?
"true" :
"false")
132 <<
", tileThresh=" <<
"false" );
142 for (
int dr = 0;
dr < ndrawers; ++
dr) {
149 for (
int ch = 0;
ch < nchannels; ++
ch) {
159 ATH_MSG_INFO(
"TileHitToRawChannel initialization completed" );
161 return StatusCode::SUCCESS;
◆ inputHandles()
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() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_all_ids
◆ 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
◆ m_cabling
◆ m_cablingSvc
Initial value:{ this,
"TileCablingSvc", "TileCablingSvc", "The Tile cabling service"}
Name of Tile cabling service.
Definition at line 126 of file TileHitToRawChannel.h.
◆ m_calibrateEnergy
bool TileHitToRawChannel::m_calibrateEnergy |
|
private |
◆ m_deltaT
double TileHitToRawChannel::m_deltaT |
|
private |
◆ m_detStore
◆ m_emScaleKey
Initial value:{this,
"TileEMScale", "TileEMScale", "Input Tile EMS calibration constants"}
Name of TileEMScale in condition store.
Definition at line 136 of file TileHitToRawChannel.h.
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_hitContainerKey
Initial value:{this,"TileHitContainer","TileHitCnt",
"input Tile hit container key"}
Definition at line 90 of file TileHitToRawChannel.h.
◆ m_infoName
std::string TileHitToRawChannel::m_infoName |
|
private |
◆ m_randomStreamName
Gaudi::Property<std::string> TileHitToRawChannel::m_randomStreamName {this, "RandomStreamName", "Tile_DigitsMaker", ""} |
|
private |
◆ m_rawChannelContainerKey
Initial value:{this,"TileRawChannelContainer",
"TileRawChannelCnt",
"Output Tile raw channel container key"}
Definition at line 93 of file TileHitToRawChannel.h.
◆ m_rChType
◆ m_rChUnit
◆ m_samplingFractionKey
◆ 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
◆ m_tileID
◆ m_tileInfo
◆ m_tileNoise
bool TileHitToRawChannel::m_tileNoise |
|
private |
◆ m_tileTBID
◆ m_tileThresh
bool TileHitToRawChannel::m_tileThresh |
|
private |
◆ m_tileToolNoiseSample
Initial value:{this,
"TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"}
Definition at line 139 of file TileHitToRawChannel.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
bool m_calibrateEnergy
if true, amplitude is converted to pCb
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
TileFragHash::TYPE m_rChType
Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h)
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
virtual int get_id(const IdentifierHash &hash_id, HWIdentifier &id, const IdContext *context=0) const
create compact HW ID from hash id (return == 0 for OK)
const TileID * m_tileID
Pointer to TileID helper.
TileRawChannelUnit::UNIT m_rChUnit
Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h)
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
size_type drawer_hash_max(void) const
drawer hash table max size
std::string m_infoName
name of the TileInfo object
IdContext drawer_context(void) const
idContext for drawers
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
#define ATH_MSG_VERBOSE(x)
const TileHWID * m_tileHWID
Pointer to TileHWID helper.
double m_threshHi
Value of the mimimal amplitude required to do the conversion to raw channel in high gain (not used fo...
int channel(const HWIdentifier &id) const
extract channel field from HW identifier
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
int ros(const HWIdentifier &id) const
extract ros field from HW identifier
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
double ThresholdRawChannel(int) const
Return the threshold value for good (filtered) TileRawChannels.
ServiceHandle< IAthRNGSvc > m_atRndmGenSvc
Random number generator engine to use.
double m_deltaT
if true, keep only hits in deltaT range
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
virtual IdentifierHash get_hash(const HWIdentifier &id) const
create hash id from compact ADC id without error checking
::StatusCode StatusCode
StatusCode definition for legacy code.
bool m_tileThresh
If true => apply threshold on the conversion to raw channels.
float getNoiseScaleFactor(void) const
Conversion from ADC sigma noise to OF sigma noise.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
const TileTBID * m_tileTBID
Pointer to TileID helper.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
HWIdentifier drawer_id(int frag) const
ROS HWIdentifer.
A wrapper class for event-slot-local random engines.
HWIdentifier channel_id(int ros, int drawer, int channel) const
channel HWIdentifer
StatusCode initialize(bool used=true)
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
std::vector< HWIdentifier * > m_all_ids
Vector to store all the drawer ids.
bool TileNoise() const
Noise switched on/off?
const TileCablingService * m_cabling
Pointer to the TileCablingService instance.
HWIdentifier adc_id(int ros, int drawer, int channel, int adc) const
adc HWIdentifer
DataObjIDColl m_extendedExtraObjects
bool TileZeroSuppress() const
Zero suppression switched on/off?
int drawer(const HWIdentifier &id) const
extract drawer field from HW identifier
def time(flags, cells_name, *args, **kw)
std::string to_string(const Identifier &id, int level=0) const
#define ATH_MSG_WARNING(x)
const TileInfo * m_tileInfo
Pointer to TileInfo.
bool connected(int ros, int drawer) const
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double m_ampMaxHi
Value of the maximum amplitude to be stored as a high gain channel.
AthAlgorithm()
Default constructor:
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
std::string to_string(const HWIdentifier &id, int level=0) const
extract all fields from HW identifier HWIdentifier get_all_fields ( const HWIdentifier & id,...
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
This class saves the "context" of an expanded identifier (ExpandedIdentifier) for compact or hash ver...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
int ADCmax() const
Returns the maximum ADC output (10 bits --> 1023)
bool m_tileNoise
If true => generate noise for the TileRawChannel creation.