Updated QA plots (Alis)
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 22 Sep 2012 17:26:27 +0000 (17:26 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 22 Sep 2012 17:26:27 +0000 (17:26 +0000)
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.h
PWGCF/EBYE/macros/AddTaskBalanceCentralityTrain.C
PWGCF/EBYE/macros/runBalanceFunctionCentrality.C

index de7105c..350fe06 100755 (executable)
@@ -236,7 +236,7 @@ void AliAnalysisTaskBF::UserCreateOutputObjects() {
   fHistTrackStats = new TH1F("fHistTrackStats","Event statistics;TrackFilterBit;N_{events}",130,0,130);
   fList->Add(fHistTrackStats);
 
-  fHistNumberOfAcceptedTracks = new TH1F("fHistNumberOfAcceptedTracks",";N_{acc.};Entries",4001,-0.5,4000.5);
+  fHistNumberOfAcceptedTracks = new TH2D("fHistNumberOfAcceptedTracks",";N_{acc.};;Centrality",4001,-0.5,4000.5,100,0,100);
   fList->Add(fHistNumberOfAcceptedTracks);
 
   // Vertex distributions
@@ -637,8 +637,9 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                    }
                    
                    delete trackTPC;
-                   
+                   gNumberOfAcceptedTracks += 1;
                  } //track loop
+                 // cout<<"Centrality: "<<fCentrality<<" - Accepted tracks: "<<gNumberOfAcceptedTracks<<endl;
                }//Vz cut
              }//Vy cut
            }//Vx cut
@@ -1099,6 +1100,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                    gNumberOfAcceptedTracks += 1;
                    
                  } //track loop
+                 //cout<<"Centrality: "<<fCentrality<<" - Accepted tracks: "<<gNumberOfAcceptedTracks<<endl;
                }//Vz cut
              }//Vy cut
            }//Vx cut
@@ -1301,7 +1303,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
     if((gNumberOfAcceptedTracks < fNumberOfAcceptedTracksMin)||(gNumberOfAcceptedTracks > fNumberOfAcceptedTracksMax))
       return;
   }
-  fHistNumberOfAcceptedTracks->Fill(gNumberOfAcceptedTracks);
+  fHistNumberOfAcceptedTracks->Fill(gNumberOfAcceptedTracks, fCentrality);
 
   // calculate balance function
   if(fUseMultiplicity) 
index 9fa3835..034b9be 100755 (executable)
@@ -7,6 +7,7 @@
 class TList;
 class TH1F;
 class TH2F;
+class TH2D;
 class TF1;
 
 class AliBalance;
@@ -198,7 +199,8 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
   Bool_t fUseMultiplicity;//use the multiplicity cuts
   Int_t fNumberOfAcceptedTracksMin;//min. number of number of accepted tracks (used for the multiplicity dependence study - pp)
   Int_t fNumberOfAcceptedTracksMax;//max. number of number of accepted tracks (used for the multiplicity dependence study - pp)
-  TH1F *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks
+  TH2D *fHistNumberOfAcceptedTracks;//hisot to store the number of accepted tracks
 
   Bool_t fUseOfflineTrigger;//Usage of the offline trigger selection
 
index 5aeee21..8153f61 100644 (file)
@@ -15,7 +15,8 @@ Bool_t kUseBayesianPID = kFALSE;
 Double_t gMinAcceptedProbability = 0.7;\r
 \r
 //_________________________________________________________//\r
-AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,\r
+AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(TString analysisType = "ESD",\r
+                                                Double_t centrMin=0.,\r
                                                 Double_t centrMax=80.,  //100.\r
                                                 Bool_t gRunShuffling=kFALSE,\r
                                                 TString centralityEstimator="V0M",\r
@@ -102,6 +103,10 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
     bf  = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut,bConversionCut,kUsePID);\r
     if(gRunShuffling) bfs = GetBalanceFunctionObject("ESD",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut,bConversionCut,kUsePID);\r
   }\r
+  else if (analysisType=="MCESD"){\r
+    bf  = GetBalanceFunctionObject("MCESD",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut,bConversionCut,kUsePID);\r
+    if(gRunShuffling) bfs = GetBalanceFunctionObject("MCESD",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut,bConversionCut,kUsePID);\r
+  }  \r
   else if (analysisType=="AOD"){\r
     bf  = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kFALSE,bHBTcut,bConversionCut,kUsePID);\r
     if(gRunShuffling) bfs = GetBalanceFunctionObject("AOD",centralityEstimator,centrMin,centrMax,kTRUE,bHBTcut,bConversionCut,kUsePID);\r
@@ -122,7 +127,7 @@ AliAnalysisTaskBF *AddTaskBalanceCentralityTrain(Double_t centrMin=0.,
   if(gRunShuffling) taskBF->SetShufflingObject(bfs);\r
 \r
   taskBF->SetCentralityPercentileRange(centrMin,centrMax);\r
-  if(analysisType == "ESD") {\r
+  if((analysisType == "ESD")||(analysisType == "MCESD")) {\r
     AliESDtrackCuts *trackCuts = GetTrackCutsObject(ptMin,ptMax,etaMin,etaMax,maxTPCchi2,DCAxy,DCAz,minNClustersTPC);\r
     taskBF->SetAnalysisCutObject(trackCuts);\r
     if(kUsePID) {\r
index db859bb..078452f 100644 (file)
@@ -109,7 +109,7 @@ void runBalanceFunctionCentrality(Int_t mode = mLocal, Bool_t DATA = kTRUE) {
     mgr->SetInputEventHandler(aodH);
   }
 
-  if (analysisType == "MC"){
+  if ((analysisType == "MC")||(analysisType == "MCESD")) {
     AliVEventHandler* esdH = new AliESDInputHandler; 
     mgr->SetInputEventHandler(esdH); 
     AliMCEventHandler *mc = new AliMCEventHandler();
@@ -122,7 +122,7 @@ void runBalanceFunctionCentrality(Int_t mode = mLocal, Bool_t DATA = kTRUE) {
   
   // Task to check the offline trigger:
   //if(mode == mLocal || mode == mGrid || mode == mGridPAR)
-  if (analysisType == "ESD"){
+  if ((analysisType == "ESD")||(analysisType == "MCESD")) {
     gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPhysicsSelection.C"); 
     AliPhysicsSelectionTask* physicsSelTask = AddTaskPhysicsSelection(!DATA);
   }
@@ -135,7 +135,7 @@ void runBalanceFunctionCentrality(Int_t mode = mLocal, Bool_t DATA = kTRUE) {
     }
   
   //Add the centrality determination task
-  if (analysisType == "ESD"){
+    if ((analysisType == "ESD")||(analysisType == "MCESD")){
     gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskCentrality.C");
     AliCentralitySelectionTask *centralityTask = AddTaskCentrality();
     centralityTask->SetMCInput();
@@ -151,7 +151,7 @@ void runBalanceFunctionCentrality(Int_t mode = mLocal, Bool_t DATA = kTRUE) {
 
   // Load the analysis task:
   gROOT->LoadMacro("AddTaskBalanceCentralityTrain.C");
-  AddTaskBalanceCentralityTrain(0.,80.,0,"V0M",10.,-1,-1,0.3,1.5,-0.8,0.8,-1,-1,0,128,0,0,0,"AnalysisResults");
+  AddTaskBalanceCentralityTrain(analysisType,0.,80.,0,"V0M",10.,-1,-1,0.3,1.5,-0.8,0.8,-1,-1,0,128,0,0,0,"AnalysisResults");
   
   // Run the analysis:
   if(!mgr->InitAnalysis()){return;}