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

#include <strawtubesHit.h>

Inheritance diagram for strawtubesHit:
Collaboration diagram for strawtubesHit:

Public Member Functions

 strawtubesHit ()
 
 strawtubesHit (Int_t detID, Float_t tdc)
 
 strawtubesHit (strawtubesPoint *p, Double_t t0)
 
 ~strawtubesHit () override=default
 
Int_t GetStationNumber () const
 
Int_t GetViewNumber () const
 
Int_t GetLayerNumber () const
 
Int_t GetStrawNumber () const
 
void Print () const
 
Float_t GetTDC () const
 
void setInvalid ()
 
bool isValid () const
 
 strawtubesHit (const strawtubesHit &point)=default
 
strawtubesHitoperator= (const strawtubesHit &point)=default
 
- 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 (strawtubesHit, 6)
 

Private Attributes

Bool_t flag {true}
 validity flag
 

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

Definition at line 11 of file strawtubesHit.h.

Constructor & Destructor Documentation

◆ strawtubesHit() [1/4]

strawtubesHit::strawtubesHit ( )

Default constructor

Definition at line 29 of file strawtubesHit.cxx.

◆ strawtubesHit() [2/4]

strawtubesHit::strawtubesHit ( Int_t  detID,
Float_t  tdc 
)

Constructor with arguments

Parameters
detIDDetector ID
digidigitized/measured TDC
flagTrue/False, false if there is another hit with smaller tdc

Definition at line 31 of file strawtubesHit.cxx.

32 : SHiP::DetectorHit(detID, tdc) {}

◆ strawtubesHit() [3/4]

strawtubesHit::strawtubesHit ( strawtubesPoint p,
Double_t  t0 
)

Definition at line 35 of file strawtubesHit.cxx.

37 if (!p) {
38 LOG(error) << "strawtubesHit: null strawtubesPoint pointer";
39 return;
40 }
41 TVector3 start = TVector3();
42 TVector3 stop = TVector3();
43 fDetectorID = p->GetDetectorID();
44 strawtubes* module = dynamic_cast<strawtubes*>(
45 FairRunSim::Instance()->GetListOfModules()->FindObject("strawtubes"));
46 Double_t v_drift = module->StrawVdrift();
47 Double_t sigma_spatial = module->StrawSigmaSpatial();
49 Double_t t_drift =
50 fabs(gRandom->Gaus(p->dist2Wire(), sigma_spatial)) / v_drift;
51 fdigi = t0 + p->GetTime() + t_drift + (stop[0] - p->GetX()) / speedOfLight;
52}
Float_t fdigi
digitized detector hit
Definition: DetectorHit.h:39
Int_t fDetectorID
Detector unique identifier.
Definition: DetectorHit.h:40
Double_t StrawSigmaSpatial()
Definition: strawtubes.h:55
static void StrawEndPoints(Int_t detID, TVector3 &top, TVector3 &bot)
Definition: strawtubes.cxx:443
Double_t StrawVdrift()
Definition: strawtubes.h:54
ROOT p
Definition: makeDecay.py:76

◆ ~strawtubesHit()

strawtubesHit::~strawtubesHit ( )
overridedefault

Destructor

◆ strawtubesHit() [4/4]

strawtubesHit::strawtubesHit ( const strawtubesHit point)
default

Copy constructor

Member Function Documentation

◆ ClassDef()

strawtubesHit::ClassDef ( strawtubesHit  ,
 
)
private

◆ GetLayerNumber()

Int_t strawtubesHit::GetLayerNumber ( ) const

Definition at line 72 of file strawtubesHit.cxx.

72 {
73 Int_t detID = GetDetectorID();
74 const auto decode = strawtubes::StrawDecode(detID);
75
76 return std::get<2>(decode);
77}
Int_t GetDetectorID() const
Definition: DetectorHit.h:29
static std::array< Int_t, 4 > StrawDecode(Int_t detID)
Definition: strawtubes.cxx:421

◆ GetStationNumber()

Int_t strawtubesHit::GetStationNumber ( ) const

Accessors

Definition at line 58 of file strawtubesHit.cxx.

58 {
59 Int_t detID = GetDetectorID();
60 const auto decode = strawtubes::StrawDecode(detID);
61
62 return std::get<0>(decode);
63}

◆ GetStrawNumber()

Int_t strawtubesHit::GetStrawNumber ( ) const

Definition at line 79 of file strawtubesHit.cxx.

79 {
80 Int_t detID = GetDetectorID();
81 const auto decode = strawtubes::StrawDecode(detID);
82
83 return std::get<3>(decode);
84}

◆ GetTDC()

Float_t strawtubesHit::GetTDC ( ) const
inline

Definition at line 35 of file strawtubesHit.h.

35{ return fdigi; }

◆ GetViewNumber()

Int_t strawtubesHit::GetViewNumber ( ) const

Definition at line 65 of file strawtubesHit.cxx.

65 {
66 Int_t detID = GetDetectorID();
67 const auto decode = strawtubes::StrawDecode(detID);
68
69 return std::get<1>(decode);
70}

◆ isValid()

bool strawtubesHit::isValid ( ) const
inline

Definition at line 37 of file strawtubesHit.h.

37{ return flag; }
Bool_t flag
validity flag
Definition: strawtubesHit.h:44

◆ operator=()

strawtubesHit & strawtubesHit::operator= ( const strawtubesHit point)
default

◆ Print()

void strawtubesHit::Print ( ) const

Definition at line 87 of file strawtubesHit.cxx.

87 {
88 cout << "-I- strawtubesHit: strawtubes hit " << " in detector " << fDetectorID
89 << endl;
90 cout << " TDC " << fdigi << " ns" << endl;
91}

◆ setInvalid()

void strawtubesHit::setInvalid ( )
inline

Definition at line 36 of file strawtubesHit.h.

36{ flag = false; }

Member Data Documentation

◆ flag

Bool_t strawtubesHit::flag {true}
private

validity flag

Definition at line 44 of file strawtubesHit.h.


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