]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliGenZDC.h
consolidate zero-length arrays (aka struct hack)
[u/mrichter/AliRoot.git] / ZDC / AliGenZDC.h
index a135240366065b2aeb76a8adc2ae79945f41dccd..1efedc12c507786d198728de9c1b1daca8902fe3 100644 (file)
@@ -24,53 +24,54 @@ public:
   AliGenZDC();
   AliGenZDC(Int_t npart);
   virtual      ~AliGenZDC() {}
-  virtual void Init();
-  virtual void Generate();
+  void Init();
+  void Generate();
+  
+  // Fermi smearing, beam divergence and crossing angle               
+  void FermiTwoGaussian(Float_t A);
+  void ExtractFermi(Int_t id, Double_t *ddp);
+  void BeamDivCross(Int_t icross, Double_t *pLab);
+  void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2,
+               Double_t phi2, Double_t *angle);
   
   // Parameters that could be set for generation
-  virtual void SetParticle(Int_t ipart) {fIpart=ipart;};
-  virtual void SetMomentum(Float_t ptot) {fPMin=ptot; fPMax=ptot;};
-  virtual void SetDir(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz)
-                {fPseudoRapidity=zpsrp; fCosx=cosx; fCosy=cosy; fCosz=cosz;};
-  virtual void SetFermi(Int_t Fflag) {fFermiflag=Fflag;};
-  virtual void SetDiv(Float_t bmdiv, Float_t bmcra, Int_t iflcr) 
-                {fBeamDiv=bmdiv; fBeamCrossAngle=bmcra; fBeamCrossPlane=iflcr;};
+  void SetParticle(Int_t ipart) {fIpart=ipart;};
+  void SetMomentum(Float_t ptot) {fPMin=ptot; fPMax=ptot;};
+  void SetDirection(Float_t zpsrp, Float_t cosx, Float_t cosy, Float_t cosz)
+          {fPseudoRapidity=zpsrp; fCosx=cosx; fCosy=cosy; fCosz=cosz;};
+  void SetFermi(Int_t Fflag) {fFermiflag=Fflag;};
+  void SetDiv(Float_t bmdiv, Float_t bmcra, Int_t iflcr) 
+          {fBeamDiv=bmdiv; fBeamCrossAngle=bmcra; fBeamCrossPlane=iflcr;};
+  void SetDebug(Int_t idebu) {fDebugOpt = idebu;};
   
   // Getters 
-  Double_t GetFermi2p(Int_t key) {return fProbintp[key];}
-  Double_t GetFermi2n(Int_t key) {return fProbintn[key];}
-  Float_t  GetMomentum(Int_t key) {return fP[key];};
-  Float_t  GetBoostMomentum(Int_t key) {return fBoostP[key];};
-  Float_t  GetDivMomentum(Int_t key) {return fDivP[key];};
-  
-  // Fermi smearing, beam divergence and crossing angle               
-  virtual void FermiTwoGaussian(Double_t A, Float_t Z, Double_t* pp, 
-                Double_t* probintp, Double_t* probintn);
-  virtual void ExtractFermi(Int_t id, Double_t* pp, Double_t* probintp, 
-                Double_t* probintn, Double_t* pFermi);
-  virtual void BeamDivCross(Int_t icross, Float_t divergence, Float_t crossangle, 
-                Int_t crossplane, Double_t* pLab);
-  virtual void AddAngle(Double_t theta1, Double_t phi1, Double_t theta2,
-               Double_t phi2, Double_t* angle);
+  Double_t GetFermi2p(Int_t key) const {return fProbintp[key];}
+  Double_t GetFermi2n(Int_t key) const {return fProbintn[key];}
+
 protected:
-  Int_t    fIpart;              // Particle to generate
-  Float_t  fCosx;               // Cos x of particle
-  Float_t  fCosy;               // Cos y of particle
-  Float_t  fCosz;               // Cos z of particle
-  Float_t  fPseudoRapidity;     // Pseudo Rapidity of particle
-  Int_t    fFermiflag;          // Fermi momentum flag
-  Float_t  fBeamDiv;            // Beam divergence
-  Float_t  fBeamCrossAngle;     // Beam crossing angle
-  Int_t    fBeamCrossPlane;     // Beam crossing plane
-  Double_t fProbintp[201];      // for protons
-  Double_t fProbintn[201];      // for neutrons
-  Double_t fPp[201];            // for protons
-  Double_t fP[3];               // momentum
-  Float_t fBoostP[3];           // boost vector
-  Float_t fDivP[3];             // divergence
+  Int_t    fIpart;              // Particle to be generated
+  Float_t  fCosx;               // Director cos of the track - x direction
+  Float_t  fCosy;               // Director cos of the track - y direction 
+  Float_t  fCosz;               // Director cos of the track - z direction
+  Float_t  fPseudoRapidity;     // Pseudorapidity (!=0 -> eta of the particle)
+                                // (=0 -> director cos of the track)
+  Int_t    fFermiflag;          // Fermi momentum flag (=1 -> Fermi smearing)
+  Float_t  fBeamDiv;            // Beam divergence (angle in rad)
+  Float_t  fBeamCrossAngle;     // Beam crossing angle (angle in rad)
+  Int_t    fBeamCrossPlane;     // Beam crossing plane 
+                                // (=1 -> horizontal, =2 -> vertical plane)
+  Double_t fProbintp[201];      // Protons momentum distribution due to Fermi 
+  Double_t fProbintn[201];      // Neutrons momentum distribution due to Fermi 
+  Double_t fPp[201];            // Spectator momenta
+  Int_t    fDebugOpt;          // Option for debugging [0->No debug, 1->Screen
+                               //  prints, 2->ASCII data file]
   
-   ClassDef(AliGenZDC,1)  // Generator for AliZDC class
+ private:
+  AliGenZDC(const AliGenZDC & gen);
+  AliGenZDC & operator=(const AliGenZDC & gen);
+
+   ClassDef(AliGenZDC,1)       // Generator for AliZDC class
 };
 
 #endif