]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
setter for nonflow
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Apr 2009 17:49:00 +0000 (17:49 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 30 Apr 2009 17:49:00 +0000 (17:49 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimpleMakerOnTheFly.h
PWG2/FLOW/macros/runFlowAnalysisOnTheFly.C

index 8784e51cfb8bcac83228d331c3a3024f850cc1a0..269aab51e92ae78f56abc8863fdfd3344e1ad1e2 100644 (file)
@@ -48,7 +48,8 @@ AliFlowEventSimpleMakerOnTheFly::AliFlowEventSimpleMakerOnTheFly(UInt_t iseed):
   fPtSpectra(NULL),
   fPhiDistribution(NULL),
   fMyTRandom3(NULL),
-  fCount(0)
+  fCount(0),
+  fNoOfLoops(1)
  {
   // constructor
    fMyTRandom3 = new TRandom3(iseed); 
@@ -114,18 +115,25 @@ AliFlowEventSimple* AliFlowEventSimpleMakerOnTheFly::CreateEventOnTheFly()
   Int_t iGoodTracks = 0;
   Int_t iSelParticlesRP = 0;
   Int_t iSelParticlesPOI = 0;
+  Double_t fTmpPt =0;
+  Double_t fTmpEta =0;
+  Double_t fTmpPhi =0;
   for(Int_t i=0;i<fNewMultiplicityOfRP;i++) {
-    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
-    pTrack->SetPt(fPtSpectra->GetRandom());
-    pTrack->SetEta(fMyTRandom3->Uniform(dEtaMin,dEtaMax));
-    pTrack->SetPhi(fPhiDistribution->GetRandom()+fMCReactionPlaneAngle);
-    pTrack->SetForRPSelection(kTRUE);
-    iSelParticlesRP++;
-    pTrack->SetForPOISelection(kTRUE);
-    iSelParticlesPOI++;
-
-    pEvent->TrackCollection()->Add(pTrack);
-    iGoodTracks++;
+    fTmpPt = fPtSpectra->GetRandom();
+    fTmpEta = fMyTRandom3->Uniform(dEtaMin,dEtaMax);
+    fTmpPhi = fPhiDistribution->GetRandom()+fMCReactionPlaneAngle;
+    for(Int_t d=0;d<fNoOfLoops;d++) {
+      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+      pTrack->SetPt(fTmpPt);
+      pTrack->SetEta(fTmpEta);
+      pTrack->SetPhi(fTmpPhi);
+      pTrack->SetForRPSelection(kTRUE);
+      iSelParticlesRP++;
+      pTrack->SetForPOISelection(kTRUE);
+      iSelParticlesPOI++;
+      pEvent->TrackCollection()->Add(pTrack);
+      iGoodTracks++;
+    }
   }
  
   pEvent->SetEventNSelTracksRP(iSelParticlesRP);  
index 1b5802ad3f1d2f096a159ba3e6b41d31dd02dfc5..07209e653b391e2f1d32a91d3e9310a53106dd6d 100644 (file)
@@ -56,6 +56,9 @@ class AliFlowEventSimpleMakerOnTheFly {
   Double_t GetV2SpreadRP() const {return this->fV2SpreadRP;} 
   //................................................................................................
   
+  void SetNoOfLoops(Int_t noofl) {this->fNoOfLoops = noofl;}
+  Int_t GetNoOfLoops() const {return this->fNoOfLoops;} 
+
  private:
  
   AliFlowEventSimpleMakerOnTheFly(const AliFlowEventSimpleMakerOnTheFly& anAnalysis);            // copy constructor
@@ -63,22 +66,24 @@ class AliFlowEventSimpleMakerOnTheFly {
   
   //................................................................................................
   // global parameters:
-  Int_t fMultiplicityOfRP;          // multiplicity of RPs
-  Double_t fMultiplicitySpreadOfRP; // multiplicity spread of RPs  
-  Double_t fV1RP;                   // directed flow of RPs
-  Double_t fV1SpreadRP;             // directed flow spread of RPs
-  Double_t fV2RP;                   // elliptic flow of RPs
-  Double_t fV2SpreadRP;             // elliptic flow spread of RPs
+  Int_t     fMultiplicityOfRP;          // multiplicity of RPs
+  Double_t  fMultiplicitySpreadOfRP; // multiplicity spread of RPs  
+  Double_t  fV1RP;                   // directed flow of RPs
+  Double_t  fV1SpreadRP;             // directed flow spread of RPs
+  Double_t  fV2RP;                   // elliptic flow of RPs
+  Double_t  fV2SpreadRP;             // elliptic flow spread of RPs
   //................................................................................................
   
   //................................................................................................
   // equations for distributions: 
-  TF1 *fPtSpectra;  // transverse momentum distribution
-  TF1 *fPhiDistribution; // azimuthal distribution
+  TF1*      fPtSpectra;  // transverse momentum distribution
+  TF1*      fPhiDistribution; // azimuthal distribution
   //................................................................................................
   
   TRandom3* fMyTRandom3; // our random generator
-  Int_t fCount;
+  Int_t     fCount;
+  Int_t     fNoOfLoops; // number of times to use the same particle (nonflow)
+
 
   ClassDef(AliFlowEventSimpleMakerOnTheFly,0) // macro for rootcint
 };
index b75d7cfd0ae712cbc4a5dedb4091f7ae1352237e..5e2c63999374ad928ba4cbd30340e26a06baa441 100644 (file)
@@ -12,17 +12,18 @@ Bool_t LYZ2  = kFALSE;
 Bool_t LYZEP = kFALSE; 
 Bool_t GFC   = kTRUE;
 Bool_t QC    = kTRUE;
-Bool_t FQD   = kFALSE;
+Bool_t FQD   = kTRUE;
 Bool_t MCEP  = kTRUE; 
 //--------------------------------------------------------------------------------------
 
 //......................................................................................  
 // Set the event parameters:
+Int_t iLoops = 1; // number of times to use each track (to simulate nonflow)
 Int_t iMultiplicityOfRP = 500; // multiplicity of RPs
-Double_t dMultiplicitySpreadOfRP = 100; // multiplicity spread of RPs
+Double_t dMultiplicitySpreadOfRP = 0; // multiplicity spread of RPs
 
 Double_t dV2RP = 0.05; // elliptic flow of RPs
-Double_t dV2SpreadRP = 0.001; // elliptic flow spread of RPs
+Double_t dV2SpreadRP = 0.; // elliptic flow spread of RPs
 
 Double_t dV1RP = 0.0; // directed flow of RPs
 Double_t dV1SpreadRP = 0.0; // directed flow spread of RPs
@@ -160,6 +161,7 @@ int runFlowAnalysisOnTheFly(Int_t mode=mLocal, Int_t nEvts=100)
  //---------------------------------------------------------------------------------------
   
  // set the global event parameters: 
+ eventMakerOnTheFly->SetNoOfLoops(iLoops);
  eventMakerOnTheFly->SetMultiplicityOfRP(iMultiplicityOfRP);
  eventMakerOnTheFly->SetMultiplicitySpreadOfRP(dMultiplicitySpreadOfRP);
  eventMakerOnTheFly->SetV1RP(dV1RP);