1 |
#ifndef PAMVMC_TRK_HIT_H |
2 |
#define PAMVMC_TRK_HIT_H |
3 |
#include <cmath> |
4 |
#include <iostream> |
5 |
|
6 |
#include <TObject.h> |
7 |
#include <TVirtualMC.h> |
8 |
#include <TParticle.h> |
9 |
|
10 |
#include "PamVMCGeoID.h" |
11 |
#include "PamVMCDetectorHit.h" |
12 |
|
13 |
using std::sqrt; |
14 |
using std::cout; |
15 |
using std::endl; |
16 |
|
17 |
class pTrkHitData: public TObject { |
18 |
|
19 |
public: |
20 |
Int_t fNXMULT; |
21 |
Int_t fNYMULT; //Particle PDG |
22 |
Float_t fXAVESPE; //PATH length in specific SD in (cm) |
23 |
Float_t fYAVESPE; |
24 |
Float_t fZAVESPE; |
25 |
|
26 |
pTrkHitData(): fNXMULT(0), fNYMULT(0), |
27 |
fXAVESPE(0.), fYAVESPE(0.), fZAVESPE(0.) { }; |
28 |
|
29 |
|
30 |
// Kept for back-compatibility |
31 |
void Clean() { |
32 |
fNXMULT = fNYMULT = 0; |
33 |
fXAVESPE = fYAVESPE = fZAVESPE = 0.; |
34 |
} |
35 |
|
36 |
void Clear( Option_t * = "") { Clean(); } |
37 |
|
38 |
void Print(Option_t * ="" ) const |
39 |
{ cout << "pTRKHitData: "<<endl |
40 |
<<"NXMULT: "<<fNXMULT<<endl |
41 |
<<"NYMULT: "<<fNYMULT<<endl |
42 |
<<"XAVESPE: "<<fXAVESPE<<endl |
43 |
<<"YAVESPE: "<<fYAVESPE<<endl |
44 |
<<"ZAVESPE: "<<fZAVESPE<<endl; } |
45 |
|
46 |
ClassDef(pTrkHitData,1) |
47 |
|
48 |
}; |
49 |
|
50 |
|
51 |
pTrkHitData & operator+=( pTrkHitData &a, const pTrkHitData & p); |
52 |
|
53 |
|
54 |
class PamVMCTrkHit : public PamVMCDetectorHit |
55 |
{ |
56 |
public: |
57 |
PamVMCTrkHit(); |
58 |
virtual ~PamVMCTrkHit(); |
59 |
|
60 |
//Set and Add methods |
61 |
|
62 |
virtual void CleanHit(){ |
63 |
PamVMCDetectorHit::CleanHit(); |
64 |
ftrkhitdata.Clean(); |
65 |
} |
66 |
|
67 |
|
68 |
pTrkHitData * GenTrkHit() { return new pTrkHitData(ftrkhitdata);} |
69 |
|
70 |
|
71 |
void operator = (const PamVMCTrkHit & ); |
72 |
|
73 |
void SetNXMULT (Int_t xmult) { ftrkhitdata.fNXMULT = xmult; } |
74 |
void SetNYMULT (Int_t ymult) { ftrkhitdata.fNYMULT = ymult; } |
75 |
void SetXAVESPE (Float_t xave) { ftrkhitdata.fXAVESPE = xave; } |
76 |
void SetYAVESPE (Float_t yave) { ftrkhitdata.fYAVESPE = yave; } |
77 |
void SetZAVESPE (Float_t zave) { ftrkhitdata.fZAVESPE = zave; } |
78 |
//void Reset(); |
79 |
|
80 |
// Get methods |
81 |
|
82 |
const pTrkHitData *GetTrkHit() {return &ftrkhitdata;} |
83 |
Int_t GetNXMULT() { return ftrkhitdata.fNXMULT; }; |
84 |
Int_t GetNYMULT() { return ftrkhitdata.fNYMULT; }; |
85 |
Float_t GetXAVESPE() { return ftrkhitdata.fXAVESPE; }; |
86 |
Float_t GetYAVESPE() { return ftrkhitdata.fYAVESPE; }; |
87 |
Float_t GetZAVESPE() { return ftrkhitdata.fZAVESPE; }; |
88 |
|
89 |
|
90 |
protected: |
91 |
|
92 |
pTrkHitData ftrkhitdata; |
93 |
|
94 |
ClassDef(PamVMCTrkHit,1) //PamVMCTrkHit |
95 |
}; |
96 |
|
97 |
#endif //PAMVMC_TRK_HIT_H |