PandaRoot
PndTargetGenerator.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- PndTargetGenerator header file -----
3 // ----- Created 13/02/2020 by R.Kliemt -----
4 // -------------------------------------------------------------------------
5 
13 #ifndef PND_TARGETGENERATOR_H
14 #define PND_TARGETGENERATOR_H
15 
16 #include "FairGenerator.h"
17 #include <iostream>
18 
19 class FairPrimaryGenerator;
20 class TF1;
21 class TVector3;
22 class TGraph;
23 
24 class PndTargetGenerator : public FairGenerator {
25  public:
28 
30  PndTargetGenerator(TString densityFile, double radius = 0., double drdz = 0., double rlimit = 2.);
31 
33  virtual ~PndTargetGenerator(){};
34 
36  void SetDensityProfile(TString density) { fDensityFile = density; }
37  void SetBeamRadius(double radius = 0.1) { fRsigma = radius; } // default beam spot sigma 1mm^2 by "Fair Operation Modes" document v.6 (2020)
38  void SetBeamPipeRadius(double radius = 2.) { fRlimit = radius; } // Smallest radius around interaction region
39  void SetConstantBeamRegion(double zmin = -140., double zmax = 223)
40  {
41  fConstantZmin = zmin;
42  fConstantZmax = zmax;
43  } //
44  void SetBeamDrDz(double drdz = 0.1) { fDrDz = drdz; } // default maximum beam divergence from 4-sigma emittance of 1-2 mm mrad by "Fair Operation Modes" document v.6 (2020)
45  void SetVerbose(int verb = 1) { fVerbose = verb; }
46  TGraph *GetDensityGraph() { return fDensityGraph; }
48  virtual Bool_t Init();
49  TVector3 SampleInteractionVertex();
50  void ReadDensityFile();
51  virtual Bool_t ReadEvent(FairPrimaryGenerator *) { return true; }; // FIXME Delete!
52  protected:
53  private:
54  double fRlimit; // Radius of beam pipe (hard limit)
55  double fRsigma; // Radius of beam profile (Gaussian sigma)
56  double fConstantZmin; // Start of constant beam width region
57  double fConstantZmax; // End of constant beam width region
58  double fDrDz; // Radius increase slope from (0,0,0)
59  double fDmin; // Minimum density
60  double fDmax; // Maximum density
61  int fVerbose; // Switch debug output
62  bool fDoExtended; // switch if not using distributed targets
63  TString fDensityFile; // ascii file to load density profile
64  TGraph *fDensityGraph; // storage of measured points
65  TGraph *fInvertedCDF; // storage of measured points as inverted "CDF"
66 
67  ClassDef(PndTargetGenerator, 1);
68 };
69 
70 #endif
void SetVerbose(int verb=1)
void SetBeamDrDz(double drdz=0.1)
void SetBeamPipeRadius(double radius=2.)
TVector3 SampleInteractionVertex()
void SetConstantBeamRegion(double zmin=-140., double zmax=223)
virtual Bool_t Init()
void SetBeamRadius(double radius=0.1)
void SetDensityProfile(TString density)
virtual Bool_t ReadEvent(FairPrimaryGenerator *)