more updates from Markus
authorcbaumann <cbaumann@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 May 2013 14:02:28 +0000 (14:02 +0000)
committercbaumann <cbaumann@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 24 May 2013 14:02:28 +0000 (14:02 +0000)
PWGDQ/dielectron/macrosLMEE/AddTask_mkoehler_CCbarMB.C [new file with mode: 0644]
PWGDQ/dielectron/macrosLMEE/ConfigLMEEPbPb2011AOD.C
PWGDQ/dielectron/macrosLMEE/Config_mkoehler_CCbarMC.C

diff --git a/PWGDQ/dielectron/macrosLMEE/AddTask_mkoehler_CCbarMB.C b/PWGDQ/dielectron/macrosLMEE/AddTask_mkoehler_CCbarMB.C
new file mode 100644 (file)
index 0000000..c62a051
--- /dev/null
@@ -0,0 +1,73 @@
+AliAnalysisTask *AddTask_mkoehler_CCbarMB(Bool_t hasMC_aod = kFALSE){
+  //get the current analysis manager
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+  if (!mgr) {
+    ::Error("AddTask_mkoehler_CCbarMB", "No analysis manager found.");
+    return NULL;
+  }
+  if (!mgr->GetInputEventHandler()) {
+    ::Error("AddTask_mkoehler_CCbarMB", "This task requires an input event handler");
+    return NULL;
+  }
+
+  //Do we have an MC handler?
+  Bool_t hasMC=(mgr->GetMCtruthEventHandler()!=0x0);
+  
+  TString configFile("ConfigCCbar_mk_pp.C");
+  if (hasMC) configFile="$ALICE_ROOT/PWGDQ/dielectron/macros/ConfigJpsi2eeEff.C";//check later
+  Bool_t isAOD=mgr->GetInputEventHandler()->IsA()==AliAODInputHandler::Class();
+
+  //create task and add it to the manager
+  AliAnalysisTaskMultiDielectron *task=new AliAnalysisTaskMultiDielectron("MultiDie");
+  mgr->AddTask(task);
+  
+  //load dielectron configuration file
+  TString checkconfig="ConfigCCbar_mk_pp";
+  if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
+    gROOT->LoadMacro(configFile.Data());
+  
+  //add dielectron analysis with different cuts to the task
+  for (Int_t i=0; i<nDie; ++i){ //nDie defined in config file
+    AliDielectron *jpsi=ConfigCCbar_mk_pp(i,isAOD);
+    if (isAOD) jpsi->SetHasMC(hasMC_aod);
+    if (jpsi) task->AddDielectron(jpsi);
+  }
+
+  //Add event filter
+  AliDielectronEventCuts *eventCuts=new AliDielectronEventCuts("eventCuts","Vertex Track && |vtxZ|<10 && ncontrib>0");
+  if(isAOD) eventCuts->SetVertexType(AliDielectronEventCuts::kVtxAny);
+  eventCuts->SetRequireVertex();
+  eventCuts->SetMinVtxContributors(1);
+  eventCuts->SetVertexZ(-10.,10.);
+  task->SetEventFilter(eventCuts);
+
+  // pileup rejection
+//    task->SetRejectPileup();
+   task->SetTriggerMask(AliVEvent::kMB);
+   task->UsePhysicsSelection();
+  //----------------------
+  //create data containers
+  //----------------------
+
+
+  //create output container
+  
+  AliAnalysisDataContainer *cOutputHist1 =
+    mgr->CreateContainer("mkoehler_ppMB_QA", TList::Class(), AliAnalysisManager::kOutputContainer,
+                         "LMEEoutput.root");
+  
+  AliAnalysisDataContainer *cOutputHist2 =
+    mgr->CreateContainer("mkoehler_ppMB_CF", TList::Class(), AliAnalysisManager::kOutputContainer,
+                         "LMEEoutput.root");
+
+  AliAnalysisDataContainer *cOutputHist3 =
+    mgr->CreateContainer("mkoehler_ppMB_EventStat", TH1D::Class(), AliAnalysisManager::kOutputContainer,
+                        "LMEEoutput.root");
+  
+  mgr->ConnectInput(task,  0, mgr->GetCommonInputContainer());
+  mgr->ConnectOutput(task, 1, cOutputHist1);
+  mgr->ConnectOutput(task, 2, cOutputHist2);
+  mgr->ConnectOutput(task, 3, cOutputHist3);
+  
+  return task;
+}
index 0ce0c78..942475e 100644 (file)
@@ -3,8 +3,8 @@
 void InitHistograms(AliDielectron *die, Int_t cutDefinition);
 void InitCF(AliDielectron* die, Int_t cutDefinition);
 void EnableMC();
-
-TString names=("noPairing;TPCTOFCentHPT;TPCTOFSemiCentHPT;TPCTOFPerinoRej;TPCTOFCentRej;TPCTOFSemiCent;TPCTOFCentBothSPD;TPCTOFCentITSRejAlt;TPCTOFCentITSRej");
+//adjust for 1,4,8
+TString names=("noPairing;TPCTOFCentHPT;TPCTOFSemiCentHPT;TPCTOFPerinoRej;TPCTOFCentRejPV;TPCTOFSemiCent;TPCTOFCentBothSPD;TPCTOFCentITSRejPVAlt;TPCTOFCentITSRejPV");
 TObjArray *arrNames=names.Tokenize(";");
 const Int_t nDie=arrNames->GetEntries();
 
@@ -44,7 +44,7 @@ AliDielectron* ConfigLMEEPbPb2011AOD(Int_t cutDefinition, Bool_t hasMC=kFALSE, B
        //not yet implemented
   }
   else if (cutDefinition==1) {
-       selectedPID = LMEECutLib::kPbPb2011TPCandTOFwide;
+       selectedPID = LMEECutLib::kPbPb2011TPCandTOFHPT;
        selectedCentrality = LMEECutLib::kPbPb2011Central;
        rejectionStep = kFALSE;
   }
@@ -59,7 +59,7 @@ AliDielectron* ConfigLMEEPbPb2011AOD(Int_t cutDefinition, Bool_t hasMC=kFALSE, B
        rejectionStep = kFALSE;
   }
   else if (cutDefinition==4) {
-       selectedPID = LMEECutLib::kPbPb2011TPCandTOFwide;
+       selectedPID = LMEECutLib::kPbPb2011TPCandTOFHPT;
        selectedCentrality = LMEECutLib::kPbPb2011Central;
        rejectionStep = kTRUE;
   }
@@ -118,9 +118,12 @@ AliDielectron* ConfigLMEEPbPb2011AOD(Int_t cutDefinition, Bool_t hasMC=kFALSE, B
         //     die->GetTrackFilter().AddCuts(LMCL->GetTrackCutsPre(selectedPID) );
        die->GetTrackFilter().AddCuts(LMCL->GetPIDCutsPre(selectedPID) );
    }
+   /*
+   //For PhiV rejection, test with same track sample as step 1
    else if (cutDefinition == 4){
        die->GetTrackFilter().AddCuts(LMCL->GetPIDCutsPre(LMEECutLib::kPbPb2011TPCorTOF) );
    }
+   */
    else {
        die->GetTrackFilter().AddCuts(LMCL->GetTrackCutsAna(selectedPID) );
        die->GetTrackFilter().AddCuts(LMCL->GetPIDCutsAna(selectedPID) );
index d497837..47b1a30 100644 (file)
@@ -320,13 +320,19 @@ void InitCFDieleData(AliDielectron *diele, Int_t cutDefinition, Bool_t isAOD)
     cf->AddVariable(AliDielectronVarManager::kZvPrim,20,-20.,20.);
 
    
-    
+    /*
     if (cutDefinition == 0){
+      
            cf->SetStepForMCtruth();
+           
   }
+    */
     
     
     
+        cf->SetStepForMCtruth();
+       
+       
   //leg variables
   diele->SetCFManagerPair(cf);