| [807] | 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | #ifndef MHit_H
|
|---|
| 7 | #define MHit_H 1
|
|---|
| 8 |
|
|---|
| 9 | // %%%%%%%%%%
|
|---|
| 10 | // G4 headers
|
|---|
| 11 | // %%%%%%%%%%
|
|---|
| 12 | #include "G4ThreeVector.hh"
|
|---|
| 13 | #include "G4VHit.hh"
|
|---|
| 14 |
|
|---|
| 15 | // %%%%%%%%%%%%%
|
|---|
| 16 | // gemc headers
|
|---|
| 17 | // %%%%%%%%%%%%%
|
|---|
| 18 | #include "detector.h"
|
|---|
| 19 |
|
|---|
| 20 | // %%%%%%%%%%%
|
|---|
| 21 | // C++ headers
|
|---|
| 22 | // %%%%%%%%%%%
|
|---|
| 23 | #include <iostream>
|
|---|
| 24 | using namespace std;
|
|---|
| 25 |
|
|---|
| 26 | // %%%%%%%%%%%%%%%%
|
|---|
| 27 | // Class definition
|
|---|
| 28 | // %%%%%%%%%%%%%%%%
|
|---|
| 29 | class MHit : public G4VHit
|
|---|
| 30 | {
|
|---|
| 31 |
|
|---|
| 32 | public:
|
|---|
| 33 | MHit();
|
|---|
| 34 | virtual ~MHit();
|
|---|
| 35 | const MHit& operator=(const MHit&){return *this;}
|
|---|
| 36 |
|
|---|
| 37 | void Draw();
|
|---|
| 38 |
|
|---|
| 39 | private:
|
|---|
| 40 | vector<G4ThreeVector> pos;
|
|---|
| 41 | vector<G4ThreeVector> Lpos;
|
|---|
| 42 | vector<double> edep;
|
|---|
| 43 | vector<double> time;
|
|---|
| 44 | G4ThreeVector mom;
|
|---|
| 45 | double E;
|
|---|
| 46 | G4ThreeVector vert;
|
|---|
| 47 | int PID;
|
|---|
| 48 | vector<int> trackID;
|
|---|
| 49 | vector<identifier> identity;
|
|---|
| 50 | detector Detector;
|
|---|
| 51 | int mPID;
|
|---|
| 52 | int mtrackID;
|
|---|
| 53 | G4ThreeVector mvert;
|
|---|
| 54 | double minEdep;
|
|---|
| 55 |
|
|---|
| 56 | public:
|
|---|
| 57 | inline void SetPos(G4ThreeVector xyz) { pos.push_back(xyz); }
|
|---|
| 58 | inline vector<G4ThreeVector> GetPos() { return pos; }
|
|---|
| 59 | inline G4ThreeVector GetLastPos() { if(pos.size()) return pos[pos.size()-1]; }
|
|---|
| 60 |
|
|---|
| 61 | inline void SetLPos(G4ThreeVector xyz) { Lpos.push_back(xyz); }
|
|---|
| 62 | inline vector<G4ThreeVector> GetLPos() { return Lpos; }
|
|---|
| 63 |
|
|---|
| 64 | inline void SetEdep(double depe) { edep.push_back(depe); }
|
|---|
| 65 | inline vector<double> GetEdep() { return edep; }
|
|---|
| 66 |
|
|---|
| 67 | inline void SetTime(double ctime) { time.push_back(ctime); }
|
|---|
| 68 | inline vector<double> GetTime() { return time; }
|
|---|
| 69 |
|
|---|
| 70 | inline void SetMom(G4ThreeVector pxyz) { mom = pxyz; }
|
|---|
| 71 | inline G4ThreeVector GetMom() { return mom; }
|
|---|
| 72 |
|
|---|
| 73 | inline void SetE(double ene) { E = ene; }
|
|---|
| 74 | inline double GetE() { return E; }
|
|---|
| 75 |
|
|---|
| 76 | inline void SetVert(G4ThreeVector ver) { vert = ver; }
|
|---|
| 77 | inline G4ThreeVector GetVert() { return vert; }
|
|---|
| 78 |
|
|---|
| 79 | inline void SetPID(string pid) { PID = mc_number_scheme(pid); }
|
|---|
| 80 | inline int GetPID() { return PID; }
|
|---|
| 81 |
|
|---|
| 82 | inline void SetTrackId(int tid) { trackID.push_back(tid); }
|
|---|
| 83 | inline vector<int> GetTrackId() { return trackID; }
|
|---|
| 84 |
|
|---|
| 85 | inline void SetmPID(string mpid) { mPID = mc_number_scheme(mpid); }
|
|---|
| 86 | inline int GetmPID() { return mPID; }
|
|---|
| 87 |
|
|---|
| 88 | inline void SetmTrackId(int tid) { mtrackID = tid; }
|
|---|
| 89 | inline int GetmTrackId() { return mtrackID; }
|
|---|
| 90 |
|
|---|
| 91 | inline void SetmVert(G4ThreeVector ver) { mvert = ver; }
|
|---|
| 92 | inline G4ThreeVector GetmVert() { return mvert; }
|
|---|
| 93 |
|
|---|
| 94 | inline vector<identifier> GetId() { return identity; }
|
|---|
| 95 | inline void SetId(vector<identifier> iden) { identity = iden; }
|
|---|
| 96 |
|
|---|
| 97 | inline void SetDetector(detector det) {Detector = det;}
|
|---|
| 98 | inline detector GetDetector() {return Detector;}
|
|---|
| 99 |
|
|---|
| 100 | inline void SetThreshold(double E) { minEdep = E; }
|
|---|
| 101 | inline double GetThreshold() { return minEdep; }
|
|---|
| 102 |
|
|---|
| 103 | int mc_number_scheme(string);
|
|---|
| 104 |
|
|---|
| 105 | };
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|
| 108 | #include "G4THitsCollection.hh"
|
|---|
| 109 | typedef G4THitsCollection<MHit> MHitCollection;
|
|---|
| 110 |
|
|---|
| 111 | #endif
|
|---|