]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
clean up of reading ESD (preparation for adding nonflow etc)
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jun 2009 12:31:50 +0000 (12:31 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 16 Jun 2009 12:31:50 +0000 (12:31 +0000)
PWG2/FLOW/AliFlowTasks/AliFlowEventSimpleMaker.cxx
PWG2/FLOW/macros/runFlowTask.C

index e28dc99b1f61fbce9096b339d08a826d70337472..3566fd56e4e1d131bfc70c030ad132883e0df560 100644 (file)
@@ -393,55 +393,63 @@ AliFlowEventSimple* AliFlowEventSimpleMaker::FillTracks(AliESDEvent* anInput, Al
 {
   //Fills the event from the ESD
   
+  //flags for particles passing int. and diff. flow cuts
+  Bool_t bPassedRPFlowCuts  = kFALSE;
+  Bool_t bPassedPOIFlowCuts = kFALSE;
+  
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
   
   AliFlowEventSimple* pEvent = new AliFlowEventSimple(10);
-    
+  
   Int_t iGoodTracks = 0;           //number of good tracks
   Int_t itrkN = 0;                 //track counter
-  Int_t iSelParticlesPOI = 0;     //number of tracks selected for Diff
   Int_t iSelParticlesRP = 0;      //number of tracks selected for Int
-
+  Int_t iSelParticlesPOI = 0;     //number of tracks selected for Diff
+  
   //normal loop
   while (itrkN < iNumberOfInputTracks) {
     AliESDtrack* pParticle = anInput->GetTrack(itrkN);   //get input particle
-    //make new AliFLowTrackSimple
-    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
-    pTrack->SetPt(pParticle->Pt() );
-    pTrack->SetEta(pParticle->Eta() );
-    pTrack->SetPhi(pParticle->Phi() );
+    
     //check if pParticle passes the cuts
-
     if (intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && 
        intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
-      pTrack->SetForRPSelection(kTRUE);
+      bPassedRPFlowCuts = kTRUE;
     }
     if (diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) && 
        diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle)) {
-      pTrack->SetForPOISelection(kTRUE);}
-
-    //check if any bits are set
-    TBits bFlowBits = pTrack->GetFlowBits();
-    if (bFlowBits.CountBits() ==0) {
-      delete pTrack; } //track will not be used anymore
-    else {
-      pEvent->TrackCollection()->Add(pTrack) ;  
-      iGoodTracks++;
-
-      if (pTrack->InRPSelection())
-       { iSelParticlesRP++; }
-      if (pTrack->InPOISelection())
-       { iSelParticlesPOI++; }
-      
+      bPassedPOIFlowCuts = kTRUE;
     }
     
+    if (bPassedRPFlowCuts || bPassedPOIFlowCuts) {
+      //make new AliFLowTrackSimple
+      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+      pTrack->SetPt(pParticle->Pt() );
+      pTrack->SetEta(pParticle->Eta() );
+      pTrack->SetPhi(pParticle->Phi() );
+      
+      //marking the particles used for int. flow:
+      if(bPassedRPFlowCuts) {  
+        pTrack->SetForRPSelection(kTRUE);
+        iSelParticlesRP++;
+      }
+      //marking the particles used for diff. flow:
+      if(bPassedPOIFlowCuts) {
+        pTrack->SetForPOISelection(kTRUE);
+        iSelParticlesPOI++;
+      }
+      //adding a particles which were used either for int. or diff. flow to the list
+      pEvent->TrackCollection()->Add(pTrack);
+      iGoodTracks++;
+    }//end of if(bPassedIntFlowCuts || bPassedDiffFlowCuts) 
     itrkN++; 
-  }
+    bPassedRPFlowCuts  = kFALSE;
+    bPassedPOIFlowCuts = kFALSE;
+  }//end of while (itrkN < iNumberOfInputTracks)
   
-  pEvent-> SetEventNSelTracksRP(iSelParticlesRP);  
+  pEvent->SetEventNSelTracksRP(iSelParticlesRP);  
   pEvent->SetNumberOfTracks(iGoodTracks);
   pEvent->SetMCReactionPlaneAngle(fMCReactionPlaneAngle);
-
+  
   if ( (++fCount % 100) == 0) {
     if (!fMCReactionPlaneAngle == 0) cout<<" MC Reaction Plane Angle = "<<  fMCReactionPlaneAngle << endl;
     else cout<<" MC Reaction Plane Angle = unknown "<< endl;
index 2421893d12abdc4e99f73378c9981427175ef8d4..f445bdb21b59f334aa8401cfd01115a0097a4d8a 100644 (file)
@@ -14,8 +14,8 @@ Bool_t LYZ2PROD = kFALSE;
 Bool_t LYZEP    = kFALSE;
 Bool_t GFC      = kTRUE;
 Bool_t QC       = kTRUE;
-Bool_t FQD      = kFALSE;
-Bool_t MCEP     = kFALSE; //not for pp 
+Bool_t FQD      = kTRUE;
+Bool_t MCEP     = kTRUE; //not for pp 
 
 Bool_t METHODS[] = {SP,LYZ1SUM,LYZ1PROD,LYZ2SUM,LYZ2PROD,LYZEP,GFC,QC,FQD,MCEP};
 
@@ -29,9 +29,10 @@ Bool_t QA = kTRUE;
 Bool_t WEIGHTS[] = {kFALSE,kFALSE,kFALSE}; //Phi, v'(pt), v'(eta)
 
 
-void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 40, 
+void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 100, 
                 //const Char_t* dataDir="/data/alice2/kolk/PP/LHC09a4/81119", Int_t offset = 0)
-                const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0)
+                //const Char_t* dataDir="/data/alice2/kolk/Therminator_midcentral", Int_t offset = 0)
+                const Char_t* dataDir="/Users/snelling/alice_data/Therminator_midcentral", Int_t offset = 0)
 //void runFlowTask(Int_t mode=mPROOF, Int_t nRuns = 10000, 
                 //      const Char_t* dataDir="/COMMON/COMMON/LHC09a4_run8158X", Int_t offset = 0)
                 //const Char_t* dataDir="/PWG2/akisiel/Therminator_c2030", Int_t offset=0)