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 33 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 97 of file PndSdsHit.h.

97 { return fBotIndex; }

◆ GetCharge()

Double_t PndSdsHit::GetCharge ( ) const
inline

Definition at line 92 of file PndSdsHit.h.

92 { return fCharge; }

◆ GetClusterIndex()

Int_t PndSdsHit::GetClusterIndex ( ) const
inline

Definition at line 95 of file PndSdsHit.h.

Referenced by GetTopIndex().

95 { return fClusterIndex; }

◆ GetCov()

TMatrixD PndSdsHit::GetCov ( ) const
inline

Definition at line 99 of file PndSdsHit.h.

99 { return fCov; }

◆ GetEloss()

Double_t PndSdsHit::GetEloss ( ) const
inline

Definition at line 98 of file PndSdsHit.h.

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

◆ GetNDigiHits()

Int_t PndSdsHit::GetNDigiHits ( ) const
inline

Definition at line 93 of file PndSdsHit.h.

93 { return fNDigiHits; }

◆ GetPosition()

TVector3 PndSdsHit::GetPosition ( ) const
inline

Definition at line 94 of file PndSdsHit.h.

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

◆ GetSensorID()

Int_t PndSdsHit::GetSensorID ( ) const
inline

Definition at line 91 of file PndSdsHit.h.

91 { return fSensorID; }

◆ GetTopIndex()

Int_t PndSdsHit::GetTopIndex ( ) const
inline

Definition at line 96 of file PndSdsHit.h.

References GetClusterIndex().

96 { return GetClusterIndex(); }
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:95

◆ 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 116 of file PndSdsHit.h.

References Print().

117  {
118  ar &boost::serialization::base_object<FairHit>(*this);
119  ar &fSensorID;
120  ar &fCharge;
121  ar &fNDigiHits;
122  ar &fClusterIndex;
123  ar &fBotIndex;
124  // ar & fCov;
125  }

◆ SetBotIndex()

void PndSdsHit::SetBotIndex ( Int_t  id)
inline

Definition at line 87 of file PndSdsHit.h.

References SetCov().

87 { fBotIndex = id; }

◆ SetCharge()

void PndSdsHit::SetCharge ( Double_t  charge)
inline

Definition at line 80 of file PndSdsHit.h.

80 { fCharge = charge; }

◆ SetClusterIndex()

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

Definition at line 82 of file PndSdsHit.h.

83  {
84  fClusterIndex = id;
85  SetLink(FairLink(fileId, evtId, datasource, id));
86  }

◆ SetCov()

void PndSdsHit::SetCov ( TMatrixD  cov)

Referenced by SetBotIndex().

◆ SetNDigiHits()

void PndSdsHit::SetNDigiHits ( Int_t  pixel)
inline

Definition at line 81 of file PndSdsHit.h.

81 { fNDigiHits = pixel; }

◆ SetSensorID()

void PndSdsHit::SetSensorID ( Int_t  sensorID)
inline

Accessors

Definition at line 79 of file PndSdsHit.h.

79 { fSensorID = sensorID; }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 134 of file PndSdsHit.h.

◆ operator<<

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

Definition at line 34 of file PndSdsHit.h.

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

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