PandaRoot
PndSdsHit Class Reference

#include <PndSdsHit.h>

Inheritance diagram for PndSdsHit:
PndSdsMergedHit

Public Member Functions

 PndSdsHit ()
 
 PndSdsHit (Int_t detID, Int_t sensorID, TVector3 &pos, TVector3 &dpos, Int_t clindex, Double_t charge, Int_t NDigiHits, Int_t mcindex)
 
virtual ~PndSdsHit ()
 
void SetSensorID (Int_t sensorID)
 
void SetCharge (Double_t charge)
 
void SetNDigiHits (Int_t pixel)
 
void SetClusterIndex (Int_t datasource, Int_t id, Int_t fileId=-1, Int_t evtId=-1)
 
void SetBotIndex (Int_t id)
 
void SetCov (TMatrixD cov)
 
Int_t GetSensorID () const
 
Double_t GetCharge () const
 
Int_t GetNDigiHits () const
 
TVector3 GetPosition () const
 
Int_t GetClusterIndex () const
 
Int_t GetTopIndex () const
 
Int_t GetBotIndex () const
 
Double_t GetEloss () const
 
TMatrixD GetCov () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
virtual void Print (const Option_t *opt=nullptr) const
 

Friends

class boost::serialization::access
 
std::ostream & operator<< (std::ostream &out, const PndSdsHit &hit)
 

Detailed Description

PndSdsHit.h

Author
T.Stockmanns t.sto.nosp@m.ckma.nosp@m.nns@f.nosp@m.z-ju.nosp@m.elich.nosp@m..de

A hit in a silicon sensor. In addition to the base class FairHit, it holds the number of digis & charge entry. There is also a bottom index for double sided strip sensors. All coordinates are in the LAB frame.

Definition at line 28 of file PndSdsHit.h.

Constructor & Destructor Documentation

◆ PndSdsHit() [1/2]

PndSdsHit::PndSdsHit ( )

Default constructor (not for use)

◆ PndSdsHit() [2/2]

PndSdsHit::PndSdsHit ( Int_t  detID,
Int_t  sensorID,
TVector3 &  pos,
TVector3 &  dpos,
Int_t  clindex,
Double_t  charge,
Int_t  NDigiHits,
Int_t  mcindex 
)

Standard constructor with all paramneters

Parameters
detIDDetector ID
sensorIDSensor ID
posPosition vector [cm]
dposPosition error vector [cm]
indexArray index of ClusterCand
chargeCharge measured in hit
NDigiHitsNumber of pixels fired for this event

◆ ~PndSdsHit()

virtual PndSdsHit::~PndSdsHit ( )
virtual

Destructor

Member Function Documentation

◆ GetBotIndex()

Int_t PndSdsHit::GetBotIndex ( ) const
inline

Definition at line 92 of file PndSdsHit.h.

92 { return fBotIndex; }

◆ GetCharge()

Double_t PndSdsHit::GetCharge ( ) const
inline

Definition at line 87 of file PndSdsHit.h.

87 { return fCharge; }

◆ GetClusterIndex()

Int_t PndSdsHit::GetClusterIndex ( ) const
inline

Definition at line 90 of file PndSdsHit.h.

Referenced by GetTopIndex().

90 { return fClusterIndex; }

◆ GetCov()

TMatrixD PndSdsHit::GetCov ( ) const
inline

Definition at line 94 of file PndSdsHit.h.

94 { return fCov; }

◆ GetEloss()

Double_t PndSdsHit::GetEloss ( ) const
inline

Definition at line 93 of file PndSdsHit.h.

93 { return (fCharge * 3.61e-9); } // 3.6 eV/Electron in Silicon

◆ GetNDigiHits()

Int_t PndSdsHit::GetNDigiHits ( ) const
inline

Definition at line 88 of file PndSdsHit.h.

88 { return fNDigiHits; }

◆ GetPosition()

TVector3 PndSdsHit::GetPosition ( ) const
inline

Definition at line 89 of file PndSdsHit.h.

89 { return TVector3(fX, fY, fZ); }

◆ GetSensorID()

Int_t PndSdsHit::GetSensorID ( ) const
inline

Definition at line 86 of file PndSdsHit.h.

86 { return fSensorID; }

◆ GetTopIndex()

Int_t PndSdsHit::GetTopIndex ( ) const
inline

Definition at line 91 of file PndSdsHit.h.

References GetClusterIndex().

91 { return GetClusterIndex(); }
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:90

◆ Print()

virtual void PndSdsHit::Print ( const Option_t *  opt = nullptr) const
virtual

Screen output

Referenced by serialize().

◆ serialize()

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

overloaded accessors

Definition at line 111 of file PndSdsHit.h.

References Print().

112  {
113  ar &boost::serialization::base_object<FairHit>(*this);
114  ar &fSensorID;
115  ar &fCharge;
116  ar &fNDigiHits;
117  ar &fClusterIndex;
118  ar &fBotIndex;
119  // ar & fCov;
120  }

◆ SetBotIndex()

void PndSdsHit::SetBotIndex ( Int_t  id)
inline

Definition at line 82 of file PndSdsHit.h.

References SetCov().

82 { fBotIndex = id; }

◆ SetCharge()

void PndSdsHit::SetCharge ( Double_t  charge)
inline

Definition at line 75 of file PndSdsHit.h.

75 { fCharge = charge; }

◆ SetClusterIndex()

void PndSdsHit::SetClusterIndex ( Int_t  datasource,
Int_t  id,
Int_t  fileId = -1,
Int_t  evtId = -1 
)
inline

Definition at line 77 of file PndSdsHit.h.

78  {
79  fClusterIndex = id;
80  SetLink(FairLink(fileId, evtId, datasource, id));
81  }

◆ SetCov()

void PndSdsHit::SetCov ( TMatrixD  cov)

Referenced by SetBotIndex().

◆ SetNDigiHits()

void PndSdsHit::SetNDigiHits ( Int_t  pixel)
inline

Definition at line 76 of file PndSdsHit.h.

76 { fNDigiHits = pixel; }

◆ SetSensorID()

void PndSdsHit::SetSensorID ( Int_t  sensorID)
inline

Accessors

Definition at line 74 of file PndSdsHit.h.

74 { fSensorID = sensorID; }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 129 of file PndSdsHit.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const PndSdsHit hit 
)
friend

Definition at line 29 of file PndSdsHit.h.

30  {
31  out << "PndSdsHit in " << hit.GetSensorID() << " at" << std::endl;
32  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
33  << " with " << hit.GetCharge() << " e"
34  << " at Time: " << hit.GetTimeStamp() << " +/- " << hit.GetTimeStampError() << " , Cluster No. " << hit.GetClusterIndex();
35  if (hit.GetBotIndex() > -1)
36  out << " and bottom " << hit.GetBotIndex();
37  if (hit.GetRefIndex() > -1)
38  out << ", mc point id = " << hit.GetRefIndex();
39  else
40  out << ", noise hit without mc poit";
41  out << std::endl;
42 
43  out << "hit.GetClusterIndex() " << hit.GetClusterIndex() << std::endl;
44  out << "hit.GetBotIndex() " << hit.GetBotIndex() << std::endl;
45  out << "hit.GetRefIndex() " << hit.GetRefIndex() << std::endl;
46  out << "hit.GetNDigiHits() " << hit.GetNDigiHits() << std::endl;
47  out << "hit.GetCharge() " << hit.GetCharge() << "(" << hit.GetEloss() << " GeV)" << std::endl;
48  out << "hit.GetSensorID() " << hit.GetSensorID() << std::endl;
49  out << "Error values in FairHit part: (dx,dy,dz) = (" << hit.GetDx() << "," << hit.GetDy() << "," << hit.GetDz() << ")" << std::endl;
50  return out;
51  }
Int_t GetSensorID() const
Definition: PndSdsHit.h:86
Int_t GetNDigiHits() const
Definition: PndSdsHit.h:88
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:90
Int_t GetBotIndex() const
Definition: PndSdsHit.h:92
Double_t GetEloss() const
Definition: PndSdsHit.h:93
Double_t GetCharge() const
Definition: PndSdsHit.h:87

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