]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
putting more functionality into the flow event
authorsnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Apr 2010 10:13:11 +0000 (10:13 +0000)
committersnelling <snelling@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Apr 2010 10:13:11 +0000 (10:13 +0000)
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.cxx
PWG2/FLOW/AliFlowCommon/AliFlowEventSimple.h
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.cxx
PWG2/FLOW/AliFlowTasks/AliAnalysisTaskFlowEvent.h
PWG2/FLOW/AliFlowTasks/AliFlowEvent.cxx
PWG2/FLOW/macros/compareFlowResults.C
PWG2/FLOW/macros/makeWeights.C
PWG2/FLOW/macros/redoFinish.C
PWG2/FLOW/macros/runFlowTask.C
PWG2/FLOW/macros/showSpread.C

index ce58e1469dfec1268075f783d5df3eb41018ac00..0c9087a969d2e184a1ad1fa5a1c6d300406f3707 100644 (file)
@@ -485,7 +485,7 @@ void AliFlowEventSimple::ResolutionPt(Double_t res)
 }
 
 //_____________________________________________________________________________
-void AliFlowEventSimple::SubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB )
+void AliFlowEventSimple::TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB )
 {
   //Flag two subevents in given eta ranges
   for (Int_t i=0; i<fNumberOfTracks; i++)
index 322eab0f6823d1ffd004bc7b75cbf7c21d392281..e4c85dd63406d3c3f15c23fa9d2997b029c44167 100644 (file)
@@ -44,8 +44,8 @@ class AliFlowEventSimple: public TObject {
   Bool_t   IsSetMCReactionPlaneAngle() const        { return fMCReactionPlaneAngleIsSet; }
 
   void ResolutionPt(Double_t res);
+  void TagSubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
   void CloneTracks(Int_t n);
-  void SubeventsInEta(Double_t etaMinA, Double_t etaMaxA, Double_t etaMinB, Double_t etaMaxB );
   void AddFlow( Double_t flow );
  
   AliFlowTrackSimple* GetTrack(Int_t i);
index dd4383a72c1af46fc714861809bd0a8c5cbdab77..973af3176f65daa5bc1ab6093b042c25d9979c96 100644 (file)
@@ -10,7 +10,7 @@
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
-* provided "as is" without express or implied warranty.                  * 
+* provided "as is" without express or implied warranty.                  *
 **************************************************************************/
 
 ////////////////////////////////////////////////////
@@ -18,8 +18,8 @@
 //
 // analysis task for filling the flow event
 // from MCEvent, ESD, AOD ....
-// and put it in an output stream so it can 
-// be used by the various flow analysis methods 
+// and put it in an output stream so it can
+// be used by the various flow analysis methods
 // for cuts the correction framework is used
 // which also outputs QA histograms to view
 // the effects of the cuts
 #include "AliGenEposEventHeader.h"
 
 // Interface to make the Flow Event Simple used in the flow analysis methods
-#include "AliFlowEventSimple.h"
-#include "AliFlowEventSimpleMaker.h"
+#include "AliFlowEvent.h"
 
 #include "AliAnalysisTaskFlowEvent.h"
 
 ClassImp(AliAnalysisTaskFlowEvent)
-  
+
 //________________________________________________________________________
-AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() : 
-  AliAnalysisTaskSE(), 
+AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
+  AliAnalysisTaskSE(),
   //  fOutputFile(NULL),
-  fEventMaker(NULL),
   fAnalysisType("ESD"),
   fCFManager1(NULL),
   fCFManager2(NULL),
@@ -98,10 +96,9 @@ AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent() :
 }
 
 //________________________________________________________________________
-AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed) : 
-  AliAnalysisTaskSE(name), 
-//  fOutputFile(NULL),
-  fEventMaker(NULL),
+AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed) :
+  AliAnalysisTaskSE(name),
+  //  fOutputFile(NULL),
   fAnalysisType("ESD"),
   fCFManager1(NULL),
   fCFManager2(NULL),
@@ -126,16 +123,18 @@ AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on,
 {
   // Constructor
   cout<<"AliAnalysisTaskFlowEvent::AliAnalysisTaskFlowEvent(const char *name, Bool_t on, UInt_t iseed)"<<endl;
-  fMyTRandom3 = new TRandom3(iseed);   
+  fMyTRandom3 = new TRandom3(iseed);
   gRandom->SetSeed(fMyTRandom3->Integer(65539));
 
 
   // Define output slots here
   // Define here the flow event output
-  DefineOutput(1, AliFlowEventSimple::Class());  
-  if(on) {
+  DefineOutput(1, AliFlowEventSimple::Class());
+  if(on)
+  {
     DefineOutput(2, TList::Class());
-    DefineOutput(3, TList::Class()); }  
+    DefineOutput(3, TList::Class());
+  }
   // and for testing open an output file
   //  fOutputFile = new TFile("FlowEvents.root","RECREATE");
 
@@ -148,196 +147,170 @@ AliAnalysisTaskFlowEvent::~AliAnalysisTaskFlowEvent()
   // Destructor
   //
   if (fMyTRandom3) delete fMyTRandom3;
-  // objects in the output list are deleted 
+  // objects in the output list are deleted
   // by the TSelector dtor (I hope)
 
 }
 
 //________________________________________________________________________
-void AliAnalysisTaskFlowEvent::UserCreateOutputObjects() 
+void AliAnalysisTaskFlowEvent::UserCreateOutputObjects()
 {
   // Called at every worker node to initialize
   cout<<"AliAnalysisTaskFlowEvent::CreateOutputObjects()"<<endl;
 
-  if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMC0"  || fAnalysisType == "ESDMC1" || fAnalysisType == "MC")) {
-    cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMC0, ESDMC1, AOD and MC are allowed."<<endl;
+  if (!(fAnalysisType == "AOD" || fAnalysisType == "ESD" || fAnalysisType == "ESDMCkineESD"  || fAnalysisType == "ESDMCkineMC" || fAnalysisType == "MC"))
+  {
+    cout<<"WRONG ANALYSIS TYPE! only ESD, ESDMCkineESD, ESDMCkineMC, AOD and MC are allowed."<<endl;
     exit(1);
   }
-
-  // Flow Event maker
-  fEventMaker = new AliFlowEventSimpleMaker();
 }
 
 //________________________________________________________________________
-void AliAnalysisTaskFlowEvent::UserExec(Option_t *) 
+void AliAnalysisTaskFlowEvent::UserExec(Option_t *)
 {
   // Main loop
   // Called for each event
-  AliFlowEventSimple* fEvent = NULL;
-  Double_t fRP = 0.; // the monte carlo reaction plane angle
-  AliMCEvent* mcEvent = fMCEvent; // from TaskSE
-  AliESDEvent* myESD = dynamic_cast<AliESDEvent*>(fInputEvent); // from TaskSE
-  AliAODEvent* myAOD = dynamic_cast<AliAODEvent*>(fInputEvent); // from TaskSE
-
-  // if monte carlo event get reaction plane from monte carlo (depends on generator) 
-  if (mcEvent && mcEvent-> GenEventHeader()) {
-
-    //COCKTAIL with HIJING
-    if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"Cocktail Header")) { //returns 0 if matches
-      AliGenCocktailEventHeader *headerC = dynamic_cast<AliGenCocktailEventHeader *> (mcEvent-> GenEventHeader()); 
-      if (headerC) {
-       TList *lhd = headerC->GetHeaders();
-       if (lhd) {
-         AliGenHijingEventHeader *hdh = dynamic_cast<AliGenHijingEventHeader *> (lhd->At(0)); 
-         if (hdh) {
-           fRP = hdh->ReactionPlaneAngle();
-           fEventMaker->SetMCReactionPlaneAngle(fRP);
-           //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
-         }
-       }
-      }
-      //else { cout<<"headerC is NULL"<<endl; }
-    }
-    
-    //GEVSIM
-    else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"GeVSim header")) { //returns 0 if matches
-      AliGenGeVSimEventHeader* headerG = (AliGenGeVSimEventHeader*)(mcEvent->GenEventHeader());
-      if (headerG) {
-       fRP = headerG->GetEventPlane();
-       fEventMaker->SetMCReactionPlaneAngle(fRP);
-       //cout<<"The reactionPlane from GeVSim is: "<< fRP <<endl;
-      }
-      //else { cout<<"headerG is NULL"<<endl; }
-    }
-    
-    //HIJING
-    else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),"Hijing")) { //returns 0 if matches
-      AliGenHijingEventHeader* headerH = (AliGenHijingEventHeader*)(mcEvent->GenEventHeader());
-      if (headerH) {
-       fRP = headerH->ReactionPlaneAngle();
-       fEventMaker->SetMCReactionPlaneAngle(fRP);
-       //cout<<"The reactionPlane from Hijing is: "<< fRP <<endl;
-      }
-      //else { cout<<"headerH is NULL"<<endl; }
-    }
-    
-    //EPOS
-    else if (!strcmp(mcEvent->GenEventHeader()->GetName(),"EPOS")) {
-      AliGenEposEventHeader* headerE = (AliGenEposEventHeader*)(mcEvent->GenEventHeader());
-      if (headerE) {
-       fRP = headerE->ReactionPlaneAngle();
-       fEventMaker->SetMCReactionPlaneAngle(fRP);
-       //cout<<"The reactionPlane from EPOS is: "<< fR <<endl;
-      }
-      //else { cout<<"headerE is NULL"<<endl; }
-    }
-  }
-
-  //setting event cuts
-  fEventMaker->SetMinMult(fMinMult);
-  fEventMaker->SetMaxMult(fMaxMult);
-  //setting ranges for eta subevents
-  fEventMaker->SetSubeventEtaRange(fMinA,fMaxA,fMinB,fMaxB);
-
-  //TODO
-  if (fbAfterburnerOn && fMyTRandom3) {  
-    // set the new value of the values using a after burner
-    cout << "settings for afterburner in TaskFlowEvent.cxx:" << endl;
-    cout << "fCount = " << fCount << endl;
-    cout << "fNoOfLoops = " << fNoOfLoops << endl;
-    cout << "fEllipticFlowValue = " << fEllipticFlowValue << endl;
-    cout << "fSigmaEllipticFlowValue = " << fSigmaEllipticFlowValue << endl;
-    cout << "fMultiplicityOfEvent = " << fMultiplicityOfEvent << endl;
-    cout << "fSigmaMultiplicityOfEvent = " << fSigmaMultiplicityOfEvent << endl;
-    Double_t xRPangle;
-    if (!mcEvent) { xRPangle = TMath::TwoPi()*(fMyTRandom3->Rndm()); }
-    else { xRPangle = fRP; }
-    Double_t xNewFlowValue = fMyTRandom3->Gaus(fEllipticFlowValue,fSigmaEllipticFlowValue);
-    Int_t nNewMultOfEvent =  TMath::Nint(fMyTRandom3->Gaus(fMultiplicityOfEvent,fSigmaMultiplicityOfEvent));
-
-    cout << "xRPangle = " << xRPangle << endl;
-    cout << "xNewFlowValue = " << xNewFlowValue << endl;
-    cout << "nNewMultOfEvent = " << nNewMultOfEvent << endl;
-    cout << "settings for after burner" << endl;  
-
-    fEventMaker->SetMCReactionPlaneAngle(xRPangle);
-    fEventMaker->SetNoOfLoops(fNoOfLoops);
-    fEventMaker->SetEllipticFlowValue(xNewFlowValue);
-    fEventMaker->SetMultiplicityOfEvent(nNewMultOfEvent);  
-    //end settings afterburner
-  }
-  
-  // Fill the FlowEventSimple for MC input          
-  if (fAnalysisType == "MC") {
-    if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-    if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-
+  AliFlowEvent* flowEvent = NULL;
+  AliMCEvent*  mcEvent = MCEvent();                              // from TaskSE
+  AliESDEvent* myESD = dynamic_cast<AliESDEvent*>(InputEvent()); // from TaskSE
+  AliAODEvent* myAOD = dynamic_cast<AliAODEvent*>(InputEvent()); // from TaskSE
+
+  // Make the FlowEvent for MC input
+  if (fAnalysisType == "MC")
+  {
     // Process MC truth, therefore we receive the AliAnalysisManager and ask it for the AliMCEventHandler
     // This handler can return the current MC event
-    if (!mcEvent) { Printf("ERROR: Could not retrieve MC event"); return;}
+    if (!(fCFManager1&&fCFManager2))
+    {
+      cout << "ERROR: No pointer to correction framework cuts! " << endl;
+      return;
+    }
+    if (!mcEvent)
+    {
+      Printf("ERROR: Could not retrieve MC event");
+      return;
+    }
 
     fCFManager1->SetMCEventInfo(mcEvent);
     fCFManager2->SetMCEventInfo(mcEvent);
-
-    // analysis 
+    
     Printf("Number of MC particles: %d", mcEvent->GetNumberOfTracks());
-    fEvent = fEventMaker->FillTracks(mcEvent,fCFManager1,fCFManager2);
+    // analysis
+    flowEvent = new AliFlowEvent(mcEvent,fCFManager1,fCFManager2);
   }
-
-  // Fill the FlowEventSimple for ESD input  
-  else if (fAnalysisType == "ESD") {
-    if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-    if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-    
-    if (!myESD) { Printf("ERROR: ESD not available"); return;}
+  // Make the FlowEvent for ESD input
+  else if (fAnalysisType == "ESD")
+  {
+    if (!(fCFManager1&&fCFManager2))
+    {
+      cout << "ERROR: No pointer to correction framework cuts! " << endl;
+      return;
+    }
+    if (!myESD)
+    {
+      Printf("ERROR: ESD not available");
+      return;
+    }
     //check the offline trigger (check if the event has the correct trigger)
     Printf("There are %d tracks in this event", fInputEvent->GetNumberOfTracks());
-    // analysis 
-    fEvent = fEventMaker->FillTracks(myESD,fCFManager1,fCFManager2);
+    // analysis
+    flowEvent = new AliFlowEvent(myESD,fCFManager1,fCFManager2);
   }
-  // Fill the FlowEventSimple for ESD input combined with MC info  
-  else if (fAnalysisType == "ESDMC0" || fAnalysisType == "ESDMC1" ) {
-    if (!fCFManager1) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-    if (!fCFManager2) {cout << "ERROR: No pointer to correction framework cuts! " << endl; return; }
-
-    if (!myESD) { Printf("ERROR: ESD not available"); return;}
+  // Make the FlowEvent for ESD input combined with MC info
+  else if (fAnalysisType == "ESDMCkineESD" || fAnalysisType == "ESDMCkineMC" )
+  {
+    if (!(fCFManager1&&fCFManager2))
+    {
+      cout << "ERROR: No pointer to correction framework cuts! " << endl;
+      return;
+    }
+    if (!myESD)
+    {
+      Printf("ERROR: ESD not available");
+      return;
+    }
     Printf("There are %d tracks in this event", fInputEvent->GetNumberOfTracks());
-    
-    if (!mcEvent) {Printf("ERROR: Could not retrieve MC event"); return;}
+
+    if (!mcEvent)
+    {
+      Printf("ERROR: Could not retrieve MC event");
+      return;
+    }
 
     fCFManager1->SetMCEventInfo(mcEvent);
     fCFManager2->SetMCEventInfo(mcEvent);
 
-
-    if (fAnalysisType == "ESDMC0") { 
-      fEvent = fEventMaker->FillTracks(myESD, mcEvent, fCFManager1, fCFManager2, 0); //0 = kine from ESD, 1 = kine from MC
-    } else if (fAnalysisType == "ESDMC1") {
-      fEvent = fEventMaker->FillTracks(myESD, mcEvent, fCFManager1, fCFManager2, 1); //0 = kine from ESD, 1 = kine from MC
+    if (fAnalysisType == "ESDMCkineESD")
+    {
+      flowEvent = new AliFlowEvent(myESD, mcEvent, AliFlowEvent::kESDkine, fCFManager1, fCFManager2 );
+    }
+    else if (fAnalysisType == "ESDMCkineMC")
+    {
+      flowEvent = new AliFlowEvent(myESD, mcEvent, AliFlowEvent::kMCkine, fCFManager1, fCFManager2 );
     }
   }
-  // Fill the FlowEventSimple for AOD input  
-  else if (fAnalysisType == "AOD") {
-    if (!myAOD) {Printf("ERROR: AOD not available"); return;}
+  // Make the FlowEventSimple for AOD input
+  else if (fAnalysisType == "AOD")
+  {
+    if (!myAOD)
+    {
+      Printf("ERROR: AOD not available");
+      return;
+    }
     Printf("There are %d tracks in this event", myAOD->GetNumberOfTracks());
-
-    // analysis 
-    //For the moment don't use CF //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fOutputAOD,fCFManager1,fCFManager2);
-    fEvent = fEventMaker->FillTracks(myAOD);
+    flowEvent = new AliFlowEvent(myAOD);
   }
 
+  //check event cuts
+  Int_t mult = flowEvent->NumberOfTracks();
+  if (mult<fMinMult && mult>fMaxMult) return;
+
+  //tag subevents
+  flowEvent->TagSubeventsInEta(fMinA,fMaxA,fMinB,fMaxB);
+
+  ////TODO afterburner
+  //if (fbAfterburnerOn && fMyTRandom3) {
+  //  // set the new value of the values using a after burner
+  //  cout << "settings for afterburner in TaskFlowEvent.cxx:" << endl;
+  //  cout << "fCount = " << fCount << endl;
+  //  cout << "fNoOfLoops = " << fNoOfLoops << endl;
+  //  cout << "fEllipticFlowValue = " << fEllipticFlowValue << endl;
+  //  cout << "fSigmaEllipticFlowValue = " << fSigmaEllipticFlowValue << endl;
+  //  cout << "fMultiplicityOflowEvent = " << fMultiplicityOflowEvent << endl;
+  //  cout << "fSigmaMultiplicityOflowEvent = " << fSigmaMultiplicityOflowEvent << endl;
+  //  Double_t xRPangle;
+  //  if (!mcEvent) { xRPangle = TMath::TwoPi()*(fMyTRandom3->Rndm()); }
+  //  else { xRPangle = fRP; }
+  //  Double_t xNewFlowValue = fMyTRandom3->Gaus(fEllipticFlowValue,fSigmaEllipticFlowValue);
+  //  Int_t nNewMultOflowEvent =  TMath::Nint(fMyTRandom3->Gaus(fMultiplicityOflowEvent,fSigmaMultiplicityOflowEvent));
+  //  cout << "xRPangle = " << xRPangle << endl;
+  //  cout << "xNewFlowValue = " << xNewFlowValue << endl;
+  //  cout << "nNewMultOflowEvent = " << nNewMultOflowEvent << endl;
+  //  cout << "settings for after burner" << endl;
+  //  flowEventMaker->SetMCReactionPlaneAngle(xRPangle);
+  //  flowEventMaker->SetNoOfLoops(fNoOfLoops);
+  //  flowEventMaker->SetEllipticFlowValue(xNewFlowValue);
+  //  flowEventMaker->SetMultiplicityOflowEvent(nNewMultOflowEvent);
+  //  //end settings afterburner
+  //}
+
+  // if monte carlo event get reaction plane from monte carlo (depends on generator)
+  if (mcEvent && mcEvent->GenEventHeader()) flowEvent->SetMCReactionPlaneAngle(mcEvent);
+
   //fListHistos->Print();
-  //  fOutputFile->WriteObject(fEvent,"myFlowEventSimple");    
-  PostData(1,fEvent);
-  if (fQA) {
+  //  fOutputFile->WriteObject(flowEvent,"myFlowEventSimple");
+  PostData(1,flowEvent);
+  if (fQA)
+  {
     PostData(2,fQAInt);
-    PostData(3,fQADiff); }
-} 
+    PostData(3,fQADiff);
+  }
+}
 
 //________________________________________________________________________
-void AliAnalysisTaskFlowEvent::Terminate(Option_t *) 
+void AliAnalysisTaskFlowEvent::Terminate(Option_t *)
 {
   // Called once at the end of the query -- do not call in case of CAF
-
 }
 
 
index 14bdb57ea2205b925ab238c7507e082cc61d9eed..e02f3c36bb83b6b93bffeb25614d36e0921cb63d 100644 (file)
@@ -76,7 +76,6 @@ class AliAnalysisTaskFlowEvent : public AliAnalysisTaskSE {
   //  TFile*        fOutputFile;              // temporary output file for testing
   //  AliESDEvent*  fESD;                   // ESD object
   //  AliAODEvent*  fAOD;                   // AOD object
-  AliFlowEventSimpleMaker* fEventMaker; // FlowEventSimple maker object
   TString       fAnalysisType;          // can be MC, ESD or AOD
   AliCFManager* fCFManager1;            // correction framework manager
   AliCFManager* fCFManager2;            // correction framework manager
index 1ce65f5cd438044db7da2e9d76f57611d2cc58a5..ea24a8b938b19276f993bf491a7df1cfb4ce1e0e 100644 (file)
@@ -112,41 +112,41 @@ AliFlowEvent::AliFlowEvent( const AliMCEvent* anInput,
 
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
 
-    //loop over tracks
-    for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+  //loop over tracks
+  for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+  {
+    //get input particle
+    AliMCParticle* pParticle = dynamic_cast<AliMCParticle*>(anInput->GetTrack(itrkN));
+    if (!pParticle) continue;
+
+    //check if pParticle passes the cuts
+    Bool_t rpOK = kTRUE;
+    Bool_t poiOK = kTRUE;
+    if (intCFManager && diffCFManager)
     {
-      //get input particle
-      AliMCParticle* pParticle = dynamic_cast<AliMCParticle*>(anInput->GetTrack(itrkN));
-      if (!pParticle) continue;
-
-      //check if pParticle passes the cuts
-      Bool_t rpOK = kTRUE;
-      Bool_t poiOK = kTRUE;
-      if (intCFManager && diffCFManager)
-      {
-        rpOK = intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
-        poiOK = diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
-      }
-      if (!(rpOK||poiOK)) continue;
+      rpOK = intCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
+      poiOK = diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
+    }
+    if (!(rpOK||poiOK)) continue;
 
-      //TODO maybe make a class AliFlowTrack with a constructor from AliVParticle
-      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
-      pTrack->SetEta(pParticle->Eta());
-      pTrack->SetPhi(pParticle->Phi());
-      pTrack->SetPt(pParticle->Pt());
+    //TODO maybe make a class AliFlowTrack with a constructor from AliVParticle
+    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+    pTrack->SetEta(pParticle->Eta());
+    pTrack->SetPhi(pParticle->Phi());
+    pTrack->SetPt(pParticle->Pt());
 
-      if (rpOK && intCFManager)
-      {
-        pTrack->SetForRPSelection(kTRUE);
-        fEventNSelTracksRP++;
-      }
-      if (poiOK && diffCFManager)
-      {
-        pTrack->SetForPOISelection(kTRUE);
-      }
+    if (rpOK && intCFManager)
+    {
+      pTrack->SetForRPSelection(kTRUE);
+      fEventNSelTracksRP++;
+    }
+    if (poiOK && diffCFManager)
+    {
+      pTrack->SetForPOISelection(kTRUE);
+    }
 
-      AddTrack(pTrack) ;
-    }//for all tracks
+    AddTrack(pTrack) ;
+  }//for all tracks
   SetMCReactionPlaneAngle(anInput);
 }
 
@@ -208,40 +208,40 @@ AliFlowEvent::AliFlowEvent( const AliAODEvent* anInput,
   //Fills the event from the AOD
   Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
 
-    //loop over tracks
+  //loop over tracks
   for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
-    {
-      AliAODTrack* pParticle = anInput->GetTrack(itrkN);   //get input particle
+  {
+    AliAODTrack* pParticle = anInput->GetTrack(itrkN);   //get input particle
 
-      //check if pParticle passes the cuts
-      Bool_t rpOK = kTRUE;
-      Bool_t poiOK = kTRUE;
-      if (intCFManager && diffCFManager)
-      {
-        rpOK = ( intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
-                 intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
-        poiOK = ( diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
-                  diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
-      }
-      if (!(rpOK || poiOK)) continue;
+    //check if pParticle passes the cuts
+    Bool_t rpOK = kTRUE;
+    Bool_t poiOK = kTRUE;
+    if (intCFManager && diffCFManager)
+    {
+      rpOK = ( intCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+               intCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
+      poiOK = ( diffCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
+                diffCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
+    }
+    if (!(rpOK || poiOK)) continue;
 
-      //make new AliFlowTrackSimple
-      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
-      pTrack->SetPt(pParticle->Pt() );
-      pTrack->SetEta(pParticle->Eta() );
-      pTrack->SetPhi(pParticle->Phi() );
+    //make new AliFlowTrackSimple
+    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+    pTrack->SetPt(pParticle->Pt() );
+    pTrack->SetEta(pParticle->Eta() );
+    pTrack->SetPhi(pParticle->Phi() );
 
-      if (rpOK && intCFManager)
-      {
-        pTrack->SetForRPSelection(kTRUE);
-        fEventNSelTracksRP++;
-      }
-      if (poiOK && diffCFManager)
-      {
-        pTrack->SetForPOISelection(kTRUE);
-      }
-      AddTrack(pTrack);
+    if (rpOK && intCFManager)
+    {
+      pTrack->SetForRPSelection(kTRUE);
+      fEventNSelTracksRP++;
     }
+    if (poiOK && diffCFManager)
+    {
+      pTrack->SetForPOISelection(kTRUE);
+    }
+    AddTrack(pTrack);
+  }
 
   //  if (iSelParticlesRP >= fMinMult && iSelParticlesRP <= fMaxMult)
   //  {
@@ -296,21 +296,21 @@ AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
 
   //loop over ESD tracks
   for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
+  {
+    AliESDtrack* pParticle = anInput->GetTrack(itrkN);   //get input particle
+    //get Label
+    Int_t iLabel = pParticle->GetLabel();
+    //match to mc particle
+    AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
+
+    //check
+    if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<"  "<<pMcParticle->Label()<<endl;
+
+    //check if pParticle passes the cuts
+    Bool_t rpOK = kTRUE;
+    Bool_t poiOK = kTRUE;
+    if (intCFManager && diffCFManager)
     {
-      AliESDtrack* pParticle = anInput->GetTrack(itrkN);   //get input particle
-      //get Label
-      Int_t iLabel = pParticle->GetLabel();
-      //match to mc particle
-      AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
-
-      //check
-      if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label()) cout<<"pParticle->GetLabel()!=pMcParticle->Label() "<<pParticle->GetLabel()<<"  "<<pMcParticle->Label()<<endl;
-
-      //check if pParticle passes the cuts
-      Bool_t rpOK = kTRUE;
-      Bool_t poiOK = kTRUE;
-      if (intCFManager && diffCFManager)
-      {
       if(anOption == kESDkine)
       {
         //cout<<"take the PID from the MC & the kinematics from the ESD"<<endl;
@@ -329,38 +329,38 @@ AliFlowEvent::AliFlowEvent( const AliESDEvent* anInput,
         if (diffCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
           poiOK=kTRUE;
       }
-      }
-
-      if (!(rpOK || poiOK)) continue;
+    }
 
-      //make new AliFlowTrackSimple
-      AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
-      if(anOption == kESDkine)   //take the PID from the MC & the kinematics from the ESD
-      {
-        pTrack->SetPt(pParticle->Pt() );
-        pTrack->SetEta(pParticle->Eta() );
-        pTrack->SetPhi(pParticle->Phi() );
-      }
-      else if (anOption == kMCkine)   //take the PID and kinematics from the MC
-      {
-        pTrack->SetPt(pMcParticle->Pt() );
-        pTrack->SetEta(pMcParticle->Eta() );
-        pTrack->SetPhi(pMcParticle->Phi() );
-      }
-      else
-      {
-        cout<<"Not a valid option"<<endl;
-      }
+    if (!(rpOK || poiOK)) continue;
 
-      if (rpOK && intCFManager)
-      {
-        fEventNSelTracksRP++;
-        pTrack->SetForRPSelection();
-      }
-      if (poiOK && diffCFManager) pTrack->SetForPOISelection();
+    //make new AliFlowTrackSimple
+    AliFlowTrackSimple* pTrack = new AliFlowTrackSimple();
+    if(anOption == kESDkine)   //take the PID from the MC & the kinematics from the ESD
+    {
+      pTrack->SetPt(pParticle->Pt() );
+      pTrack->SetEta(pParticle->Eta() );
+      pTrack->SetPhi(pParticle->Phi() );
+    }
+    else if (anOption == kMCkine)   //take the PID and kinematics from the MC
+    {
+      pTrack->SetPt(pMcParticle->Pt() );
+      pTrack->SetEta(pMcParticle->Eta() );
+      pTrack->SetPhi(pMcParticle->Phi() );
+    }
+    else
+    {
+      cout<<"Not a valid option"<<endl;
+    }
 
-      AddTrack(pTrack);
+    if (rpOK && intCFManager)
+    {
+      fEventNSelTracksRP++;
+      pTrack->SetForRPSelection();
     }
-    SetMCReactionPlaneAngle(anInputMc);
+    if (poiOK && diffCFManager) pTrack->SetForPOISelection();
+
+    AddTrack(pTrack);
+  }
+  SetMCReactionPlaneAngle(anInputMc);
 }
 
index 1bb361910c359aa0109f0454d2c7748ea9e7ab88..ca71c9f20563367e5908da551f4b64b77e34de5b 100644 (file)
@@ -1,4 +1,4 @@
-//type of analysis can be: ESD, AOD, MC, ESDMC0, ESDMC1
+//type of analysis can be: ESD, AOD, MC, ESDMCkineESD, ESDMCkineMC
 //const TString type = "ESD"; 
 
 enum libModes {mLocal,mLocalSource};
index ca6caa0fc318bc77f64aa8a7c41fc6191621d4a9..b067c96e05bd5bcff6c35f24a31ffb3fdd99506a 100755 (executable)
@@ -40,7 +40,7 @@ enum libModes {mLocal,mLocalSource};
 //void makeWeights(TString type="", TString method="GFC", TString cumulantOrder="4th", Int_t mode=mLocalSource)
 void makeWeights(TString type="", TString method="QC", TString cumulantOrder="4th", Int_t mode=mLocal)
 { 
- // 1. type: "ESD", "AOD", "ESDMC0", "ESDMC1", for Monte Carlo and 'on the fly' use simply "", ;
+ // 1. type: "ESD", "AOD", "ESDMCkineESD", "ESDMCkineMC", for Monte Carlo and 'on the fly' use simply "", ;
  // 2. method: MCEP, LYZ1, LYZ2, LYZEP, SP, FQD, GFC or QC; 
  // 3. cumulantOrder: 2nd, 4th, 6th or 8th;             
  // 4. mode: if mode = mLocal -> analyze data on your computer using aliroot
index f16c3907b4b5fc5ab99b332b676922e9c7837ceb..f8b1f0d30336c9d3dc693605710ec49b2c623ecc 100644 (file)
@@ -5,7 +5,7 @@ enum libModes {mLocal,mLocalSource};
 
 void redoFinish(TString type="ESD", Int_t mode=mLocal)
 {
- // type: type of analysis can be ESD, AOD, MC, ESDMC0, ESDMC1
+ // type: type of analysis can be ESD, AOD, MC, ESDMCkineESD, ESDMCkineMC
  //       (if type="" output files are from MC simulation (default))
  // mode: if mode = mLocal: analyze data on your computer using aliroot
  //       if mode = mLocalSource: analyze data on your computer using root + source files
index 538a9a1039eec275ed48d2c3918c699443850f4c..afb7742b260a8d6361b12837d7a5c8301bce533c 100644 (file)
@@ -21,7 +21,7 @@ Bool_t NL       = kFALSE;  // nested loops (for instance distribution of phi1-ph
 
 Bool_t METHODS[] = {SP,LYZ1SUM,LYZ1PROD,LYZ2SUM,LYZ2PROD,LYZEP,GFC,QC,FQD,MCEP,MH,NL};
 
-// Analysis type can be ESD, AOD, MC, ESDMC0, ESDMC1
+// Analysis type can be ESD, AOD, MC, ESDMCkineESD, ESDMCkineMC
 const TString type = "ESD";
 
 // Boolean to fill/not fill the QA histograms
@@ -90,7 +90,7 @@ void runFlowTask(Int_t mode=mLocal, Int_t nRuns = 1,
     } 
   }
   
-  if (type == "MC" || type == "ESDMC0" || type == "ESDMC1"){
+  if (type == "MC" || type == "ESDMCkineESD" || type == "ESDMCkineMC"){
     AliVEventHandler* esdH = new AliESDInputHandler;
     mgr->SetInputEventHandler(esdH);
     
index dc2ccc8d24427763dccc48c2b914483a762982f8..418f21c4a68817ad8151914316c587d278239489 100644 (file)
@@ -25,7 +25,7 @@ Int_t methodMeshColor[nMethods] = {kRed-10,kRed-10,kRed-10,kRed-10};
 
 void showSpread(TString type="", Int_t mode=mLocal)
 {
- // type: type of analysis can be ESD, AOD, MC, ESDMC0, ESDMC1
+ // type: type of analysis can be ESD, AOD, MC, ESDMCkineESD, ESDMCkineMC
  //       (if type="" output files are from MC simulation (default))
  // mode: if mode = mLocal: analyze data on your computer using aliroot
  //       if mode = mLocalSource: analyze data on your computer using root + source files