]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
authorsjena <sjena@cern.ch>
Tue, 18 Nov 2014 14:59:00 +0000 (15:59 +0100)
committersjena <sjena@cern.ch>
Tue, 18 Nov 2014 14:59:00 +0000 (15:59 +0100)
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioEffContExtra.cxx

index 885b91820110e01c81a56b8b5de2ec59dc1b9e83..27c8eec736bb28bf0bdfd0e67334c22b8cbd41ed 100644 (file)
@@ -22,8 +22,8 @@
 //          New approch to find particle ratio to reduce memory            //
 //                             (Test Only)                                 //
 //        Copied from NetParticle Classes
-//        Origin: Authors: Jochen Thaeder <jochen@thaeder.de>
-//                         Michael Weber <m.weber@cern.ch>
+//        Origin: Jochen Thaeder <jochen@thaeder.de>
+//                Michael Weber <m.weber@cern.ch>
 //=========================================================================//
 
 #include "TMath.h"
@@ -412,7 +412,7 @@ void AliEbyEPidRatioEffContExtra::CheckContTrack(AliVTrack *track, Int_t ipid) {
     return;
 
   Bool_t isPhysicalPrimary = (fESD) ? fStack->IsPhysicalPrimary(label): (static_cast<AliAODMCParticle*>(particle))->IsPhysicalPrimary();
-  
+
   // -- Check if correctly identified 
   //    > return if correctly identified -> all ok, no action neededin this method
   //    > if PID required check -> for the correct (signed pdgcode) particle
@@ -455,14 +455,6 @@ void AliEbyEPidRatioEffContExtra::CheckContTrack(AliVTrack *track, Int_t ipid) {
   Double_t yRec  = 0.;
   fHelper->IsTrackAcceptedRapidity(track, yRec, ipid); 
 
-  Double_t deltaPhi = particle->Phi()-track->Phi();
-  if (TMath::Abs(deltaPhi) > TMath::TwoPi()) {
-    if (deltaPhi < 0)
-      deltaPhi += TMath::TwoPi();
-    else
-      deltaPhi -= TMath::TwoPi();
-  }
-
  
   Double_t yetapid = (ipid == 0 ) ? particle->Eta() : particle->Y();
   Double_t yeta    = (ipid == 0 ) ? track->Eta() : yRec;
@@ -471,9 +463,9 @@ void AliEbyEPidRatioEffContExtra::CheckContTrack(AliVTrack *track, Int_t ipid) {
   Double_t hnContRec[5] = {fCentralityBin,signRec, yeta,track->Phi(),track->Pt()};
   
   if (ipid == 0) { fHnNchCRec->Fill(hnContRec); fHnNchCMc->Fill(hnContMc); }
-  if (ipid == 1) { fHnNpiCRec->Fill(hnContRec); fHnNpiCMc->Fill(hnContMc); }
-  if (ipid == 2) { fHnNkaCRec->Fill(hnContRec); fHnNkaCMc->Fill(hnContMc); }
-  if (ipid == 3) { fHnNprCRec->Fill(hnContRec); fHnNprCMc->Fill(hnContMc); }
+  else if (ipid == 1) { fHnNpiCRec->Fill(hnContRec); fHnNpiCMc->Fill(hnContMc); }
+  else if (ipid == 2) { fHnNkaCRec->Fill(hnContRec); fHnNkaCMc->Fill(hnContMc); }
+  else if (ipid == 3) { fHnNprCRec->Fill(hnContRec); fHnNprCMc->Fill(hnContMc); }
   
   
 }
@@ -530,8 +522,7 @@ void AliEbyEPidRatioEffContExtra::FillMCEffHist(Int_t ipid) {
       if (idxMC == fLabelsRec[0][ipid][idxRec]) {
        recStatus = 1.;
        
-       if (idxMC == fLabelsRec[1][ipid][idxRec])
-         recPid = 1.;
+       if (idxMC == fLabelsRec[1][ipid][idxRec]) recPid = 1.;
        
         AliVTrack *track = NULL;
         if(fESD)
@@ -540,15 +531,18 @@ void AliEbyEPidRatioEffContExtra::FillMCEffHist(Int_t ipid) {
           track = fAOD->GetTrack(idxRec);
        
         if (track) {
-          // if no track present (which should not happen)
-          // -> pt = 0. , which is not in the looked at range
-         
-          // -- Get Reconstructed values
-          etaRec  = track->Eta();
+         etaRec  = track->Eta();
           phiRec  = track->Phi();         
           ptRec   = track->Pt();
          signRec = track->Charge();
-          fHelper->IsTrackAcceptedRapidity(track, yRec, ipid); // yRec = y for identified particles | yRec = eta for charged particles
+          fHelper->IsTrackAcceptedRapidity(track, yRec, ipid); 
+         Double_t yeta    = (ipid == 0 ) ? etaRec : yRec;
+         Double_t hneffRec[5] = {fCentralityBin,signRec, yeta,phiRec,ptRec};
+         if (ipid == 0) { fHnNchERec->Fill(hneffRec); }
+         else if (ipid == 1) { fHnNpiERec->Fill(hneffRec); }
+         else if (ipid == 2) { fHnNkaERec->Fill(hneffRec); }
+         else if (ipid == 3) { fHnNprERec->Fill(hneffRec); }
+
         }     
         break;
       }
@@ -564,17 +558,17 @@ void AliEbyEPidRatioEffContExtra::FillMCEffHist(Int_t ipid) {
     */
   
     Double_t yetapid = (ipid == 0 ) ? particle->Eta() : particle->Y();
-    Double_t yeta    = (ipid == 0 ) ? etaRec : yRec;
+   
 
     // Printf("%2d  %10.5f %10.5f %10.5f %10.5f %10.5f %10.5f", ipid, yetapid, yeta, particle->Eta(), particle->Y(),  etaRec, yRec);    
 
     Double_t hneffMc[8]  = {fCentralityBin,signMC,findable, recStatus, recPid,yetapid,particle->Phi(),particle->Pt()};
-    Double_t hneffRec[5] = {fCentralityBin,signRec, yeta,phiRec,ptRec};
+    
 
-    if (ipid == 0) { fHnNchERec->Fill(hneffRec); fHnNchEMc->Fill(hneffMc); }
-    if (ipid == 1) { fHnNpiERec->Fill(hneffRec); fHnNpiEMc->Fill(hneffMc); }
-    if (ipid == 2) { fHnNkaERec->Fill(hneffRec); fHnNkaEMc->Fill(hneffMc); }
-    if (ipid == 3) { fHnNprERec->Fill(hneffRec); fHnNprEMc->Fill(hneffMc); }
+    if (ipid == 0) { fHnNchEMc->Fill(hneffMc); }
+    else if (ipid == 1) { fHnNpiEMc->Fill(hneffMc); }
+    else if (ipid == 2) { fHnNkaEMc->Fill(hneffMc); }
+    else if (ipid == 3) { fHnNprEMc->Fill(hneffMc); }
    
 
   } // for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {