FairRoot/PandaRoot
PndSttHit.cxx
Go to the documentation of this file.
1 
8 #include "PndSttHit.h"
9 
10 #include "PndDetectorList.h"
11 
12 #include <iostream>
13 #include "TMath.h"
14 
15 using namespace std;
16 
19  FairHit(), fTubeID(0), fPulse(0), fIsochrone(0), fIsochroneError(0), fDepCharge(0)
20 {
21  Clear();
22 }
23 
24 
25 PndSttHit::PndSttHit(Int_t detID, Int_t tubeID, Int_t mcindex, TVector3& pos, TVector3& dpos, Double_t p, Double_t isochrone, Double_t isochroneError, Double_t chDep) : FairHit(detID, pos, dpos, mcindex),
26  fTubeID(tubeID), fPulse(p), fIsochrone(isochrone), fIsochroneError(isochroneError), fDepCharge(chDep)
27 {
28  SetTimeStamp(p);
29 
30  SetLink(FairLink("STTPoint", mcindex));
31 
32 }
33 
36 {
37  fTubeID = 0;
38  fPulse = 0;
39  fIsochrone = 0.;
40  fIsochroneError = 0.;
41  fDepCharge = 0.;
42 
43 }
44 
45 
48 {
49 }
50 
51 
53 
54  // cout << "tuberadius/isochrone " << tuberadius << " " << fIsochrone << endl;
55 
56  Double_t distance = 2 * sqrt(tuberadius * tuberadius - fIsochrone * fIsochrone); // cm
57 // cout << "tuberadius/isochrone/distance " << tuberadius << " " << fIsochrone << " " << distance << endl;
58 
59  TVector3 momentum = track->GetParamFirst().GetMomentum();
60  //Double_t pt = momentum.Perp();
61  //Double_t pl = momentum.Z();
62 
63  Double_t coslam = momentum.Perp()/momentum.Mag();
64 
65  distance = distance / coslam;
66  // cout << "depcharge " << fDepCharge << endl;;
67  Double_t dedx = 0.;
68  if (distance != 0) dedx = fDepCharge/(1000000 * distance); // in arbitrary units
69 // cout << "cosla/distance2/dedx " << coslam << " " << distance/coslam << " " << dedx << endl;
70 
71  return dedx;
72 }
73 
74 
TVector3 pos
Double_t p
Definition: anasim.C:58
friend F32vec4 sqrt(const F32vec4 &a)
Definition: P4_F32vec4.h:29
void Clear()
Definition: PndSttHit.cxx:35
Double_t fIsochrone
Definition: PndSttHit.h:107
Double_t fIsochroneError
Definition: PndSttHit.h:109
Int_t fTubeID
Definition: PndSttHit.h:103
Double_t
PndMCTrack * track
Definition: anaLmdCluster.C:89
Double_t fDepCharge
Definition: PndSttHit.h:111
Double_t ComputedEdx(PndTrack *track, Double_t tuberadius)
Definition: PndSttHit.cxx:52
Double_t fPulse
Definition: PndSttHit.h:105
virtual ~PndSttHit()
Definition: PndSttHit.cxx:47
ClassImp(PndAnaContFact)
FairTrackParP GetParamFirst()
Definition: PndTrack.h:49