FairRoot/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 
23 #include "TVector3.h"
24 #include "TString.h"
25 #include "FairHit.h"
26 
27 #include <stdio.h>
28 #include <iostream>
29 #include "PndDetectorList.h"
30 
31 
32 class PndHypHit : public FairHit
33 {
35 
36  out << "Hyp hit in " << hit.GetDetName() << " at" << std::endl;
37  out << "(" << hit.GetX() << ", " << hit.GetY() << ", " << hit.GetZ() << ") cm "
38  << " with " << hit.GetCharge() << " e" << ", Cluster No. " << hit.GetRefIndex();
39  if (hit.GetBotIndex() > -1)
40  out << " " << hit.GetBotIndex();
41  out << std::endl;
42 
43  return out;
44  }
45 
46  public:
47 
49  PndHypHit();
50 
51 
63  //PndHypHit(Int_t trackID, Int_t detID, TString detName,
64  // TVector3& pos, TVector3& dpos, Int_t index, Double_t charge, Int_t NPixelHits);
65 
66  PndHypHit( Int_t detID, TString detName,
67  TVector3& pos, TVector3& dpos, Int_t index, Double_t charge, Int_t NDigiHits);
68 
69  //PndHypHit(PndHypHit& c);
71  virtual ~PndHypHit();
72 
73 
76  //void SetTrackID(Int_t id){fTrackID = id;};
77  //new version const added
79  void SetCharge(Double_t charge) {fCharge = charge;};
80  void SetNDigiHits(Int_t pixel) {fNDigiHits = pixel;};
81  void SetBotIndex(Int_t id) { fBotIndex = id;}
82 
83  TString GetDetName()const { return fDetName; }
84  //Int_t GetTrackID(){return fTrackID;};
85  Double_t GetCharge()const{return fCharge;};
86  Int_t GetNDigiHits() const { return fNDigiHits; }
87  TVector3 GetPosition() const { return TVector3(fX, fY, fZ); }
88  Int_t GetBotIndex() const { return fBotIndex;}
89  Double_t GetEloss() const { return (fCharge * 3.61e-9);} // 3.6 eV/Electron in Silicon
90 
91 
92 
93 
95  virtual void Print(const Option_t* opt = 0) const;
96  //new version
97 
98 
99  private:
100 
101  //Double_t GetD(Int_t i);
102 
103  TString fDetName; // Detector name
104  //Int_t fTrackID;
106  Int_t fNDigiHits;
107  Int_t fBotIndex;
108 
109  ClassDef(PndHypHit,7);
110 
111 };
112 
113 
114 
115 
116 #endif
TVector3 pos
void SetNDigiHits(Int_t pixel)
Definition: PndHypHit.h:80
TVector3 GetPosition() const
Definition: PndHypHit.h:87
Double_t fX
Definition: PndCaloDraw.cxx:34
ClassDef(PndHypHit, 7)
bottom side of strip clusters
void SetBotIndex(Int_t id)
Definition: PndHypHit.h:81
friend std::ostream & operator<<(std::ostream &out, const PndHypHit &hit)
Definition: PndHypHit.h:34
Int_t GetNDigiHits() const
Definition: PndHypHit.h:86
void SetCharge(Double_t charge)
Definition: PndHypHit.h:79
Double_t fZ
Definition: PndCaloDraw.cxx:34
TString fDetName
Definition: PndHypHit.h:103
virtual void Print(const Option_t *opt=0) const
Definition: PndHypHit.cxx:48
Double_t GetEloss() const
Definition: PndHypHit.h:89
Double_t fCharge
Definition: PndHypHit.h:105
TString GetDetName() const
Definition: PndHypHit.h:83
Int_t fNDigiHits
Definition: PndHypHit.h:106
Double_t
Int_t GetBotIndex() const
Definition: PndHypHit.h:88
Int_t fBotIndex
Definition: PndHypHit.h:107
virtual ~PndHypHit()
Definition: PndHypHit.cxx:42
TFile * out
Definition: reco_muo.C:20
TString name
int hit(Int_t nEvents=0, TString inFile="sim.root", TString parFile="par.root", TString inDigi="digi.root", TString outFile="hit.root", Int_t timeBased=0)
Definition: hit.C:1
Double_t fY
Definition: PndCaloDraw.cxx:34
void SetDetName(TString name)
Definition: PndHypHit.h:78
Double_t GetCharge() const
Definition: PndHypHit.h:85