1 #if !defined(__CINT__) || defined(__MAKECINT__)
4 #include "AliGenerator.h"
8 /// Simple 3D-BOX generator for single muons
9 /// with a fixed fraction of + and - (50% per default)
11 class AliGenMuBox : public AliGenBox
15 AliGenMuBox(Float_t plusShare=0.50);
17 virtual ~AliGenMuBox() {}
19 void GenerateN(Int_t ntimes);
21 void Generate() { GenerateN(1); }
24 Float_t fPlusShare; // Fraction of plus muons
26 ClassDef(AliGenMuBox,1) // Square box random generator for muons (+ and -)
31 AliGenMuBox::AliGenMuBox(Float_t plusShare) : AliGenBox(), fPlusShare(plusShare)
33 if ( fPlusShare <= 0.0 )
37 if ( fPlusShare > 1.0 )
43 void AliGenMuBox::GenerateN(Int_t ntimes)
47 if ( fPlusShare == 1.0 )
63 AliGenBox::GenerateN(ntimes);
66 AliGenerator* GenMuBox()
68 AliGenBox* generator = new AliGenMuBox;
70 generator->SetNumberParticles(1);
72 generator->SetPtRange(VAR_GENMUBOX_PTMIN,VAR_GENMUBOX_PTMAX);
73 generator->SetYRange(VAR_GENMUBOX_YMIN,VAR_GENMUBOX_YMAX);
75 generator->SetPhiRange(0., 360.);
76 generator->SetTrackingFlag(1);