27#ifndef TILESIMALGS_TILEDIGITSMAKER_H
28#define TILESIMALGS_TILEDIGITSMAKER_H
51#include "GaudiKernel/ToolHandle.h"
52#include "GaudiKernel/ServiceHandle.h"
54#include "CLHEP/Random/RandomEngine.h"
82 using AthReentrantAlgorithm::AthReentrantAlgorithm;
89 virtual StatusCode
execute(
const EventContext &ctx)
const override;
90 virtual StatusCode
finalize()
override;
95 std::vector<std::vector<double>>& drawerBufferLo,
96 std::vector<std::vector<double>>& drawerBufferHi,
97 std::vector<int>& igain,
int ros,
int drawer,
int drawerIdx,
98 std::vector<int>& over_gain,
const TileEMScale* emScale,
103 std::vector<std::vector<double>>& drawerBufferLo,
104 std::vector<std::vector<double>>& drawerBufferHi,
105 std::vector<int>& igain, std::vector<int>& overgain, std::vector<double>& ech_int,
106 std::vector<bool> &signal_in_channel,
const TileEMScale* emScale,
110 "TileHitContainer",
"TileHitCnt",
"input Tile hit container key"};
113 "TileHitContainer_DigiHSTruth",
"TileHitCnt_DigiHSTruth",
"input Tile hit container key"};
116 "OnlyUseContainerName",
true,
"Don't use the ReadHandleKey directly. Just extract the container name from it."};
122 "TileDigitsContainer",
"TileDigitsCnt",
"Output Tile digits container key"};
125 "TileDigitsContainer_DigiHSTruth",
"TileDigitsCnt_DigiHSTruth",
"Output DigiHSTruth Tile digits container key"};
128 "TileFilteredContainer",
"TileDigitsFlt",
"Output filtered Tile digits container key"};
131 "FilterThreshold", 100.0 * Athena::Units::MeV,
"Threshold on filtered digits (default - 100 MeV)"};
134 "FilterThresholdMBTS", 0.0 * Athena::Units::MeV,
"Threshold on filtered digits of MBTS (default - 0 MeV)"};
137 "TileInfoName",
"TileInfo",
"TileInfo object name"};
140 "IntegerDigits",
true,
"Round digits to integer"};
143 "CalibrationRun",
false,
"If true -> both high and low gain saved"};
146 "RndmEvtOverlay",
false,
"Pileup and/or noise added by overlaying random events (default=false)"};
149 "UseCoolPulseShapes",
true,
"Pulse shapes from database (default=true)"};
152 "MaskBadChannels",
false,
"Remove channels tagged bad (default=false)"};
155 "DoHSTruthReconstruction",
false,
""};
158 "AllChannels", -1,
"Create all channels, use 0 or 1 or 2 (default=-1 - unset)"};
168 std::vector<std::unique_ptr<HWIdentifier[]> >
m_all_ids;
200 "TileCablingSvc",
"TileCablingSvc",
"The Tile cabling service"};
210 "TileSampleNoise",
"TileSampleNoise",
"Input Tile sample noise"};
216 "TileEMScale",
"TileEMScale",
"Input Tile EMS calibration constants"};
222 "TilePulseShape",
"TilePulseShape",
"Input Tile pulse shape"};
228 "TileSamplingFraction",
"TileSamplingFraction",
"Input Tile sampling fraction"};
234 "TileBadChannels",
"TileBadChannels",
"Input Tile bad channel status"};
237 "TileDQstatus",
"",
"Input TileDQstatus key" };
the preferred mechanism to access information from the different event stores in a pileup job.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Information produced by TileDQstatusAlg (used to be done by TileBeamInfoProvider).
Wrapper to avoid constant divisions when using units.
An algorithm that can be simultaneously executed in multiple threads.
manage multiple RandomEngines in thread-safe way.
the preferred mechanism to access information from the different event stores in a pileup job.
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
Condition object to keep Tile channel and ADC status.
Class that holds Data Quality fragment information and provides functions to extract the data quality...
This algorithm performs digitization in TileCal, obtaining TileDigits from TileHits.
int m_nSamples
Number of time slices for each channel.
int m_binTime0Lo
Index of time=0 bin for low gain pulse shape.
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
SG::WriteHandleKey< TileDigitsContainer > m_digitsContainerKey
float m_ADCmaxMinusEps
ADC saturation value - 0.01 or something small.
Gaudi::Property< int > m_allChannels
SG::ReadHandleKey< TileHitContainer > m_hitContainer_DigiHSTruthKey
SG::ReadCondHandleKey< TileBadChannels > m_badChannelsKey
Name of TileBadChannels in condition store.
int m_nShapeLo
Number of bins in low gain pulse shape.
Gaudi::Property< bool > m_onlyUseContainerName
int m_i_ADCmax
ADC saturation value.
SG::ReadHandleKey< TileHitContainer > m_hitContainerKey
float m_f_ADCmax
ADC saturation value.
int m_nBinsPerXHi
Number of bins per bunch crossing in high gain pulse shape.
float m_ADCmaxPlusEps
ADC saturation value + 0.01 or something small.
bool m_tileNoise
If true => generate noise in TileDigits.
SG::ReadCondHandleKey< TilePulse > m_pulseShapeKey
Name of TilePulseShape in condition store.
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
SG::ReadHandleKey< TileDQstatus > m_DQstatusKey
Gaudi::Property< bool > m_rndmEvtOverlay
virtual StatusCode execute(const EventContext &ctx) const override
execute method
const TileHWID * m_tileHWID
int m_nBinsPerXLo
Number of bins per bunch crossing in low gain pulse shape.
SG::WriteHandleKey< TileDigitsContainer > m_filteredDigitsContainerKey
double m_timeStepHi
Time step in high gain pulse shape: 25.0 / nBinsPerXHi.
Gaudi::Property< bool > m_calibRun
StatusCode fillDigitCollection(const TileHitCollection *hitCollection, std::vector< std::vector< double > > &drawerBufferLo, std::vector< std::vector< double > > &drawerBufferHi, std::vector< int > &igain, std::vector< int > &overgain, std::vector< double > &ech_int, std::vector< bool > &signal_in_channel, const TileEMScale *emScale, const TileSamplingFraction *samplingFraction, const TilePulse *pulse) const
const TileInfo * m_tileInfo
bool m_tileThresh
If true => apply threshold to Digits.
std::vector< double > m_digitShapeHi
High gain pulse shape.
Gaudi::Property< bool > m_useCoolPulseShapes
std::vector< double > m_digitShapeLo
Low gain pulse shape.
bool m_tileCoherNoise
If true => generate coherent noise in TileDigits.
ServiceHandle< PileUpMergeSvc > m_mergeSvc
Gaudi::Property< std::string > m_infoName
const TileCablingService * m_cabling
TileCabling instance.
double m_timeStepLo
Time step in low gain pulse shape: 25.0 / nBinsPerXLo.
int m_iTrig
Index of the triggering time slice.
int m_nShapeHi
Number of bins in high gain pulse shape.
Gaudi::Property< bool > m_integerDigits
double m_tileThreshHi
Actual threshold value for high gain.
std::string m_inputDigitContainerName
Gaudi::Property< double > m_filterThresholdMBTS
SG::ReadCondHandleKey< TileEMScale > m_emScaleKey
Name of TileEMScale in condition store.
SG::ReadCondHandleKey< TileSampleNoise > m_sampleNoiseKey
Name of TileSampleNoise in condition store.
Gaudi::Property< bool > m_doDigiTruth
virtual ~TileDigitsMaker()=default
float m_f_ADCmaskValue
indicates channels which were masked in background dataset
int m_binTime0Hi
Index of time=0 bin for high gain pulse shape.
SG::ReadCondHandleKey< TileSamplingFraction > m_samplingFractionKey
Name of TileSamplingFraction in condition store.
Gaudi::Property< double > m_filterThreshold
Gaudi::Property< bool > m_maskBadChannels
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service to use.
SG::ReadHandleKey< TileDigitsContainer > m_inputDigitContainerKey
float m_f_ADCmaxHG
ADC saturation value - 0.5.
double m_tileThreshLo
Actual threshold value for low gain.
virtual StatusCode finalize() override
finalize method
StatusCode overlayBackgroundDigits(const TileDigitsCollection *bkgDigitCollection, const TileHitCollection *hitCollection, std::vector< std::vector< double > > &drawerBufferLo, std::vector< std::vector< double > > &drawerBufferHi, std::vector< int > &igain, int ros, int drawer, int drawerIdx, std::vector< int > &over_gain, const TileEMScale *emScale, const TileSampleNoise *sampleNoise, const TileDQstatus *dqStatus, const TileBadChannels *badChannels) const
std::vector< std::unique_ptr< HWIdentifier[]> > m_all_ids
SG::WriteHandleKey< TileDigitsContainer > m_digitsContainer_DigiHSTruthKey
virtual StatusCode initialize() override
initialize method
const TileTBID * m_tileTBID
Condition object to keep calibration factors of TileCal channels.
Helper class for TileCal online (hardware) identifiers.
Helper class for TileCal offline identifiers.
Condition object to keep and provide Tile pulse shape.
Condition object to keep and provide Tile sample noise.
Condition object to keep and provide Tile Calorimeter sampling fraction and number of photoelectrons.
Helper class for TileCal offline identifiers of ancillary testbeam detectors and MBTS.