ROOT logo
#ifndef ALIGENZDC_H
#define ALIGENZDC_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 * See cxx source for full Copyright notice                               */

/* $Id$ */

////////////////////////////////////////////////////
//                                                //  
// Test pc generator for ZDC (taking into account //
// Fermi smearing, beam divergence and crossing)  //
//                                                //
////////////////////////////////////////////////////


#include <TMath.h>
 
#include "AliGenerator.h"

 
class AliGenZDC : public AliGenerator {

public:
  AliGenZDC();
  AliGenZDC(Int_t npart);
  virtual      ~AliGenZDC() {}
  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
  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) const {return fProbintp[key];}
  Double_t GetFermi2n(Int_t key) const {return fProbintn[key];}

protected:
  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]
  
 private:
  AliGenZDC(const AliGenZDC & gen);
  AliGenZDC & operator=(const AliGenZDC & gen);

   ClassDef(AliGenZDC,1)  	// Generator for AliZDC class
};

#endif
 AliGenZDC.h:1
 AliGenZDC.h:2
 AliGenZDC.h:3
 AliGenZDC.h:4
 AliGenZDC.h:5
 AliGenZDC.h:6
 AliGenZDC.h:7
 AliGenZDC.h:8
 AliGenZDC.h:9
 AliGenZDC.h:10
 AliGenZDC.h:11
 AliGenZDC.h:12
 AliGenZDC.h:13
 AliGenZDC.h:14
 AliGenZDC.h:15
 AliGenZDC.h:16
 AliGenZDC.h:17
 AliGenZDC.h:18
 AliGenZDC.h:19
 AliGenZDC.h:20
 AliGenZDC.h:21
 AliGenZDC.h:22
 AliGenZDC.h:23
 AliGenZDC.h:24
 AliGenZDC.h:25
 AliGenZDC.h:26
 AliGenZDC.h:27
 AliGenZDC.h:28
 AliGenZDC.h:29
 AliGenZDC.h:30
 AliGenZDC.h:31
 AliGenZDC.h:32
 AliGenZDC.h:33
 AliGenZDC.h:34
 AliGenZDC.h:35
 AliGenZDC.h:36
 AliGenZDC.h:37
 AliGenZDC.h:38
 AliGenZDC.h:39
 AliGenZDC.h:40
 AliGenZDC.h:41
 AliGenZDC.h:42
 AliGenZDC.h:43
 AliGenZDC.h:44
 AliGenZDC.h:45
 AliGenZDC.h:46
 AliGenZDC.h:47
 AliGenZDC.h:48
 AliGenZDC.h:49
 AliGenZDC.h:50
 AliGenZDC.h:51
 AliGenZDC.h:52
 AliGenZDC.h:53
 AliGenZDC.h:54
 AliGenZDC.h:55
 AliGenZDC.h:56
 AliGenZDC.h:57
 AliGenZDC.h:58
 AliGenZDC.h:59
 AliGenZDC.h:60
 AliGenZDC.h:61
 AliGenZDC.h:62
 AliGenZDC.h:63
 AliGenZDC.h:64
 AliGenZDC.h:65
 AliGenZDC.h:66
 AliGenZDC.h:67
 AliGenZDC.h:68
 AliGenZDC.h:69
 AliGenZDC.h:70
 AliGenZDC.h:71
 AliGenZDC.h:72
 AliGenZDC.h:73
 AliGenZDC.h:74
 AliGenZDC.h:75
 AliGenZDC.h:76
 AliGenZDC.h:77