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 |
virtual ~pTrkHitData(){ ; }; |
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 |
void Clear(Option_t * = "") { this->~PamVMCTrkHit(); } |
69 |
|
70 |
pTrkHitData * GenTrkHit() { return new pTrkHitData(ftrkhitdata);} |
71 |
|
72 |
|
73 |
void operator = (const PamVMCTrkHit & ); |
74 |
|
75 |
void SetNXMULT (Int_t xmult) { ftrkhitdata.fNXMULT = xmult; } |
76 |
void SetNYMULT (Int_t ymult) { ftrkhitdata.fNYMULT = ymult; } |
77 |
void SetXAVESPE (Float_t xave) { ftrkhitdata.fXAVESPE = xave; } |
78 |
void SetYAVESPE (Float_t yave) { ftrkhitdata.fYAVESPE = yave; } |
79 |
void SetZAVESPE (Float_t zave) { ftrkhitdata.fZAVESPE = zave; } |
80 |
//void Reset(); |
81 |
|
82 |
// Get methods |
83 |
|
84 |
const pTrkHitData *GetTrkHit() {return &ftrkhitdata;} |
85 |
Int_t GetNXMULT() { return ftrkhitdata.fNXMULT; }; |
86 |
Int_t GetNYMULT() { return ftrkhitdata.fNYMULT; }; |
87 |
Float_t GetXAVESPE() { return ftrkhitdata.fXAVESPE; }; |
88 |
Float_t GetYAVESPE() { return ftrkhitdata.fYAVESPE; }; |
89 |
Float_t GetZAVESPE() { return ftrkhitdata.fZAVESPE; }; |
90 |
|
91 |
|
92 |
protected: |
93 |
|
94 |
pTrkHitData ftrkhitdata; |
95 |
|
96 |
ClassDef(PamVMCTrkHit,1) //PamVMCTrkHit |
97 |
}; |
98 |
|
99 |
#endif //PAMVMC_TRK_HIT_H |