SND@LHC Software
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)
 
virtual ~vetoHit ()
 
Double_t GetX ()
 
Double_t GetY ()
 
Double_t GetZ ()
 
TVector3 GetXYZ ()
 
TGeoNode * GetNode ()
 
void SetEloss (Double_t val)
 
void SetTDC (Double_t val)
 
virtual void Print (Int_t detID) const
 
Float_t GetADC () const
 
Float_t GetTDC () const
 
Double_t GetEloss ()
 
void setInvalid ()
 
void setIsValid ()
 
bool isValid () const
 
- Public Member Functions inherited from ShipHit
 ShipHit ()
 
 ShipHit (Int_t detID, Float_t digi)
 
virtual ~ShipHit ()
 
Double_t GetDigi () const
 
Int_t GetDetectorID () const
 
void SetDigi (Float_t d)
 
void SetDetectorID (Int_t detID)
 
virtual void Print (const Option_t *opt="") const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Member Functions

 vetoHit (const vetoHit &point)
 
vetoHit operator= (const vetoHit &point)
 
 ClassDef (vetoHit, 1)
 

Private Attributes

Double_t ft
 
Float_t flag
 flag
 

Additional Inherited Members

- Protected Member Functions inherited from ShipHit
 ClassDef (ShipHit, 1)
 
- Protected Attributes inherited from ShipHit
Float_t fdigi
 digitized detector hit
 
Int_t fDetectorID
 Detector unique identifier.
 

Detailed Description

Definition at line 10 of file vetoHit.h.

Constructor & Destructor Documentation

◆ vetoHit() [1/3]

vetoHit::vetoHit ( )

Default constructor

Definition at line 19 of file vetoHit.cxx.

20 : ShipHit()
21{
22 flag = true;
23}
ShipHit()
Definition ShipHit.cxx:5
Float_t flag
flag
Definition vetoHit.h:50

◆ 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 25 of file vetoHit.cxx.

26 : ShipHit(detID,adc)
27{
28 ft = -1;
29 flag = true;
30}
Double_t ft
Definition vetoHit.h:46

◆ ~vetoHit()

vetoHit::~vetoHit ( )
virtual

Destructor

Definition at line 35 of file vetoHit.cxx.

35{ }

◆ vetoHit() [3/3]

vetoHit::vetoHit ( const vetoHit point)
private

Member Function Documentation

◆ ClassDef()

vetoHit::ClassDef ( vetoHit  ,
 
)
private

◆ GetADC()

Float_t vetoHit::GetADC ( ) const
inline

Definition at line 39 of file vetoHit.h.

39{return fdigi;}
Float_t fdigi
digitized detector hit
Definition ShipHit.h:57

◆ GetEloss()

Double_t vetoHit::GetEloss ( )
inline

Definition at line 41 of file vetoHit.h.

41{return fdigi;}

◆ GetNode()

TGeoNode * vetoHit::GetNode ( )

Definition at line 61 of file vetoHit.cxx.

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

◆ GetTDC()

Float_t vetoHit::GetTDC ( ) const
inline

Definition at line 40 of file vetoHit.h.

40{return ft;}

◆ GetX()

Double_t vetoHit::GetX ( )

Accessors

Definition at line 49 of file vetoHit.cxx.

50{ TVector3 pos = GetXYZ();
51 return pos.X();
52}
TVector3 GetXYZ()
Definition vetoHit.cxx:38

◆ GetXYZ()

TVector3 vetoHit::GetXYZ ( )

Definition at line 38 of file vetoHit.cxx.

39{
40 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
41 TGeoNode* node = GetNode();
42 TGeoBBox* shape = (TGeoBBox*)node->GetVolume()->GetShape();
43 Double_t origin[3] = {shape->GetOrigin()[0],shape->GetOrigin()[1],shape->GetOrigin()[2]};
44 Double_t master[3] = {0,0,0};
45 nav->LocalToMaster(origin,master);
46 TVector3 pos = TVector3(master[0],master[1],master[2]);
47 return pos;
48}
TGeoNode * GetNode()
Definition vetoHit.cxx:61
origin(sTree, it)

◆ GetY()

Double_t vetoHit::GetY ( )

Definition at line 53 of file vetoHit.cxx.

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

◆ GetZ()

Double_t vetoHit::GetZ ( )

Definition at line 57 of file vetoHit.cxx.

58{ TVector3 pos = GetXYZ();
59 return pos.Z();
60}

◆ isValid()

bool vetoHit::isValid ( ) const
inline

Definition at line 44 of file vetoHit.h.

44{return flag;}

◆ operator=()

vetoHit vetoHit::operator= ( const vetoHit point)
private

◆ Print()

void vetoHit::Print ( Int_t  detID) const
virtual

Output to screen

Definition at line 100 of file vetoHit.cxx.

101{
102 cout << "-I- vetoHit: veto hit " << " in detector " << fDetectorID << endl;
103 cout << " ADC " << fdigi << " ns" << endl;
104}

◆ SetEloss()

void vetoHit::SetEloss ( Double_t  val)
inline

Modifier

Definition at line 33 of file vetoHit.h.

◆ setInvalid()

void vetoHit::setInvalid ( )
inline

Definition at line 42 of file vetoHit.h.

42{flag = false;}

◆ setIsValid()

void vetoHit::setIsValid ( )
inline

Definition at line 43 of file vetoHit.h.

43{flag = true;}

◆ SetTDC()

void vetoHit::SetTDC ( Double_t  val)
inline

Definition at line 34 of file vetoHit.h.

34{ft=val;}

Member Data Documentation

◆ flag

Float_t vetoHit::flag
private

flag

Definition at line 50 of file vetoHit.h.

◆ ft

Double_t vetoHit::ft
private

Definition at line 46 of file vetoHit.h.


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