]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGJE/UserTasks/AliAnalysisTaskPID.cxx
add data driven method to evaluate trigger efficiencies for several trigger systems...
[u/mrichter/AliRoot.git] / PWGJE / UserTasks / AliAnalysisTaskPID.cxx
index e0aae2acd41b52ff5ea70b090c8155c52c5662df..b7de901a6de8142b7f31598a405839330c024b22 100644 (file)
@@ -149,6 +149,7 @@ AliAnalysisTaskPID::AliAnalysisTaskPID()
   , fh2FFJetPtGen(0x0)
   , fh1Xsec(0x0)
   , fh1Trials(0x0)
+  , fh1EvtsPtHardCut(0x0)
   , fContainerEff(0x0)
   , fQASharedCls(0x0)
   , fDeDxCheck(0x0)
@@ -290,6 +291,7 @@ AliAnalysisTaskPID::AliAnalysisTaskPID(const char *name)
   , fh2FFJetPtGen(0x0)
   , fh1Xsec(0x0)
   , fh1Trials(0x0)
+  , fh1EvtsPtHardCut(0x0)
   , fContainerEff(0x0)
   , fQASharedCls(0x0)
   , fDeDxCheck(0x0)
@@ -597,26 +599,48 @@ void AliAnalysisTaskPID::UserCreateOutputObjects()
            11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 18.0, 20.0, 22.0, 24.0,
            26.0, 28.0, 30.0, 32.0, 34.0, 36.0, 40.0, 45.0, 50.0 };
   
-  const Int_t nCentBins = 12;
+  const Bool_t useITSTPCtrackletsCentEstimatorWithNewBinning = fCentralityEstimator.CompareTo("ITSTPCtracklets", TString::kIgnoreCase) == 0
+                                                               && fStoreCentralityPercentile;
+  
+  const Int_t nCentBinsGeneral = 12;
+  const Int_t nCentBinsNewITSTPCtracklets = 17;
+  
+  const Int_t nCentBins = useITSTPCtrackletsCentEstimatorWithNewBinning ? nCentBinsNewITSTPCtracklets : nCentBinsGeneral;
+
+  Double_t binsCent[nCentBins+1];
+  for (Int_t i = 0; i < nCentBins + 1; i++)
+    binsCent[i] = -1;
+  
   //-1 for pp (unless explicitely requested); 90-100 has huge electro-magnetic impurities
-  Double_t binsCent[nCentBins+1] =                {-1, 0,  5, 10, 20, 30, 40, 50, 60, 70, 80,  90, 100 };
+  Double_t binsCentV0[nCentBinsGeneral+1] = {-1, 0,  5, 10, 20, 30, 40, 50, 60, 70, 80,  90, 100 };
   
-  // This centrality estimator deals with integers! This implies that the ranges are always [lowlim, uplim - 1]
-  Double_t binsCentITSTPCTracklets[nCentBins+1] = { 0, 7, 13, 20, 29, 40, 50, 60, 72, 83, 95, 105, 115 };
+  // These centrality estimators deal with integers! This implies that the ranges are always [lowlim, uplim - 1]
+  Double_t binsCentITSTPCTracklets[nCentBinsNewITSTPCtracklets+1] = { -9999, 0, 1, 4, 7, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90, 100, 9999 };
+  Double_t binsCentITSTPCTrackletsOldPreliminary[nCentBinsGeneral+1] = { 0, 7, 13, 20, 29, 40, 50, 60, 72, 83, 95, 105, 115 };
   
   // Special centrality binning for pp
-  Double_t binsCentpp[nCentBins+1] =   { 0, 0.01, 0.1, 1, 5, 10, 15, 20, 30, 40, 50, 70, 100};
+  Double_t binsCentpp[nCentBinsGeneral+1] =   { 0, 0.01, 0.1, 1, 5, 10, 15, 20, 30, 40, 50, 70, 100};
   
-  if (fCentralityEstimator.CompareTo("ITSTPCtracklets", TString::kIgnoreCase) == 0 && fStoreCentralityPercentile) {
+  if (fCentralityEstimator.CompareTo("ITSTPCtrackletsOldPreliminaryBinning", TString::kIgnoreCase) == 0 && fStoreCentralityPercentile) {
     // Special binning for this centrality estimator; but keep number of bins!
-    for (Int_t i = 0; i < nCentBins+1; i++)
+    for (Int_t i = 0; i < nCentBinsGeneral+1; i++)
+      binsCent[i] = binsCentITSTPCTrackletsOldPreliminary[i];
+  }
+  else if (fCentralityEstimator.CompareTo("ITSTPCtracklets", TString::kIgnoreCase) == 0 && fStoreCentralityPercentile) {
+    // Special binning for this centrality estimator and different number of bins!
+    for (Int_t i = 0; i < nCentBinsNewITSTPCtracklets+1; i++)
       binsCent[i] = binsCentITSTPCTracklets[i];
   }
   else if (fCentralityEstimator.Contains("ppMult", TString::kIgnoreCase) && fStoreCentralityPercentile) {
     // Special binning for this pp centrality estimator; but keep number of bins!
-    for (Int_t i = 0; i < nCentBins+1; i++)
+    for (Int_t i = 0; i < nCentBinsGeneral+1; i++)
       binsCent[i] = binsCentpp[i];
   }
+  else {
+    // Take default binning for VZERO
+    for (Int_t i = 0; i < nCentBinsGeneral+1; i++)
+      binsCent[i] = binsCentV0[i];
+  }
 
   const Int_t nJetPtBins = 11;
   Double_t binsJetPt[nJetPtBins+1] = {0, 2, 5, 10, 15, 20, 30, 40, 60, 80, 120, 200};
@@ -904,8 +928,14 @@ void AliAnalysisTaskPID::UserCreateOutputObjects()
   fh1Trials->Sumw2();
   fh1Trials->GetXaxis()->SetBinLabel(1, "#sum{ntrials}");
   
+  fh1EvtsPtHardCut = new TH1F("fh1EvtsPtHardCut", "#events before and after MC #it{p}_{T,hard} cut;;Events",2,0,2);
+  fh1EvtsPtHardCut->Sumw2();
+  fh1EvtsPtHardCut->GetXaxis()->SetBinLabel(1, "All");
+  fh1EvtsPtHardCut->GetXaxis()->SetBinLabel(2, "#it{p}_{T,hard}");
+  
   fOutputContainer->Add(fh1Xsec);
   fOutputContainer->Add(fh1Trials);
+  fOutputContainer->Add(fh1EvtsPtHardCut);
   
   if (fDoDeDxCheck || fDoPtResolution) {
     OpenFile(3);
@@ -1054,7 +1084,7 @@ void AliAnalysisTaskPID::UserExec(Option_t *)
   
   Double_t centralityPercentile = -1;
   if (fStoreCentralityPercentile) {
-    if (fCentralityEstimator.CompareTo("ITSTPCtracklets", TString::kIgnoreCase) == 0) {
+    if (fCentralityEstimator.Contains("ITSTPCtracklets", TString::kIgnoreCase)) {
       // Special pp centrality estimator
       AliESDEvent* esdEvent = dynamic_cast<AliESDEvent*>(fEvent);
       if (!esdEvent) {
@@ -1877,6 +1907,7 @@ Double_t AliAnalysisTaskPID::GetMCStrangenessFactorCMS(Int_t motherPDG, Double_t
   }
   
   if (absMotherPDG == 3122) { // Lambda
+  //if (absMotherPDG == 3122 || absMotherPDG == 3112 || absMotherPDG == 3222) { // Lambda / Sigma- / Sigma+
     if (0.00 <= motherGenPt && motherGenPt < 0.20) fac = 0.645162;
     else if(0.20 <= motherGenPt && motherGenPt < 0.40) fac = 0.627431;
     else if(0.40 <= motherGenPt && motherGenPt < 0.60) fac = 0.457136;