27 std::vector<double> Edep;
28 std::vector<double> G4Time;
29 std::vector<double> Doca;
30 std::vector<double> DriftTime;
41 void ComputeDocaAndTime(MHit * aHit);
42 std::vector<short> Dgtz;
43 std::vector<short> Noise;
48 const double timeOffset;
49 const double samplingTime;
50 const double Landau_width;
51 double electronYield = 9500;
52 static const int ADC_LIMIT = 4095;
59 ahdcSignal(MHit * aHit,
int _hitn,
double _tmin,
double _tmax,
double _timeOffset,
double _samplingTime,
double _Landau_width)
60 : tmin(_tmin), tmax(_tmax), timeOffset(_timeOffset), samplingTime(_samplingTime), Landau_width(_Landau_width) {
63 vector<identifier> identity = aHit->GetId();
65 layer = 10 * identity[0].id + identity[1].id ;
68 Edep = aHit->GetEdep();
70 for (
int s=0;s<
nsteps;s++){Edep.at(s) = Edep.at(s)*1000;}
71 G4Time = aHit->GetTime();
72 this->ComputeDocaAndTime(aHit);
82 std::vector<double>
GetEdep() {
return Edep;}
88 std::vector<double>
GetDoca() {
return Doca;}
97 std::vector<short>
GetDgtz() {
return Dgtz;}
114 using namespace Genfun;
115 double signalValue = 0;
116 for (
int s=0; s<
nsteps; s++){
119 L.peak() = Parameter(
"Peak",DriftTime.at(s),tmin,tmax);
120 L.width() = Parameter(
"Width",Landau_width,0,400);
121 signalValue += Edep.at(s)*L(timePoint-timeOffset);
154 std::map<std::string,double>
Extract(
bool expression =
true);
156 void PrintBeforeProcessing(
bool expression =
true);
157 void PrintAllShapes(
bool expression =
true);
158 void PrintAfterProcessing(
bool expression =
true);
159 void PrintNoise(
bool expression =
true);
160 void PrintSignal(
bool expression =
true);
ahdc signal simulation
Definition ahdcSignal.h:17
void GenerateNoise(double mean, double stdev)
Generate gaussian noise.
int hitn
n-th MHit of the event, also corresponds to the n-th activated wire
Definition ahdcSignal.h:20
~ahdcSignal()
Destructor.
Definition ahdcSignal.h:76
std::vector< double > GetDriftTime()
Return the content of the attribut DriftTime
Definition ahdcSignal.h:91
double operator()(double timePoint)
Overloaded () operator to get the value of the signal at a given time.
Definition ahdcSignal.h:113
void Digitize()
Digitize the simulated signal.
std::map< std::string, double > Extract(bool expression=true)
Extract various informations from the digitized signal.
int layer
layer, second wire identifer
Definition ahdcSignal.h:22
std::vector< short > GetDgtz()
Return the content of the attribut Dgtz
Definition ahdcSignal.h:97
std::vector< double > GetG4Time()
Return the content of the attribut G4Time
Definition ahdcSignal.h:85
std::vector< double > GetEdep()
Return the content of the attribut Edep
Definition ahdcSignal.h:82
double GetElectronYield()
Return the value of the attribut electronYield
Definition ahdcSignal.h:79
int nsteps
number of steps in this MHit, i.e number of Geant4 calculation steps in the sensitive area of the wir...
Definition ahdcSignal.h:24
void SetElectronYield(double electronYield_)
Set the electron yield.
Definition ahdcSignal.h:104
ahdcSignal()=default
Default constructor.
std::vector< short > GetNoise()
Return the content of the attribut Noise
Definition ahdcSignal.h:94
int component
component, third wire identifier
Definition ahdcSignal.h:23
std::vector< double > GetDoca()
Return the content of the attribut Doca
Definition ahdcSignal.h:88
int sector
sector, first wire identifier
Definition ahdcSignal.h:21
ahdcSignal(MHit *aHit, int _hitn, double _tmin, double _tmax, double _timeOffset, double _samplingTime, double _Landau_width)
Constructor.
Definition ahdcSignal.h:59