SND@LHC Software
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)
 
void StrawEndPoints (TVector3 &vbot, TVector3 &vtop)
 
virtual ~strawtubesHit ()
 
virtual void Print () const
 
Float_t GetTDC () const
 
void setInvalid ()
 
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

 strawtubesHit (const strawtubesHit &point)
 
strawtubesHit operator= (const strawtubesHit &point)
 
 ClassDef (strawtubesHit, 3)
 

Private Attributes

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 strawtubesHit.h.

Constructor & Destructor Documentation

◆ strawtubesHit() [1/4]

strawtubesHit::strawtubesHit ( )

Default constructor

Definition at line 20 of file strawtubesHit.cxx.

21 : ShipHit()
22{
23 flag = true;
24}
ShipHit()
Definition ShipHit.cxx:5
Float_t flag
flag

◆ 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 26 of file strawtubesHit.cxx.

27 : ShipHit(detID,tdc)
28{
29 flag = true;
30}

◆ strawtubesHit() [3/4]

strawtubesHit::strawtubesHit ( strawtubesPoint p,
Double_t  t0 
)

Definition at line 32 of file strawtubesHit.cxx.

33 : ShipHit()
34{
35 TVector3 start = TVector3();
36 TVector3 stop = TVector3();
37 fDetectorID = p->GetDetectorID();
38 strawtubes* module = dynamic_cast<strawtubes*> (FairRunSim::Instance()->GetListOfModules()->FindObject("Strawtubes") );
39 Double_t v_drift = module->StrawVdrift();
40 Double_t sigma_spatial = module->StrawSigmaSpatial();
41 module->StrawEndPoints(fDetectorID,start,stop);
42 Double_t t_drift = fabs( gRandom->Gaus( p->dist2Wire(), sigma_spatial ) )/v_drift;
43 fdigi = t0 + p->GetTime() + t_drift + ( stop[0]-p->GetX() )/ speedOfLight;
44 flag = true;
45}
Float_t fdigi
digitized detector hit
Definition ShipHit.h:57
Int_t fDetectorID
Detector unique identifier.
Definition ShipHit.h:58
Double_t speedOfLight
Definition muonHit.cxx:27

◆ ~strawtubesHit()

strawtubesHit::~strawtubesHit ( )
virtual

Destructor

Definition at line 101 of file strawtubesHit.cxx.

101{ }

◆ strawtubesHit() [4/4]

strawtubesHit::strawtubesHit ( const strawtubesHit point)
private

Copy constructor

Member Function Documentation

◆ ClassDef()

strawtubesHit::ClassDef ( strawtubesHit  ,
 
)
private

◆ GetTDC()

Float_t strawtubesHit::GetTDC ( ) const
inline

Definition at line 30 of file strawtubesHit.h.

30{return fdigi;}

◆ isValid()

bool strawtubesHit::isValid ( ) const
inline

Definition at line 32 of file strawtubesHit.h.

32{return flag;}

◆ operator=()

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

◆ Print()

void strawtubesHit::Print ( ) const
virtual

Output to screen

Definition at line 105 of file strawtubesHit.cxx.

106{
107 cout << "-I- strawtubesHit: strawtubes hit " << " in detector " << fDetectorID << endl;
108 cout << " TDC " << fdigi << " ns" << endl;
109}

◆ setInvalid()

void strawtubesHit::setInvalid ( )
inline

Definition at line 31 of file strawtubesHit.h.

31{flag = false;}

◆ StrawEndPoints()

void strawtubesHit::StrawEndPoints ( TVector3 &  vbot,
TVector3 &  vtop 
)

Definition at line 46 of file strawtubesHit.cxx.

47{
48 Int_t statnb = fDetectorID/10000000;
49 Int_t vnb = (fDetectorID - statnb*10000000)/1000000;
50 Int_t pnb = (fDetectorID- statnb*10000000 - vnb*1000000)/100000;
51 Int_t lnb = (fDetectorID - statnb*10000000 - vnb*1000000 - pnb*100000)/10000;
52 TString stat = "Tr";stat+=+statnb;stat+="_";stat+=statnb;
53 if (statnb==5){stat="Veto_5";}
54 TString view;
55 switch (vnb) {
56 case 0:
57 view = "_x1";
58 if (statnb==5){view = "_x";}
59 break;
60 case 1:
61 view = "_u";
62 break;
63 case 2:
64 view = "_v";
65 break;
66 case 3:
67 view = "_x2";
68 break;
69 default:
70 view = "_x1";}
71 TGeoNavigator* nav = gGeoManager->GetCurrentNavigator();
72 TString prefix = "Tr";
73 if (statnb==5){prefix="Veto";}
74 else{prefix+=statnb;}
75 prefix+=view;prefix+="_plane_";prefix+=pnb;prefix+="_";
76 TString plane = prefix;plane+=statnb;plane+=vnb;plane+=+pnb;plane+="00000";
77 TString layer = prefix+"layer_";layer+=lnb;layer+="_";layer+=statnb;layer+=vnb;layer+=pnb;layer+=lnb;layer+="0000";
78 TString wire = "wire_";
79 if (statnb==5){wire+="veto_";}
80 wire+=(fDetectorID+1000);
81 if (statnb<3){wire = "wire_12_";wire+=(fDetectorID+1000);}
82 TString path = "/";path+=stat;path+="/";path+=plane;path+="/";path+=layer;path+="/";path+=wire;
83 Bool_t rc = nav->cd(path);
84 if (not rc){
85 cout << "strawtubes::StrawDecode, TgeoNavigator failed "<<path<<endl;
86 return;
87 }
88 TGeoNode* W = nav->GetCurrentNode();
89 TGeoTube* S = dynamic_cast<TGeoTube*>(W->GetVolume()->GetShape());
90 Double_t top[3] = {0,0,S->GetDZ()};
91 Double_t bot[3] = {0,0,-S->GetDZ()};
92 Double_t Gtop[3],Gbot[3];
93 nav->LocalToMaster(top, Gtop); nav->LocalToMaster(bot, Gbot);
94 vtop.SetXYZ(Gtop[0],Gtop[1],Gtop[2]);
95 vbot.SetXYZ(Gbot[0],Gbot[1],Gbot[2]);
96}
dict S
Definition MufiCTR.py:12

Member Data Documentation

◆ flag

Float_t strawtubesHit::flag
private

flag

Definition at line 39 of file strawtubesHit.h.


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