]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ANALYSIS/AliCentralitySelectionTask.cxx
Macro to compite pion, kaon and proton spectra with nsigma cuts (Leonardo)
[u/mrichter/AliRoot.git] / ANALYSIS / AliCentralitySelectionTask.cxx
index 5ed0f71f40791270aa49a882b88cff37841763db..7d77b3d56128d465a444847f294394c68841efa0 100644 (file)
@@ -1222,12 +1222,17 @@ void AliCentralitySelectionTask::UserExec(Option_t */*option*/)
 
   if (esd) {
     if (strcmp(esd->GetESDRun()->GetBeamType(), "A-A") == 0) runType=0;
-    else runType=1;  
+    else runType=1;
+    if (strcmp(esd->GetESDRun()->GetBeamType(), "p-p") == 0) runType=2;  
   } else {
     Int_t runNumber = event->GetRunNumber();
     if ((runNumber >= 136851 && runNumber <= 139517) ||  // LHC10h
        (runNumber >= 166529 && runNumber <= 170593))    // LHC11h
       runType=0;
+    else if ((runNumber >= 188355 && runNumber <= 188366) ||  // LHC12h 
+            (runNumber >= 195344 && runNumber <= 197692))    // LHC13h 
+      runType=1;
+    else runType=2;
   }
 
   esdCent = event->GetCentrality();
@@ -1279,15 +1284,25 @@ void AliCentralitySelectionTask::UserExec(Option_t */*option*/)
   multV0AEq=0.;
   multV0CEq=0.;
   if (esd) { // only for ESD?
-    for(Int_t iCh = 4; iCh < 7; ++iCh) {
+    for(Int_t iCh = 32; iCh < 64; ++iCh) {
       Double_t mult = esd->GetVZEROEqMultiplicity(iCh);
       multV0AEq += mult;
     }
-    for(Int_t iCh = 0; iCh < 3; ++iCh) {
+    for(Int_t iCh = 0; iCh < 32; ++iCh) {
       Double_t mult = esd->GetVZEROEqMultiplicity(iCh);
       multV0CEq += mult;
     }
   }
+  else {
+    for(Int_t iCh = 32; iCh < 64; ++iCh) {
+      Double_t mult = aod->GetVZEROEqMultiplicity(iCh);
+      multV0AEq += mult;
+    }
+    for(Int_t iCh = 0; iCh < 32; ++iCh) {
+      Double_t mult = aod->GetVZEROEqMultiplicity(iCh);
+      multV0CEq += mult;
+    }
+  }
   Bool_t kT0BB = kFALSE;    
   if (esd) {
     // ***** T0 info    
@@ -1726,7 +1741,8 @@ void AliCentralitySelectionTask::UserExec(Option_t */*option*/)
     if (fPHS) fHOutCentV0MPHS->Fill(fCentV0M);
 
     if (((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB) && (runType==0)) ||
-       ((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7) && (runType==1))) { // fill the QA histograms only for MB events!
+       ((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kINT7) && (runType==1)) || 
+       ((((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->IsEventSelected() & AliVEvent::kMB) && (runType==2)) ) { // fill the QA histograms only for MB events!
 
       fHOutQuality->Fill(fQuality);
       fHOutVertex->Fill(zvtx);