]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWG2/FLOW/macros/AddTaskFlow.C
adds PMD + fixes in cuts (reference multiplicity in event cuts)
[u/mrichter/AliRoot.git] / PWG2 / FLOW / macros / AddTaskFlow.C
index 43ce147d49e5814c43d0888d4fdae5bc22c1fda4..572f095bacb061e3253b696aa074a7104b76a024 100644 (file)
@@ -8,16 +8,36 @@
 /////////////////////////////////////////////////////////////////////////////////////////////
 
 // Define the range for eta subevents (for SP method)
-//(FMD 1.7 - 5.0)
+//-----(FMD 1.7 - 5.0)-----
 //Double_t minA = -5.0;
 //Double_t maxA = -1.7;
 //Double_t minB = 1.7;
 //Double_t maxB = 5.0;
-//(Tracklets 0.9 - 2.0)
-Double_t minA = -2.0;
-Double_t maxA = -0.9;
-Double_t minB = 0.9;
-Double_t maxB = 2.0;
+//-----(Tracklets 0.9 - 2.0)-----
+//Double_t minA = -2.0;
+//Double_t maxA = -0.9;
+//Double_t minB = 0.9;
+//Double_t maxB = 2.0;
+//-----(Global 0.5 - 0.9)-----
+Double_t minA = -0.9;
+Double_t maxA = -0.5;
+Double_t minB = 0.5;
+Double_t maxB = 0.9;
+
+// AFTERBURNER
+Bool_t useAfterBurner=kFALSE;
+Double_t v1=0.0;
+Double_t v2=0.0;
+Double_t v3=0.0;
+Double_t v4=0.0;
+Int_t numberOfTrackClones=0; //non-flow
+
+// Define a range of the detector to exclude
+Bool_t ExcludeRegion = kFALSE;
+Double_t excludeEtaMin = -0.;
+Double_t excludeEtaMax = 0.;
+Double_t excludePhiMin = 0.;
+Double_t excludePhiMax = 0.;
 
 // use physics selection class
 Bool_t  UsePhysicsSelection = kTRUE;
@@ -35,8 +55,8 @@ const Double_t vertexXmin = -1.e99;
 const Double_t vertexXmax = 1.e99;
 const Double_t vertexYmin = -1.e99;
 const Double_t vertexYmax = 1.e99;
-const Double_t vertexZmin = -1.e99
-const Double_t vertexZmax = 1.e99
+const Double_t vertexZmin = -10.
+const Double_t vertexZmax = 10.
 const Int_t vertexNContributorsmin = 1;
 const Int_t vertexNContributorsmax = 10000;
 
@@ -54,9 +74,10 @@ const Int_t multmax = 10000;     //used for AliFlowEventSimple (to set the centr
 const TString rptype = "Global";
 //const TString rptype = "Tracklet";
 //const TString rptype = "FMD";
+//const TString rptype = "PMD";
 
 //KINEMATICS (on generated and reconstructed tracks)
-Bool_t UseKineforRP =  kTRUE;
+Bool_t UseKineforRP =  kFALSE;
 const Double_t ptminRP = 0.0;
 const Double_t ptmaxRP = 10.0;
 const Double_t etaminRP  = -0.9;
@@ -70,7 +91,7 @@ const Int_t PdgRP = 211;
 
 //TRACK QUALITY (on reconstructed tracks only)
 //see /CORRFW/AliCFTrackQualityCuts class
-Bool_t UseTrackQualityforRP =  kTRUE;
+Bool_t UseTrackQualityforRP =  kFALSE;
 const Int_t    minClustersTpcRP = 80;           //default = -1; 
 const Double_t maxChi2PerClusterTpcRP = 4.0;    //default = 1.e+09;
 const UShort_t minDedxClusterTpcRP = 0;
@@ -84,7 +105,7 @@ const ULong_t  statusRP = AliESDtrack::kTPCrefit;   //AliESDtrack::kTPCrefit &
 
 //PRIMARY (on reconstructed tracks only)
 //see /CORRFW/AliCFTrackIsPrimaryCuts class
-Bool_t UsePrimariesforRP = kTRUE;
+Bool_t UsePrimariesforRP = kFALSE;
 const Bool_t   spdVertexRP = kFALSE;
 const Bool_t   tpcVertexRP = kFALSE;
 const Float_t  minDcaToVertexXyRP = 0.;
@@ -165,12 +186,6 @@ const Int_t minTrackrefsTrdPOI = 0;
 const Int_t minTrackrefsTofPOI = 0; 
 const Int_t minTrackrefsMuonPOI = 0; 
 
-
-//----------For Adding Flow to the Event----------
-const Bool_t AddToEvent = kFALSE;
-Double_t ellipticFlow = 0.05;
-
-
 AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA, Bool_t* WEIGHTS)
 {
   //boleans for the methods
@@ -310,27 +325,38 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
     cout<<"LYZEP input file/list read..."<<endl;
   }
   
+  
   // Create the FMD task and add it to the manager
   //===========================================================================
-  AliFMDAnalysisTaskSE *taskfmd = NULL;
   if (rptype == "FMD") {
-    taskfmd = new AliFMDAnalysisTaskSE("TaskFMD");
-    mgr->AddTask(taskfmd);
+    AliFMDAnalysisTaskSE *taskfmd = NULL;
+    if (rptype == "FMD") {
+      taskfmd = new AliFMDAnalysisTaskSE("TaskFMD");
+      mgr->AddTask(taskfmd);
   
-    AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
-    pars->Init();
-    pars->SetProcessPrimary(kTRUE);
-    pars->SetProcessHits(kFALSE);
-  }
+      AliFMDAnaParameters* pars = AliFMDAnaParameters::Instance();
+      pars->Init();
+      pars->SetProcessPrimary(kTRUE); //for MC only
+      pars->SetProcessHits(kFALSE);
 
+      //pars->SetRealData(kTRUE); //for real data
+      //pars->SetProcessPrimary(kFALSE); //for real data
+
+    }
+  }
+  
 
   // Create the task, add it to the manager.
   //===========================================================================
   AliAnalysisTaskFlowEvent *taskFE = NULL;
   if (QA) { 
-    if(AddToEvent) { 
+    if(useAfterBurner)
+    { 
       taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kTRUE,1);
-      taskFE->SetEllipticFlowValue(ellipticFlow); }    //TEST
+      taskFE->SetFlow(v1,v2,v3,v4); 
+      taskFE->SetNonFlowNumberOfTrackClones(numberOfTrackClones);
+      taskFE->SetAfterburnerOn();
+    }
     else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kTRUE); }
     taskFE->SetAnalysisType(type);
     taskFE->SetRPType(rptype); //only for ESD
@@ -338,6 +364,10 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
       taskFE->SetMinMult(multmin);
       taskFE->SetMaxMult(multmax);
     }
+    if (ExcludeRegion) {
+      taskFE->DefineDeadZone(excludeEtaMin, excludeEtaMax, excludePhiMin, excludePhiMax); 
+    }
+
     taskFE->SetSubeventEtaRange(minA, maxA, minB, maxB);
     if (UsePhysicsSelection) {
       taskFE->SelectCollisionCandidates();
@@ -346,15 +376,23 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
     mgr->AddTask(taskFE);
   }
   else { 
-    if(AddToEvent) { 
+    if(useAfterBurner)
+    { 
       taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kFALSE,1);
-      taskFE->SetEllipticFlowValue(ellipticFlow); }    //TEST
+      taskFE->SetFlow(v1,v2,v3,v4); 
+      taskFE->SetNonFlowNumberOfTrackClones(numberOfTrackClones);
+      taskFE->SetAfterburnerOn();
+    }
     else {taskFE = new AliAnalysisTaskFlowEvent("TaskFlowEvent",rptype,kFALSE); }
     taskFE->SetAnalysisType(type);
+    taskFE->SetRPType(rptype); //only for ESD
     if (UseMultCut) {
       taskFE->SetMinMult(multmin);
       taskFE->SetMaxMult(multmax);
     }
+    if (ExcludeRegion) {
+      taskFE->DefineDeadZone(excludeEtaMin, excludeEtaMax, excludePhiMin, excludePhiMax); 
+    }
     taskFE->SetSubeventEtaRange(minA, maxA, minB, maxB);
     if (UsePhysicsSelection) {
       taskFE->SelectCollisionCandidates();
@@ -682,7 +720,8 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
   //===========================================================================
   if (SP){
     AliAnalysisTaskScalarProduct *taskSP = new AliAnalysisTaskScalarProduct("TaskScalarProduct",WEIGHTS[0]);
-    taskSP->SetRelDiffMsub(0.1);
+    taskSP->SetRelDiffMsub(1.0);
+    taskSP->SetApplyCorrectionForNUA(kFALSE);
     mgr->AddTask(taskSP);
   }
   if (LYZ1SUM){
@@ -744,21 +783,22 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
   }
   if (MH){
     AliAnalysisTaskMixedHarmonics *taskMH = new AliAnalysisTaskMixedHarmonics("TaskMixedHarmonics",useWeights);
-    taskMH->SetCorrelatorInteger(1);
+    taskMH->SetHarmonic(1); // n in cos[n(phi1+phi2-2phi3)] and cos[n(psi1+psi2-2phi3)]
     taskMH->SetNoOfMultipicityBins(10);
     taskMH->SetMultipicityBinWidth(2);
     taskMH->SetMinMultiplicity(3);
     taskMH->SetCorrectForDetectorEffects(kTRUE);
-    //taskMH->SetUsePhiWeights(WEIGHTS[0]); 
-    //taskMH->SetUsePtWeights(WEIGHTS[1]);
-    //taskMH->SetUseEtaWeights(WEIGHTS[2]); 
+    taskMH->SetEvaluateDifferential3pCorrelator(kFALSE); // evaluate <<cos[n(psi1+psi2-2phi3)]>> (Remark: two nested loops)    
+    taskMH->SetOppositeChargesPOI(kFALSE); // POIs psi1 and psi2 in cos[n(psi1+psi2-2phi3)] will have opposite charges  
     mgr->AddTask(taskMH);
   }  
   if (NL){
     AliAnalysisTaskNestedLoops *taskNL = new AliAnalysisTaskNestedLoops("TaskNestedLoops",useWeights);
-    //taskNL->SetUsePhiWeights(WEIGHTS[0]); 
-    //taskNL->SetUsePtWeights(WEIGHTS[1]);
-    //taskNL->SetUseEtaWeights(WEIGHTS[2]); 
+    taskNL->SetHarmonic(1); // n in cos[n(phi1+phi2-2phi3)] and cos[n(psi1+psi2-2phi3)]
+    taskNL->SetEvaluateNestedLoopsForRAD(kTRUE); // RAD = Relative Angle Distribution
+    taskNL->SetEvaluateNestedLoopsForMH(kTRUE); // evalaute <<cos[n(phi1+phi2-2phi3)]>> (Remark: three nested loops)   
+    taskNL->SetEvaluateDifferential3pCorrelator(kFALSE); // evaluate <<cos[n(psi1+psi2-2phi3)]>>  (Remark: three nested loops)   
+    taskNL->SetOppositeChargesPOI(kFALSE); // POIs psi1 and psi2 in cos[n(psi1+psi2-2phi3)] will have opposite charges  
     mgr->AddTask(taskNL);
   }
   
@@ -776,7 +816,7 @@ AliAnalysisTaskFlowEvent* AddTaskFlow(TString type, Bool_t* METHODS, Bool_t QA,
     //input into taskFE
     mgr->ConnectInput(taskFE,1,coutputFMD);
   }
-
+  
   AliAnalysisDataContainer *coutputFE = 
     mgr->CreateContainer("cobjFlowEventSimple",  AliFlowEventSimple::Class(),AliAnalysisManager::kExchangeContainer);
   mgr->ConnectInput(taskFE,0,cinput1);