Project
Loading...
Searching...
No Matches
SimParam.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
13#include <iostream>
14#include <TMath.h>
15
17
18using namespace o2::emcal;
19
20std::ostream& o2::emcal::operator<<(std::ostream& stream, const o2::emcal::SimParam& s)
21{
22 s.PrintStream(stream);
23 return stream;
24}
25
26void SimParam::PrintStream(std::ostream& stream) const
27{
28 stream << "EMCAL::SimParam.mDigitThreshold = " << mDigitThreshold;
29 stream << "\nEMCAL::SimParam.mMeanPhotonElectron = " << mMeanPhotonElectron;
30 stream << "\nEMCal::SimParam.mGainFluctuations = " << mGainFluctuations;
31 stream << "\nEMCal::SimParam.mPinNoise = " << mPinNoise;
32 stream << "\nEMCal::SimParam.mPinNoiseLG = " << mPinNoiseLG;
33 stream << "\nEMCal::SimParam.mPinNoiseTRU = " << mPinNoiseTRU;
34 stream << "\nEMCal::SimParam.mTimeResolutionPar0 = " << mTimeResolutionPar0;
35 stream << "\nEMCal::SimParam.mTimeResolutionPar1 = " << mTimeResolutionPar1;
36 stream << "\nEMCal::SimParam.mTimeResponseTau = " << mTimeResponseTau;
37 stream << "\nEMCal::SimParam.mTimeResponsePower = " << mTimeResponsePower;
38 stream << "\nEMCal::SimParam.mTimeResponseThreshold = " << mTimeResponseThreshold;
39 stream << "\nEMCal::SimParam.mThresholdLZERO = " << mThresholdLZERO;
40 stream << "\nEMCal::SimParam.mNADCEC = " << mNADCEC;
41 stream << "\nEMCal::SimParam.mSwapPhase = " << mSwapPhase;
42 stream << "\nEMCal::SimParam.mA = " << mA;
43 stream << "\nEMCal::SimParam.mB = " << mB;
44 stream << "\nEMCal::SimParam.mECPrimThreshold = " << mECPrimThreshold;
45 stream << "\nEMCal::SimParam.mSignalDelay = " << mSignalDelay;
46 stream << "\nEMCal::SimParam.mTimeWindowStart = " << mTimeWindowStart;
47 stream << "\nEMCal::SimParam.mLiveTime = " << mLiveTime;
48 stream << "\nEMCal::SimParam.mBusyTime = " << mBusyTime;
49 stream << "\nEMCal::SimParam.mPreTriggerTime = " << mPreTriggerTime;
50 stream << "\nEMCal::SimParam.mSmearEnergy = " << ((mSmearEnergy) ? "true" : "false");
51 stream << "\nEMCal::SimParam.mSimulateTimeResponse = " << ((mSimulateTimeResponse) ? "true" : "false");
52 stream << "\nEMCal::SimParam.mRemoveDigitsBelowThreshold = " << ((mRemoveDigitsBelowThreshold) ? "true" : "false");
53 stream << "\nEMCal::SimParam.mSimulateNoiseDigits = " << ((mSimulateNoiseDigits) ? "true" : "false");
54 stream << "\nEMCal::SimParam.mDisablePileup = " << ((mDisablePileup) ? "true" : "false");
55 stream << "\nEMCal::SimParam.mSimulateL1Phase = " << ((mSimulateL1Phase) ? "true" : "false");
56}
57
58Double_t SimParam::getTimeResolution(Double_t energy) const
59{
60 Double_t res = -1;
61 if (energy > 0) {
62 res = TMath::Sqrt(mTimeResolutionPar0 + mTimeResolutionPar1 / (energy * energy));
63 }
64
65 // parametrization above is for ns. Convert to seconds:
66 // return res*1e-9;
67 return res;
68}
#define O2ParamImpl(classname)
uint32_t res
Definition RawData.h:0
EMCal simulation parameters.
Definition SimParam.h:28
Float_t mPinNoise
Electronics noise in EMC, APD.
Definition SimParam.h:81
Bool_t mSimulateNoiseDigits
simulate noise digits
Definition SimParam.h:116
void PrintStream(std::ostream &stream) const
Definition SimParam.cxx:26
Float_t mB
Slope Digitizition parameters.
Definition SimParam.h:102
Bool_t mSimulateTimeResponse
simulate time response
Definition SimParam.h:114
Float_t mGainFluctuations
correct fMeanPhotonElectron by the gain fluctuations
Definition SimParam.h:80
Float_t mA
Pedestal parameter.
Definition SimParam.h:101
Float_t mLiveTime
EMCal live time (ns)
Definition SimParam.h:108
Float_t mTimeResponseTau
Raw time response function tau parameter.
Definition SimParam.h:86
unsigned int mTimeWindowStart
The start of the time window.
Definition SimParam.h:107
Float_t mPreTriggerTime
EMCal pre-trigger time (ns)
Definition SimParam.h:110
Float_t mSignalDelay
Signal delay time (ns)
Definition SimParam.h:106
Int_t mDigitThreshold
Threshold for storing digits in EMC.
Definition SimParam.h:78
Int_t mNADCEC
number of channels in EC section ADC
Definition SimParam.h:85
Float_t mTimeResponsePower
Raw time response function power parameter.
Definition SimParam.h:87
bool mSimulateL1Phase
Simulate L1 phase.
Definition SimParam.h:117
Bool_t mDisablePileup
disable pileup simulation
Definition SimParam.h:120
Float_t mECPrimThreshold
To store primary if EC Shower Elos > threshold.
Definition SimParam.h:103
Float_t mBusyTime
EMCal busy time (ns)
Definition SimParam.h:109
Float_t mPinNoiseTRU
Electronics noise in EMC, TRU, normalised by fastOr.
Definition SimParam.h:92
Float_t mTimeResponseThreshold
Raw time response function energy threshold.
Definition SimParam.h:88
Double_t getTimeResolution(Double_t energy) const
Definition SimParam.cxx:58
Int_t mSwapPhase
BC phase swap similar to data.
Definition SimParam.h:89
Float_t mTimeResolutionPar0
Time resolution of FEE electronics.
Definition SimParam.h:83
Int_t mMeanPhotonElectron
number of photon electrons per GeV deposited energy
Definition SimParam.h:79
Float_t mTimeResolutionPar1
Time resolution of FEE electronics.
Definition SimParam.h:84
Bool_t mSmearEnergy
do time and energy smearing
Definition SimParam.h:113
Float_t mPinNoiseLG
Electronics noise in EMC, APD, Low Gain.
Definition SimParam.h:82
Float_t mThresholdLZERO
ADC threshold for peak finding in the LZEROElectronics.
Definition SimParam.h:98
Bool_t mRemoveDigitsBelowThreshold
remove digits below threshold
Definition SimParam.h:115
GLuint GLuint stream
Definition glcorearb.h:1806
std::ostream & operator<<(std::ostream &stream, const Cell &cell)
Stream operator for EMCAL cell.
Definition Cell.cxx:355