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

Hit class for UpstreamTagger scoring plane. More...

#include <UpstreamTaggerHit.h>

Inheritance diagram for UpstreamTaggerHit:
[legend]
Collaboration diagram for UpstreamTaggerHit:
[legend]

Public Member Functions

 UpstreamTaggerHit ()
 UpstreamTaggerHit (UpstreamTaggerPoint *p, Double_t t0, const TVector3 &digitizedPosition, Double_t time_res)
 ~UpstreamTaggerHit () override=default
 UpstreamTaggerHit (const UpstreamTaggerHit &hit)=default
UpstreamTaggerHit & operator= (const UpstreamTaggerHit &hit)=default
Double_t GetX () const
Double_t GetY () const
Double_t GetZ () const
TVector3 GetXYZ () const
Double_t GetTime () const
Int_t GetADC () const
Int_t GetTileID () const
Bool_t IsTriggered () const
void SetADC (Int_t adc)
void SetTileID (Int_t tileID)
void SetTriggered (Bool_t triggered)
void Print () const
void Print (const Option_t *opt="") const override
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

 ClassDefOverride (UpstreamTaggerHit, 3)

Private Attributes

Double_t fX
 Digitized x position (cm).
Double_t fY
 Digitized y position (cm).
Double_t fZ
 Digitized z position (cm).
Double_t fTime
 Smeared time (ns).
Int_t fTileID
 Unique position- and tile-size-aware constituent ID.
Bool_t fTriggered
 True when ADC is at or above the trigger threshold.

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 the center of the fired constituent tile and the smeared time. 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(),
19 fX(0.),
20 fY(0.),
21 fZ(0.),
22 fTime(0.),
23 fTileID(-1),
24 fTriggered(kFALSE) {}
Double_t fTime
Smeared time (ns).
Double_t fY
Digitized y position (cm).
Int_t fTileID
Unique position- and tile-size-aware constituent ID.
Double_t fZ
Digitized z position (cm).
Double_t fX
Digitized x position (cm).
Bool_t fTriggered
True when ADC is at or above the trigger threshold.

◆ UpstreamTaggerHit() [2/3]

UpstreamTaggerHit::UpstreamTaggerHit ( UpstreamTaggerPoint * p,
Double_t t0,
const TVector3 & digitizedPosition,
Double_t time_res )

Constructor from UpstreamTaggerPoint

Parameters
pMC point
t0Event time offset
digitizedPositionCenter of the fired constituent tile (cm)
time_resTime resolution (ns)

Definition at line 27 of file UpstreamTaggerHit.cxx.

30 : SHiP::DetectorHit(),
31 fX(0.),
32 fY(0.),
33 fZ(0.),
34 fTime(0.),
35 fTileID(-1),
36 fTriggered(kFALSE) {
37 if (!p) {
38 LOG(error) << "UpstreamTaggerHit: null UpstreamTaggerPoint pointer";
39 return;
40 }
41 fDetectorID = p->GetDetectorID();
42 fX = digitizedPosition.X();
43 fY = digitizedPosition.Y();
44 fZ = digitizedPosition.Z();
45 fTime = gRandom->Gaus(p->GetTime() + t0, time_res);
46}
Int_t fDetectorID
Detector unique identifier.
Definition DetectorHit.h:40

◆ ~UpstreamTaggerHit()

UpstreamTaggerHit::~UpstreamTaggerHit ( )
overridedefault

Destructor

◆ UpstreamTaggerHit() [3/3]

UpstreamTaggerHit::UpstreamTaggerHit ( const UpstreamTaggerHit & hit)
default

Copy constructor

Member Function Documentation

◆ ClassDefOverride()

UpstreamTaggerHit::ClassDefOverride ( UpstreamTaggerHit ,
3  )
private

◆ GetADC()

Int_t UpstreamTaggerHit::GetADC ( ) const
inline

Definition at line 49 of file UpstreamTaggerHit.h.

49{ return static_cast<Int_t>(fdigi); }
Float_t fdigi
digitized detector hit
Definition DetectorHit.h:39

◆ GetTileID()

Int_t UpstreamTaggerHit::GetTileID ( ) const
inline

Definition at line 50 of file UpstreamTaggerHit.h.

50{ return fTileID; }

◆ 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; }

◆ IsTriggered()

Bool_t UpstreamTaggerHit::IsTriggered ( ) const
inline

Definition at line 51 of file UpstreamTaggerHit.h.

51{ return fTriggered; }

◆ operator=()

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

◆ Print() [1/2]

void UpstreamTaggerHit::Print ( ) const

Definition at line 49 of file UpstreamTaggerHit.cxx.

49 {
50 cout << "-I- UpstreamTaggerHit: detector " << fDetectorID << endl;
51 cout << " Constituent tile ID: " << fTileID << endl;
52 cout << " Position: (" << fX << ", " << fY << ", " << fZ << ") cm" << endl;
53 cout << " Time: " << fTime << " ns" << endl;
54 cout << " ADC: " << GetADC()
55 << ", triggered: " << (fTriggered ? "yes" : "no") << endl;
56}

◆ Print() [2/2]

void SHiP::DetectorHit::Print ( const Option_t * opt = "") const
inlineoverride

Output to screen

Definition at line 36 of file DetectorHit.h.

36{}

◆ SetADC()

void UpstreamTaggerHit::SetADC ( Int_t adc)
inline

Definition at line 52 of file UpstreamTaggerHit.h.

52{ SetDigi(adc); }
void SetDigi(Float_t d)
Definition DetectorHit.h:32

◆ SetTileID()

void UpstreamTaggerHit::SetTileID ( Int_t tileID)
inline

Definition at line 53 of file UpstreamTaggerHit.h.

53{ fTileID = tileID; }

◆ SetTriggered()

void UpstreamTaggerHit::SetTriggered ( Bool_t triggered)
inline

Definition at line 54 of file UpstreamTaggerHit.h.

54{ fTriggered = triggered; }

Member Data Documentation

◆ fTileID

Int_t UpstreamTaggerHit::fTileID
private

Unique position- and tile-size-aware constituent ID.

Definition at line 65 of file UpstreamTaggerHit.h.

◆ fTime

Double_t UpstreamTaggerHit::fTime
private

Smeared time (ns).

Definition at line 64 of file UpstreamTaggerHit.h.

◆ fTriggered

Bool_t UpstreamTaggerHit::fTriggered
private

True when ADC is at or above the trigger threshold.

Definition at line 66 of file UpstreamTaggerHit.h.

◆ fX

Double_t UpstreamTaggerHit::fX
private

Digitized x position (cm).

Definition at line 61 of file UpstreamTaggerHit.h.

◆ fY

Double_t UpstreamTaggerHit::fY
private

Digitized y position (cm).

Definition at line 62 of file UpstreamTaggerHit.h.

◆ fZ

Double_t UpstreamTaggerHit::fZ
private

Digitized z position (cm).

Definition at line 63 of file UpstreamTaggerHit.h.


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