FairShip
Loading...
Searching...
No Matches
UpstreamTaggerHit Class Reference

Hit class for UpstreamTagger scoring plane. More...

#include <UpstreamTaggerHit.h>

Inheritance diagram for UpstreamTaggerHit:
Collaboration diagram for UpstreamTaggerHit:

Public Member Functions

 UpstreamTaggerHit ()
 
 UpstreamTaggerHit (UpstreamTaggerPoint *p, Double_t t0, Double_t pos_res, Double_t time_res)
 
 ~UpstreamTaggerHit () override=default
 
 UpstreamTaggerHit (const UpstreamTaggerHit &hit)=default
 
UpstreamTaggerHitoperator= (const UpstreamTaggerHit &hit)=default
 
Double_t GetX () const
 
Double_t GetY () const
 
Double_t GetZ () const
 
TVector3 GetXYZ () const
 
Double_t GetTime () const
 
void Print () const
 
- Public Member Functions inherited from SHiP::DetectorHit
 DetectorHit ()
 
 DetectorHit (Int_t detID, Float_t digi)
 
 ~DetectorHit () override=default
 
Double_t GetDigi () const
 
Int_t GetDetectorID () const
 
void SetDigi (Float_t d)
 
void SetDetectorID (Int_t detID)
 
void Print (const Option_t *opt="") const override
 

Private Member Functions

 ClassDef (UpstreamTaggerHit, 2)
 

Private Attributes

Double_t fX
 Smeared x position (cm)
 
Double_t fY
 Smeared y position (cm)
 
Double_t fZ
 Smeared z position (cm)
 
Double_t fTime
 Smeared time (ns)
 

Additional Inherited Members

- Protected Member Functions inherited from SHiP::DetectorHit
 ClassDefOverride (SHiP::DetectorHit, 1)
 
- Protected Attributes inherited from SHiP::DetectorHit
Float_t fdigi
 digitized detector hit
 
Int_t fDetectorID
 Detector unique identifier.
 

Detailed Description

Hit class for UpstreamTagger scoring plane.

Simple hit class for UBT scoring plane detector. Stores smeared position and time from MC truth. Does not store MC truth information directly.

Definition at line 20 of file UpstreamTaggerHit.h.

Constructor & Destructor Documentation

◆ UpstreamTaggerHit() [1/3]

UpstreamTaggerHit::UpstreamTaggerHit ( )

Default constructor

Definition at line 17 of file UpstreamTaggerHit.cxx.

18 : SHiP::DetectorHit(), fX(0.), fY(0.), fZ(0.), fTime(0.) {}
Double_t fTime
Smeared time (ns)
Double_t fY
Smeared y position (cm)
Double_t fZ
Smeared z position (cm)
Double_t fX
Smeared x position (cm)

◆ UpstreamTaggerHit() [2/3]

UpstreamTaggerHit::UpstreamTaggerHit ( UpstreamTaggerPoint p,
Double_t  t0,
Double_t  pos_res,
Double_t  time_res 
)

Constructor from UpstreamTaggerPoint

Parameters
pMC point
t0Event time offset
pos_resPosition resolution (cm)
time_resTime resolution (ns)

Definition at line 21 of file UpstreamTaggerHit.cxx.

24 if (!p) {
25 LOG(error) << "UpstreamTaggerHit: null UpstreamTaggerPoint pointer";
26 return;
27 }
28 fDetectorID = p->GetDetectorID();
29
30 // Smear position with Gaussian resolution
31 fX = gRandom->Gaus(p->GetX(), pos_res);
32 fY = gRandom->Gaus(p->GetY(), pos_res);
33 fZ = gRandom->Gaus(p->GetZ(), pos_res);
34
35 // Smear time with Gaussian resolution
36 fTime = gRandom->Gaus(p->GetTime() + t0, time_res);
37}
Int_t fDetectorID
Detector unique identifier.
Definition: DetectorHit.h:40
ROOT p
Definition: makeDecay.py:76

◆ ~UpstreamTaggerHit()

UpstreamTaggerHit::~UpstreamTaggerHit ( )
overridedefault

Destructor

◆ UpstreamTaggerHit() [3/3]

UpstreamTaggerHit::UpstreamTaggerHit ( const UpstreamTaggerHit hit)
default

Copy constructor

Member Function Documentation

◆ ClassDef()

UpstreamTaggerHit::ClassDef ( UpstreamTaggerHit  ,
 
)
private

◆ GetTime()

Double_t UpstreamTaggerHit::GetTime ( ) const
inline

Time accessor

Definition at line 48 of file UpstreamTaggerHit.h.

48{ return fTime; }

◆ GetX()

Double_t UpstreamTaggerHit::GetX ( ) const
inline

Position accessors

Definition at line 42 of file UpstreamTaggerHit.h.

42{ return fX; }

◆ GetXYZ()

TVector3 UpstreamTaggerHit::GetXYZ ( ) const
inline

Definition at line 45 of file UpstreamTaggerHit.h.

45{ return TVector3(fX, fY, fZ); }

◆ GetY()

Double_t UpstreamTaggerHit::GetY ( ) const
inline

Definition at line 43 of file UpstreamTaggerHit.h.

43{ return fY; }

◆ GetZ()

Double_t UpstreamTaggerHit::GetZ ( ) const
inline

Definition at line 44 of file UpstreamTaggerHit.h.

44{ return fZ; }

◆ operator=()

UpstreamTaggerHit & UpstreamTaggerHit::operator= ( const UpstreamTaggerHit hit)
default

◆ Print()

void UpstreamTaggerHit::Print ( ) const

Definition at line 40 of file UpstreamTaggerHit.cxx.

40 {
41 cout << "-I- UpstreamTaggerHit: detector " << fDetectorID << endl;
42 cout << " Position: (" << fX << ", " << fY << ", " << fZ << ") cm" << endl;
43 cout << " Time: " << fTime << " ns" << endl;
44}

Member Data Documentation

◆ fTime

Double_t UpstreamTaggerHit::fTime
private

Smeared time (ns)

Definition at line 58 of file UpstreamTaggerHit.h.

◆ fX

Double_t UpstreamTaggerHit::fX
private

Smeared x position (cm)

Definition at line 55 of file UpstreamTaggerHit.h.

◆ fY

Double_t UpstreamTaggerHit::fY
private

Smeared y position (cm)

Definition at line 56 of file UpstreamTaggerHit.h.

◆ fZ

Double_t UpstreamTaggerHit::fZ
private

Smeared z position (cm)

Definition at line 57 of file UpstreamTaggerHit.h.


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