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

This algorithm creates TileDigits from pulses provided by pulse simulator. More...

#include <TileDigitsFromPulse.h>

Inheritance diagram for TileDigitsFromPulse:

Public Member Functions

 TileDigitsFromPulse (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TileDigitsFromPulse ()
virtual StatusCode initialize () override
 initialize method
virtual StatusCode execute (const EventContext &ctx) override
 execute method
virtual StatusCode finalize () override
 finalize method
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

bool makeDist (TFile *&file, TH1F *&hist, const std::string &fileName, const std::string &histName="h_Eopt_hi")
 Method to read distribution from file.
bool makeDist (TFile *&file, std::vector< std::vector< TH1F * > > &hists, const std::string &fileName)
void addPileUp (double &n_inTimeAmp, double ootAmp, int gain, int ros, int drawer, int channel)
 Fill vector with pile-up amplitudes.
void addPileUpSample (int gain, int ros, int drawer, int channel)
 Fill only a BC with pile-up amplitude.
double generatePulseTimeOffset ()
 Generate a pulse arrival-time variation in ns.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_outputContainer
 Name of the output TileDigitsContainer.
const TileHWID * m_tileHWID {}
Gaudi::Property< std::string > m_infoName {this, "TileInfoName", "TileInfo"}
const TileInfo * m_tileInfo {}
int m_i_ADCmax {}
TileRawChannelUnit::UNIT m_rChUnit {TileRawChannelUnit::ADCcounts}
 Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h).
TileFragHash::TYPE m_rChType {TileFragHash::Default}
 Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h).
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
SG::WriteHandleKey< TileDigitsContainer > m_digitsContainerKey
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
ServiceHandle< IAthRNGSvc > m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
 Random number service to use.
Gaudi::Property< std::string > m_randomStreamName {this, "RandomStreamName", "Tile_DigitsMaker", ""}
 Random Stream Name.
Gaudi::Property< double > m_imperfectionMean {this, "ImperfectionMean", 1.01}
 Mean value of pulse shape broadening.
Gaudi::Property< double > m_imperfectionRms {this, "ImperfectionRms", 0.02}
 RMS of pulse shape broadening.
Gaudi::Property< double > m_inTimeAmp {this, "InTimeAmp", 300.}
 Amplitude of in-time pulse.
Gaudi::Property< double > m_ootAmp {this, "OutOfTimeAmp", 150.}
 Amplitude of out-of-time pulse.
Gaudi::Property< double > m_itOffset {this, "InTimeOffset", 0.}
 In-time pulse offset from nominal time.
Gaudi::Property< double > m_ootOffset {this, "OutOfTimeOffset", 50.}
 Out-of-time pulse offset from nominal time.
Gaudi::Property< double > m_ped_HG {this, "PedestalValueHG", 100}
 Pedestal value for HG if specific channel pedestal is not used.
Gaudi::Property< double > m_ped_LG {this, "PedestalValueLG", 100}
 Pedestal value for LG if specific channel pedestal is not used.
Gaudi::Property< bool > m_gaussNoise {this, "UseGaussNoise", false}
 Set to TRUE in order to create noise from double gaussian.
Gaudi::Property< double > m_GNAmpOne {this, "GaussNoiseAmpOne", 1 / 1.039}
 Amplitude of first gaussian of double gaussian noise.
Gaudi::Property< double > m_GNSigmaOne {this, "GaussNoiseSigmaOne", 1.6}
 Standard deviation of first gaussian of double gaussian noise.
Gaudi::Property< double > m_GNAmpTwo {this, "GaussNoiseAmpTwo", 0.039}
 Amplitude of second gaussian of double gaussian noise.
Gaudi::Property< double > m_GNSigmaTwo {this, "GaussNoiseSigmaTwo", 3.6}
 Standard deviation of second gaussian of double gaussian noise.
Gaudi::Property< bool > m_useItADist {this, "UseInTimeAmpDist", false}
 Set to TRUE in order to use a distribution for the in-time amplitude instead of a constant value.
Gaudi::Property< double > m_itAPulseProb {this, "InTimeAmpPulseProb", 0}
 Probability to add an in-time pulse.
Gaudi::Property< bool > m_useOotADist {this, "UseOutOfTimeAmpDist", false}
 Set to TRUE in order to use a distribution for the out-of-time amplitude instead of a constant value.
Gaudi::Property< float > m_pileUpFraction {this, "PileUpFraction", 1}
 Probability that an out-of-time component will be added.
Gaudi::Property< float > m_gausC2C {this, "GaussianC2CPhaseVariation", 0}
 RMS for the in-time pulse offset (channel-to-channel phase variation).
Gaudi::Property< double > m_gaussianPulseTimingVariation
 RMS of individual pulse arrival-time variations in ns.
Gaudi::Property< std::string > m_itADistFileName {this, "InTimeAmpDistFileName", ""}
 Filename of file to use for amplitude distribution of in-time pulses.
Gaudi::Property< std::string > m_ootADistFileName {this, "OutOfTimeAmpDistFileName", ""}
 Filename of file to use for amplitude distribution of out-of-time pulses.
Gaudi::Property< bool > m_chanPed {this, "ChannelSpecificPedestal", false}
 Use channel specific pedestal value if true.
Gaudi::Property< bool > m_chanNoise {this, "ChannelSpecificNoise", false}
 Add channel specific noise.
Gaudi::Property< std::string > m_ootOffsetFileName {this, "OutOfTimeOffsetHistogramFile", ""}
 File name for offset timing distribution histogram.
Gaudi::Property< std::string > m_ootOffsetHistName {this, "OutOfTimeOffsetHistogramName", ""}
 Name of the histogram for timing offset distribution.
Gaudi::Property< int > m_AmpDistLowLim {this, "AmpDistLowerLimit", 135}
 Set all bins to the left of this bin to 0 in the amplitude distribution histograms.
Gaudi::Property< std::string > m_itADistHistName {this, "InTimeAmpDistHistogramName", "h_Eopt_hi"}
 Name of histogram for in-time amplitude distribution.
Gaudi::Property< std::string > m_ootADistHistName {this, "OutOfTimeAmpDistHistogramName", "h_Eopt_hi"}
 Name of histogram for out-of-time amplitude distribution.
Gaudi::Property< bool > m_simQIE {this, "SimulateQIE", false}
 Raw PMT pulses are generated if the option is set to true.
Gaudi::Property< bool > m_simPulseChain {this, "SimulatePulseChain", false}
 Simulate continous output of readout for HL-LHC paradigm.
Gaudi::Property< bool > m_useGainDependentUndershoot
 Use gain-dependent analytical undershoot parameters.
Gaudi::Property< bool > m_useRecursiveUndershoot
 Recursively accumulate the long undershoot in continuous readout.
Gaudi::Property< int > m_seed {this, "RandomSeed", 4357}
Gaudi::Property< int > m_BunchSpacing {this, "BunchSpacing", 25}
 Time between pulses in ms 25, 50 or 75.
Gaudi::Property< int > m_nSamples {this, "NSamples", 7}
 number of read out samples
Gaudi::Property< int > m_nPul {this, "NPulses", 21}
 number of pileup pulses
int m_nPul_eff {}
std::vector< std::vector< std::vector< std::vector< float > > > > m_PUAmp
std::vector< std::vector< std::vector< std::vector< double > > > > m_pulseTimeOffsets
std::vector< std::vector< std::vector< std::array< double, 2 > > > > m_accumulatedUndershoot
std::array< double, 2 > m_tailDecayPerBC {}
std::array< double, 2 > m_tailAtAccumulation {}
std::array< int, 2 > m_firstAccumulatedIndex {}
std::array< int, 2 > m_firstRelevantIndex {}
int m_pulseHistorySize {}
Gaudi::Property< bool > m_PhaseII {this, "TilePhaseII", false}
Gaudi::Property< bool > m_bigain {this, "Bigain", false}
Gaudi::Property< bool > m_simPUwPoisson {this, "SimulatePileUpWithPoiss", false}
Gaudi::Property< int > m_avgMuForPU {this, "AvgMuForPileUpSimulation", 40}
Gaudi::Property< std::string > m_pileupAmpDistFileName {this, "PileUpAmpDistFileName", ""}
 Filename for PU amplitude distribution histograms.
TilePulseShape * m_ps [2]
 Class for defining pulse.
TileSampleBuffer * m_buf {}
 Buffer class to hold generated pulses.
TileSampleGenerator * m_tsg {}
 Pulse generating class.
TH1F * m_ootDist
 Histogram to hold the distribution of out-of-time amplitudes.
TH1F * m_itDist
 Histogram to hold the distribution of in-time amplitudes.
TFile * m_itFile
 File that holds the distribution of in-time amplitudes.
TFile * m_ootFile
 File that holds the distribution of out-of-time amplitudes.
TH1F * m_ootOffsetDist
 Histogram to hold the distribution of out-of-time timing offsets.
TFile * m_ootOffsetFile
 File that holds the distribution of out-of-time timing offsets.
bool m_useOffsetHisto {false}
 Internally used to keep track of wether a histogram has been opened or not.
TFile * m_pileup_AmpDistFile
 File containing amplitude histograms for PU pulses.
std::vector< std::vector< TH1F * > > m_pileup_AmpDists
 Matrix of PU amplitude distribution histograms (PU per partition and channel).
float m_sample_tru = 0
std::unique_ptr< TRandom3 > m_random
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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 creates TileDigits from pulses provided by pulse simulator.

Definition at line 91 of file TileDigitsFromPulse.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TileDigitsFromPulse()

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

Definition at line 64 of file TileDigitsFromPulse.cxx.

64 :
65 AthAlgorithm(name, pSvcLocator)
66{
67 //Initialisations
68 m_ps[0] = new TilePulseShape(msgSvc(), "TilePulseShapeLo"); //Low Gain
69 m_ps[1] = new TilePulseShape(msgSvc(), "TilePulseShapeHi"); //High Gain
70
71
72 m_itFile = new TFile();
73 m_itDist = new TH1F();
74 m_ootFile = new TFile();
75 m_ootDist = new TH1F();
76 m_ootOffsetDist = new TH1F();
77 m_ootOffsetFile = new TFile();
78
79 m_pileup_AmpDistFile = new TFile();
80}
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
TFile * m_pileup_AmpDistFile
File containing amplitude histograms for PU pulses.
TFile * m_itFile
File that holds the distribution of in-time amplitudes.
TH1F * m_ootDist
Histogram to hold the distribution of out-of-time amplitudes.
TFile * m_ootFile
File that holds the distribution of out-of-time amplitudes.
TFile * m_ootOffsetFile
File that holds the distribution of out-of-time timing offsets.
TH1F * m_ootOffsetDist
Histogram to hold the distribution of out-of-time timing offsets.
TilePulseShape * m_ps[2]
Class for defining pulse.
TH1F * m_itDist
Histogram to hold the distribution of in-time amplitudes.
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ ~TileDigitsFromPulse()

TileDigitsFromPulse::~TileDigitsFromPulse ( )
virtual

Definition at line 82 of file TileDigitsFromPulse.cxx.

82 {
83
84 delete m_ootOffsetFile;
85 delete m_ootFile;
86 delete m_itFile;
88
89 delete m_ps[0];
90 delete m_ps[1];
91}

Member Function Documentation

◆ addPileUp()

void TileDigitsFromPulse::addPileUp ( double & n_inTimeAmp,
double ootAmp,
int gain,
int ros,
int drawer,
int channel )
private

Fill vector with pile-up amplitudes.

Definition at line 793 of file TileDigitsFromPulse.cxx.

793 {
794 //Pileup samples
795 double amp_1;
796 double amp_2;
797 double mu = 0; //Interaction per bunch crossing for PU simulation
798 if(gain == 1){
799 for (int i = 0; i <= m_nPul_eff; i++) {
800 if (((i * 25) % m_BunchSpacing) == 0) {
801 if(m_simPUwPoisson){
802 mu=m_random->Poisson(m_avgMuForPU);
803 ATH_MSG_VERBOSE("Effective pulse number " << i);
804 ATH_MSG_VERBOSE("Number of interactions for simulation: " << mu );
805
806 for (int imu = 0; imu<mu; imu++){
807
808 if (m_random->Rndm() < m_pileUpFraction){
809 amp_1 = m_pileup_AmpDists[ros-1][channel]->GetRandom();
810 }
811 else{
812 amp_1 = 0;
813 }
814
815 if (m_random->Rndm() < m_pileUpFraction){
816 amp_2 = m_pileup_AmpDists[ros-1][channel]->GetRandom();
817 }
818 else{
819 amp_2 = 0;
820 }
821
822 ATH_MSG_VERBOSE("Random amplitudes for PU: " << amp_1 << " " << amp_2);
823 if(i==0){
824 m_PUAmp[ros-1][drawer][channel][m_nPul_eff] += amp_1;
825 }
826 else{
827 m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] += amp_1;
828 m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] += amp_2;
829 }
830 }
831
832 if(m_PUAmp[ros-1][drawer][channel][m_nPul_eff] < 0) m_PUAmp[ros-1][drawer][channel][m_nPul_eff] = 0;
833 if(m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] < 0) m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] = 0;
834 if(m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] < 0) m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] = 0;
835
836 ATH_MSG_VERBOSE("Final amplitudes for pulse " << m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] << " " << m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i]);
837 }
838 else{
839 m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] = m_useOotADist ? m_ootDist->GetRandom() : ootAmp;
840 m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] = m_useOotADist ? m_ootDist->GetRandom() : ootAmp;
841 }
842
843 if(m_simPulseChain){ // Special treatment for pulse-chain simulation, add in-time pulses when initializing true-amp vector
844 if (m_random->Rndm() < m_itAPulseProb){
845 amp_1 = m_useItADist ? m_itDist->GetRandom() : m_inTimeAmp.value();
846 } else{
847 amp_1 = 0;
848 }
849
850 if (m_random->Rndm() < m_itAPulseProb){
851 amp_2 = m_useItADist ? m_itDist->GetRandom() : m_inTimeAmp.value();
852 } else{
853 amp_2 = 0;
854 }
855
856 if(i==0){
857 m_PUAmp[ros-1][drawer][channel][m_nPul_eff] += amp_1;
858 }
859 else{
860 m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] += amp_1;
861 m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] += amp_2;
862 }
863 }
864 } else {
865 m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] = 0;
866 m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] = 0;
867 }
868 }
869 }
870 else if (gain == 0)
871 {
872 double scaleFactor = m_PhaseII ? 40 : 64;
873 n_inTimeAmp /= scaleFactor;
874 for (int i = 0; i <= m_nPul_eff; i++) {
875 m_PUAmp[ros-1][drawer][channel][m_nPul_eff + i] /= scaleFactor;
876 m_PUAmp[ros-1][drawer][channel][m_nPul_eff - i] /= scaleFactor;
877 }
878 }
879}
#define ATH_MSG_VERBOSE(x,...)
Gaudi::Property< float > m_pileUpFraction
Probability that an out-of-time component will be added.
Gaudi::Property< bool > m_useOotADist
Set to TRUE in order to use a distribution for the out-of-time amplitude instead of a constant value.
std::vector< std::vector< std::vector< std::vector< float > > > > m_PUAmp
std::unique_ptr< TRandom3 > m_random
Gaudi::Property< int > m_BunchSpacing
Time between pulses in ms 25, 50 or 75.
Gaudi::Property< double > m_itAPulseProb
Probability to add an in-time pulse.
Gaudi::Property< int > m_avgMuForPU
Gaudi::Property< bool > m_simPulseChain
Simulate continous output of readout for HL-LHC paradigm.
Gaudi::Property< bool > m_useItADist
Set to TRUE in order to use a distribution for the in-time amplitude instead of a constant value.
Gaudi::Property< bool > m_PhaseII
std::vector< std::vector< TH1F * > > m_pileup_AmpDists
Matrix of PU amplitude distribution histograms (PU per partition and channel).
Gaudi::Property< bool > m_simPUwPoisson
Gaudi::Property< double > m_inTimeAmp
Amplitude of in-time pulse.

◆ addPileUpSample()

void TileDigitsFromPulse::addPileUpSample ( int gain,
int ros,
int drawer,
int channel )
private

Fill only a BC with pile-up amplitude.

Definition at line 881 of file TileDigitsFromPulse.cxx.

881 {
882
883 double amp = 0;
884 double mu = 0; //Interaction per bunch crossing for PU simulation
885
886 mu=m_random->Poisson(m_avgMuForPU);
887
888 if(gain == 1){
889 for (int imu = 0; imu<mu; imu++){
890 if (m_random->Rndm() < m_pileUpFraction){
891 amp = m_pileup_AmpDists[ros-1][channel]->GetRandom();
892 }
893 else{
894 amp = 0;
895 }
896
897 m_PUAmp[ros-1][drawer][channel].front() += amp;
898 }
899 }
900 else if (gain == 0)
901 {
902 if(!m_PhaseII){
903 m_PUAmp[ros-1][drawer][channel].front() /= 64;
904 }
905 else{
906 m_PUAmp[ros-1][drawer][channel].front() /= 40;
907 }
908 }
909
910 if(m_PUAmp[ros-1][drawer][channel].front() < 0) m_PUAmp[ros-1][drawer][channel].front() = 0;
911}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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 TileDigitsFromPulse::execute ( const EventContext & ctx)
overridevirtual

execute method

< Local loop variable for amplitude of in-time pulse

Implements AthAlgorithm.

Definition at line 294 of file TileDigitsFromPulse.cxx.

294 {
295
296 ATH_MSG_DEBUG("in execute()");
297
298
299 // Prepare RNG service
300 ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, m_randomStreamName);
301 rngWrapper->setSeed( m_randomStreamName, ctx );
302 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->getEngine(ctx);
303
304 // Create new container for digits
305 auto digitsContainer = std::make_unique<TileMutableDigitsContainer>(true,
309
310 ATH_CHECK( digitsContainer->status() );
311
312 //Create RawChannel for truth values.
313 auto rawChannelContainer = std::make_unique<TileMutableRawChannelContainer>(true, m_rChType, m_rChUnit);
314 ATH_CHECK( rawChannelContainer->status() );
315
316 DataPool < TileDigits > tileDigitsPool(m_tileHWID->adc_hash_max());
317
318 double samplingPhase = 0, ped = 100; //Settings for simulation
319
320 TF1* pdf = nullptr;
321 std::unique_ptr<TF1> pdf_PhaseI;
322 std::unique_ptr<TF1> pdf_lo;
323 std::unique_ptr<TF1> pdf_hi;
324 if (!m_simQIE && m_gaussNoise) {
325 if(m_PhaseII){
326 Double_t sigma_lo = 1; //Noise value obtained from ATL-COM-TILECAL-2020-031
327 pdf_lo = std::make_unique<TF1>("pdf_lo","(1/(sqrt(2*pi)*[0])) * (exp(-0.5*(x/[0])**2)/(sqrt(2*pi)*[0]))", -100, 100);
328 pdf_lo->SetParameter(0,sigma_lo);
329
330 Double_t sigma_hi = 2.5; //Noise value obtained from ATL-COM-TILECAL-2020-031
331 pdf_hi = std::make_unique<TF1>("pdf_hi","(1/(sqrt(2*pi)*[0])) * (exp(-0.5*(x/[0])**2)/(sqrt(2*pi)*[0]))", -100, 100);
332 pdf_hi->SetParameter(0,sigma_hi);
333 }
334 else{
335 //Noise pdf for general noise. Maybe use as a member and put in init.
336 //pdf = new TF1("pdf", "[0] * (Gaus(x,0,[1]) + [2] * Gaus(x,0,[3]))", -100., 100.); //Root goes not like "Gaus"
337
338 pdf_PhaseI = std::make_unique<TF1>("pdf_PhaseI", "[0] * (exp(-0.5*(x/[1])**2)/(sqrt(2*pi)*[1]) + [2] *exp(-0.5*(x/[3])**2)/(sqrt(2*pi)*[3]))", -100., 100.);
339 pdf_PhaseI->SetParameters(m_GNAmpOne, m_GNSigmaOne, m_GNAmpTwo, m_GNSigmaTwo);
340 }
341 }
342
343 std::vector<float> samples(m_nSamples);
344
345 std::vector<double> Rndm(m_nSamples);
346 double Rndm_dG[1]; // uniform random number for the double gaussian
347
348 ATH_MSG_DEBUG("Starting loop");
349 int gain = 1;
350 double n_inTimeAmp = 0.0;
351 float sample = 0.0;
352
353 for (int ros = 1; ros < 5; ++ros) {
354 for (int drawer = 0; drawer < 64; ++drawer) {
355 unsigned int drawerIdx = TileCalibUtils::getDrawerIdx(ros, drawer);
356 for (int channel = 0; channel < 48; ++channel) {
357
358 if (!m_simQIE && !m_simPulseChain) { //3-in-1 or FENICS is simulated below
359 double ootAmp = m_ootAmp;
360 double truePhase = samplingPhase;
361 std::vector<double> pulseTimeOffsets;
363 pulseTimeOffsets.resize(m_nPul, 0.0);
364 const std::vector<double>* pulseTiming = pulseTimeOffsets.empty() ? nullptr : &pulseTimeOffsets;
365
366 if(m_PhaseII){
367 ATH_MSG_VERBOSE("executing FENICS code");
368 }
369 else{
370 ATH_MSG_VERBOSE("executing 3-in-1 code");
371 }
372
373
374 bool isHGSaturated = false;
375
376 for (int igain = 1; igain >= 0; igain--) {
377
378 gain = igain;
379 if (m_chanPed){
380 ped = m_tileToolNoiseSample->getPed(drawerIdx, channel, gain, TileRawChannelUnit::ADCcounts, ctx);
381 }
382 else{
383 ped = (gain == 1) ? m_ped_HG : m_ped_LG;
384 }
385
386 if (gain == 1) {
387 n_inTimeAmp = m_useItADist ? m_itDist->GetRandom() : m_inTimeAmp.value();
388
389 if (m_random->Rndm() >= m_pileUpFraction){
390 ootAmp = 0; //Set oot amplitude to 0 if no pile-up.
391 }
392 samplingPhase = m_random->Gaus(0., m_gausC2C); //C2C phase variation
393 double deformatedTime = m_random->Gaus(m_imperfectionMean, m_imperfectionRms); //Widening of pulseshape
394 m_ps[gain]->scalePulse(deformatedTime, deformatedTime); // Deformation of pulse shape by changing its width
395 //if(m_useOffsetHisto) m_ootOffset = m_ootOffsetDist->GetRandom(); //OLD Remove for 7 samples -> BunchSpacing
396
397 // Make sure m_PUAmp[ros-1][drawer][channel] has m_nPul elements, all zero
398 m_PUAmp[ros-1][drawer][channel].assign(m_nPul, 0.0);
399
400 // Fill amplitudes (including pile-up) for HG
401 addPileUp(n_inTimeAmp, ootAmp, gain, ros, drawer, channel);
402 if (pulseTiming) {
403 for (int pulse = 0; pulse < m_nPul; ++pulse) {
404 const bool hasPulse = m_PUAmp[ros-1][drawer][channel][pulse] != 0.0 || (pulse == m_nPul_eff && n_inTimeAmp != 0.0);
405 if (hasPulse)
406 pulseTimeOffsets[pulse] = generatePulseTimeOffset();
407 }
408 }
409 // Without an in-time pulse, retain the sampling phase; no physical pulse phase exists.
410 truePhase = n_inTimeAmp != 0.0
411 ? samplingPhase + (pulseTiming ? pulseTimeOffsets[m_nPul_eff] : 0.0) - m_itOffset
412 : samplingPhase;
413
414 } else {
415 double deformatedTime = m_random->Gaus(m_imperfectionMean, m_imperfectionRms); //Widening of pulseshape
416 m_ps[gain]->scalePulse(deformatedTime, deformatedTime); // Deformation of pulse shape by changing its width
417
418 double scaleFactor = (m_PhaseII ? 40.0 : 64.0);
419 n_inTimeAmp /= scaleFactor;
420 for (auto &ampValue : m_PUAmp[ros-1][drawer][channel]) {
421 ampValue /= scaleFactor;
422 }
423 }
424
425 if(m_PhaseII && m_gaussNoise){
426 pdf = (gain==1) ? pdf_hi.get() : pdf_lo.get();
427 }
428 else if(m_gaussNoise){
429 pdf = pdf_PhaseI.get();
430 }
431
432 m_tsg->setPulseShape(m_ps[gain]);
433 m_tsg->fillNSamples(samplingPhase, ped, n_inTimeAmp, m_PUAmp[ros-1][drawer][channel], pdf, m_gaussNoise, m_itOffset, m_nSamples, m_nPul, pulseTiming); // Sum of Intime + PU pulses
434
435 samples.clear();
436 samples.resize(m_nSamples);
437 m_buf->getValueVector(samples);
438
439 if (m_chanNoise) {
440 double Hfn1 = m_tileToolNoiseSample->getHfn1(drawerIdx, channel, gain, ctx);
441 double Hfn2 = m_tileToolNoiseSample->getHfn2(drawerIdx, channel, gain, ctx);
442 double Norm = m_tileToolNoiseSample->getHfnNorm(drawerIdx, channel, gain, ctx);
443 RandGaussQ::shootArray(rndmEngine, samples.size(), Rndm.data(), 0.0, 1.0);
444 RandFlat::shootArray(rndmEngine, 1, Rndm_dG, 0.0, 1.0);
445 for (unsigned int js = 0; js < samples.size(); ++js) {
446 //using the same gaussian(sigma) for all samples in one channel in one event
447 if (Rndm_dG[0] < Norm)
448 samples[js] += (float) Hfn1 * Rndm[js];
449 else
450 samples[js] += (float) Hfn2 * Rndm[js];
451 }
452 }
453
454 for (unsigned int i = 0; i < samples.size(); ++i) {
455 if (samples[i] >= m_i_ADCmax){
456 isHGSaturated = true;
457 if(m_bigain) samples[i]=m_i_ADCmax;
458 }
459
460 }
461
462 if(!m_bigain && !isHGSaturated){
463 break;
464 }
465
466 ATH_MSG_VERBOSE("New ADC " << ros << "/" << drawer << "/" << channel << "/ saving gain " << gain);
467
468 TileDigits * digit = tileDigitsPool.nextElementPtr();
469 *digit = TileDigits (m_tileHWID->adc_id(ros, drawer, channel, gain), samples);
470
471 ATH_CHECK( digitsContainer->push_back(digit) );
472
473 auto rawChannel = std::make_unique<TileRawChannel>(digit->adc_HWID(),
474 n_inTimeAmp,
475 truePhase,
476 ootAmp,
478
479 ATH_CHECK( rawChannelContainer->push_back(std::move(rawChannel)) );
480
481 }
482
483 if(!m_bigain){
484 ATH_MSG_VERBOSE("New ADC " << ros << "/" << drawer << "/" << channel << "/ saving gain " << gain);
485
486 TileDigits * digit = tileDigitsPool.nextElementPtr();
487 *digit = TileDigits (m_tileHWID->adc_id(ros, drawer, channel, gain), std::move(samples));
488
489 ATH_CHECK( digitsContainer->push_back(digit) );
490
491 auto rawChannel = std::make_unique<TileRawChannel>(digit->adc_HWID(),
492 n_inTimeAmp,
493 truePhase,
494 ootAmp,
496
497 ATH_CHECK( rawChannelContainer->push_back(std::move(rawChannel)) );
498 }
499
500 } else if (m_simQIE) { //QIE is simulated here --------------------------------------------
501
502 //ATH_MSG_DEBUG("executing QIE code");
503
504 gain = 1; //This is just a place holder. The gain is not used in QIE.
505 n_inTimeAmp = m_useItADist ? m_itDist->GetRandom() : m_inTimeAmp.value();
506 //if (random->Rndm() >= m_pileUpFraction) //m_pileUpFraction is 1 by default
507 m_ootAmp = 0; //Set oot amplitude to 0 if no pile-up.
508 samplingPhase = 0; //TODO: Introduce jitter of the PMT pulse; random->Gaus(0., m_gausC2C); //C2C phase variation
509
510 //Pileup samples
511 //m_PUAmp.clear();
512 //m_PUAmp.resize(nPul);
513 float my_PUAmp[7] = {0}; //I use an array to store the energies/charges of the out-of-time pulses
514
515 for (int i = 0; i < 7; i++)
516 if ((((i - 3) * 25) % (int) m_BunchSpacing) == 0) {
517 if (i != 3) { //index 3 corresponds to the in-time pulse, the signal
518 my_PUAmp[i] = m_useOotADist ? m_ootDist->GetRandom() : m_ootAmp.value(); //out-of-time pulses
519 } else {
520 my_PUAmp[i] = 0;
521 }
522 }
523
524 //fill7SamplesQIE(float t0, float amp_it, float *amp_pu, bool addNoise);
525 m_tsg->fill7SamplesQIE((float) n_inTimeAmp, my_PUAmp); // Sum of In time + out-of-time PU pulses
526
527 samples.clear();
528 samples.resize(m_nSamples);
529 m_buf->getValueVector(samples);
530
531 ATH_MSG_VERBOSE("New ADC " << ros << "/" << drawer << "/" << channel << "/ saving gain " << gain);
532
533 TileDigits * digit = tileDigitsPool.nextElementPtr();
534 *digit = TileDigits (m_tileHWID->adc_id(ros, drawer, channel, gain),
535 std::move(samples));
536
537 ATH_CHECK( digitsContainer->push_back(digit) );
538
539 auto rawChannel = std::make_unique<TileRawChannel>(digit->adc_HWID(),
540 n_inTimeAmp,
541 samplingPhase,
542 m_ootAmp,
544
545 ATH_CHECK( rawChannelContainer->push_back(std::move(rawChannel)) );
546 }
547 else if (m_simPulseChain) {
548 ATH_MSG_VERBOSE("executing chain-of-pulses code");
549
550 bool isHGSaturated = false;
551 double truthPulseTimeOffset = 0.0;
552 std::vector<double>* pulseTiming = m_gaussianPulseTimingVariation > 0.0
554 : nullptr;
555
556 for (int igain = 1; igain >= 0; --igain) {
557 gain = igain;
558 n_inTimeAmp = 0.0;
559 m_ootAmp = 0.0;
560 m_ootOffset = 0.0;
561
562 if (m_random->Rndm() < m_itAPulseProb){
563 n_inTimeAmp = m_useItADist ? m_itDist->GetRandom() : m_inTimeAmp.value();
564 } else{
565 n_inTimeAmp = 0;
566 }
567
568 // PDF logic for noise
569 if (m_gaussNoise) {
570 if (m_PhaseII) {
571 pdf = (gain == 1) ? pdf_hi.get() : pdf_lo.get();
572 } else {
573 pdf = pdf_PhaseI.get();
574 }
575 }
576
577 m_tsg->setPulseShape(m_ps[gain]);
578 if (gain == 1) {
579 ped = m_chanPed
580 ? m_tileToolNoiseSample->getPed(drawerIdx, channel, gain,
582 : m_ped_HG.value();
583
584 samplingPhase = m_random->Gaus(0., m_gausC2C);
585 double deformatedTime = m_random->Gaus(m_imperfectionMean, m_imperfectionRms);
586 m_ps[gain]->scalePulse(deformatedTime, deformatedTime);
587
588 // Successive execute calls represent consecutive simulated BCs.
589 // Shift the stored pulses to simulate the next BC.
590 m_PUAmp[ros-1][drawer][channel].pop_back();
591 m_PUAmp[ros-1][drawer][channel].insert(m_PUAmp[ros-1][drawer][channel].begin(), 0);
592 if (pulseTiming) {
593 pulseTiming->pop_back();
594 pulseTiming->insert(pulseTiming->begin(), 0.0);
595 }
596
597 // m_sample_tru is the amplitude for the central BC
598 m_sample_tru = m_PUAmp[ros-1][drawer][channel][(m_nPul - 1) / 2];
599 if (pulseTiming)
600 truthPulseTimeOffset = pulseTiming->at(m_nPul_eff);
601
602 // Fill the new BC at the front
603 addPileUpSample(gain, ros, drawer, channel);
604 m_PUAmp[ros-1][drawer][channel].front() += n_inTimeAmp; // Add amplitude from in-time pulse to true-amp vector
605 if (pulseTiming && m_PUAmp[ros-1][drawer][channel].front() != 0.0)
606 pulseTiming->front() = generatePulseTimeOffset();
607
609 auto& accumulatedUndershoot = m_accumulatedUndershoot[ros-1][drawer][channel];
610 for (int gainIndex = 0; gainIndex < 2; ++gainIndex) {
611 const double gainRatio = (gainIndex == 1) ? 1.0 : 40.0;
612
613 // Decay the accumulated undershoot and add the tail of the next older pulse
614 double tailAtPulseTime = m_tailAtAccumulation[gainIndex];
615 if (pulseTiming) {
616 const double pulseTimeOffset = pulseTiming->at(m_firstAccumulatedIndex[gainIndex]);
617 tailAtPulseTime *= std::exp(pulseTimeOffset / m_ps[gainIndex]->undershootDecayTime());
618 }
619 accumulatedUndershoot[gainIndex] = m_tailDecayPerBC[gainIndex] * accumulatedUndershoot[gainIndex]
621 * tailAtPulseTime / gainRatio;
622 }
623 sample = m_tsg->fillSampleWithUndershoot(samplingPhase, ped,
624 m_PUAmp[ros-1][drawer][channel],
627 gain, accumulatedUndershoot[gain], pulseTiming);
628 } else {
629 sample = m_tsg->fillSample(samplingPhase, ped,
630 m_PUAmp[ros-1][drawer][channel],
631 pdf, m_gaussNoise,
632 (int)m_PUAmp[ros-1][drawer][channel].size(),
633 gain, pulseTiming);
634 }
635 } else {
636 // Low gain
637 ped = m_chanPed
638 ? m_tileToolNoiseSample->getPed(drawerIdx, channel, gain,
640 : m_ped_LG.value();
641
643 sample = m_tsg->fillSampleWithUndershoot(samplingPhase, ped,
644 m_PUAmp[ros-1][drawer][channel],
647 gain, m_accumulatedUndershoot[ros-1][drawer][channel][gain], pulseTiming);
648 } else {
649 sample = m_tsg->fillSample(samplingPhase, ped,
650 m_PUAmp[ros-1][drawer][channel],
651 pdf, m_gaussNoise,
652 (int)m_PUAmp[ros-1][drawer][channel].size(),
653 gain, pulseTiming);
654 }
655
656 // Scale truth amplitude from HG to LG
657 if (m_PhaseII) {
658 m_sample_tru /= 40.0;
659 } else {
660 m_sample_tru /= 64.0;
661 }
662 }
663
664 // Clip the sample
665 if (sample < 0.0) {
666 sample = 0.0;
667 } else if (sample >= m_i_ADCmax) {
668 isHGSaturated = true;
670 }
671
672 samples.clear();
673 samples.push_back(sample);
674
675 ATH_MSG_VERBOSE("New chain ADC " << ros << "/" << drawer << "/" << channel << " - saving gain " << gain);
676
677 TileDigits* digit = tileDigitsPool.nextElementPtr();
678 *digit = TileDigits(m_tileHWID->adc_id(ros, drawer, channel, gain),
679 std::move(samples));
680 ATH_CHECK(digitsContainer->push_back(digit));
681
682 // The pulse timing offset is zero when there is no in-time pulse.
683 const double truePhase = samplingPhase + truthPulseTimeOffset;
684 auto rawChannel = std::make_unique<TileRawChannel>(
685 digit->adc_HWID(),
687 truePhase,
688 m_ootAmp,
689 ped);
690 ATH_CHECK(rawChannelContainer->push_back(std::move(rawChannel)));
691
692 // If not bigain, break if HG didn't saturate
693 if (!m_bigain && !isHGSaturated) {
694 break;
695 }
696 }
697 }
698 }
699 }
700 }
701
702 SG::WriteHandle<TileRawChannelContainer> rawChannelCnt(m_rawChannelContainerKey, ctx);
703 ATH_CHECK( rawChannelCnt.record(std::move(rawChannelContainer)) );
704
705 SG::WriteHandle<TileDigitsContainer> digitsCnt(m_digitsContainerKey, ctx);
706 ATH_CHECK( digitsCnt.record(std::move(digitsContainer)) );
707
708 ATH_MSG_DEBUG("Execution completed");
709
710 return StatusCode::SUCCESS;
711}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
size_t size() const
Number of registered mappings.
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
static unsigned int getDrawerIdx(unsigned int ros, unsigned int drawer)
Returns a drawer hash.
Gaudi::Property< float > m_gausC2C
RMS for the in-time pulse offset (channel-to-channel phase variation).
Gaudi::Property< double > m_ped_HG
Pedestal value for HG if specific channel pedestal is not used.
Gaudi::Property< bool > m_useRecursiveUndershoot
Recursively accumulate the long undershoot in continuous readout.
SG::WriteHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Gaudi::Property< double > m_ootOffset
Out-of-time pulse offset from nominal time.
void addPileUp(double &n_inTimeAmp, double ootAmp, int gain, int ros, int drawer, int channel)
Fill vector with pile-up amplitudes.
const TileHWID * m_tileHWID
std::array< int, 2 > m_firstAccumulatedIndex
Gaudi::Property< double > m_ped_LG
Pedestal value for LG if specific channel pedestal is not used.
Gaudi::Property< double > m_itOffset
In-time pulse offset from nominal time.
Gaudi::Property< bool > m_chanPed
Use channel specific pedestal value if true.
TileFragHash::TYPE m_rChType
Type of TileRawChannels (Digitizar, OF1, OF2, Fit, etc.)(see TileFragHash.h).
TileSampleBuffer * m_buf
Buffer class to hold generated pulses.
ToolHandle< TileCondToolNoiseSample > m_tileToolNoiseSample
std::vector< std::vector< std::vector< std::vector< double > > > > m_pulseTimeOffsets
Gaudi::Property< double > m_GNSigmaOne
Standard deviation of first gaussian of double gaussian noise.
void addPileUpSample(int gain, int ros, int drawer, int channel)
Fill only a BC with pile-up amplitude.
Gaudi::Property< int > m_nPul
number of pileup pulses
Gaudi::Property< double > m_imperfectionMean
Mean value of pulse shape broadening.
Gaudi::Property< double > m_GNSigmaTwo
Standard deviation of second gaussian of double gaussian noise.
TileRawChannelUnit::UNIT m_rChUnit
Units used for the TileRawChannels (ADC, pCb, etc.)(see TileInfo.h).
std::vector< std::vector< std::vector< std::array< double, 2 > > > > m_accumulatedUndershoot
double generatePulseTimeOffset()
Generate a pulse arrival-time variation in ns.
SG::WriteHandleKey< TileDigitsContainer > m_digitsContainerKey
Gaudi::Property< bool > m_gaussNoise
Set to TRUE in order to create noise from double gaussian.
Gaudi::Property< bool > m_bigain
Gaudi::Property< double > m_GNAmpOne
Amplitude of first gaussian of double gaussian noise.
Gaudi::Property< double > m_imperfectionRms
RMS of pulse shape broadening.
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service to use.
Gaudi::Property< double > m_gaussianPulseTimingVariation
RMS of individual pulse arrival-time variations in ns.
TileSampleGenerator * m_tsg
Pulse generating class.
Gaudi::Property< int > m_nSamples
number of read out samples
Gaudi::Property< std::string > m_randomStreamName
Random Stream Name.
Gaudi::Property< double > m_GNAmpTwo
Amplitude of second gaussian of double gaussian noise.
std::array< double, 2 > m_tailAtAccumulation
Gaudi::Property< bool > m_chanNoise
Add channel specific noise.
std::array< int, 2 > m_firstRelevantIndex
std::array< double, 2 > m_tailDecayPerBC
Gaudi::Property< bool > m_simQIE
Raw PMT pulses are generated if the option is set to true.
Gaudi::Property< double > m_ootAmp
Amplitude of out-of-time pulse.
void Norm(TH1 *h, double scale, double xmin, double xmax)
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode TileDigitsFromPulse::finalize ( )
overridevirtual

finalize method

Definition at line 713 of file TileDigitsFromPulse.cxx.

713 {
714 ATH_MSG_DEBUG("in finalize()");
715 delete m_buf;
716 delete m_tsg;
717
718
719 if (m_useItADist)
720 m_itFile->Close();
721 if (m_useOotADist)
722 m_ootFile->Close();
723 if (m_simPUwPoisson)
724 m_pileup_AmpDistFile->Close();
725
726 return StatusCode::SUCCESS;
727}

◆ generatePulseTimeOffset()

double TileDigitsFromPulse::generatePulseTimeOffset ( )
private

Generate a pulse arrival-time variation in ns.

Definition at line 785 of file TileDigitsFromPulse.cxx.

785 {
786 double pulseTimeOffset = 0.0;
787 do {
788 pulseTimeOffset = m_random->Gaus(0.0, m_gaussianPulseTimingVariation);
789 } while (std::abs(pulseTimeOffset) > MAX_PULSE_TIME_OFFSET);
790 return pulseTimeOffset;
791}
constexpr double MAX_PULSE_TIME_OFFSET

◆ initialize()

StatusCode TileDigitsFromPulse::initialize ( )
overridevirtual

initialize method

Definition at line 96 of file TileDigitsFromPulse.cxx.

96 {
97
98 ATH_MSG_DEBUG("in initialize()");
99
100 m_buf = new TileSampleBuffer(m_nSamples, -(m_nSamples-1)*25/2, 25.);
101
102 m_tsg = new TileSampleGenerator(m_ps[0], m_buf, false); //Set third parameter to true for debug of the sum of pulses
103
104 m_nPul_eff = (m_nPul - 1) / 2; //Used for symetrization of PU in computation
105
106 ATH_CHECK(detStore()->retrieve(m_tileHWID, "TileHWID"));
107 ATH_CHECK(detStore()->retrieve(m_tileInfo, m_infoName.value()));
108 m_i_ADCmax = m_tileInfo->ADCmax();
109 ATH_MSG_DEBUG("Max ADC counts TileDigitsFromPulse: " << m_i_ADCmax);
110
112
113 ATH_CHECK(m_digitsContainerKey.initialize());
114 ATH_MSG_INFO("Output digits container: " << m_digitsContainerKey.key());
115
117 ATH_MSG_INFO("Output raw channel container: " << m_rawChannelContainerKey.key());
118
119
120 //Build pulse shapes
121 m_ps[0]->setPulseShape(m_tileInfo->digitsFullShapeLo());
122 m_ps[1]->setPulseShape(m_tileInfo->digitsFullShapeHi());
124 m_ps[0]->setUndershootParameters(-0.001964785, 20379.4);
125 m_ps[1]->setUndershootParameters(-0.002073114, 20394.6);
126 }
127
130 || m_gausC2C != 0.0 || m_imperfectionMean != 1.0 || m_imperfectionRms != 0.0) {
131 ATH_MSG_FATAL("Recursive undershoot requires (for the moment) continuous readout, gain-dependent "
132 "undershoot, fixed timing, and undeformed pulse shapes");
133 return StatusCode::FAILURE;
134 }
135
136 for (int gain = 0; gain < 2; ++gain) {
137 const TilePulseShape& pulse = *m_ps[gain];
138 const double amplitude = pulse.undershootAmplitude();
139 const double tau = pulse.undershootDecayTime();
140 const double startTime = pulse.effectiveStartTime();
141 const double endTime = pulse.effectiveEndTime();
142
143 if (!std::isfinite(tau) || tau <= 0.0 || !std::isfinite(startTime) || !std::isfinite(endTime)) {
144 ATH_MSG_FATAL("Invalid pulse shape or decay time for gain " << gain);
145 return StatusCode::FAILURE;
146 }
147
148 const double pulseTimingRange = m_gaussianPulseTimingVariation > 0.0 ? MAX_PULSE_TIME_OFFSET : 0.0;
149 const double accumulationStartTime = std::max(300.0, endTime) + pulseTimingRange;
150 const int firstTailBC = static_cast<int>(std::ceil(accumulationStartTime / 25.0));
151
152 m_firstRelevantIndex[gain] = std::max(0, m_nPul_eff + static_cast<int>(std::ceil((startTime - pulseTimingRange) / 25.0)));
153 m_firstAccumulatedIndex[gain] = m_nPul_eff + firstTailBC;
154
155 m_tailDecayPerBC[gain] = std::exp(-25.0 / tau);
156 m_tailAtAccumulation[gain] = amplitude * std::exp(-25.0 * firstTailBC / tau);
157 }
158
161 }
162 m_random = std::make_unique<TRandom3>(m_seed);
163
164 //Initialise distribution histograms if in use
165 if (m_useItADist) {
166 if (m_itADistFileName.value().size() == 0) {
167 m_itADistFileName = PathResolver::find_file("Distributions_small_h2000_177531_JetTauEtmiss.root", "DATAPATH");
168 if (m_itADistFileName.value().size() == 0) {
169 ATH_MSG_FATAL("Could not find input file Distributions_small_h2000_177531_JetTauEtmiss.root");
170 return StatusCode::FAILURE;
171 }
172 }
174 return StatusCode::FAILURE;
175 ATH_MSG_DEBUG("Made in-time distribution");
176 } else
177 delete m_itDist;
178
179 if (m_simPUwPoisson){
180
181 if (m_pileupAmpDistFileName.value().size() == 0) {
182 m_pileupAmpDistFileName = PathResolver::find_file("Distributions_MB_minbias_inelastic_lowjetphoton_e8314_e7400_s3508.root", "DATAPATH");
183 if (m_pileupAmpDistFileName.value().size() == 0 ) {
184 ATH_MSG_FATAL("Could not find input file Distributions_MB_minbias_inelastic_lowjetphoton_e8314_e7400_s3508.root");
185 return StatusCode::FAILURE;
186 }
187
188 }
190 return StatusCode::FAILURE;
191 ATH_MSG_DEBUG("Made PU amp distributions for each partition and channel");
192
193 }
194
195 if (m_useOotADist) {
196 if (m_ootADistFileName.value().size() == 0) {
197 m_ootADistFileName = PathResolver::find_file("Distributions_small_h2000_177531_ZeroBias.root", "DATAPATH");
198 if (m_ootADistFileName.value().size() == 0) {
199 ATH_MSG_FATAL("Could not find input file Distributions_small_h2000_177531_ZeroBias.root");
200 return StatusCode::FAILURE;
201 }
202 }
204 return StatusCode::FAILURE;
205 ATH_MSG_DEBUG("Made Oot distribution");
206 } else
207 delete m_ootDist;
208
209 //Initialise timing offset distribution. If filename is empty, use static offset
210 if (m_ootOffsetFileName.value().size() != 0) {
211 m_ootOffsetFile = TFile::Open(m_ootOffsetFileName.value().c_str());
212 if (m_ootOffsetFile->IsZombie()) {
213 ATH_MSG_WARNING("Error reading offset timing distribution from " << m_ootOffsetFileName.value() << ". Using static timing offset.");
214 } else {
215 TKey *key = m_ootOffsetFile->FindKey(m_ootOffsetHistName.value().c_str());
216 if (key == 0) {
217 ATH_MSG_WARNING("Histogram " << m_ootOffsetHistName.value() << " not found in file " << m_ootOffsetFileName.value() << ". Using static timing offset.");
218 } else {
219 m_ootOffsetDist = (TH1F*) m_ootOffsetFile->Get(m_ootOffsetHistName.value().c_str());
220 m_useOffsetHisto = kTRUE;
221 }
222 }
223 }
224
225 //Start the random number service used to create channel specific noise
226 if (!m_rndmSvc.retrieve().isSuccess()) {
227 ATH_MSG_FATAL("Could not initialize find Random Number Service.");
228 return StatusCode::FAILURE;
229 }
230 if (m_chanNoise)
231 m_gaussNoise = kFALSE; //Make sure channel noise overrides gaussian noise.
232
233 m_PUAmp.clear();
234 m_PUAmp.resize(4);
235 for (int ros = 1; ros < 5; ++ros){
236 m_PUAmp[ros-1].clear();
237 m_PUAmp[ros-1].resize(64);
238
239 for (int drawer = 0; drawer < 64; ++drawer){
240 m_PUAmp[ros-1][drawer].clear();
241 m_PUAmp[ros-1][drawer].resize(48);
242 for (int channel = 0; channel < 48; channel++){
243 m_PUAmp[ros-1][drawer][channel].clear();
245 }
246 }
247 }
249 m_pulseTimeOffsets.resize(4);
250 for (int ros = 0; ros < 4; ++ros) {
251 m_pulseTimeOffsets[ros].resize(64);
252 for (int drawer = 0; drawer < 64; ++drawer) {
253 m_pulseTimeOffsets[ros][drawer].resize(48);
254 for (int channel = 0; channel < 48; ++channel) {
255 m_pulseTimeOffsets[ros][drawer][channel].resize(m_PUAmp[ros][drawer][channel].size(), 0.0);
256 }
257 }
258 }
259 }
260
262 m_accumulatedUndershoot.resize(4);
263 for (auto& rosState : m_accumulatedUndershoot) {
264 rosState.resize(64);
265 for (auto& drawerState : rosState) {
266 drawerState.resize(48, std::array<double, 2>{0.0, 0.0});
267 }
268 }
269 } else {
270 for (int ros = 1; ros < 5; ++ros) { // initialize the vector of PU amplitudes
271 for (int drawer = 0; drawer < 64; ++drawer){
272 for (int channel = 0; channel < 48; ++channel) {
273 double inTimeAmp = m_inTimeAmp.value();
274 addPileUp(inTimeAmp, m_ootAmp.value(), 1, ros, drawer, channel); // Initialized for HG, for LG use the same divided by the HG/LG ratio
276 for (std::size_t pulse = 0; pulse < m_PUAmp[ros-1][drawer][channel].size(); ++pulse) {
277 if (m_PUAmp[ros-1][drawer][channel][pulse] != 0.0F)
279 }
280 }
281 }
282 }
283 }
284 }
285
286 ATH_MSG_DEBUG("initialize() successful");
287
288 return StatusCode::SUCCESS;
289}
#define ATH_MSG_WARNING(x,...)
#define ATH_MSG_INFO(x,...)
#define ATH_MSG_FATAL(x,...)
const ServiceHandle< StoreGateSvc > & detStore() const
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)
Gaudi::Property< bool > m_useGainDependentUndershoot
Use gain-dependent analytical undershoot parameters.
Gaudi::Property< std::string > m_ootADistFileName
Filename of file to use for amplitude distribution of out-of-time pulses.
Gaudi::Property< std::string > m_infoName
Gaudi::Property< std::string > m_itADistHistName
Name of histogram for in-time amplitude distribution.
Gaudi::Property< std::string > m_pileupAmpDistFileName
Filename for PU amplitude distribution histograms.
Gaudi::Property< std::string > m_ootOffsetFileName
File name for offset timing distribution histogram.
Gaudi::Property< int > m_seed
bool m_useOffsetHisto
Internally used to keep track of wether a histogram has been opened or not.
const TileInfo * m_tileInfo
Gaudi::Property< std::string > m_itADistFileName
Filename of file to use for amplitude distribution of in-time pulses.
bool makeDist(TFile *&file, TH1F *&hist, const std::string &fileName, const std::string &histName="h_Eopt_hi")
Method to read distribution from file.
Gaudi::Property< std::string > m_ootOffsetHistName
Name of the histogram for timing offset distribution.
Gaudi::Property< std::string > m_ootADistHistName
Name of histogram for out-of-time amplitude distribution.
double undershootDecayTime() const
double effectiveStartTime() const
double effectiveEndTime() const
double undershootAmplitude() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ makeDist() [1/2]

bool TileDigitsFromPulse::makeDist ( TFile *& file,
std::vector< std::vector< TH1F * > > & hists,
const std::string & fileName )
private

Definition at line 747 of file TileDigitsFromPulse.cxx.

747 {
748
749 std::string histName;
750 TKey *key;
751 TH1F* hist;
752
753 file = new TFile(fileName.c_str());
754 if (file->IsZombie()) {
755 ATH_MSG_FATAL("Error reading amplitude distributions from " << fileName << ".");
756 return kFALSE;
757 }
758
759 for(int ros=0; ros<4; ros++){
760
761 hists.push_back(std::vector<TH1F*>());
762 for(int channel=0; channel<48; channel++){
763
764 histName = "ene_ros_" + std::to_string(ros+1) + "_channel_" + std::to_string(channel+1);
765
766 key = file->FindKey(histName.c_str());
767 if (key == 0) {
768 ATH_MSG_FATAL("Could not find histogram " << histName << " in file " << fileName << ".");
769 return kFALSE;
770 }
771
772 hist = (TH1F*) file->Get(histName.c_str());
773
774 for (int i = 0; i < m_AmpDistLowLim; i++)
775 hist->SetBinContent(i, 0.); // Puts a cut on the amplitude distribution.
776
777 hists[ros].push_back(hist);
778 hist->Clear();
779 }
780 }
781
782 return kTRUE;
783}
Gaudi::Property< int > m_AmpDistLowLim
Set all bins to the left of this bin to 0 in the amplitude distribution histograms.
TFile * file

◆ makeDist() [2/2]

bool TileDigitsFromPulse::makeDist ( TFile *& file,
TH1F *& hist,
const std::string & fileName,
const std::string & histName = "h_Eopt_hi" )
private

Method to read distribution from file.

Definition at line 729 of file TileDigitsFromPulse.cxx.

729 {
730 file = new TFile(fileName.c_str());
731 if (file->IsZombie()) {
732 ATH_MSG_FATAL("Error reading amplitude distribution from " << fileName << ".");
733 return kFALSE;
734 }
735 TKey *key = file->FindKey(histName.c_str());
736 if (key == 0) {
737 ATH_MSG_FATAL("Could not find histogram " << histName << " in file " << fileName << ".");
738 return kFALSE;
739 }
740 hist = (TH1F*) file->Get(histName.c_str());
741 for (int i = 0; i < m_AmpDistLowLim; i++)
742 hist->SetBinContent(i, 0.); // Puts a cut on the amplitude distribution.
743 return kTRUE;
744
745}

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 368 of file AthCommonDataStore.h.

369 {
370 h.renounce();
372 }
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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_ERROR(x,...)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_accumulatedUndershoot

std::vector<std::vector<std::vector<std::array<double, 2> > > > TileDigitsFromPulse::m_accumulatedUndershoot
private

Definition at line 181 of file TileDigitsFromPulse.h.

◆ m_AmpDistLowLim

Gaudi::Property<int> TileDigitsFromPulse::m_AmpDistLowLim {this, "AmpDistLowerLimit", 135}
private

Set all bins to the left of this bin to 0 in the amplitude distribution histograms.

Definition at line 159 of file TileDigitsFromPulse.h.

159{this, "AmpDistLowerLimit", 135};

◆ m_avgMuForPU

Gaudi::Property<int> TileDigitsFromPulse::m_avgMuForPU {this, "AvgMuForPileUpSimulation", 40}
private

Definition at line 192 of file TileDigitsFromPulse.h.

192{this, "AvgMuForPileUpSimulation", 40}; //Mean of the poissonian distribution to generate the number of interactions per bunch crossing for PU simulation

◆ m_bigain

Gaudi::Property<bool> TileDigitsFromPulse::m_bigain {this, "Bigain", false}
private

Definition at line 189 of file TileDigitsFromPulse.h.

189{this, "Bigain", false}; //If true, save the two gains in the ntuples

◆ m_buf

TileSampleBuffer* TileDigitsFromPulse::m_buf {}
private

Buffer class to hold generated pulses.

Definition at line 197 of file TileDigitsFromPulse.h.

197{};

◆ m_BunchSpacing

Gaudi::Property<int> TileDigitsFromPulse::m_BunchSpacing {this, "BunchSpacing", 25}
private

Time between pulses in ms 25, 50 or 75.

Definition at line 173 of file TileDigitsFromPulse.h.

173{this, "BunchSpacing", 25};

◆ m_chanNoise

Gaudi::Property<bool> TileDigitsFromPulse::m_chanNoise {this, "ChannelSpecificNoise", false}
private

Add channel specific noise.

Definition at line 156 of file TileDigitsFromPulse.h.

156{this, "ChannelSpecificNoise", false};

◆ m_chanPed

Gaudi::Property<bool> TileDigitsFromPulse::m_chanPed {this, "ChannelSpecificPedestal", false}
private

Use channel specific pedestal value if true.

Otherwise, same for all channels.

Definition at line 155 of file TileDigitsFromPulse.h.

155{this, "ChannelSpecificPedestal", false};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_digitsContainerKey

SG::WriteHandleKey<TileDigitsContainer> TileDigitsFromPulse::m_digitsContainerKey
private
Initial value:
{this,
"TileDigitsContainer", "TileDigitsCnt", "Output Tile digits container key"}

Definition at line 120 of file TileDigitsFromPulse.h.

120 {this,
121 "TileDigitsContainer", "TileDigitsCnt", "Output Tile digits container key"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_firstAccumulatedIndex

std::array<int, 2> TileDigitsFromPulse::m_firstAccumulatedIndex {}
private

Definition at line 184 of file TileDigitsFromPulse.h.

184{}; // Index of the first pulse included in the accumulated undershoot

◆ m_firstRelevantIndex

std::array<int, 2> TileDigitsFromPulse::m_firstRelevantIndex {}
private

Definition at line 185 of file TileDigitsFromPulse.h.

185{}; // Index of the first pulse contributing to the current sample

◆ m_gausC2C

Gaudi::Property<float> TileDigitsFromPulse::m_gausC2C {this, "GaussianC2CPhaseVariation", 0}
private

RMS for the in-time pulse offset (channel-to-channel phase variation).

Definition at line 149 of file TileDigitsFromPulse.h.

149{this, "GaussianC2CPhaseVariation", 0};

◆ m_gaussianPulseTimingVariation

Gaudi::Property<double> TileDigitsFromPulse::m_gaussianPulseTimingVariation
private
Initial value:
{
this, "GaussianPulseTimingVariation", 0.0
}

RMS of individual pulse arrival-time variations in ns.

Definition at line 150 of file TileDigitsFromPulse.h.

150 {
151 this, "GaussianPulseTimingVariation", 0.0
152 };

◆ m_gaussNoise

Gaudi::Property<bool> TileDigitsFromPulse::m_gaussNoise {this, "UseGaussNoise", false}
private

Set to TRUE in order to create noise from double gaussian.

Definition at line 140 of file TileDigitsFromPulse.h.

140{this, "UseGaussNoise", false};

◆ m_GNAmpOne

Gaudi::Property<double> TileDigitsFromPulse::m_GNAmpOne {this, "GaussNoiseAmpOne", 1 / 1.039}
private

Amplitude of first gaussian of double gaussian noise.

Definition at line 141 of file TileDigitsFromPulse.h.

141{this, "GaussNoiseAmpOne", 1 / 1.039};

◆ m_GNAmpTwo

Gaudi::Property<double> TileDigitsFromPulse::m_GNAmpTwo {this, "GaussNoiseAmpTwo", 0.039}
private

Amplitude of second gaussian of double gaussian noise.

Definition at line 143 of file TileDigitsFromPulse.h.

143{this, "GaussNoiseAmpTwo", 0.039};

◆ m_GNSigmaOne

Gaudi::Property<double> TileDigitsFromPulse::m_GNSigmaOne {this, "GaussNoiseSigmaOne", 1.6}
private

Standard deviation of first gaussian of double gaussian noise.

Definition at line 142 of file TileDigitsFromPulse.h.

142{this, "GaussNoiseSigmaOne", 1.6};

◆ m_GNSigmaTwo

Gaudi::Property<double> TileDigitsFromPulse::m_GNSigmaTwo {this, "GaussNoiseSigmaTwo", 3.6}
private

Standard deviation of second gaussian of double gaussian noise.

Definition at line 144 of file TileDigitsFromPulse.h.

144{this, "GaussNoiseSigmaTwo", 3.6};

◆ m_i_ADCmax

int TileDigitsFromPulse::m_i_ADCmax {}
private

Definition at line 112 of file TileDigitsFromPulse.h.

112{};

◆ m_imperfectionMean

Gaudi::Property<double> TileDigitsFromPulse::m_imperfectionMean {this, "ImperfectionMean", 1.01}
private

Mean value of pulse shape broadening.

Definition at line 132 of file TileDigitsFromPulse.h.

132{this, "ImperfectionMean", 1.01};

◆ m_imperfectionRms

Gaudi::Property<double> TileDigitsFromPulse::m_imperfectionRms {this, "ImperfectionRms", 0.02}
private

RMS of pulse shape broadening.

Definition at line 133 of file TileDigitsFromPulse.h.

133{this, "ImperfectionRms", 0.02};

◆ m_infoName

Gaudi::Property<std::string> TileDigitsFromPulse::m_infoName {this, "TileInfoName", "TileInfo"}
private

Definition at line 110 of file TileDigitsFromPulse.h.

110{this, "TileInfoName", "TileInfo"};

◆ m_inTimeAmp

Gaudi::Property<double> TileDigitsFromPulse::m_inTimeAmp {this, "InTimeAmp", 300.}
private

Amplitude of in-time pulse.

Definition at line 134 of file TileDigitsFromPulse.h.

134{this, "InTimeAmp", 300.};

◆ m_itADistFileName

Gaudi::Property<std::string> TileDigitsFromPulse::m_itADistFileName {this, "InTimeAmpDistFileName", ""}
private

Filename of file to use for amplitude distribution of in-time pulses.

Definition at line 153 of file TileDigitsFromPulse.h.

153{this, "InTimeAmpDistFileName", ""};

◆ m_itADistHistName

Gaudi::Property<std::string> TileDigitsFromPulse::m_itADistHistName {this, "InTimeAmpDistHistogramName", "h_Eopt_hi"}
private

Name of histogram for in-time amplitude distribution.

Definition at line 160 of file TileDigitsFromPulse.h.

160{this, "InTimeAmpDistHistogramName", "h_Eopt_hi"};

◆ m_itAPulseProb

Gaudi::Property<double> TileDigitsFromPulse::m_itAPulseProb {this, "InTimeAmpPulseProb", 0}
private

Probability to add an in-time pulse.

Definition at line 146 of file TileDigitsFromPulse.h.

146{this, "InTimeAmpPulseProb", 0};

◆ m_itDist

TH1F* TileDigitsFromPulse::m_itDist
private

Histogram to hold the distribution of in-time amplitudes.

Definition at line 202 of file TileDigitsFromPulse.h.

◆ m_itFile

TFile* TileDigitsFromPulse::m_itFile
private

File that holds the distribution of in-time amplitudes.

Definition at line 203 of file TileDigitsFromPulse.h.

◆ m_itOffset

Gaudi::Property<double> TileDigitsFromPulse::m_itOffset {this, "InTimeOffset", 0.}
private

In-time pulse offset from nominal time.

Definition at line 136 of file TileDigitsFromPulse.h.

136{this, "InTimeOffset", 0.};

◆ m_nPul

Gaudi::Property<int> TileDigitsFromPulse::m_nPul {this, "NPulses", 21}
private

number of pileup pulses

Definition at line 175 of file TileDigitsFromPulse.h.

175{this, "NPulses", 21};

◆ m_nPul_eff

int TileDigitsFromPulse::m_nPul_eff {}
private

Definition at line 176 of file TileDigitsFromPulse.h.

176{}; //Used for symetrization of PU in computation

◆ m_nSamples

Gaudi::Property<int> TileDigitsFromPulse::m_nSamples {this, "NSamples", 7}
private

number of read out samples

Definition at line 174 of file TileDigitsFromPulse.h.

174{this, "NSamples", 7};

◆ m_ootADistFileName

Gaudi::Property<std::string> TileDigitsFromPulse::m_ootADistFileName {this, "OutOfTimeAmpDistFileName", ""}
private

Filename of file to use for amplitude distribution of out-of-time pulses.

Definition at line 154 of file TileDigitsFromPulse.h.

154{this, "OutOfTimeAmpDistFileName", ""};

◆ m_ootADistHistName

Gaudi::Property<std::string> TileDigitsFromPulse::m_ootADistHistName {this, "OutOfTimeAmpDistHistogramName", "h_Eopt_hi"}
private

Name of histogram for out-of-time amplitude distribution.

Definition at line 161 of file TileDigitsFromPulse.h.

161{this, "OutOfTimeAmpDistHistogramName", "h_Eopt_hi"};

◆ m_ootAmp

Gaudi::Property<double> TileDigitsFromPulse::m_ootAmp {this, "OutOfTimeAmp", 150.}
private

Amplitude of out-of-time pulse.

Definition at line 135 of file TileDigitsFromPulse.h.

135{this, "OutOfTimeAmp", 150.};

◆ m_ootDist

TH1F* TileDigitsFromPulse::m_ootDist
private

Histogram to hold the distribution of out-of-time amplitudes.

Definition at line 201 of file TileDigitsFromPulse.h.

◆ m_ootFile

TFile* TileDigitsFromPulse::m_ootFile
private

File that holds the distribution of out-of-time amplitudes.

Definition at line 204 of file TileDigitsFromPulse.h.

◆ m_ootOffset

Gaudi::Property<double> TileDigitsFromPulse::m_ootOffset {this, "OutOfTimeOffset", 50.}
private

Out-of-time pulse offset from nominal time.

Definition at line 137 of file TileDigitsFromPulse.h.

137{this, "OutOfTimeOffset", 50.};

◆ m_ootOffsetDist

TH1F* TileDigitsFromPulse::m_ootOffsetDist
private

Histogram to hold the distribution of out-of-time timing offsets.

Definition at line 205 of file TileDigitsFromPulse.h.

◆ m_ootOffsetFile

TFile* TileDigitsFromPulse::m_ootOffsetFile
private

File that holds the distribution of out-of-time timing offsets.

Definition at line 206 of file TileDigitsFromPulse.h.

◆ m_ootOffsetFileName

Gaudi::Property<std::string> TileDigitsFromPulse::m_ootOffsetFileName {this, "OutOfTimeOffsetHistogramFile", ""}
private

File name for offset timing distribution histogram.

Definition at line 157 of file TileDigitsFromPulse.h.

157{this, "OutOfTimeOffsetHistogramFile", ""};

◆ m_ootOffsetHistName

Gaudi::Property<std::string> TileDigitsFromPulse::m_ootOffsetHistName {this, "OutOfTimeOffsetHistogramName", ""}
private

Name of the histogram for timing offset distribution.

Definition at line 158 of file TileDigitsFromPulse.h.

158{this, "OutOfTimeOffsetHistogramName", ""};

◆ m_outputContainer

std::string TileDigitsFromPulse::m_outputContainer
private

Name of the output TileDigitsContainer.

Definition at line 105 of file TileDigitsFromPulse.h.

◆ m_ped_HG

Gaudi::Property<double> TileDigitsFromPulse::m_ped_HG {this, "PedestalValueHG", 100}
private

Pedestal value for HG if specific channel pedestal is not used.

Definition at line 138 of file TileDigitsFromPulse.h.

138{this, "PedestalValueHG", 100};

◆ m_ped_LG

Gaudi::Property<double> TileDigitsFromPulse::m_ped_LG {this, "PedestalValueLG", 100}
private

Pedestal value for LG if specific channel pedestal is not used.

Definition at line 139 of file TileDigitsFromPulse.h.

139{this, "PedestalValueLG", 100};

◆ m_PhaseII

Gaudi::Property<bool> TileDigitsFromPulse::m_PhaseII {this, "TilePhaseII", false}
private

Definition at line 188 of file TileDigitsFromPulse.h.

188{this, "TilePhaseII", false}; //Use parameters of TilePhaseII if the option is set to true

◆ m_pileup_AmpDistFile

TFile* TileDigitsFromPulse::m_pileup_AmpDistFile
private

File containing amplitude histograms for PU pulses.

Definition at line 208 of file TileDigitsFromPulse.h.

◆ m_pileup_AmpDists

std::vector<std::vector<TH1F*> > TileDigitsFromPulse::m_pileup_AmpDists
private

Matrix of PU amplitude distribution histograms (PU per partition and channel).

Definition at line 209 of file TileDigitsFromPulse.h.

◆ m_pileupAmpDistFileName

Gaudi::Property<std::string> TileDigitsFromPulse::m_pileupAmpDistFileName {this, "PileUpAmpDistFileName", ""}
private

Filename for PU amplitude distribution histograms.

Definition at line 193 of file TileDigitsFromPulse.h.

193{this, "PileUpAmpDistFileName", ""};

◆ m_pileUpFraction

Gaudi::Property<float> TileDigitsFromPulse::m_pileUpFraction {this, "PileUpFraction", 1}
private

Probability that an out-of-time component will be added.

Definition at line 148 of file TileDigitsFromPulse.h.

148{this, "PileUpFraction", 1};

◆ m_ps

TilePulseShape* TileDigitsFromPulse::m_ps[2]
private

Class for defining pulse.

One element for lo gain and one for hi.

Definition at line 196 of file TileDigitsFromPulse.h.

◆ m_PUAmp

std::vector<std::vector<std::vector<std::vector<float> > > > TileDigitsFromPulse::m_PUAmp
private

Definition at line 177 of file TileDigitsFromPulse.h.

◆ m_pulseHistorySize

int TileDigitsFromPulse::m_pulseHistorySize {}
private

Definition at line 186 of file TileDigitsFromPulse.h.

186{}; // Number of pulse amplitudes retained in the history

◆ m_pulseTimeOffsets

std::vector<std::vector<std::vector<std::vector<double> > > > TileDigitsFromPulse::m_pulseTimeOffsets
private

Definition at line 178 of file TileDigitsFromPulse.h.

◆ m_random

std::unique_ptr<TRandom3> TileDigitsFromPulse::m_random
private

Definition at line 221 of file TileDigitsFromPulse.h.

◆ m_randomStreamName

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

Random Stream Name.

Definition at line 128 of file TileDigitsFromPulse.h.

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

◆ m_rawChannelContainerKey

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

Definition at line 123 of file TileDigitsFromPulse.h.

123 {this,
124 "TileRawChannelContainer", "TrueAmp", "Output Tile raw channel container key"};

◆ m_rChType

TileFragHash::TYPE TileDigitsFromPulse::m_rChType {TileFragHash::Default}
private

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

Definition at line 115 of file TileDigitsFromPulse.h.

◆ m_rChUnit

TileRawChannelUnit::UNIT TileDigitsFromPulse::m_rChUnit {TileRawChannelUnit::ADCcounts}
private

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

Definition at line 114 of file TileDigitsFromPulse.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> TileDigitsFromPulse::m_rndmSvc {this, "RndmSvc", "AthRNGSvc", ""}
private

Random number service to use.

Definition at line 126 of file TileDigitsFromPulse.h.

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

◆ m_sample_tru

float TileDigitsFromPulse::m_sample_tru = 0
private

Definition at line 219 of file TileDigitsFromPulse.h.

◆ m_seed

Gaudi::Property<int> TileDigitsFromPulse::m_seed {this, "RandomSeed", 4357}
private

Definition at line 172 of file TileDigitsFromPulse.h.

172{this, "RandomSeed", 4357};

◆ m_simPulseChain

Gaudi::Property<bool> TileDigitsFromPulse::m_simPulseChain {this, "SimulatePulseChain", false}
private

Simulate continous output of readout for HL-LHC paradigm.

Definition at line 164 of file TileDigitsFromPulse.h.

164{this, "SimulatePulseChain", false};

◆ m_simPUwPoisson

Gaudi::Property<bool> TileDigitsFromPulse::m_simPUwPoisson {this, "SimulatePileUpWithPoiss", false}
private

Definition at line 191 of file TileDigitsFromPulse.h.

191{this, "SimulatePileUpWithPoiss", false}; //If true, simulate PU overlapping amplitudes n times, with n being generated with a poissonian distribution

◆ m_simQIE

Gaudi::Property<bool> TileDigitsFromPulse::m_simQIE {this, "SimulateQIE", false}
private

Raw PMT pulses are generated if the option is set to true.

The option is intended to simulate the QIE FEB.

Definition at line 163 of file TileDigitsFromPulse.h.

163{this, "SimulateQIE", false};

◆ m_tailAtAccumulation

std::array<double, 2> TileDigitsFromPulse::m_tailAtAccumulation {}
private

Definition at line 183 of file TileDigitsFromPulse.h.

183{}; // Normalized tail amplitude when a pulse enters the accumulator

◆ m_tailDecayPerBC

std::array<double, 2> TileDigitsFromPulse::m_tailDecayPerBC {}
private

Definition at line 182 of file TileDigitsFromPulse.h.

182{}; // Exponential decay factor over 25 ns, exp(-25/tau)

◆ m_tileHWID

const TileHWID* TileDigitsFromPulse::m_tileHWID {}
private

Definition at line 107 of file TileDigitsFromPulse.h.

107{};

◆ m_tileInfo

const TileInfo* TileDigitsFromPulse::m_tileInfo {}
private

Definition at line 111 of file TileDigitsFromPulse.h.

111{};

◆ m_tileToolNoiseSample

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

Definition at line 117 of file TileDigitsFromPulse.h.

117 {this,
118 "TileCondToolNoiseSample", "TileCondToolNoiseSample", "Tile sample noise tool"};

◆ m_tsg

TileSampleGenerator* TileDigitsFromPulse::m_tsg {}
private

Pulse generating class.

Definition at line 198 of file TileDigitsFromPulse.h.

198{};

◆ m_useGainDependentUndershoot

Gaudi::Property<bool> TileDigitsFromPulse::m_useGainDependentUndershoot
private
Initial value:
{
this, "UseGainDependentUndershoot", false
}

Use gain-dependent analytical undershoot parameters.

Definition at line 165 of file TileDigitsFromPulse.h.

165 {
166 this, "UseGainDependentUndershoot", false
167 };

◆ m_useItADist

Gaudi::Property<bool> TileDigitsFromPulse::m_useItADist {this, "UseInTimeAmpDist", false}
private

Set to TRUE in order to use a distribution for the in-time amplitude instead of a constant value.

Definition at line 145 of file TileDigitsFromPulse.h.

145{this, "UseInTimeAmpDist", false};

◆ m_useOffsetHisto

bool TileDigitsFromPulse::m_useOffsetHisto {false}
private

Internally used to keep track of wether a histogram has been opened or not.

Definition at line 207 of file TileDigitsFromPulse.h.

207{false};

◆ m_useOotADist

Gaudi::Property<bool> TileDigitsFromPulse::m_useOotADist {this, "UseOutOfTimeAmpDist", false}
private

Set to TRUE in order to use a distribution for the out-of-time amplitude instead of a constant value.

Definition at line 147 of file TileDigitsFromPulse.h.

147{this, "UseOutOfTimeAmpDist", false};

◆ m_useRecursiveUndershoot

Gaudi::Property<bool> TileDigitsFromPulse::m_useRecursiveUndershoot
private
Initial value:
{
this, "UseRecursiveUndershoot", false
}

Recursively accumulate the long undershoot in continuous readout.

Definition at line 168 of file TileDigitsFromPulse.h.

168 {
169 this, "UseRecursiveUndershoot", false
170 };

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.


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