]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVGEN/AliGenHIJINGpara.cxx
Add const to SolenoidField() method for correct overwriting from the parent class
[u/mrichter/AliRoot.git] / EVGEN / AliGenHIJINGpara.cxx
index 438a878efde738e9239bed8055e9160d75a23498..565a1ac48dae38de71036e3f110e9304e5a6db5a 100644 (file)
 
 /*
 $Log$
+Revision 1.11  2002/03/20 10:21:13  hristov
+Set fPtMax to 15 GeV in order to avoid some numerical problems
+
+Revision 1.10  2001/10/15 16:44:46  morsch
+- Possibility for vertex distribution truncation.
+- Write mc header with vertex position.
+
 Revision 1.9  2001/07/27 17:09:36  morsch
 Use local SetTrack, KeepTrack and SetHighWaterMark methods
 to delegate either to local stack or to stack owned by AliRun.
@@ -195,6 +202,7 @@ AliGenHIJINGpara::AliGenHIJINGpara()
     fETApic = 0;
     fETAkac = 0;
     SetCutVertexZ();
+    SetPtRange();
 }
 
 //_____________________________________________________________________________
@@ -211,6 +219,7 @@ AliGenHIJINGpara::AliGenHIJINGpara(Int_t npart)
     fETApic = 0;
     fETAkac = 0;
     SetCutVertexZ();
+    SetPtRange();
 }
 
 //_____________________________________________________________________________
@@ -240,27 +249,27 @@ void AliGenHIJINGpara::Init()
     fETApic = new TF1("etapic",&etapic,etaMin,etaMax,0);
     fETAkac = new TF1("etakac",&etakac,etaMin,etaMax,0);
 
-    TF1 *etaPic0 = new TF1("etapic",&etapic,-7,7,0);
-    TF1 *etaKac0 = new TF1("etakac",&etakac,-7,7,0);
+    TF1 etaPic0("etapic",&etapic,-7,7,0);
+    TF1 etaKac0("etakac",&etakac,-7,7,0);
 
-    TF1 *ptPic0  = new TF1("ptpi",&ptpi,0.,15.,0);
-    TF1 *ptKac0  = new TF1("ptka",&ptka,0.,15.,0);
+    TF1 ptPic0("ptpi",&ptpi,0.,15.,0);
+    TF1 ptKac0("ptka",&ptka,0.,15.,0);
 
-    Float_t intETApi  = etaPic0->Integral(-0.5, 0.5);
-    Float_t intETAka  = etaKac0->Integral(-0.5, 0.5);
+    Float_t intETApi  = etaPic0.Integral(-0.5, 0.5);
+    Float_t intETAka  = etaKac0.Integral(-0.5, 0.5);
     Float_t scalePi   = 7316/(intETApi/1.5);
     Float_t scaleKa   =  684/(intETAka/2.0);
 
 //  Fraction of events corresponding to the selected pt-range    
-    Float_t intPt    = (0.877*ptPic0->Integral(0, 15)+
-                       0.123*ptKac0->Integral(0, 15));
-    Float_t intPtSel = (0.877*ptPic0->Integral(fPtMin, fPtMax)+
-                       0.123*ptKac0->Integral(fPtMin, fPtMax));
+    Float_t intPt    = (0.877*ptPic0.Integral(0, 15)+
+                       0.123*ptKac0.Integral(0, 15));
+    Float_t intPtSel = (0.877*ptPic0.Integral(fPtMin, fPtMax)+
+                       0.123*ptKac0.Integral(fPtMin, fPtMax));
     Float_t ptFrac   = intPtSel/intPt;
 
 //  Fraction of events corresponding to the selected eta-range    
-    Float_t intETASel  = (scalePi*etaPic0->Integral(etaMin, etaMax)+
-                         scaleKa*etaKac0->Integral(etaMin, etaMax));
+    Float_t intETASel  = (scalePi*etaPic0.Integral(etaMin, etaMax)+
+                         scaleKa*etaKac0.Integral(etaMin, etaMax));
 //  Fraction of events corresponding to the selected phi-range    
     Float_t phiFrac    = (fPhiMax-fPhiMin)/2/TMath::Pi();
 
@@ -371,4 +380,7 @@ AliGenHIJINGpara& AliGenHIJINGpara::operator=(const  AliGenHIJINGpara& rhs)
     return *this;
 }
 
+void AliGenHIJINGpara::SetPtRange(Float_t ptmin, Float_t ptmax) {
+  AliGenerator::SetPtRange(ptmin, ptmax);
+}