QwGeant4
QweakSimUserInformation.hh
Go to the documentation of this file.
1 #ifndef QweakSimUserInformation_h
2 #define QweakSimUserInformation_h
3 
4 #include <vector>
5 
6 //user includes
7 #include "G4PhysicsOrderedFreeVector.hh"
8 
11 #include "QweakSimSystemOfUnits.hh"
13 
14 // forward declarations
15 class QweakSimEPEvent;
16 
17 #define ELOSS_DEBUG 0
18 
20 {
21 public:
22 
25 
27  G4double TargetLength;
31  G4double TargetUSDummyPositionOffsetZ; // Offset from LH2 center
32  G4double TargetDSDummyPositionOffsetZ; // Offset from LH2 center
33  // Dummy target Z positions are taken from the June 21, 2012 target survey
34 
43 
55 
56  //Variables to hold luminosities for alloy calculation
57  //K. Bartlett 2016/9/13
67 
68  G4int ReactionType; // assign a number to which kind of reaction,e.g. 1 = elastic ep,
70  G4int EvtGenStatus;
71 
72  // clear the energy loss variables
73  void ClearELoss(){
74  dEIonIn= dEIonOut=0;
76  dEMscIn= dEMscOut=0;
77  }
78 
79  //setter functions
80  void SetBeamPositionX(G4double x) { fPositionX = x; };
81  void SetBeamPositionY(G4double y) { fPositionY = y; };
82  void SetBeamPositionZ(G4double z) { fPositionZ = z; };
83  void SetBeamDirectionX(G4double x) { fNormMomentumX = x; };
84  void SetBeamDirectionY(G4double y) { fNormMomentumY = y; };
85 
86  //getter functions
87  G4double GetBeamPositionX() const {return fPositionX;};
88  G4double GetBeamPositionY() const {return fPositionY;};
89  G4double GetBeamPositionZ() const {return fPositionZ;};
90 
91  G4double GetNormMomentumX() const {return fNormMomentumX;};
92  G4double GetNormMomentumY() const {return fNormMomentumY;};
93  G4ThreeVector GetNormMomentum() const {
95  }
96 
99  }
102  }
103 
104 private:
105 
107 
108  G4double fPositionX;
109  G4double fPositionY;
110  G4double fPositionZ;
111  G4double fNormMomentumX;
112  G4double fNormMomentumY;
113 
115  G4int PDGcode; // particle data code/number for the primary particle, e.g. 11=electron
116  G4int TrackID;
117  G4double GlobalTime;
118  G4double PrimaryQ2;
119  G4double CrossSection;
133  G4double Asymmetry;
149 
150  G4double fPhiAngle_Min;
151  G4double fPhiAngle_Max;
152  G4double fThetaAngle_Min;
153  G4double fThetaAngle_Max;
154  G4double fEPrime_Min;
155  G4double fEPrime_Max;
156 
157  G4double fBeamEnergy;
158  G4double fEPrime;
159  G4double fLuminosity;
160  G4double fPhaseSpace;
161 
166 
167  G4double CerEngDep;
168 
169  // various energy losses at the target
170  G4double dEIonIn, dEIonOut;
171  G4double dEBremIn, dEBremOut;
172  G4double dEMscIn, dEMscOut;
173 
177 
183 
184  G4PhysicsOrderedFreeVector* PMTQE_XP4572;
185  G4PhysicsOrderedFreeVector* PMTQED753WKBS20;
186 
187  G4String StepVolumeName;
188  G4ThreeVector cerenkovEventExitPos;
190  G4ThreeVector *cerenkovSecondaryPartMom;
193 
194  std::vector <G4double> CerenkovPhotonEnergy;
195 
197 
198  G4int PMTSide;
199 
200  private:
202  public:
203  void SetEPEvent(QweakSimEPEvent* EP) { EPEvent = EP; };
205 
206  public:
207 
208  void Print() const;
209  void PrintELoss();
210  void Initialize();
211 
212  void StoreTrackID(G4int tid) { TrackID = tid; }
213  G4int GetTrackID() const {return TrackID;}
214 
215  void StoreGlobalTime(G4double gtime) { GlobalTime = gtime; }
216  G4double GetGlobalTime() const {return GlobalTime;}
217 
218  //G4double CalculateLuminosity(G4double mass, G4double density, G4double length);
219 
220  //-----------------
223 
226 
229  //-----------------
232 
235 
238  //-----------------
239  void StoreOriginVertexThetaAngle(G4double theta) { OriginVertexThetaAngle = theta; }
241 
242  void StoreOriginVertexPhiAngle(G4double phi) { OriginVertexPhiAngle = phi; }
244  //-----------------
245 
248 
251 
254  //-----------------
255 
258 
261 
264 
267  //-----------------
268 
269  void SetEPrime_Min(G4double energy) {fEPrime_Min = energy;}
270  G4double GetEPrime_Min() {return fEPrime_Min;}
271 
272  void SetEPrime_Max(G4double energy) {fEPrime_Max = energy;}
273  G4double GetEPrime_Max() {return fEPrime_Max;}
274 
275  void SetThetaAngle_Min(G4double ang) {fThetaAngle_Min = ang;}
276  G4double GetThetaAngle_Min() {return fThetaAngle_Min;}
277 
278  void SetThetaAngle_Max(G4double ang) {fThetaAngle_Max = ang;}
279  G4double GetThetaAngle_Max() {return fThetaAngle_Max;}
280 
281  void SetPhiAngle_Min(G4double ang) {fPhiAngle_Min = ang;}
282  G4double GetPhiAngle_Min() {return fPhiAngle_Min;}
283 
284  void SetPhiAngle_Max(G4double ang) {fPhiAngle_Max = ang;}
285  G4double GetPhiAngle_Max() {return fPhiAngle_Max;}
286 
287  //-----------------
288 
289  void SetBeamEnergy(G4double energy) { fBeamEnergy = energy; }
290  G4double GetBeamEnergy() const {return fBeamEnergy;}
291 
292  void SetEPrime(G4double energy) { fEPrime = energy; }
293  G4double GetEPrime() const {return fEPrime;}
294 
295  void SetLuminosity(G4double lum) { fLuminosity = lum; }
296  G4double GetLuminosity() {return fLuminosity;}
297 
298  void SetPhaseSpace(G4double ps) { fPhaseSpace = ps; }
299  G4double GetPhaseSpace() {return fPhaseSpace;}
300 
301  //-----------------
302 
305 
308 
310  G4double GetEffectiveKinematicX() const {return EffectiveKinematicX;}
311 
313  G4double GetEffectiveKinematicW() const {return EffectiveKinematicW;}
314  //-----------------
315 
316  void StorePrimaryQ2(G4double pq2) { PrimaryQ2 = pq2; }
317  G4double GetPrimaryQ2() const {return PrimaryQ2; }
318 
319  void StoreCrossSection(G4double cs) {CrossSection = cs;}
320  G4double GetCrossSection() const {return CrossSection; }
321 
322  void StoreCrossSectionWeight(G4double csw) {CrossSectionWeight = csw;}
323  G4double GetCrossSectionWeight() const {return CrossSectionWeight; }
324 
325  void StoreAsymmetry(G4double asym) {Asymmetry = asym;}
326  G4double GetAsymmetry() const {return Asymmetry; }
327 
328  void StorePrimaryEventNumber(G4int pen) { PrimaryEventNumber = pen; }
329  G4int GetPrimaryEventNumber() const {return PrimaryEventNumber; }
330  //-----------------
331 
334 
337 
338  void StoreCrossSectionBornQE(G4double cs) {CrossSectionBornQE = cs;}
339  G4double GetCrossSectionBornQE() const {return CrossSectionBornQE; }
340 
342  G4double GetCrossSectionRadTotal() const {return CrossSectionRadTotal; }
343 
346 
347  void StoreCrossSectionRadQE(G4double cs) {CrossSectionRadQE = cs;}
348  G4double GetCrossSectionRadQE() const {return CrossSectionRadQE; }
349 
350  void StoreCrossSectionRadDIS(G4double cs) {CrossSectionRadDIS = cs;}
351  G4double GetCrossSectionRadDIS() const {return CrossSectionRadDIS; }
352  //-----------------
353 
356 
359 
362 
365  //-----------------
366 
369  //-----------------
370 
371  void StoreReactionRegion(G4int rt) { ReactionRegion = rt; }
372  G4int GetReactionRegion() const {return ReactionRegion; }
373 
374  void StoreReactionType(G4int rt) { ReactionType = rt; }
375  G4int GetReactionType() const {return ReactionType; }
376 
377  void StorePDGcode(G4int code) { PDGcode = code; }
378  G4int GetPDGcode() const {return PDGcode; }
379 
380 
381 
384 
385  G4double GetNumberOfPhotoelectrons(G4double eng);
386  G4double GetNumberOfPhotoelectronsS20(G4double eng);
387 
388  void SetLeftPMTHitValid(G4int state) {leftPMTHitValid = state;};
390  void SetRightPMTHitValid(G4int state){rightPMTHitValid = state;};
392 
393  void StoreStepVolumeName(G4String name) {StepVolumeName = name;};
395 
396  void SetEdgeEventDetected(G4int det){edgeEventDetected = det;};
398 
399  void StoreLocalCerenkovExitPosition(G4ThreeVector ep) {cerenkovEventExitPos = ep;};
401 
402  void StoreCerenkovSecondaryParticleInfo(G4ThreeVector ep, G4ThreeVector ee, G4double eng, G4double charge);
404  G4ThreeVector GetCerenkovSecondaryParticleOrigin(G4int indx);
405  G4ThreeVector GetCerenkovSecondaryParticleMomentum(G4int indx);
406  G4double GetCerenkovSecondaryParticleEnergy(G4int indx);
407  G4double GetCerenkovSecondaryParticleCharge(G4int indx);
412 
413  void SetCurrentPMTHit(QweakSimCerenkov_PMTHit* hit, G4int side){PMTHit = hit; PMTSide = side;};
415  G4int GetCurrentPMTSide() {return PMTSide;};
416 
417  void AddCerenkovEnergyDeposit(G4double eng){CerEngDep += eng;};
418  G4double GetCerenkovEnergyDeposit(G4bool zero = true){G4double tmp = CerEngDep; if(zero) CerEngDep = 0.0; return tmp;};
419 
420  void StoreCerenkovPhotonEnergy(G4double eng) {CerenkovPhotonEnergy.push_back(eng);};
421  G4double GetCerenkovPhotonEnergyAtIndex(G4int ind) {return CerenkovPhotonEnergy[ind];};
422 
423  // // store various Elosses at the target
424  void StoredEIonIn(G4double dE){dEIonIn=dE;}
425  void StoredEIonOut(G4double dE){dEIonOut=dE;}
426  void StoredEBremIn(G4double dE){dEBremIn=dE;}
427  void StoredEBremOut(G4double dE){dEBremOut=dE;}
428  void StoredEMscIn(G4double dE){dEMscIn=dE;}
429  void StoredEMscOut(G4double dE){dEMscOut=dE;}
430  ///
431  void AddTodEIonIn(G4double dE){dEIonIn+=dE;}
432  void AddTodEIonOut(G4double dE){dEIonOut+=dE;}
433  void AddTodEBremIn(G4double dE){dEBremIn+=dE;}
434  void AddTodEBremOut(G4double dE){dEBremOut+=dE;}
435  void AddTodEMscIn(G4double dE){dEMscIn+=dE;}
436  void AddTodEMscOut(G4double dE){dEMscOut+=dE;}
437  ////////
438  G4double GetdEIonIn(){return dEIonIn;}
439  G4double GetdEIonOut(){return dEIonOut;}
440  G4double GetdEIonTot(){return dEIonIn + dEIonOut;}
441  G4double GetdEBremIn(){return dEBremIn;}
442  G4double GetdEBremOut(){return dEBremOut;}
443  G4double GetdEBremTot(){return dEBremIn + dEBremOut;}
444  G4double GetdEMscIn(){return dEMscIn;}
445  G4double GetdEMscOut(){return dEMscOut;}
446  G4double GetdEMscTot(){return dEMscIn + dEMscOut;}
447  G4double GetdETotIn(){return dEIonIn + dEBremIn + dEMscIn;}
448  G4double GetdETotOut(){return dEIonOut + dEBremOut + dEMscOut;}
450  ///////
451 
452 };
453 
454 #endif
G4double GetEffectiveKinematicQ2() const
G4double GetCrossSectionBornInelastic() const
G4double GetEffectiveKinematicNu() const
G4double GetEffectiveKinematicX() const
void StoreCrossSectionRadTotal(G4double cs)
void StoreOriginVertexKinematicX(G4double X)
G4double GetCrossSectionRadQEIntOnly() const
void SetCurrentPMTHit(QweakSimCerenkov_PMTHit *hit, G4int side)
void SetEPrime_Min(G4double energy)
G4double GetCrossSectionRadTotalIntOnly() const
void StoreOriginVertexKinematicQ2(G4double Q2)
G4double GetCrossSectionRadQE() const
G4double GetCrossSectionBornQE() const
G4double GetOriginVertexKinematicNu() const
G4double GetOriginVertexPositionZ() const
void StoreOriginVertexPhiAngle(G4double phi)
G4double GetOriginVertexPositionX() const
G4double GetPreScatteringKineticEnergy() const
G4PhysicsOrderedFreeVector * PMTQED753WKBS20
void StoreEffectiveKinematicX(G4double X)
void StoreEffectiveKinematicNu(G4double Nu)
G4double GetOriginVertexMomentumDirectionX() const
G4double GetCrossSectionBornTotal() const
void StoreOriginVertexPositionX(G4double vx)
G4double GetCrossSectionRadElasticIntOnly() const
G4double GetOriginVertexMomentumDirectionZ() const
void StoreCrossSectionRadDISIntOnly(G4double cs)
void StoreCrossSectionRadElasticPeak(G4double cs)
G4double GetOriginVertexMomentumDirectionY() const
void StoreCerenkovSecondaryParticleInfo(G4ThreeVector ep, G4ThreeVector ee, G4double eng, G4double charge)
G4double GetCrossSectionWeight() const
void StoreEffectiveKinematicQ2(G4double Q2)
QweakSimCerenkov_PMTHit * PMTHit
void StoreCrossSectionBornTotal(G4double cs)
G4double GetCrossSectionRadTotal() const
void StoreOriginVertexPositionY(G4double vy)
void StoreStepVolumeName(G4String name)
void StoreGlobalTime(G4double gtime)
void StoreAsymmetry(G4double asym)
G4double GetOriginVertexKinematicX() const
void SetThetaAngle_Min(G4double ang)
void StoreOriginVertexTotalEnergy(G4double etot)
void StoreOriginVertexKinematicNu(G4double Nu)
void StoreCrossSectionBornQE(G4double cs)
void StoreCerenkovPhotonEnergy(G4double eng)
G4ThreeVector GetCerenkovSecondaryParticleMomentum(G4int indx)
G4double GetNumberOfPhotoelectrons(G4double eng)
void StoreCrossSectionRadQEIntOnly(G4double cs)
void StoreOriginVertexPositionZ(G4double vz)
void SetEPEvent(QweakSimEPEvent *EP)
std::vector< G4double > CerenkovPhotonEnergy
void StoreCrossSectionRadTotalIntOnly(G4double cs)
void StoreOriginVertexMomentumDirectionZ(G4double vz)
G4ThreeVector GetCerenkovSecondaryParticleOrigin(G4int indx)
G4double GetOriginVertexKinematicW() const
void StoreOriginVertexMomentumDirectionX(G4double vx)
void StoreCrossSectionRadDIS(G4double cs)
void SetBeamEnergy(G4double energy)
G4double GetCrossSectionRadElastic() const
void StoreCrossSectionBornInelastic(G4double cs)
G4double GetCerenkovEnergyDeposit(G4bool zero=true)
void StoreCrossSectionRadElastic(G4double cs)
void StorePreScatteringKineticEnergy(G4double ekin)
void StoreOriginVertexKineticEnergy(G4double ekin)
G4double GetCrossSectionRadDISIntOnly() const
G4double GetCerenkovSecondaryParticleEnergy(G4int indx)
QweakSimCerenkov_PMTHit * GetCurrentPMTHit()
void SetEPrime(G4double energy)
G4double GetOriginVertexTotalEnergy() const
G4double GetOriginVertexPositionY() const
void StoreCrossSectionWeight(G4double csw)
G4double GetNumberOfPhotoelectronsS20(G4double eng)
G4double GetOriginVertexKinematicQ2() const
void AddCerenkovEnergyDeposit(G4double eng)
void StoreOriginVertexKinematicW(G4double W)
void SetEPrime_Max(G4double energy)
G4double GetCrossSectionRadDIS() const
void StoreCrossSectionRadQE(G4double cs)
void SetThetaAngle_Max(G4double ang)
G4ThreeVector GetNormMomentum() const
void StoreCrossSectionRadElasticIntOnly(G4double cs)
G4double GetEffectiveKinematicW() const
G4double GetCrossSectionRadElasticPeak() const
G4int GetNumberOfEventToBeProcessed() const
G4double GetOriginVertexKineticEnergy() const
G4double GetOriginVertexPhiAngle() const
G4ThreeVector GetLocalCerenkovExitPosition()
G4double GetOriginVertexThetaAngle() const
void StoreOriginVertexThetaAngle(G4double theta)
G4double GetCerenkovSecondaryParticleCharge(G4int indx)
G4double GetCerenkovPhotonEnergyAtIndex(G4int ind)
void StoreOriginVertexMomentumDirectionY(G4double vy)
void StoreLocalCerenkovExitPosition(G4ThreeVector ep)
G4PhysicsOrderedFreeVector * PMTQE_XP4572
void StoreEffectiveKinematicW(G4double W)