Update from PR Analysis: drathee
authorsjena <sjena@cern.ch>
Mon, 22 Sep 2014 09:48:17 +0000 (11:48 +0200)
committersjena <sjena@cern.ch>
Mon, 22 Sep 2014 09:48:17 +0000 (11:48 +0200)
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioDCA.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioEffCont.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioPhy.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioQA.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioTask.cxx

index 8395616..b8fea29 100644 (file)
@@ -100,7 +100,7 @@ void AliEbyEPidRatioDCA::Process() {
     else if (fHelper->IsTrackAcceptedPID(track, pid, (AliPID::kProton))){  iPid = 3; gPdgCode = 2212;}
     else iPid = 0;
 
-
+    //  cout << " --- DCA ---- " << iPid << "  " << gPdgCode << endl;
     Double_t yP;
     if (!fHelper->IsTrackAcceptedRapidity(track, yP, iPid))
       continue;
index 6ccbd78..1971cfe 100644 (file)
@@ -331,6 +331,7 @@ void AliEbyEPidRatioEffCont::FillMCLabels() {
     else if (fHelper->IsTrackAcceptedPID(track, pid, (AliPID::kProton))){  iPid = 3; gPdgCode = 2212;}
     else iPid = 0;
 
+    //  cout << " --- EFF ---- " << iPid << "  " << gPdgCode << endl;
     
     Double_t yP;
     if (!fHelper->IsTrackAcceptedRapidity(track, yP, iPid))
@@ -402,6 +403,8 @@ void AliEbyEPidRatioEffCont::CheckContTrack(AliVTrack *track, Int_t iPid, Int_t
     else                                              contPart = 6; // other
   }
   
+  // cout << " --- CONT ---- " << iPid << "  " << gPdgCode << endl;
+
   // -- Get Reconstructed y
   //    yRec = y for identified particles | yRec = eta for charged particles
   Double_t yRec  = 0.;
index 8003a0a..f63028a 100644 (file)
@@ -88,6 +88,8 @@ AliEbyEPidRatioHelper::AliEbyEPidRatioHelper() :
   fNTriggers(5),
 
   fHCentralityStat(NULL),
+  fHCentralityPer(NULL),
+  fHCentralityPerAll(NULL),
   fNCentralityBins(11),
   
   fRandom(NULL),
@@ -781,9 +783,17 @@ void AliEbyEPidRatioHelper::InitializeCentralityStats() {
 
   fHCentralityStat = new TH1F("hCentralityStat","Centrality statistics;Centrality Bins;Events", 
                              fNCentralityBins,-0.5,fNCentralityBins-0.5);
-
+  
   for ( Int_t ii=0; ii < fNCentralityBins; ii++ )
     fHCentralityStat->GetXaxis()->SetBinLabel(ii+1, AliEbyEPidRatioHelper::fgkCentralityNames[ii]);
+  
+  fHCentralityPer = new TH1F("hCentralityPercentileAccepted","Centrality Percentile statistics;Centrality Bins;Events", 
+                            100,-0.5,99.5);
+
+  fHCentralityPerAll = new TH1F("hCentralityPercentileAll","Centrality Percentile statistics;Centrality Bins;Events", 
+                            100,-0.5,99.5);
+
+
 }
 //________________________________________________________________________
 Bool_t AliEbyEPidRatioHelper::FillEventStats(Int_t *aEventCuts) {
@@ -807,8 +817,14 @@ Bool_t AliEbyEPidRatioHelper::FillEventStats(Int_t *aEventCuts) {
   }
 
   // -- Fill centrality statistics of accepted events
-  if (!isRejected)
+  if (!isRejected) {
     fHCentralityStat->Fill(fCentralityBin);
+    fHCentralityPer->Fill(fCentralityPercentile);
+  }
+
+  fHCentralityPerAll->Fill(fCentralityPercentile);
+
+
 
   return isRejected;
 }
index 2d30c8f..d583429 100644 (file)
@@ -53,13 +53,13 @@ class AliEbyEPidRatioHelper : public TNamed {
   void SetMinPtForTOFRequired(Float_t f)       {fMinPtForTOFRequired = f;}
   void SetMaxPtForTPClow(Float_t f)            {fMaxPtForTPClow      = f;}
 
-  // void SetIsRatio(Bool_t b)                    {fIsRatio             = b;}  
-  // void SetIsPtBin(Bool_t   b)                  {fIsPtBin             = b;}  
-
+  
   TH1F*    GetHEventStat0()                    {return fHEventStat0;     }
   TH1F*    GetHEventStat1()                    {return fHEventStat1;     }
   TH1F*    GetHTriggerStat()                   {return fHTriggerStat;    }
   TH1F*    GetHCentralityStat()                {return fHCentralityStat; }
+  TH1F*    GetHCentralityPercentile()          {return fHCentralityPer; }
+  TH1F*    GetHCentralityPercentileAll()       {return fHCentralityPerAll; }
   Int_t    GetCentralityBin()                  {return fCentralityBin;   }
   Float_t  GetMaxPtForTPClow()                 {return fMaxPtForTPClow;  }
   Float_t  GetRapidityMax()                    {return fRapidityMax;     }
@@ -123,6 +123,9 @@ class AliEbyEPidRatioHelper : public TNamed {
    */
   void BinLogAxis(const THnBase *h, Int_t axisNumber, AliESDtrackCuts* cuts = NULL);
 
+  // void SetIsRatio(Bool_t b)                    {fIsRatio             = b;}  
+  // void SetIsPtBin(Bool_t   b)                  {fIsPtBin             = b;}  
+  
   static const Float_t fgkfHistBinWitdthRap;   // Histogram std bin width for rapidity/eta
   static const Float_t fgkfHistBinWitdthPt;    // Histogram std bin width for pt
 
@@ -191,6 +194,8 @@ class AliEbyEPidRatioHelper : public TNamed {
   TH1F                 *fHTriggerStat;             //  Trigger statistics
   Int_t                 fNTriggers;                //  N triggers used
   TH1F                 *fHCentralityStat;          //  Centrality statistics
+  TH1F                 *fHCentralityPer;           //  Centrality Percentile
+  TH1F                 *fHCentralityPerAll;        //  Centrality Percentile
   Int_t                 fNCentralityBins;          //  N centrality bins used
   TRandom3             *fRandom;                   //  Random generator
   Bool_t                fIsRatio;                  //  Is ratio
index 893f1c8..549e0a9 100644 (file)
@@ -285,6 +285,9 @@ Int_t AliEbyEPidRatioPhy::ProcessTracks() {
     else if (fHelper->IsTrackAcceptedPID(track, pid, (AliPID::kProton))) iPid = 3;
     else iPid = 0;
    
+    //cout << idxTrack <<" --- PHY ---- " << iPid  << endl;
+
+
     Double_t yP;
     if (iPid != 0 && !fHelper->IsTrackAcceptedRapidity(track, yP, iPid))
       continue;
index c8f418a..576bc44 100644 (file)
@@ -156,7 +156,7 @@ void AliEbyEPidRatioQA::Process() {
   
   // -- Track Loop
   for (Int_t idxTrack = 0; idxTrack < fNTracks; ++idxTrack) {
-    
+   
     AliVTrack *track = (fESD) ? static_cast<AliVTrack*>(fESD->GetTrack(idxTrack)) : static_cast<AliVTrack*>(fAOD->GetTrack(idxTrack)); 
 
     // -- Check if track is accepted for basic parameters
@@ -164,9 +164,12 @@ void AliEbyEPidRatioQA::Process() {
       continue;
     
     // -- Check if accepted - ESD
-    if (fESD && !fESDTrackCuts->AcceptTrack(dynamic_cast<AliESDtrack*>(track)))
-      continue;
-    
+    if (fESD){
+      if (!fESDTrackCuts->AcceptTrack(dynamic_cast<AliESDtrack*>(track)))
+       continue;
+    }
+   
+  
     // -- Check if accepted - AOD
     if (fAOD){
       AliAODTrack * trackAOD = dynamic_cast<AliAODTrack*>(track);
@@ -192,6 +195,9 @@ void AliEbyEPidRatioQA::Process() {
     else if (fHelper->IsTrackAcceptedPID(track, pid, (AliPID::kProton))){  iPid = 3; gPdgCode = 2212;}
     else iPid = 0;
 
+
+    //cout << idxTrack << " --- QA ---- " << iPid << "  " << gPdgCode << endl;
+
     Double_t yP;
     if ((iPid != 0) && !fHelper->IsTrackAcceptedRapidity(track, yP, iPid))
       continue;
index 6cf15df..51dc586 100644 (file)
@@ -167,7 +167,11 @@ void AliEbyEPidRatioTask::UserCreateOutputObjects() {
   list->Add(fHelper->GetHEventStat0());
   list->Add(fHelper->GetHEventStat1());
   list->Add(fHelper->GetHTriggerStat());
-  list->Add(fHelper->GetHCentralityStat());
+  list->Add(fHelper->GetHCentralityPercentile());
+  list->Add(fHelper->GetHCentralityPercentileAll());
+
+
+
 
   if ((fIsAOD||fIsMC) && fModeEffCreation == 1) {
     fOutListEff->Add(fEffCont->GetHnEffMc());
@@ -333,7 +337,7 @@ Int_t AliEbyEPidRatioTask::Initialize() {
   // ------------------------------------------------------------------
   if ((fIsMC||fIsAOD) && fModeEffCreation == 1) {
     fEffCont = new AliEbyEPidRatioEffCont;
-    fEffCont->Initialize(fHelper);
+    fEffCont->Initialize(fHelper, fESDTrackCuts);
   }
 
   // ------------------------------------------------------------------
@@ -342,7 +346,7 @@ Int_t AliEbyEPidRatioTask::Initialize() {
   if (fModeDCACreation == 1) {
     fDCA = new AliEbyEPidRatioDCA;
     fDCA->SetESDTrackCutsBkg(fESDTrackCutsBkg);
-    fDCA->Initialize(fHelper);
+    fDCA->Initialize(fHelper, fESDTrackCuts);
   }
 
   // ------------------------------------------------------------------
@@ -359,7 +363,7 @@ Int_t AliEbyEPidRatioTask::Initialize() {
   // ------------------------------------------------------------------
   if (fModeQACreation == 1) {
     fQA = new AliEbyEPidRatioQA();
-    fQA->Initialize(fHelper);
+    fQA->Initialize(fHelper, fESDTrackCuts);
   }
 
   // ------------------------------------------------------------------