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

#include <vetoHit.h>

Inheritance diagram for vetoHit:
Collaboration diagram for vetoHit:

Public Member Functions

 vetoHit ()
 
 vetoHit (Int_t detID, Float_t adc)
 
 ~vetoHit () override=default
 
Double_t GetX () const
 
Double_t GetY () const
 
Double_t GetZ () const
 
TVector3 GetXYZ () const
 
TGeoNode * GetNode () const
 
void SetEloss (Double_t val)
 
void SetTDC (Double_t val)
 
void Print (Int_t detID) const
 
Float_t GetADC () const
 
Float_t GetTDC () const
 
Double_t GetEloss () const
 
void setInvalid ()
 
void setIsValid ()
 
bool isValid () const
 
 vetoHit (const vetoHit &point)=default
 
vetoHitoperator= (const vetoHit &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 (vetoHit, 2)
 

Private Attributes

Double_t ft {-1.}
 
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 vetoHit.h.

Constructor & Destructor Documentation

◆ vetoHit() [1/3]

vetoHit::vetoHit ( )

Default constructor

Definition at line 24 of file vetoHit.cxx.

◆ vetoHit() [2/3]

vetoHit::vetoHit ( Int_t  detID,
Float_t  adc 
)

Constructor with arguments

Parameters
detIDDetector ID
digidigitized/measured ADC
flagTrue/False, false if below threshold

Definition at line 26 of file vetoHit.cxx.

26: SHiP::DetectorHit(detID, adc) {}

◆ ~vetoHit()

vetoHit::~vetoHit ( )
overridedefault

Destructor

◆ vetoHit() [3/3]

vetoHit::vetoHit ( const vetoHit point)
default

Member Function Documentation

◆ ClassDef()

vetoHit::ClassDef ( vetoHit  ,
 
)
private

◆ GetADC()

Float_t vetoHit::GetADC ( ) const
inline

Definition at line 38 of file vetoHit.h.

38{ return fdigi; }
Float_t fdigi
digitized detector hit
Definition: DetectorHit.h:39

◆ GetEloss()

Double_t vetoHit::GetEloss ( ) const
inline

Definition at line 40 of file vetoHit.h.

40{ return fdigi; }

◆ GetNode()

TGeoNode * vetoHit::GetNode ( ) const

Definition at line 57 of file vetoHit.cxx.

57 {
58 TGeoNode* node;
59 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
60 TString path = "cave/DecayVolume_1/T2_1/VetoLiSc_0/";
61 // id = ShapeType*100000 + blockNr*10000 + Zlayer*100 + number*10 + position;
62
63 Int_t ShapeType = fDetectorID / 100000;
64 Int_t blockNr = (fDetectorID % 100000) / 10000;
65 Int_t Zlayer = (fDetectorID % 10000) / 100;
66 Int_t number = (fDetectorID % 100) / 10;
67 // Int_t position = (fDetectorID % 10);
68
69 if (ShapeType == 1)
70 path += "LiScX_";
71 else if (ShapeType == 2)
72 path += "LiScY_";
73 else if (ShapeType == 3)
74 path += "LiSc_S3_";
75 else if (ShapeType == 4)
76 path += "LiSc_S4_";
77 else if (ShapeType == 5)
78 path += "LiSc_S5_";
79 else if (ShapeType == 6)
80 path += "LiSc_S6_";
81
82 path += ShapeType;
83 path += blockNr;
84 if (Zlayer < 10) path += "0";
85 path += Zlayer;
86 path += number;
87 path += "0_";
89
90 nav->cd(path);
91 node = nav->GetCurrentNode();
92 return node;
93}
Int_t fDetectorID
Detector unique identifier.
Definition: DetectorHit.h:40

◆ GetTDC()

Float_t vetoHit::GetTDC ( ) const
inline

Definition at line 39 of file vetoHit.h.

39{ return ft; }
Double_t ft
Definition: vetoHit.h:49

◆ GetX()

Double_t vetoHit::GetX ( ) const

Accessors

Definition at line 45 of file vetoHit.cxx.

45 {
46 TVector3 pos = GetXYZ();
47 return pos.X();
48}
TVector3 GetXYZ() const
Definition: vetoHit.cxx:32

◆ GetXYZ()

TVector3 vetoHit::GetXYZ ( ) const

Definition at line 32 of file vetoHit.cxx.

32 {
33 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
34 TGeoNode* node = GetNode();
35 TGeoVolume* volume = node->GetVolume();
36 TGeoBBox* shape = dynamic_cast<TGeoBBox*>(volume->GetShape());
37 Double_t origin[3] = {shape->GetOrigin()[0], shape->GetOrigin()[1],
38 shape->GetOrigin()[2]};
39 Double_t master[3] = {0, 0, 0};
40 nav->LocalToMaster(origin, master);
41 TVector3 pos = TVector3(master[0], master[1], master[2]);
42 return pos;
43}
TGeoNode * GetNode() const
Definition: vetoHit.cxx:57
None origin(sTree, it)

◆ GetY()

Double_t vetoHit::GetY ( ) const

Definition at line 49 of file vetoHit.cxx.

49 {
50 TVector3 pos = GetXYZ();
51 return pos.Y();
52}

◆ GetZ()

Double_t vetoHit::GetZ ( ) const

Definition at line 53 of file vetoHit.cxx.

53 {
54 TVector3 pos = GetXYZ();
55 return pos.Z();
56}

◆ isValid()

bool vetoHit::isValid ( ) const
inline

Definition at line 43 of file vetoHit.h.

43{ return flag; }
Bool_t flag
validity flag
Definition: vetoHit.h:50

◆ operator=()

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

◆ Print()

void vetoHit::Print ( Int_t  detID) const

Definition at line 96 of file vetoHit.cxx.

96 {
97 LOG(info) << "vetoHit: veto hit "
98 << " in detector " << fDetectorID;
99 LOG(info) << " ADC " << fdigi << " ns";
100}

◆ SetEloss()

void vetoHit::SetEloss ( Double_t  val)
inline

Modifier

Definition at line 32 of file vetoHit.h.

32{ fdigi = val; }

◆ setInvalid()

void vetoHit::setInvalid ( )
inline

Definition at line 41 of file vetoHit.h.

41{ flag = false; }

◆ setIsValid()

void vetoHit::setIsValid ( )
inline

Definition at line 42 of file vetoHit.h.

42{ flag = true; }

◆ SetTDC()

void vetoHit::SetTDC ( Double_t  val)
inline

Definition at line 33 of file vetoHit.h.

33{ ft = val; }

Member Data Documentation

◆ flag

Bool_t vetoHit::flag {true}
private

validity flag

Definition at line 50 of file vetoHit.h.

◆ ft

Double_t vetoHit::ft {-1.}
private

Definition at line 49 of file vetoHit.h.


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