#include <sndScifiHit.h>
|
| sndScifiHit () |
|
| sndScifiHit (const sndScifiHit &hit)=default |
|
sndScifiHit & | operator= (const sndScifiHit &hit)=default |
|
| sndScifiHit (Int_t detID) |
|
| sndScifiHit (int detID, std::vector< ScifiPoint * >, std::vector< Float_t >) |
|
virtual | ~sndScifiHit () |
|
void | Print () |
|
Float_t | GetEnergy () |
|
void | setInvalid () |
|
bool | isValid () const |
|
Int_t | GetStation () |
|
bool | isVertical () |
|
Int_t | GetMat () |
|
Int_t | GetSiPM () |
|
Int_t | GetSiPMChan () |
|
Int_t | GetChannelID () |
|
| SndlhcHit () |
|
| SndlhcHit (Int_t detID, Int_t nSiPMs=1, Int_t nSides=0) |
|
virtual | ~SndlhcHit () |
|
Int_t | GetDetectorID () const |
|
Float_t | GetSignal (Int_t nChannel=0) |
|
Float_t | GetTime (Int_t nChannel=0) |
|
Int_t | GetnSiPMs () const |
|
Int_t | GetnSides () const |
|
void | SetDigi (Float_t s, Float_t t, Int_t i=0) |
|
void | SetDetectorID (Int_t detID) |
|
void | SetDaqID (Int_t i, Int_t k, Int_t board_id, Int_t tofpet_id, Int_t tofpet_channel) |
|
Int_t | GetBoardID (Int_t i) |
|
Int_t | GetTofpetID (Int_t i) |
|
Int_t | Getchannel (Int_t i) |
|
Int_t | GetRawHitIndex (Int_t i=0) |
|
virtual void | Print (const Option_t *opt="") const |
|
virtual void | GetPosition (TVector3 L, TVector3 R) const |
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
|
| ClassDef (SndlhcHit, 2) |
| encodes rawhitindex*100000+(board_id * 1000) + (tofpet_id * 100) + tofpet_channel
|
|
Int_t | fDetectorID |
| Detector unique identifier.
|
|
Int_t | nSiPMs |
|
Int_t | nSides |
| number of SiPMs per side
|
|
Float_t | signals [16] |
| number of sides
|
|
Float_t | times [16] |
| SiPM signal.
|
|
Int_t | fDaqID [16] |
| SiPM time.
|
|
Definition at line 9 of file sndScifiHit.h.
◆ sndScifiHit() [1/4]
sndScifiHit::sndScifiHit |
( |
| ) |
|
◆ sndScifiHit() [2/4]
◆ sndScifiHit() [3/4]
sndScifiHit::sndScifiHit |
( |
Int_t |
detID | ) |
|
|
explicit |
◆ sndScifiHit() [4/4]
sndScifiHit::sndScifiHit |
( |
int |
detID, |
|
|
std::vector< ScifiPoint * > |
V, |
|
|
std::vector< Float_t > |
W |
|
) |
| |
Definition at line 30 of file sndScifiHit.cxx.
31{
32 Scifi* ScifiDet =
dynamic_cast<Scifi*
> (gROOT->GetListOfGlobals()->FindObject(
"Scifi") );
33 Float_t nphe_min = ScifiDet->
GetConfParF(
"Scifi/nphe_min");
34 Float_t nphe_max = ScifiDet->
GetConfParF(
"Scifi/nphe_max");
37
40 for (
unsigned int j=0;
j<16; ++
j){
43 }
44
46 Float_t ly_total = 0;
47 Float_t earliestToA = 1E20;
48 for(
int i = 0;
i <
V.size();
i++) {
49
50 Double_t
signal =
V[
i]->GetEnergyLoss()*W[
i];
51
52
54 TVector3 impact(V[i]->GetX(),V[i]->GetY() ,V[i]->GetZ() );
56
57 Double_t distance;
58
60
61
62
63 if (verticalHit) {
64 distance = (
b - impact).Mag();
65
66 } else {
67 distance = (impact -
a).Mag();
68 }
69
70
72
74 ly_total+= ly;
75
76
77 Float_t arrival_time =
V[
i]->GetTime() + distance/
signalSpeed;
78 if (arrival_time < earliestToA){earliestToA = arrival_time;}
79
80 }
81
82 ly_total= gRandom->Poisson(ly_total);
83
84
86
88
89 if (ly_total > nphe_min){
91 }else{
93 }
94 times[0] = gRandom->Gaus(earliestToA, timeResol);
95
96 LOG(DEBUG) << "signal created";
97}
void GetSiPMPosition(Int_t SiPMChan, TVector3 &A, TVector3 &B)
Float_t GetConfParF(TString name)
Float_t times[16]
SiPM signal.
Int_t GetDetectorID() const
Int_t fDetectorID
Detector unique identifier.
Int_t nSides
number of SiPMs per side
Float_t signals[16]
number of sides
Float_t ly_loss(Float_t distance)
Float_t npix_to_qdc(Float_t npix)
Float_t sipm_saturation(Float_t ly, Float_t nphe_max)
◆ ~sndScifiHit()
sndScifiHit::~sndScifiHit |
( |
| ) |
|
|
virtual |
◆ ClassDef()
◆ GetChannelID()
Int_t sndScifiHit::GetChannelID |
( |
| ) |
|
|
inline |
◆ GetEnergy()
Float_t sndScifiHit::GetEnergy |
( |
| ) |
|
◆ GetMat()
Int_t sndScifiHit::GetMat |
( |
| ) |
|
|
inline |
◆ GetSiPM()
Int_t sndScifiHit::GetSiPM |
( |
| ) |
|
|
inline |
◆ GetSiPMChan()
Int_t sndScifiHit::GetSiPMChan |
( |
| ) |
|
|
inline |
◆ GetStation()
Int_t sndScifiHit::GetStation |
( |
| ) |
|
|
inline |
◆ isValid()
bool sndScifiHit::isValid |
( |
| ) |
const |
|
inline |
◆ isVertical()
bool sndScifiHit::isVertical |
( |
| ) |
|
|
inline |
Definition at line 32 of file sndScifiHit.h.
32 {
34 else{return (false);}
35 }
◆ ly_loss()
Float_t sndScifiHit::ly_loss |
( |
Float_t |
distance | ) |
|
|
private |
Definition at line 110 of file sndScifiHit.cxx.
110 {
111
112 return TMath::Exp(-(distance-ly_loss_params[0])/ly_loss_params[1]);
113}
◆ npix_to_qdc()
Float_t sndScifiHit::npix_to_qdc |
( |
Float_t |
npix | ) |
|
|
private |
Definition at line 121 of file sndScifiHit.cxx.
121 {
122
123 Float_t
A = gRandom->Gaus(npix_to_qdc_params[0], npix_to_qdc_params[2]);
124 Float_t
B = gRandom->Gaus(npix_to_qdc_params[1], npix_to_qdc_params[3]);
126}
◆ operator=()
◆ Print()
void sndScifiHit::Print |
( |
| ) |
|
Output to screen
Definition at line 129 of file sndScifiHit.cxx.
130{
131 std::cout <<
"-I- sndScifiHit: Scifi hit " <<
" in station " <<
GetStation();
132 if (
isVertical()) { std::cout <<
" vertical plane ";}
133 else { std::cout << " horizontal plane ";}
135}
◆ setInvalid()
void sndScifiHit::setInvalid |
( |
| ) |
|
|
inline |
◆ sipm_saturation()
Float_t sndScifiHit::sipm_saturation |
( |
Float_t |
ly, |
|
|
Float_t |
nphe_max |
|
) |
| |
|
private |
Definition at line 115 of file sndScifiHit.cxx.
115 {
116
117 Float_t factor = 1 - TMath::Exp(-ly/nphe_max);
118 return nphe_max*factor;
119}
◆ flag
Float_t sndScifiHit::flag |
|
private |
The documentation for this class was generated from the following files: