PandaRoot
PndHypHit.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- MvdHit header file -----
3 // ----- Created by T.Stockmanns -----
4 // ----- modified for hyp purpose by A.Sanchez
5 // -------------------------------------------------------------------------
6 
19 #ifndef PNDHYPHIT_H
20 #define PNDHYPHIT_H
21 
22 #include "TVector3.h"
23 #include "TString.h"
24 #include "FairHit.h"
25 
26 #include <stdio.h>
27 #include <iostream>
28 #include "PndDetectorList.h"
29 
30 class PndHypHit : public FairHit {
31  friend std::ostream &operator<<(std::ostream &out, const PndHypHit &hit)
32  {
33 
34  out << "Hyp hit in " << hit.GetDetName() << " at" << std::endl;
35  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
36  << " with " << hit.GetCharge() << " e"
37  << ", Cluster No. " << hit.GetRefIndex();
38  if (hit.GetBotIndex() > -1)
39  out << " " << hit.GetBotIndex();
40  out << std::endl;
41 
42  return out;
43  }
44 
45  public:
47  PndHypHit();
48 
60  // PndHypHit(Int_t trackID, Int_t detID, TString detName,
61  // TVector3& pos, TVector3& dpos, Int_t index, Double_t charge, Int_t NPixelHits);
62 
63  PndHypHit(Int_t detID, TString detName, TVector3 &pos, TVector3 &dpos, Int_t index, Double_t charge, Int_t NDigiHits);
64 
65  // PndHypHit(PndHypHit& c);
67  virtual ~PndHypHit();
68 
71  // void SetTrackID(Int_t id){fTrackID = id;};
72  // new version const added
73  void SetDetName(TString name) { fDetName = name; };
74  void SetCharge(Double_t charge) { fCharge = charge; };
75  void SetNDigiHits(Int_t pixel) { fNDigiHits = pixel; };
76  void SetBotIndex(Int_t id) { fBotIndex = id; }
77 
78  TString GetDetName() const { return fDetName; }
79  // Int_t GetTrackID(){return fTrackID;};
80  Double_t GetCharge() const { return fCharge; };
81  Int_t GetNDigiHits() const { return fNDigiHits; }
82  TVector3 GetPosition() const { return TVector3(fX, fY, fZ); }
83  Int_t GetBotIndex() const { return fBotIndex; }
84  Double_t GetEloss() const { return (fCharge * 3.61e-9); } // 3.6 eV/Electron in Silicon
85 
87  virtual void Print(const Option_t *opt = nullptr) const;
88  // new version
89 
90  private:
91  // Double_t GetD(Int_t i);
92 
93  TString fDetName; // Detector name
94  // Int_t fTrackID;
95  Double_t fCharge;
96  Int_t fNDigiHits;
97  Int_t fBotIndex;
98 
99  ClassDef(PndHypHit, 7);
100 };
101 
102 #endif
Double_t GetCharge() const
Definition: PndHypHit.h:80
virtual ~PndHypHit()
void SetNDigiHits(Int_t pixel)
Definition: PndHypHit.h:75
TString GetDetName() const
Definition: PndHypHit.h:78
void SetBotIndex(Int_t id)
Definition: PndHypHit.h:76
friend std::ostream & operator<<(std::ostream &out, const PndHypHit &hit)
Definition: PndHypHit.h:31
void SetCharge(Double_t charge)
Definition: PndHypHit.h:74
TVector3 GetPosition() const
Definition: PndHypHit.h:82
Double_t GetEloss() const
Definition: PndHypHit.h:84
Int_t GetNDigiHits() const
Definition: PndHypHit.h:81
virtual void Print(const Option_t *opt=nullptr) const
void SetDetName(TString name)
Definition: PndHypHit.h:73
Int_t GetBotIndex() const
Definition: PndHypHit.h:83