ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtDigitization
AtVectorResponse.cxx
Go to the documentation of this file.
1
#include "
AtVectorResponse.h
"
2
3
#include "
AtDigiPar.h
"
4
#include "
AtElectronicResponse.h
"
5
6
#include <FairLogger.h>
7
#include <FairParSet.h>
// for FairParSet
8
#include <FairRunAna.h>
9
#include <FairRuntimeDb.h>
10
11
#include <string>
12
13
double
AtVectorResponse::fPeakingTime
= 0;
14
double
AtVectorResponse::fTBTime
= 0;
15
std::unique_ptr<ElectronicResponse::AtFileResponse>
AtVectorResponse::fResponse
=
nullptr
;
16
17
double
AtVectorResponse::ResponseFunction
(
double
reducedTime)
18
{
19
return
(*
fResponse
)(reducedTime *
fPeakingTime
+ 0.5 *
fTBTime
);
20
}
21
22
void
AtVectorResponse::SetFile
(TString filename)
23
{
24
setParameters
();
25
LOG(info) <<
"fPeakingTime: "
<<
fPeakingTime
<<
"; fTBTime: "
<<
fTBTime
;
26
fResponse
= std::make_unique<ElectronicResponse::AtFileResponse>(
fTBTime
, std::string(filename.Data()));
27
}
28
29
void
AtVectorResponse::setParameters
()
30
{
31
auto
fPar =
dynamic_cast<
AtDigiPar
*
>
(FairRunAna::Instance()->GetRuntimeDb()->getContainer(
"AtDigiPar"
));
32
fPeakingTime
= fPar->GetPeakingTime() / 1000.;
33
fTBTime
= fPar->GetTBTime() / 1000.;
34
}
AtVectorResponse.h
AtElectronicResponse.h
AtVectorResponse::fPeakingTime
static double fPeakingTime
Definition:
AtVectorResponse.h:15
AtVectorResponse::fTBTime
static double fTBTime
Electronic peaking time in us.
Definition:
AtVectorResponse.h:16
AtVectorResponse::setParameters
static void setParameters()
Definition:
AtVectorResponse.cxx:29
AtDigiPar.h
AtDigiPar
Definition:
AtDigiPar.h:14
AtVectorResponse::fResponse
static std::unique_ptr< ElectronicResponse::AtFileResponse > fResponse
Time bucket size in us.
Definition:
AtVectorResponse.h:17
AtVectorResponse::ResponseFunction
static double ResponseFunction(double reducedTime)
Definition:
AtVectorResponse.cxx:17
AtVectorResponse::SetFile
static void SetFile(TString filename)
Definition:
AtVectorResponse.cxx:22
Generated on Sat Nov 11 2023 15:30:37 for ATTPCROOT by
1.8.18