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 45 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 109 of file PndSdsHit.h.

109 { return fBotIndex; }

◆ GetCharge()

Double_t PndSdsHit::GetCharge ( ) const
inline

Definition at line 104 of file PndSdsHit.h.

104 { return fCharge; }

◆ GetClusterIndex()

Int_t PndSdsHit::GetClusterIndex ( ) const
inline

Definition at line 107 of file PndSdsHit.h.

Referenced by GetTopIndex().

107 { return fClusterIndex; }

◆ GetCov()

TMatrixD PndSdsHit::GetCov ( ) const
inline

Definition at line 111 of file PndSdsHit.h.

111 { return fCov; }

◆ GetEloss()

Double_t PndSdsHit::GetEloss ( ) const
inline

Definition at line 110 of file PndSdsHit.h.

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

◆ GetNDigiHits()

Int_t PndSdsHit::GetNDigiHits ( ) const
inline

Definition at line 105 of file PndSdsHit.h.

105 { return fNDigiHits; }

◆ GetPosition()

TVector3 PndSdsHit::GetPosition ( ) const
inline

Definition at line 106 of file PndSdsHit.h.

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

◆ GetSensorID()

Int_t PndSdsHit::GetSensorID ( ) const
inline

Definition at line 103 of file PndSdsHit.h.

103 { return fSensorID; }

◆ GetTopIndex()

Int_t PndSdsHit::GetTopIndex ( ) const
inline

Definition at line 108 of file PndSdsHit.h.

References GetClusterIndex().

108 { return GetClusterIndex(); }
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:107

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

References Print().

129  {
130  ar &boost::serialization::base_object<FairHit>(*this);
131  ar &fSensorID;
132  ar &fCharge;
133  ar &fNDigiHits;
134  ar &fClusterIndex;
135  ar &fBotIndex;
136  // ar & fCov;
137  }

◆ SetBotIndex()

void PndSdsHit::SetBotIndex ( Int_t  id)
inline

Definition at line 99 of file PndSdsHit.h.

References SetCov().

99 { fBotIndex = id; }

◆ SetCharge()

void PndSdsHit::SetCharge ( Double_t  charge)
inline

Definition at line 92 of file PndSdsHit.h.

92 { fCharge = charge; }

◆ SetClusterIndex()

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

Definition at line 94 of file PndSdsHit.h.

95  {
96  fClusterIndex = id;
97  SetLink(FairLink(fileId, evtId, datasource, id));
98  }

◆ SetCov()

void PndSdsHit::SetCov ( TMatrixD  cov)

Referenced by SetBotIndex().

◆ SetNDigiHits()

void PndSdsHit::SetNDigiHits ( Int_t  pixel)
inline

Definition at line 93 of file PndSdsHit.h.

93 { fNDigiHits = pixel; }

◆ SetSensorID()

void PndSdsHit::SetSensorID ( Int_t  sensorID)
inline

Accessors

Definition at line 91 of file PndSdsHit.h.

91 { fSensorID = sensorID; }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 146 of file PndSdsHit.h.

◆ operator<<

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

Definition at line 46 of file PndSdsHit.h.

47  {
48  out << "PndSdsHit in " << hit.GetSensorID() << " at" << std::endl;
49  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
50  << " with " << hit.GetCharge() << " e"
51  << " at Time: " << hit.GetTimeStamp() << " +/- " << hit.GetTimeStampError() << " , Cluster No. " << hit.GetClusterIndex();
52  if (hit.GetBotIndex() > -1)
53  out << " and bottom " << hit.GetBotIndex();
54  if (hit.GetRefIndex() > -1)
55  out << ", mc point id = " << hit.GetRefIndex();
56  else
57  out << ", noise hit without mc poit";
58  out << std::endl;
59 
60  out << "hit.GetClusterIndex() " << hit.GetClusterIndex() << std::endl;
61  out << "hit.GetBotIndex() " << hit.GetBotIndex() << std::endl;
62  out << "hit.GetRefIndex() " << hit.GetRefIndex() << std::endl;
63  out << "hit.GetNDigiHits() " << hit.GetNDigiHits() << std::endl;
64  out << "hit.GetCharge() " << hit.GetCharge() << "(" << hit.GetEloss() << " GeV)" << std::endl;
65  out << "hit.GetSensorID() " << hit.GetSensorID() << std::endl;
66  out << "Error values in FairHit part: (dx,dy,dz) = (" << hit.GetDx() << "," << hit.GetDy() << "," << hit.GetDz() << ")" << std::endl;
67  return out;
68  }
Int_t GetSensorID() const
Definition: PndSdsHit.h:103
Int_t GetNDigiHits() const
Definition: PndSdsHit.h:105
Int_t GetClusterIndex() const
Definition: PndSdsHit.h:107
Int_t GetBotIndex() const
Definition: PndSdsHit.h:109
Double_t GetEloss() const
Definition: PndSdsHit.h:110
Double_t GetCharge() const
Definition: PndSdsHit.h:104

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