setting some defaults
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Aug 2010 13:04:29 +0000 (13:04 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 24 Aug 2010 13:04:29 +0000 (13:04 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h

index 28c58ea..c54eb1a 100644 (file)
@@ -148,14 +148,19 @@ AliFlowEventSimple::~AliFlowEventSimple()
 
 //-----------------------------------------------------------------------
 void AliFlowEventSimple::Generate(Int_t nParticles,
-                                        TF1* ptDist,
-                                        Double_t phiMin,
-                                        Double_t phiMax,
-                                        Double_t etaMin,
-                                        Double_t etaMax)
+                                  TF1* ptDist,
+                                  Double_t phiMin,
+                                  Double_t phiMax,
+                                  Double_t etaMin,
+                                  Double_t etaMax)
 {
   //generate nParticles random tracks uniform in phi and eta
   //according to the specified pt distribution
+  if (!ptDist)
+  {
+    static TF1 ptdistribution("ptSpectra","x*TMath::Exp(-pow(0.13957*0.13957+x*x,0.5)/0.4)",0.1,10.);
+    ptDist=&ptdistribution;
+  }
   for (Int_t i=0; i<nParticles; i++)
   {
     AliFlowTrackSimple* track = new AliFlowTrackSimple();
@@ -165,6 +170,7 @@ void AliFlowEventSimple::Generate(Int_t nParticles,
     track->SetCharge( (gRandom->Uniform()-0.5<0)?-1:1 );
     AddTrack(track);
   }
+  fMCReactionPlaneAngle=gRandom->Uniform(0.0,TMath::TwoPi());
 }
 
 //-----------------------------------------------------------------------
index b6774ef..62e5e94 100644 (file)
@@ -41,7 +41,7 @@ class AliFlowEventSimple: public TObject {
   virtual  ~AliFlowEventSimple();
 
   virtual void Generate( Int_t nParticles,
-                         TF1* ptDist,
+                         TF1* ptDist=NULL,
                          Double_t phiMin=0,
                          Double_t phiMax=TMath::TwoPi(),
                          Double_t etaMin=-1.0,