File indexing completed on 2026-04-17 07:51:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #ifndef __MICROELECHITSEY_H__
0031 #define __MICROELECHITSEY_H__ 1
0032
0033 #include "G4VHit.hh"
0034 #include "G4THitsCollection.hh"
0035 #include "G4Allocator.hh"
0036 #include "G4ThreeVector.hh"
0037
0038 class MicroElecHitSey : public G4VHit
0039 {
0040
0041 public:
0042
0043 MicroElecHitSey();
0044 ~MicroElecHitSey();
0045
0046 MicroElecHitSey(const MicroElecHitSey&);
0047
0048 const MicroElecHitSey& operator=(const MicroElecHitSey&);
0049 int operator==(const MicroElecHitSey&) const;
0050
0051 inline void* operator new(size_t);
0052 inline void operator delete(void*);
0053
0054 void Print();
0055
0056 public:
0057
0058 void SetNbPrim (G4int nbprim) { NbPrim=nbprim; };
0059 void SetNbSec (G4int nbsec) { NbSec = nbsec; };
0060 void SetNbSup50 (G4int nbsup50) { NbSup50 = nbsup50; };
0061 void SetPDGEncoding (G4int pdgencoding) { PDGEncoding = pdgencoding; };
0062 void SetParentID (G4int parent) { ParentID = parent; };
0063 void SetTrackID (G4int track) { trackID = track; };
0064 void SetParticleType (G4String nameT) { ParticleType = nameT; };
0065 void SetParticleName (G4String name) { ParticleName = name; };
0066 void SetVolumeName (G4String nameV) { VolumeName = nameV; };
0067 void SetZ (G4int z) { Z = z; };
0068 void SetA (G4int a) { A = a; };
0069 void SetVertexKineticEnergy (G4double VQ) { VertexKineticEnergy = VQ; };
0070 void SetVertexPos(G4ThreeVector xyz) { VertexPos = xyz; };
0071 void SetVertexMomentum(G4ThreeVector xyz) { VertexMomentum = xyz; };
0072 void SetPreStepKineticEnergy (G4double Q) { PreStepKineticEnergy = Q; };
0073 void SetPostStepKineticEnergy (G4double Q) { PostStepKineticEnergy = Q; };
0074 void SetEdep (G4double de) { Edep = de; };
0075 void SetNi_Edep (G4double NIde) { Ni_Edep = NIde; };
0076 void SetStepLength (G4double length) { StepLength = length; };
0077 void SetPrePos (G4ThreeVector xyz) { PrePos = xyz; };
0078 void SetPostPos (G4ThreeVector xyz) { PostPos = xyz; };
0079 void SetPreStepMomentum (G4ThreeVector xyz) { PreStepMomentum = xyz; };
0080 void SetPostStepMomentum (G4ThreeVector xyz) { PostStepMomentum = xyz; };
0081
0082
0083 G4int GetNbPrim() { return NbPrim; };
0084 G4int GetNbSec() { return NbSec; };
0085 G4int GetNbSup50() { return NbSup50; };
0086 G4int GetPDGEncoding () { return PDGEncoding; };
0087 G4int GetParentID () { return ParentID; };
0088 G4int GetTrackID () { return trackID; };
0089 G4String GetParticleType () { return ParticleType; };
0090 G4String GetParticleName () { return ParticleName; };
0091 G4String GetVolumeName () { return VolumeName; };
0092 G4int GetZ () { return Z; };
0093 G4int GetA () { return A; };
0094 G4double GetVertexKineticEnergy (){ return VertexKineticEnergy; };
0095 G4ThreeVector GetVertexPos() { return VertexPos; };
0096 G4ThreeVector GetVertexMomentum() { return VertexMomentum ; };
0097 G4double GetPreStepKineticEnergy(){ return PreStepKineticEnergy; };
0098 G4double GetPostStepKineticEnergy(){ return PostStepKineticEnergy;};
0099 G4double GetEdep () { return Edep; };
0100 G4double GetNi_Edep () { return Ni_Edep; };
0101 G4ThreeVector GetPrePos () { return PrePos; };
0102 G4ThreeVector GetPostPos () { return PostPos; };
0103 G4ThreeVector GetPreStepMomentum () { return PreStepMomentum; };
0104 G4ThreeVector GetPostStepMomentum () { return PostStepMomentum; };
0105 G4double GetStepLength () { return StepLength; };
0106
0107
0108
0109 void SetVolumeCopyNumber(int value){VolumeCopyNumber = value;};
0110 G4int GetVolumeCopyNumber(){return VolumeCopyNumber;};
0111
0112 private:
0113
0114 G4int NbPrim;
0115 G4int NbSec;
0116 G4int NbSup50;
0117 G4int PDGEncoding;
0118 G4int ParentID;
0119 G4int trackID;
0120 G4String ParticleType;
0121 G4String ParticleName;
0122 G4String VolumeName;
0123 G4int Z;
0124 G4int A;
0125 G4double VertexKineticEnergy;
0126 G4double PreStepKineticEnergy;
0127 G4double PostStepKineticEnergy;
0128 G4double Edep;
0129 G4double Ni_Edep;
0130 G4double StepLength;
0131 G4ThreeVector PrePos;
0132 G4ThreeVector PostPos;
0133 G4ThreeVector VertexPos;
0134 G4ThreeVector PreStepMomentum;
0135 G4ThreeVector PostStepMomentum;
0136 G4ThreeVector VertexMomentum;
0137
0138
0139
0140 G4int VolumeCopyNumber;
0141
0142 };
0143
0144 typedef G4THitsCollection<MicroElecHitSey> MicroElecHitSeyCollection;
0145 extern G4ThreadLocal G4Allocator<MicroElecHitSey>* MicroElecHitSeyAllocator;
0146 inline void* MicroElecHitSey::operator new(size_t){
0147 void *aHit;
0148 if (!MicroElecHitSeyAllocator) { MicroElecHitSeyAllocator = new G4Allocator<MicroElecHitSey>; }
0149 aHit = (void *) MicroElecHitSeyAllocator->MallocSingle();
0150 return aHit;
0151 }
0152 inline void MicroElecHitSey::operator delete(void *aHit){MicroElecHitSeyAllocator->FreeSingle((MicroElecHitSey*) aHit);}
0153 #endif