SND@LHC Software
Loading...
Searching...
No Matches
SndlhcHit Class Reference

#include <SndlhcHit.h>

Inheritance diagram for SndlhcHit:
Collaboration diagram for SndlhcHit:

Public Member Functions

 SndlhcHit ()
 
 SndlhcHit (Int_t detID, Int_t nSiPMs=1, Int_t nSides=0)
 
virtual ~SndlhcHit ()
 
Int_t GetDetectorID () const
 
Float_t GetSignal (Int_t nChannel=0)
 
Float_t GetTime (Int_t nChannel=0)
 
Int_t GetnSiPMs () const
 
Int_t GetnSides () const
 
void SetDigi (Float_t s, Float_t t, Int_t i=0)
 
void SetDetectorID (Int_t detID)
 
void SetDaqID (Int_t i, Int_t k, Int_t board_id, Int_t tofpet_id, Int_t tofpet_channel)
 
Int_t GetBoardID (Int_t i)
 
Int_t GetTofpetID (Int_t i)
 
Int_t Getchannel (Int_t i)
 
Int_t GetRawHitIndex (Int_t i=0)
 
virtual void Print (const Option_t *opt="") const
 
virtual void GetPosition (TVector3 L, TVector3 R) const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Protected Member Functions

 ClassDef (SndlhcHit, 2)
 encodes rawhitindex*100000+(board_id * 1000) + (tofpet_id * 100) + tofpet_channel
 

Protected Attributes

Int_t fDetectorID
 Detector unique identifier.
 
Int_t nSiPMs
 
Int_t nSides
 number of SiPMs per side
 
Float_t signals [16]
 number of sides
 
Float_t times [16]
 SiPM signal.
 
Int_t fDaqID [16]
 SiPM time.
 

Friends

class boost::serialization::access
 

Detailed Description

copied from FairRoot FairHit and simplified

Definition at line 19 of file SndlhcHit.h.

Constructor & Destructor Documentation

◆ SndlhcHit() [1/2]

SndlhcHit::SndlhcHit ( )

Default constructor

Definition at line 5 of file SndlhcHit.cxx.

6 : TObject(),
8{
9}
Int_t fDetectorID
Detector unique identifier.
Definition SndlhcHit.h:72

◆ SndlhcHit() [2/2]

SndlhcHit::SndlhcHit ( Int_t  detID,
Int_t  nSiPMs = 1,
Int_t  nSides = 0 
)

Constructor with detector id, number of SiPMs per side, number of sides

Definition at line 15 of file SndlhcHit.cxx.

16 :TObject(),
17 fDetectorID(detID),
18 nSiPMs(nP),
19 nSides(nS)
20 {
21 for (unsigned int j=0; j<16; ++j){
22 signals[j] = -1;
23 times[j] =-1;
24 fDaqID[j] =-1;
25 }
26 }
Int_t nSiPMs
Definition SndlhcHit.h:73
Float_t times[16]
SiPM signal.
Definition SndlhcHit.h:76
Int_t fDaqID[16]
SiPM time.
Definition SndlhcHit.h:77
Int_t nSides
number of SiPMs per side
Definition SndlhcHit.h:74
Float_t signals[16]
number of sides
Definition SndlhcHit.h:75

◆ ~SndlhcHit()

SndlhcHit::~SndlhcHit ( )
virtual

Destructor

Definition at line 40 of file SndlhcHit.cxx.

40{ }

Member Function Documentation

◆ ClassDef()

SndlhcHit::ClassDef ( SndlhcHit  ,
 
)
protected

encodes rawhitindex*100000+(board_id * 1000) + (tofpet_id * 100) + tofpet_channel

◆ GetBoardID()

Int_t SndlhcHit::GetBoardID ( Int_t  i)
inline

Definition at line 45 of file SndlhcHit.h.

45{ return int((fDaqID[i]%100000)/1000);}

◆ Getchannel()

Int_t SndlhcHit::Getchannel ( Int_t  i)
inline

Definition at line 47 of file SndlhcHit.h.

47{ return fDaqID[i]%100;}
int i
Definition ShipAna.py:86

◆ GetDetectorID()

Int_t SndlhcHit::GetDetectorID ( ) const
inline

Accessors

Definition at line 36 of file SndlhcHit.h.

36{ return fDetectorID; };

◆ GetnSides()

Int_t SndlhcHit::GetnSides ( ) const
inline

Definition at line 40 of file SndlhcHit.h.

40{ return nSides; };

◆ GetnSiPMs()

Int_t SndlhcHit::GetnSiPMs ( ) const
inline

Definition at line 39 of file SndlhcHit.h.

39{ return nSiPMs; };

◆ GetPosition()

virtual void SndlhcHit::GetPosition ( TVector3  L,
TVector3  R 
) const
inlinevirtual

Definition at line 55 of file SndlhcHit.h.

55{;}

◆ GetRawHitIndex()

Int_t SndlhcHit::GetRawHitIndex ( Int_t  i = 0)
inline

Definition at line 48 of file SndlhcHit.h.

48{ return int(fDaqID[i]/100000);}

◆ GetSignal()

Float_t SndlhcHit::GetSignal ( Int_t  nChannel = 0)

Definition at line 28 of file SndlhcHit.cxx.

29{
30 return signals[nChannel];
31}

◆ GetTime()

Float_t SndlhcHit::GetTime ( Int_t  nChannel = 0)

Definition at line 32 of file SndlhcHit.cxx.

33{
34 return times[nChannel];
35}

◆ GetTofpetID()

Int_t SndlhcHit::GetTofpetID ( Int_t  i)
inline

Definition at line 46 of file SndlhcHit.h.

46{ return int((fDaqID[i]%1000)/100);}

◆ Print()

virtual void SndlhcHit::Print ( const Option_t *  opt = "") const
inlinevirtual

Definition at line 53 of file SndlhcHit.h.

53{;}

◆ serialize()

template<class Archive >
void SndlhcHit::serialize ( Archive &  ar,
const unsigned int  version 
)
inline

Definition at line 60 of file SndlhcHit.h.

61 {
62 ar& boost::serialization::base_object<TObject>(*this);
63 ar& fDetectorID;
64 ar& nSiPMs;
65 ar& nSides;
66 }

◆ SetDaqID()

void SndlhcHit::SetDaqID ( Int_t  i,
Int_t  k,
Int_t  board_id,
Int_t  tofpet_id,
Int_t  tofpet_channel 
)
inline

Definition at line 44 of file SndlhcHit.h.

44{ fDaqID[i] = k*100000 + board_id * 1000 + tofpet_id * 100 + tofpet_channel; }

◆ SetDetectorID()

void SndlhcHit::SetDetectorID ( Int_t  detID)
inline

Definition at line 43 of file SndlhcHit.h.

43{ fDetectorID = detID; }

◆ SetDigi()

void SndlhcHit::SetDigi ( Float_t  s,
Float_t  t,
Int_t  i = 0 
)
inline

Modifiers

Definition at line 42 of file SndlhcHit.h.

42{ signals[i]=trunc(100*s)/100;times[i]=trunc(1000*t)/1000.; }

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 70 of file SndlhcHit.h.

Member Data Documentation

◆ fDaqID

Int_t SndlhcHit::fDaqID[16]
protected

SiPM time.

Definition at line 77 of file SndlhcHit.h.

◆ fDetectorID

Int_t SndlhcHit::fDetectorID
protected

Detector unique identifier.

Definition at line 72 of file SndlhcHit.h.

◆ nSides

Int_t SndlhcHit::nSides
protected

number of SiPMs per side

Definition at line 74 of file SndlhcHit.h.

◆ nSiPMs

Int_t SndlhcHit::nSiPMs
protected

Definition at line 73 of file SndlhcHit.h.

◆ signals

Float_t SndlhcHit::signals[16]
protected

number of sides

Definition at line 75 of file SndlhcHit.h.

◆ times

Float_t SndlhcHit::times[16]
protected

SiPM signal.

Definition at line 76 of file SndlhcHit.h.


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