coding/naming rule fixes
authormiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jul 2012 04:40:20 +0000 (04:40 +0000)
committermiweber <miweber@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 13 Jul 2012 04:40:20 +0000 (04:40 +0000)
17 files changed:
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBF.h
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskBFPsi.h
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEventMixingBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskEventMixingBF.h
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskToyModel.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskTriggeredBF.cxx
PWGCF/EBYE/BalanceFunctions/AliAnalysisTaskTriggeredBF.h
PWGCF/EBYE/BalanceFunctions/AliBalance.cxx
PWGCF/EBYE/BalanceFunctions/AliBalance.h
PWGCF/EBYE/BalanceFunctions/AliBalanceEventMixing.cxx
PWGCF/EBYE/BalanceFunctions/AliBalanceEventMixing.h
PWGCF/EBYE/BalanceFunctions/AliBalancePsi.cxx
PWGCF/EBYE/BalanceFunctions/AliBalancePsi.h
PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.cxx
PWGCF/EBYE/BalanceFunctions/AliBalanceTriggered.h

index 798f4d8..8185d3f 100755 (executable)
@@ -107,7 +107,7 @@ AliAnalysisTaskBF::AliAnalysisTaskBF(const char *name)
   fVxMax(0.3),
   fVyMax(0.3),
   fVzMax(10.),
-  nAODtrackCutBit(128),
+  fAODtrackCutBit(128),
   fPtMin(0.3),
   fPtMax(1.5),
   fEtaMin(-0.8),
@@ -369,7 +369,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
   // Called for each event
   TString gAnalysisLevel = fBalance->GetAnalysisLevel();
 
-  AliESDtrack *track_TPC   = NULL;
+  AliESDtrack *trackTPC   = NULL;
 
   Int_t gNumberOfAcceptedTracks = 0;
   Float_t fCentrality           = 0.;
@@ -385,13 +385,13 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
     chargeVector[i]        = new vector<Double_t>;
   }
 
-  Double_t v_charge;
-  Double_t v_y;
-  Double_t v_eta;
-  Double_t v_phi;
-  Double_t v_p[3];
-  Double_t v_pt;
-  Double_t v_E;
+  Double_t vCharge;
+  Double_t vY;
+  Double_t vEta;
+  Double_t vPhi;
+  Double_t vP[3];
+  Double_t vPt;
+  Double_t vE;
 
   if(fUsePID) {
     fPIDResponse = ((AliInputEventHandler*)(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler()))->GetPIDResponse();
@@ -455,28 +455,28 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                    }   
                    
                    // take only TPC only tracks
-                   track_TPC   = new AliESDtrack();
-                   if(!track->FillTPCOnlyTrack(*track_TPC)) continue;
+                   trackTPC   = new AliESDtrack();
+                   if(!track->FillTPCOnlyTrack(*trackTPC)) continue;
                    
                    //ESD track cuts
                    if(fESDtrackCuts) 
-                     if(!fESDtrackCuts->AcceptTrack(track_TPC)) continue;
+                     if(!fESDtrackCuts->AcceptTrack(trackTPC)) continue;
                    
                    // fill QA histograms
                    Float_t b[2];
                    Float_t bCov[3];
-                   track_TPC->GetImpactParameters(b,bCov);
+                   trackTPC->GetImpactParameters(b,bCov);
                    if (bCov[0]<=0 || bCov[2]<=0) {
                      AliDebug(1, "Estimated b resolution lower or equal zero!");
                      bCov[0]=0; bCov[2]=0;
                    }
                    
                    Int_t nClustersTPC = -1;
-                   nClustersTPC = track_TPC->GetTPCNclsIter1();   // TPC standalone
+                   nClustersTPC = trackTPC->GetTPCNclsIter1();   // TPC standalone
                    //nClustersTPC = track->GetTPCclusters(0);   // global track
                    Float_t chi2PerClusterTPC = -1;
                    if (nClustersTPC!=0) {
-                     chi2PerClusterTPC = track_TPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone
+                     chi2PerClusterTPC = trackTPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone
                      //chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);     // global track
                    }
 
@@ -581,47 +581,47 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                      PostData(4, fHistListPIDQA);
                    }
                     //===========================PID===============================//
-                   v_charge = track_TPC->Charge();
-                   v_y      = track_TPC->Y();
-                   v_eta    = track_TPC->Eta();
-                   v_phi    = track_TPC->Phi() * TMath::RadToDeg();
-                   v_E      = track_TPC->E();
-                   v_pt     = track_TPC->Pt();
-                   track_TPC->PxPyPz(v_p);
-                   fHistClus->Fill(track_TPC->GetITSclusters(0),nClustersTPC);
+                   vCharge = trackTPC->Charge();
+                   vY      = trackTPC->Y();
+                   vEta    = trackTPC->Eta();
+                   vPhi    = trackTPC->Phi() * TMath::RadToDeg();
+                   vE      = trackTPC->E();
+                   vPt     = trackTPC->Pt();
+                   trackTPC->PxPyPz(vP);
+                   fHistClus->Fill(trackTPC->GetITSclusters(0),nClustersTPC);
                    fHistDCA->Fill(b[1],b[0]);
                    fHistChi2->Fill(chi2PerClusterTPC);
-                   fHistPt->Fill(v_pt);
-                   fHistEta->Fill(v_eta);
-                   fHistPhi->Fill(v_phi);
-                   fHistRapidity->Fill(v_y);
-                   if(v_charge > 0) fHistPhiPos->Fill(v_phi);
-                   else if(v_charge < 0) fHistPhiNeg->Fill(v_phi);
+                   fHistPt->Fill(vPt);
+                   fHistEta->Fill(vEta);
+                   fHistPhi->Fill(vPhi);
+                   fHistRapidity->Fill(vY);
+                   if(vCharge > 0) fHistPhiPos->Fill(vPhi);
+                   else if(vCharge < 0) fHistPhiNeg->Fill(vPhi);
 
                    // fill charge vector
-                   chargeVector[0]->push_back(v_charge);
-                   chargeVector[1]->push_back(v_y);
-                   chargeVector[2]->push_back(v_eta);
-                   chargeVector[3]->push_back(v_phi);
-                   chargeVector[4]->push_back(v_p[0]);
-                   chargeVector[5]->push_back(v_p[1]);
-                   chargeVector[6]->push_back(v_p[2]);
-                   chargeVector[7]->push_back(v_pt);
-                   chargeVector[8]->push_back(v_E);
+                   chargeVector[0]->push_back(vCharge);
+                   chargeVector[1]->push_back(vY);
+                   chargeVector[2]->push_back(vEta);
+                   chargeVector[3]->push_back(vPhi);
+                   chargeVector[4]->push_back(vP[0]);
+                   chargeVector[5]->push_back(vP[1]);
+                   chargeVector[6]->push_back(vP[2]);
+                   chargeVector[7]->push_back(vPt);
+                   chargeVector[8]->push_back(vE);
 
                    if(fRunShuffling) {
-                     chargeVectorShuffle[0]->push_back(v_charge);
-                     chargeVectorShuffle[1]->push_back(v_y);
-                     chargeVectorShuffle[2]->push_back(v_eta);
-                     chargeVectorShuffle[3]->push_back(v_phi);
-                     chargeVectorShuffle[4]->push_back(v_p[0]);
-                     chargeVectorShuffle[5]->push_back(v_p[1]);
-                     chargeVectorShuffle[6]->push_back(v_p[2]);
-                     chargeVectorShuffle[7]->push_back(v_pt);
-                     chargeVectorShuffle[8]->push_back(v_E);
+                     chargeVectorShuffle[0]->push_back(vCharge);
+                     chargeVectorShuffle[1]->push_back(vY);
+                     chargeVectorShuffle[2]->push_back(vEta);
+                     chargeVectorShuffle[3]->push_back(vPhi);
+                     chargeVectorShuffle[4]->push_back(vP[0]);
+                     chargeVectorShuffle[5]->push_back(vP[1]);
+                     chargeVectorShuffle[6]->push_back(vP[2]);
+                     chargeVectorShuffle[7]->push_back(vPt);
+                     chargeVectorShuffle[8]->push_back(vE);
                    }
                    
-                   delete track_TPC;
+                   delete trackTPC;
                    
                  } //track loop
                }//Vz cut
@@ -721,7 +721,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                      continue;
                    }
                    Int_t gID = aodTrack->GetID();
-                   //if (!aodTrack->TestFilterBit(nAODtrackCutBit)) trackMap->Add(gID, iTracks);
+                   //if (!aodTrack->TestFilterBit(fAODtrackCutBit)) trackMap->Add(gID, iTracks);
                    if (aodTrack->TestFilterBit(1)) trackMap->Add(gID, iTracks);
                  }
                  AliAODTrack* newAodTrack; 
@@ -740,7 +740,7 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                    //===========================================//
                    // take only TPC only tracks 
                    fHistTrackStats->Fill(aodTrack->GetFilterMap());
-                   if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;
+                   if(!aodTrack->TestFilterBit(fAODtrackCutBit)) continue;
 
                    Int_t gID = aodTrack->GetID();
                    newAodTrack = gID >= 0 ? aodTrack : gAOD->GetTrack(trackMap->GetValue(-1-gID));
@@ -748,34 +748,34 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                     //===========================================//
 
                    //fHistTrackStats->Fill(aodTrack->GetFilterMap());
-                   //if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;
+                   //if(!aodTrack->TestFilterBit(fAODtrackCutBit)) continue;
                    
-                   v_charge = aodTrack->Charge();
-                   v_y      = aodTrack->Y();
-                   v_eta    = aodTrack->Eta();
-                   v_phi    = aodTrack->Phi() * TMath::RadToDeg();
-                   v_E      = aodTrack->E();
-                   v_pt     = aodTrack->Pt();
-                   aodTrack->PxPyPz(v_p);
+                   vCharge = aodTrack->Charge();
+                   vY      = aodTrack->Y();
+                   vEta    = aodTrack->Eta();
+                   vPhi    = aodTrack->Phi() * TMath::RadToDeg();
+                   vE      = aodTrack->E();
+                   vPt     = aodTrack->Pt();
+                   aodTrack->PxPyPz(vP);
                    
-                   Float_t DCAxy = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)
-                   Float_t DCAz  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)
+                   Float_t dcaXY = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)
+                   Float_t dcaZ  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)
                    
                    
                    // Kinematics cuts from ESD track cuts
-                   if( v_pt < fPtMin || v_pt > fPtMax)      continue;
+                   if( vPt < fPtMin || vPt > fPtMax)      continue;
 
                    if (!fUsePID) {
-                     if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;
+                     if( vEta < fEtaMin || vEta > fEtaMax)  continue;
                    }
 
                    else if (fUsePID){
-                     if( v_y < fEtaMin || v_y > fEtaMax)  continue;
+                     if( vY < fEtaMin || vY > fEtaMax)  continue;
                    }
 
                    // Extra DCA cuts (for systematic studies [!= -1])
                    if( fDCAxyCut != -1 && fDCAzCut != -1){
-                     if(TMath::Sqrt((DCAxy*DCAxy)/(fDCAxyCut*fDCAxyCut)+(DCAz*DCAz)/(fDCAzCut*fDCAzCut)) > 1 ){
+                     if(TMath::Sqrt((dcaXY*dcaXY)/(fDCAxyCut*fDCAxyCut)+(dcaZ*dcaZ)/(fDCAzCut*fDCAzCut)) > 1 ){
                        continue;  // 2D cut
                      }
                    }
@@ -896,36 +896,36 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                                    
                    // fill QA histograms
                    fHistClus->Fill(aodTrack->GetITSNcls(),aodTrack->GetTPCNcls());
-                   fHistDCA->Fill(DCAz,DCAxy);
+                   fHistDCA->Fill(dcaZ,dcaXY);
                    fHistChi2->Fill(aodTrack->Chi2perNDF());
-                   fHistPt->Fill(v_pt);
-                   fHistEta->Fill(v_eta);
-                   fHistPhi->Fill(v_phi);
-                   fHistRapidity->Fill(v_y);
-                   if(v_charge > 0) fHistPhiPos->Fill(v_phi);
-                   else if(v_charge < 0) fHistPhiNeg->Fill(v_phi);
+                   fHistPt->Fill(vPt);
+                   fHistEta->Fill(vEta);
+                   fHistPhi->Fill(vPhi);
+                   fHistRapidity->Fill(vY);
+                   if(vCharge > 0) fHistPhiPos->Fill(vPhi);
+                   else if(vCharge < 0) fHistPhiNeg->Fill(vPhi);
 
                    // fill charge vector
-                   chargeVector[0]->push_back(v_charge);
-                   chargeVector[1]->push_back(v_y);
-                   chargeVector[2]->push_back(v_eta);
-                   chargeVector[3]->push_back(v_phi);
-                   chargeVector[4]->push_back(v_p[0]);
-                   chargeVector[5]->push_back(v_p[1]);
-                   chargeVector[6]->push_back(v_p[2]);
-                   chargeVector[7]->push_back(v_pt);
-                   chargeVector[8]->push_back(v_E);
+                   chargeVector[0]->push_back(vCharge);
+                   chargeVector[1]->push_back(vY);
+                   chargeVector[2]->push_back(vEta);
+                   chargeVector[3]->push_back(vPhi);
+                   chargeVector[4]->push_back(vP[0]);
+                   chargeVector[5]->push_back(vP[1]);
+                   chargeVector[6]->push_back(vP[2]);
+                   chargeVector[7]->push_back(vPt);
+                   chargeVector[8]->push_back(vE);
 
                    if(fRunShuffling) {
-                     chargeVectorShuffle[0]->push_back(v_charge);
-                     chargeVectorShuffle[1]->push_back(v_y);
-                     chargeVectorShuffle[2]->push_back(v_eta);
-                     chargeVectorShuffle[3]->push_back(v_phi);
-                     chargeVectorShuffle[4]->push_back(v_p[0]);
-                     chargeVectorShuffle[5]->push_back(v_p[1]);
-                     chargeVectorShuffle[6]->push_back(v_p[2]);
-                     chargeVectorShuffle[7]->push_back(v_pt);
-                     chargeVectorShuffle[8]->push_back(v_E);
+                     chargeVectorShuffle[0]->push_back(vCharge);
+                     chargeVectorShuffle[1]->push_back(vY);
+                     chargeVectorShuffle[2]->push_back(vEta);
+                     chargeVectorShuffle[3]->push_back(vPhi);
+                     chargeVectorShuffle[4]->push_back(vP[0]);
+                     chargeVectorShuffle[5]->push_back(vP[1]);
+                     chargeVectorShuffle[6]->push_back(vP[2]);
+                     chargeVectorShuffle[7]->push_back(vPt);
+                     chargeVectorShuffle[8]->push_back(vE);
                    }
                                    
                    gNumberOfAcceptedTracks += 1;
@@ -1010,73 +1010,73 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
                    if(!mcTrack) continue;
 
                    // take only TPC only tracks
-                   track_TPC   = new AliESDtrack();
-                   if(!track->FillTPCOnlyTrack(*track_TPC)) continue;
+                   trackTPC   = new AliESDtrack();
+                   if(!track->FillTPCOnlyTrack(*trackTPC)) continue;
                    
                    //ESD track cuts
                    if(fESDtrackCuts) 
-                     if(!fESDtrackCuts->AcceptTrack(track_TPC)) continue;
+                     if(!fESDtrackCuts->AcceptTrack(trackTPC)) continue;
                    
                    // fill QA histograms
                    Float_t b[2];
                    Float_t bCov[3];
-                   track_TPC->GetImpactParameters(b,bCov);
+                   trackTPC->GetImpactParameters(b,bCov);
                    if (bCov[0]<=0 || bCov[2]<=0) {
                      AliDebug(1, "Estimated b resolution lower or equal zero!");
                      bCov[0]=0; bCov[2]=0;
                    }
                    
                    Int_t nClustersTPC = -1;
-                   nClustersTPC = track_TPC->GetTPCNclsIter1();   // TPC standalone
+                   nClustersTPC = trackTPC->GetTPCNclsIter1();   // TPC standalone
                    //nClustersTPC = track->GetTPCclusters(0);   // global track
                    Float_t chi2PerClusterTPC = -1;
                    if (nClustersTPC!=0) {
-                     chi2PerClusterTPC = track_TPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone
+                     chi2PerClusterTPC = trackTPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone
                      //chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);     // global track
                    }
                    
-                   v_charge = track_TPC->Charge();
-                   v_y      = track_TPC->Y();
-                   v_eta    = track_TPC->Eta();
-                   v_phi    = track_TPC->Phi() * TMath::RadToDeg();
-                   v_E      = track_TPC->E();
-                   v_pt     = track_TPC->Pt();
-                   track_TPC->PxPyPz(v_p);
-
-                   fHistClus->Fill(track_TPC->GetITSclusters(0),nClustersTPC);
+                   vCharge = trackTPC->Charge();
+                   vY      = trackTPC->Y();
+                   vEta    = trackTPC->Eta();
+                   vPhi    = trackTPC->Phi() * TMath::RadToDeg();
+                   vE      = trackTPC->E();
+                   vPt     = trackTPC->Pt();
+                   trackTPC->PxPyPz(vP);
+
+                   fHistClus->Fill(trackTPC->GetITSclusters(0),nClustersTPC);
                    fHistDCA->Fill(b[1],b[0]);
                    fHistChi2->Fill(chi2PerClusterTPC);
-                   fHistPt->Fill(v_pt);
-                   fHistEta->Fill(v_eta);
-                   fHistPhi->Fill(v_phi);
-                   fHistRapidity->Fill(v_y);
-                   if(v_charge > 0) fHistPhiPos->Fill(v_phi);
-                   else if(v_charge < 0) fHistPhiNeg->Fill(v_phi);
+                   fHistPt->Fill(vPt);
+                   fHistEta->Fill(vEta);
+                   fHistPhi->Fill(vPhi);
+                   fHistRapidity->Fill(vY);
+                   if(vCharge > 0) fHistPhiPos->Fill(vPhi);
+                   else if(vCharge < 0) fHistPhiNeg->Fill(vPhi);
 
                    // fill charge vector
-                   chargeVector[0]->push_back(v_charge);
-                   chargeVector[1]->push_back(v_y);
-                   chargeVector[2]->push_back(v_eta);
-                   chargeVector[3]->push_back(v_phi);
-                   chargeVector[4]->push_back(v_p[0]);
-                   chargeVector[5]->push_back(v_p[1]);
-                   chargeVector[6]->push_back(v_p[2]);
-                   chargeVector[7]->push_back(v_pt);
-                   chargeVector[8]->push_back(v_E);
+                   chargeVector[0]->push_back(vCharge);
+                   chargeVector[1]->push_back(vY);
+                   chargeVector[2]->push_back(vEta);
+                   chargeVector[3]->push_back(vPhi);
+                   chargeVector[4]->push_back(vP[0]);
+                   chargeVector[5]->push_back(vP[1]);
+                   chargeVector[6]->push_back(vP[2]);
+                   chargeVector[7]->push_back(vPt);
+                   chargeVector[8]->push_back(vE);
 
                    if(fRunShuffling) {
-                     chargeVectorShuffle[0]->push_back(v_charge);
-                     chargeVectorShuffle[1]->push_back(v_y);
-                     chargeVectorShuffle[2]->push_back(v_eta);
-                     chargeVectorShuffle[3]->push_back(v_phi);
-                     chargeVectorShuffle[4]->push_back(v_p[0]);
-                     chargeVectorShuffle[5]->push_back(v_p[1]);
-                     chargeVectorShuffle[6]->push_back(v_p[2]);
-                     chargeVectorShuffle[7]->push_back(v_pt);
-                     chargeVectorShuffle[8]->push_back(v_E);
+                     chargeVectorShuffle[0]->push_back(vCharge);
+                     chargeVectorShuffle[1]->push_back(vY);
+                     chargeVectorShuffle[2]->push_back(vEta);
+                     chargeVectorShuffle[3]->push_back(vPhi);
+                     chargeVectorShuffle[4]->push_back(vP[0]);
+                     chargeVectorShuffle[5]->push_back(vP[1]);
+                     chargeVectorShuffle[6]->push_back(vP[2]);
+                     chargeVectorShuffle[7]->push_back(vPt);
+                     chargeVectorShuffle[8]->push_back(vE);
                    }
                    
-                   delete track_TPC;
+                   delete trackTPC;
                    gNumberOfAcceptedTracks += 1;
                    
                  } //track loop
@@ -1148,17 +1148,17 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
            //exclude non stable particles
            if(!mcEvent->IsPhysicalPrimary(iTracks)) continue;
 
-           v_eta    = track->Eta();
-           v_pt     = track->Pt();
-           v_y      = track->Y();
+           vEta    = track->Eta();
+           vPt     = track->Pt();
+           vY      = track->Y();
 
-           if( v_pt < fPtMin || v_pt > fPtMax)      
+           if( vPt < fPtMin || vPt > fPtMax)      
              continue;
            if (!fUsePID) {
-             if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;
+             if( vEta < fEtaMin || vEta > fEtaMax)  continue;
            }
            else if (fUsePID){
-             if( v_y < fEtaMin || v_y > fEtaMax)  continue;
+             if( vY < fEtaMin || vY > fEtaMax)  continue;
            }
 
            //analyze one set of particles
@@ -1203,67 +1203,67 @@ void AliAnalysisTaskBF::UserExec(Option_t *) {
              if(kExcludeParticle) continue;
            }
 
-           v_charge = track->Charge();
-           v_phi    = track->Phi();
-           v_E      = track->E();
-           track->PxPyPz(v_p);
-           //Printf("phi (before): %lf",v_phi);
+           vCharge = track->Charge();
+           vPhi    = track->Phi();
+           vE      = track->E();
+           track->PxPyPz(vP);
+           //Printf("phi (before): %lf",vPhi);
 
-           fHistPt->Fill(v_pt);
-           fHistEta->Fill(v_eta);
-           fHistPhi->Fill(v_phi);
-           fHistRapidity->Fill(v_y);
-           if(v_charge > 0) fHistPhiPos->Fill(v_phi);
-           else if(v_charge < 0) fHistPhiNeg->Fill(v_phi);
+           fHistPt->Fill(vPt);
+           fHistEta->Fill(vEta);
+           fHistPhi->Fill(vPhi);
+           fHistRapidity->Fill(vY);
+           if(vCharge > 0) fHistPhiPos->Fill(vPhi);
+           else if(vCharge < 0) fHistPhiNeg->Fill(vPhi);
 
            //Flow after burner
            if(fUseFlowAfterBurner) {
              Double_t precisionPhi = 0.001;
              Int_t maxNumberOfIterations = 100;
 
-             Double_t phi0 = v_phi;
-             Double_t gV2 = fDifferentialV2->Eval(v_pt);
+             Double_t phi0 = vPhi;
+             Double_t gV2 = fDifferentialV2->Eval(vPt);
 
              for (Int_t j = 0; j < maxNumberOfIterations; j++) {
-               Double_t phiprev = v_phi;
-               Double_t fl = v_phi - phi0 + gV2*TMath::Sin(2.*(v_phi - gReactionPlane));
-               Double_t fp = 1.0 + 2.0*gV2*TMath::Cos(2.*(v_phi - gReactionPlane)); 
-               v_phi -= fl/fp;
-               if (TMath::AreEqualAbs(phiprev,v_phi,precisionPhi)) break;
+               Double_t phiprev = vPhi;
+               Double_t fl = vPhi - phi0 + gV2*TMath::Sin(2.*(vPhi - gReactionPlane));
+               Double_t fp = 1.0 + 2.0*gV2*TMath::Cos(2.*(vPhi - gReactionPlane)); 
+               vPhi -= fl/fp;
+               if (TMath::AreEqualAbs(phiprev,vPhi,precisionPhi)) break;
              }
-             //Printf("phi (after): %lf\n",v_phi);
-                     Double_t v_DeltaphiBefore = phi0 - gReactionPlane;
-             if(v_DeltaphiBefore < 0) v_DeltaphiBefore += 2*TMath::Pi();
-             fHistPhiBefore->Fill(v_DeltaphiBefore);
-
-             Double_t v_DeltaphiAfter = v_phi - gReactionPlane;
-             if(v_DeltaphiAfter < 0) v_DeltaphiAfter += 2*TMath::Pi();
-             fHistPhiAfter->Fill(v_DeltaphiAfter);
+             //Printf("phi (after): %lf\n",vPhi);
+                     Double_t vDeltaphiBefore = phi0 - gReactionPlane;
+             if(vDeltaphiBefore < 0) vDeltaphiBefore += 2*TMath::Pi();
+             fHistPhiBefore->Fill(vDeltaphiBefore);
+
+             Double_t vDeltaphiAfter = vPhi - gReactionPlane;
+             if(vDeltaphiAfter < 0) vDeltaphiAfter += 2*TMath::Pi();
+             fHistPhiAfter->Fill(vDeltaphiAfter);
            }
            
-           v_phi *= TMath::RadToDeg();
+           vPhi *= TMath::RadToDeg();
 
            // fill charge vector
-           chargeVector[0]->push_back(v_charge);
-           chargeVector[1]->push_back(v_y);
-           chargeVector[2]->push_back(v_eta);
-           chargeVector[3]->push_back(v_phi);
-           chargeVector[4]->push_back(v_p[0]);
-           chargeVector[5]->push_back(v_p[1]);
-           chargeVector[6]->push_back(v_p[2]);
-           chargeVector[7]->push_back(v_pt);
-           chargeVector[8]->push_back(v_E);
+           chargeVector[0]->push_back(vCharge);
+           chargeVector[1]->push_back(vY);
+           chargeVector[2]->push_back(vEta);
+           chargeVector[3]->push_back(vPhi);
+           chargeVector[4]->push_back(vP[0]);
+           chargeVector[5]->push_back(vP[1]);
+           chargeVector[6]->push_back(vP[2]);
+           chargeVector[7]->push_back(vPt);
+           chargeVector[8]->push_back(vE);
            
            if(fRunShuffling) {
-             chargeVectorShuffle[0]->push_back(v_charge);
-             chargeVectorShuffle[1]->push_back(v_y);
-             chargeVectorShuffle[2]->push_back(v_eta);
-             chargeVectorShuffle[3]->push_back(v_phi);
-             chargeVectorShuffle[4]->push_back(v_p[0]);
-             chargeVectorShuffle[5]->push_back(v_p[1]);
-             chargeVectorShuffle[6]->push_back(v_p[2]);
-             chargeVectorShuffle[7]->push_back(v_pt);
-             chargeVectorShuffle[8]->push_back(v_E);
+             chargeVectorShuffle[0]->push_back(vCharge);
+             chargeVectorShuffle[1]->push_back(vY);
+             chargeVectorShuffle[2]->push_back(vEta);
+             chargeVectorShuffle[3]->push_back(vPhi);
+             chargeVectorShuffle[4]->push_back(vP[0]);
+             chargeVectorShuffle[5]->push_back(vP[1]);
+             chargeVectorShuffle[6]->push_back(vP[2]);
+             chargeVectorShuffle[7]->push_back(vPt);
+             chargeVectorShuffle[8]->push_back(vE);
            }
            gNumberOfAcceptedTracks += 1;
                    
index f6d6cdf..e0e22bb 100755 (executable)
@@ -1,5 +1,5 @@
-#ifndef ALIANALYSISTASKBF_CXX
-#define ALIANALYSISTASKBF_CXX
+#ifndef ALIANALYSISTASKBF_H
+#define ALIANALYSISTASKBF_H
 
 // Analysis task for the BF code
 // Authors: Panos Cristakoglou@cern.ch
@@ -48,15 +48,12 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
 
   //==============AOD analysis==============//
   void SetAODtrackCutBit(Int_t bit){
-    nAODtrackCutBit = bit;
+    fAODtrackCutBit = bit;
   }
 
   void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){
-    fPtMin  = ptmin;
-    fPtMax  = ptmax;
-    fEtaMin = etamin;
-    fEtaMax = etamax;
-
+    fPtMin  = ptmin;    fPtMax  = ptmax;
+    fEtaMin = etamin;   fEtaMax = etamax;
   }
 
   void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){
@@ -70,10 +67,9 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
   }
 
   //==============MC analysis==============//
-  void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax,
-                           Double_t etamin, Double_t etamax){
-    fPtMin  = ptmin; fPtMax  = ptmax;
-    fEtaMin = etamin; fEtaMax = etamax;
+   void SetKinematicsCutsMC(Double_t ptmin, Double_t ptmax,Double_t etamin, Double_t etamax){
+    fPtMin  = ptmin;   fPtMax  = ptmax;
+    fEtaMin = etamin;  fEtaMax = etamax;
   }
   void UseFlowAfterBurner(TF1 *gDifferentialV2) {
     fDifferentialV2 = gDifferentialV2;
@@ -88,7 +84,7 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
 
   //Centrality
   void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}
-  const char* GetCentralityEstimator(void)                     {return fCentralityEstimator;}
+  const char* GetCentralityEstimator (void) const {return fCentralityEstimator;}
   void SetCentralityPercentileRange(Double_t min, Double_t max) { 
     fUseCentrality = kTRUE;
     fCentralityPercentileMin=min;
@@ -146,47 +142,48 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
   TH1F *fHistVy; //y coordinate of the primary vertex
   TH1F *fHistVz; //z coordinate of the primary vertex
 
-  TH2F *fHistClus;//
-  TH2F *fHistDCA;//
-  TH1F *fHistChi2;//
-  TH1F *fHistPt;//
-  TH1F *fHistEta;//
-  TH1F *fHistRapidity;//
-  TH1F *fHistPhi;//
-  TH1F *fHistPhiBefore;//
-  TH1F *fHistPhiAfter;//
-  TH1F *fHistPhiPos;//
-  TH1F *fHistPhiNeg;//
-  TH2F *fHistV0M;//
-  TH2F *fHistRefTracks;//
+  TH2F *fHistClus;//number of clusters (QA histogram)
+  TH2F *fHistDCA;//DCA  (QA histogram)
+  TH1F *fHistChi2;//track chi2 (QA histogram)
+  TH1F *fHistPt;//transverse momentum (QA histogram)
+  TH1F *fHistEta;//pseudorapidity (QA histogram)
+  TH1F *fHistRapidity;//rapidity (QA histogram)
+  TH1F *fHistPhi;//phi (QA histogram)
+  TH1F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)
+  TH1F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)
+  TH1F *fHistPhiPos;//phi for positive particles (QA histogram)
+  TH1F *fHistPhiNeg;//phi for negative particles (QA histogram)
+  TH2F *fHistV0M;//V0 multiplicities (QA histogram)
+  TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)
 
   //============PID============//
-  TH2D *fHistdEdxVsPTPCbeforePID;//
-  TH2D *fHistBetavsPTOFbeforePID;//
-  TH2D *fHistProbTPCvsPtbeforePID; //
-  TH2D *fHistProbTOFvsPtbeforePID;//
-  TH2D *fHistProbTPCTOFvsPtbeforePID;//
-  TH2D *fHistNSigmaTPCvsPtbeforePID;//
-  TH2D *fHistNSigmaTOFvsPtbeforePID;//
-  TH2D *fHistdEdxVsPTPCafterPID;//
-  TH2D *fHistBetavsPTOFafterPID;//
-  TH2D *fHistProbTPCvsPtafterPID;//
-  TH2D *fHistProbTOFvsPtafterPID;//
-  TH2D *fHistProbTPCTOFvsPtafterPID;//
-  TH2D *fHistNSigmaTPCvsPtafterPID;//
-  TH2D *fHistNSigmaTOFvsPtafterPID; //
+  TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram)
+  TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram)
+  TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram)
+  TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram)
+  TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram)
+  TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram)
+  TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram)
+  TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram)
+  TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram)
+  TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram)
+  TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram)
+  TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram)
+  TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram)
+  TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram)
+
 
   AliPIDResponse *fPIDResponse;     //! PID response object
   AliPIDCombined       *fPIDCombined;     //! combined PID object
   
-  kParticleOfInterest  fParticleOfInterest;
-  kDetectorUsedForPID   fPidDetectorConfig;
-
-  Bool_t fUsePID; //
-  Bool_t fUsePIDnSigma;//
-  Bool_t fUsePIDPropabilities;//
-  Double_t fPIDNSigma;//
-  Double_t fMinAcceptedPIDProbability;//
+  kParticleOfInterest  fParticleOfInterest;//analyzed particle
+  kDetectorUsedForPID   fPidDetectorConfig;//used detector for PID
+
+  Bool_t fUsePID; //flag to use PID 
+  Bool_t fUsePIDnSigma;//flag to use nsigma method for PID
+  Bool_t fUsePIDPropabilities;//flag to use probability method for PID
+  Double_t fPIDNSigma;//nsigma cut for PID
+  Double_t fMinAcceptedPIDProbability;//probability cut for PID
   //============PID============//
 
   AliESDtrackCuts *fESDtrackCuts; //ESD track cuts
@@ -209,7 +206,7 @@ class AliAnalysisTaskBF : public AliAnalysisTaskSE {
   Double_t fVyMax;//vymax
   Double_t fVzMax;//vzmax
 
-  Int_t nAODtrackCutBit;//track cut bit from track selection (only used for AODs)
+  Int_t fAODtrackCutBit;//track cut bit from track selection (only used for AODs)
 
   Double_t fPtMin;//only used for AODs
   Double_t fPtMax;//only used for AODs
index 30e055a..0592e1a 100755 (executable)
@@ -731,11 +731,11 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
   TObjArray* tracksAccepted = new TObjArray;\r
   tracksAccepted->SetOwner(kTRUE);\r
 \r
-  Double_t v_charge;\r
-  Double_t v_eta;\r
-  Double_t v_y;\r
-  Double_t v_phi;\r
-  Double_t v_pt;\r
+  Double_t vCharge;\r
+  Double_t vEta;\r
+  Double_t vY;\r
+  Double_t vPhi;\r
+  Double_t vPt;\r
 \r
 \r
   if(gAnalysisLevel == "AOD") { // handling of TPC only tracks different in AOD and ESD\r
@@ -755,23 +755,23 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
       fHistTrackStats->Fill(aodTrack->GetFilterMap());\r
       if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;\r
       \r
-      v_charge = aodTrack->Charge();\r
-      v_eta    = aodTrack->Eta();\r
-      v_y      = aodTrack->Y();\r
-      v_phi    = aodTrack->Phi() * TMath::RadToDeg();\r
-      v_pt     = aodTrack->Pt();\r
+      vCharge = aodTrack->Charge();\r
+      vEta    = aodTrack->Eta();\r
+      vY      = aodTrack->Y();\r
+      vPhi    = aodTrack->Phi() * TMath::RadToDeg();\r
+      vPt     = aodTrack->Pt();\r
       \r
-      Float_t DCAxy = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
-      Float_t DCAz  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
+      Float_t dcaXY = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
+      Float_t dcaZ  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
       \r
       \r
       // Kinematics cuts from ESD track cuts\r
-      if( v_pt < fPtMin || v_pt > fPtMax)      continue;\r
-      if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;\r
+      if( vPt < fPtMin || vPt > fPtMax)      continue;\r
+      if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
       \r
       // Extra DCA cuts (for systematic studies [!= -1])\r
       if( fDCAxyCut != -1 && fDCAzCut != -1){\r
-       if(TMath::Sqrt((DCAxy*DCAxy)/(fDCAxyCut*fDCAxyCut)+(DCAz*DCAz)/(fDCAzCut*fDCAzCut)) > 1 ){\r
+       if(TMath::Sqrt((dcaXY*dcaXY)/(fDCAxyCut*fDCAxyCut)+(dcaZ*dcaZ)/(fDCAzCut*fDCAzCut)) > 1 ){\r
          continue;  // 2D cut\r
        }\r
       }\r
@@ -786,24 +786,24 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
       \r
       // fill QA histograms\r
       fHistClus->Fill(aodTrack->GetITSNcls(),aodTrack->GetTPCNcls());\r
-      fHistDCA->Fill(DCAz,DCAxy);\r
+      fHistDCA->Fill(dcaZ,dcaXY);\r
       fHistChi2->Fill(aodTrack->Chi2perNDF(),fCentrality);\r
-      fHistPt->Fill(v_pt,fCentrality);\r
-      fHistEta->Fill(v_eta,fCentrality);\r
-      fHistRapidity->Fill(v_y,fCentrality);\r
-      if(v_charge > 0) fHistPhiPos->Fill(v_phi,fCentrality);\r
-      else if(v_charge < 0) fHistPhiNeg->Fill(v_phi,fCentrality);\r
-      fHistPhi->Fill(v_phi,fCentrality);\r
+      fHistPt->Fill(vPt,fCentrality);\r
+      fHistEta->Fill(vEta,fCentrality);\r
+      fHistRapidity->Fill(vY,fCentrality);\r
+      if(vCharge > 0) fHistPhiPos->Fill(vPhi,fCentrality);\r
+      else if(vCharge < 0) fHistPhiNeg->Fill(vPhi,fCentrality);\r
+      fHistPhi->Fill(vPhi,fCentrality);\r
       \r
       // add the track to the TObjArray\r
-      tracksAccepted->Add(new AliBFBasicParticle(v_eta, v_phi, v_pt, v_charge));\r
+      tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge));\r
     }//track loop\r
   }// AOD analysis\r
 \r
 \r
   else if(gAnalysisLevel == "ESD" || gAnalysisLevel == "MCESD") { // handling of TPC only tracks different in AOD and ESD\r
 \r
-    AliESDtrack *track_TPC   = NULL;\r
+    AliESDtrack *trackTPC   = NULL;\r
     AliMCParticle *mcTrack   = NULL;\r
 \r
     AliMCEvent*  mcEvent     = NULL;\r
@@ -836,28 +836,28 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
       }\r
 \r
       // take only TPC only tracks\r
-      track_TPC   = new AliESDtrack();\r
-      if(!track->FillTPCOnlyTrack(*track_TPC)) continue;\r
+      trackTPC   = new AliESDtrack();\r
+      if(!track->FillTPCOnlyTrack(*trackTPC)) continue;\r
       \r
       //ESD track cuts\r
       if(fESDtrackCuts) \r
-       if(!fESDtrackCuts->AcceptTrack(track_TPC)) continue;\r
+       if(!fESDtrackCuts->AcceptTrack(trackTPC)) continue;\r
       \r
       // fill QA histograms\r
       Float_t b[2];\r
       Float_t bCov[3];\r
-      track_TPC->GetImpactParameters(b,bCov);\r
+      trackTPC->GetImpactParameters(b,bCov);\r
       if (bCov[0]<=0 || bCov[2]<=0) {\r
        AliDebug(1, "Estimated b resolution lower or equal zero!");\r
        bCov[0]=0; bCov[2]=0;\r
       }\r
       \r
       Int_t nClustersTPC = -1;\r
-      nClustersTPC = track_TPC->GetTPCNclsIter1();   // TPC standalone\r
+      nClustersTPC = trackTPC->GetTPCNclsIter1();   // TPC standalone\r
       //nClustersTPC = track->GetTPCclusters(0);   // global track\r
       Float_t chi2PerClusterTPC = -1;\r
       if (nClustersTPC!=0) {\r
-       chi2PerClusterTPC = track_TPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone\r
+       chi2PerClusterTPC = trackTPC->GetTPCchi2Iter1()/Float_t(nClustersTPC);      // TPC standalone\r
        //chi2PerClusterTPC = track->GetTPCchi2()/Float_t(nClustersTPC);     // global track\r
       }\r
       \r
@@ -960,25 +960,25 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
        }\r
       }\r
       //===========================PID===============================//\r
-      v_charge = track_TPC->Charge();\r
-      v_y      = track_TPC->Y();\r
-      v_eta    = track_TPC->Eta();\r
-      v_phi    = track_TPC->Phi() * TMath::RadToDeg();\r
-      v_pt     = track_TPC->Pt();\r
-      fHistClus->Fill(track_TPC->GetITSclusters(0),nClustersTPC);\r
+      vCharge = trackTPC->Charge();\r
+      vY      = trackTPC->Y();\r
+      vEta    = trackTPC->Eta();\r
+      vPhi    = trackTPC->Phi() * TMath::RadToDeg();\r
+      vPt     = trackTPC->Pt();\r
+      fHistClus->Fill(trackTPC->GetITSclusters(0),nClustersTPC);\r
       fHistDCA->Fill(b[1],b[0]);\r
       fHistChi2->Fill(chi2PerClusterTPC,fCentrality);\r
-      fHistPt->Fill(v_pt,fCentrality);\r
-      fHistEta->Fill(v_eta,fCentrality);\r
-      fHistPhi->Fill(v_phi,fCentrality);\r
-      fHistRapidity->Fill(v_y,fCentrality);\r
-      if(v_charge > 0) fHistPhiPos->Fill(v_phi,fCentrality);\r
-      else if(v_charge < 0) fHistPhiNeg->Fill(v_phi,fCentrality);\r
+      fHistPt->Fill(vPt,fCentrality);\r
+      fHistEta->Fill(vEta,fCentrality);\r
+      fHistPhi->Fill(vPhi,fCentrality);\r
+      fHistRapidity->Fill(vY,fCentrality);\r
+      if(vCharge > 0) fHistPhiPos->Fill(vPhi,fCentrality);\r
+      else if(vCharge < 0) fHistPhiNeg->Fill(vPhi,fCentrality);\r
       \r
       // add the track to the TObjArray\r
-      tracksAccepted->Add(new AliBFBasicParticle(v_eta, v_phi, v_pt, v_charge));      \r
+      tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge));      \r
 \r
-      delete track_TPC;\r
+      delete trackTPC;\r
     }//track loop\r
   }// ESD analysis\r
 \r
@@ -995,17 +995,17 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
       //exclude non stable particles\r
       if(!(dynamic_cast<AliMCEvent*>(event)->IsPhysicalPrimary(iTracks))) continue;\r
 \r
-      v_eta    = track->Eta();\r
-      v_pt     = track->Pt();\r
-      v_y      = track->Y();\r
+      vEta    = track->Eta();\r
+      vPt     = track->Pt();\r
+      vY      = track->Y();\r
       \r
-      if( v_pt < fPtMin || v_pt > fPtMax)      \r
+      if( vPt < fPtMin || vPt > fPtMax)      \r
        continue;\r
       if (!fUsePID) {\r
-       if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;\r
+       if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
       }\r
       else if (fUsePID){\r
-       if( v_y < fEtaMin || v_y > fEtaMax)  continue;\r
+       if( vY < fEtaMin || vY > fEtaMax)  continue;\r
       }\r
       \r
       //analyze one set of particles\r
@@ -1050,45 +1050,45 @@ TObjArray* AliAnalysisTaskBFPsi::GetAcceptedTracks(AliVEvent *event, Double_t fC
        if(kExcludeParticle) continue;\r
       }\r
       \r
-      v_charge = track->Charge();\r
-      v_phi    = track->Phi();\r
-      //Printf("phi (before): %lf",v_phi);\r
+      vCharge = track->Charge();\r
+      vPhi    = track->Phi();\r
+      //Printf("phi (before): %lf",vPhi);\r
       \r
-      fHistPt->Fill(v_pt,fCentrality);\r
-      fHistEta->Fill(v_eta,fCentrality);\r
-      fHistPhi->Fill(v_phi*TMath::RadToDeg(),fCentrality);\r
-      fHistRapidity->Fill(v_y,fCentrality);\r
-      if(v_charge > 0) fHistPhiPos->Fill(v_phi*TMath::RadToDeg(),fCentrality);\r
-      else if(v_charge < 0) fHistPhiNeg->Fill(v_phi*TMath::RadToDeg(),fCentrality);\r
+      fHistPt->Fill(vPt,fCentrality);\r
+      fHistEta->Fill(vEta,fCentrality);\r
+      fHistPhi->Fill(vPhi*TMath::RadToDeg(),fCentrality);\r
+      fHistRapidity->Fill(vY,fCentrality);\r
+      if(vCharge > 0) fHistPhiPos->Fill(vPhi*TMath::RadToDeg(),fCentrality);\r
+      else if(vCharge < 0) fHistPhiNeg->Fill(vPhi*TMath::RadToDeg(),fCentrality);\r
       \r
       //Flow after burner\r
       if(fUseFlowAfterBurner) {\r
        Double_t precisionPhi = 0.001;\r
        Int_t maxNumberOfIterations = 100;\r
        \r
-       Double_t phi0 = v_phi;\r
-       Double_t gV2 = fDifferentialV2->Eval(v_pt);\r
+       Double_t phi0 = vPhi;\r
+       Double_t gV2 = fDifferentialV2->Eval(vPt);\r
        \r
        for (Int_t j = 0; j < maxNumberOfIterations; j++) {\r
-         Double_t phiprev = v_phi;\r
-         Double_t fl = v_phi - phi0 + gV2*TMath::Sin(2.*(v_phi - gReactionPlane));\r
-         Double_t fp = 1.0 + 2.0*gV2*TMath::Cos(2.*(v_phi - gReactionPlane)); \r
-         v_phi -= fl/fp;\r
-         if (TMath::AreEqualAbs(phiprev,v_phi,precisionPhi)) break;\r
+         Double_t phiprev = vPhi;\r
+         Double_t fl = vPhi - phi0 + gV2*TMath::Sin(2.*(vPhi - gReactionPlane));\r
+         Double_t fp = 1.0 + 2.0*gV2*TMath::Cos(2.*(vPhi - gReactionPlane)); \r
+         vPhi -= fl/fp;\r
+         if (TMath::AreEqualAbs(phiprev,vPhi,precisionPhi)) break;\r
        }\r
-       //Printf("phi (after): %lf\n",v_phi);\r
-       Double_t v_DeltaphiBefore = phi0 - gReactionPlane;\r
-       if(v_DeltaphiBefore < 0) v_DeltaphiBefore += 2*TMath::Pi();\r
-       fHistPhiBefore->Fill(v_DeltaphiBefore,fCentrality);\r
+       //Printf("phi (after): %lf\n",vPhi);\r
+       Double_t vDeltaphiBefore = phi0 - gReactionPlane;\r
+       if(vDeltaphiBefore < 0) vDeltaphiBefore += 2*TMath::Pi();\r
+       fHistPhiBefore->Fill(vDeltaphiBefore,fCentrality);\r
        \r
-       Double_t v_DeltaphiAfter = v_phi - gReactionPlane;\r
-       if(v_DeltaphiAfter < 0) v_DeltaphiAfter += 2*TMath::Pi();\r
-       fHistPhiAfter->Fill(v_DeltaphiAfter,fCentrality);\r
+       Double_t vDeltaphiAfter = vPhi - gReactionPlane;\r
+       if(vDeltaphiAfter < 0) vDeltaphiAfter += 2*TMath::Pi();\r
+       fHistPhiAfter->Fill(vDeltaphiAfter,fCentrality);\r
       }\r
       \r
-      v_phi *= TMath::RadToDeg();\r
+      vPhi *= TMath::RadToDeg();\r
           \r
-      tracksAccepted->Add(new AliBFBasicParticle(v_eta, v_phi, v_pt, v_charge));\r
+      tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge));\r
       \r
     } //track loop\r
   }//MC\r
index b1f1e46..4b7b134 100755 (executable)
@@ -1,5 +1,5 @@
-#ifndef ALIANALYSISTASKBFPSI_CXX\r
-#define ALIANALYSISTASKBFPSI_CXX\r
+#ifndef ALIANALYSISTASKBFPSI_H\r
+#define ALIANALYSISTASKBFPSI_H\r
 \r
 // Analysis task for the BF vs Psi code\r
 // Authors: Panos Cristakoglou@cern.ch\r
@@ -59,11 +59,8 @@ class AliAnalysisTaskBFPsi : public AliAnalysisTaskSE {
   }\r
 \r
   void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
-    fPtMin  = ptmin;\r
-    fPtMax  = ptmax;\r
-    fEtaMin = etamin;\r
-    fEtaMax = etamax;\r
-\r
+    fPtMin  = ptmin;  fPtMax  = ptmax;\r
+    fEtaMin = etamin; fEtaMax = etamax;\r
   }\r
 \r
   void SetExtraDCACutsAOD(Double_t DCAxy, Double_t DCAz){\r
@@ -95,7 +92,7 @@ class AliAnalysisTaskBFPsi : public AliAnalysisTaskSE {
 \r
   //Centrality\r
   void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
-  const char* GetCentralityEstimator(void)                     {return fCentralityEstimator;}\r
+  const char* GetCentralityEstimator(void)  const              {return fCentralityEstimator;}\r
   void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
     fUseCentrality = kTRUE;\r
     fCentralityPercentileMin=min;\r
@@ -166,47 +163,47 @@ class AliAnalysisTaskBFPsi : public AliAnalysisTaskSE {
 \r
   TH2F *fHistEventPlane; //event plane distribution\r
 \r
-  TH2F *fHistClus;//\r
-  TH2F *fHistDCA;//\r
-  TH2F *fHistChi2;//\r
-  TH2F *fHistPt;//\r
-  TH2F *fHistEta;//\r
-  TH2F *fHistRapidity;//\r
-  TH2F *fHistPhi;//\r
-  TH2F *fHistPhiBefore;//\r
-  TH2F *fHistPhiAfter;//\r
-  TH2F *fHistPhiPos;//\r
-  TH2F *fHistPhiNeg;//\r
-  TH2F *fHistV0M;//\r
-  TH2F *fHistRefTracks;//\r
+  TH2F *fHistClus;//number of clusters (QA histogram)\r
+  TH2F *fHistDCA;//DCA  (QA histogram)\r
+  TH2F *fHistChi2;//track chi2 (QA histogram)\r
+  TH2F *fHistPt;//transverse momentum (QA histogram)\r
+  TH2F *fHistEta;//pseudorapidity (QA histogram)\r
+  TH2F *fHistRapidity;//rapidity (QA histogram)\r
+  TH2F *fHistPhi;//phi (QA histogram)\r
+  TH2F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)\r
+  TH2F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)\r
+  TH2F *fHistPhiPos;//phi for positive particles (QA histogram)\r
+  TH2F *fHistPhiNeg;//phi for negative particles (QA histogram)\r
+  TH2F *fHistV0M;//V0 multiplicities (QA histogram)\r
+  TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)\r
 \r
   //============PID============//\r
-  TH2D *fHistdEdxVsPTPCbeforePID;//\r
-  TH2D *fHistBetavsPTOFbeforePID;//\r
-  TH2D *fHistProbTPCvsPtbeforePID; //\r
-  TH2D *fHistProbTOFvsPtbeforePID;//\r
-  TH2D *fHistProbTPCTOFvsPtbeforePID;//\r
-  TH2D *fHistNSigmaTPCvsPtbeforePID;//\r
-  TH2D *fHistNSigmaTOFvsPtbeforePID;//\r
-  TH2D *fHistdEdxVsPTPCafterPID;//\r
-  TH2D *fHistBetavsPTOFafterPID;//\r
-  TH2D *fHistProbTPCvsPtafterPID;//\r
-  TH2D *fHistProbTOFvsPtafterPID;//\r
-  TH2D *fHistProbTPCTOFvsPtafterPID;//\r
-  TH2D *fHistNSigmaTPCvsPtafterPID;//\r
-  TH2D *fHistNSigmaTOFvsPtafterPID; //\r
+  TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram)\r
+  TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram)\r
+  TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram)\r
 \r
   AliPIDResponse *fPIDResponse;     //! PID response object\r
   AliPIDCombined       *fPIDCombined;     //! combined PID object\r
   \r
-  kParticleOfInterest  fParticleOfInterest;\r
-  kDetectorUsedForPID   fPidDetectorConfig;\r
-\r
-  Bool_t fUsePID; //\r
-  Bool_t fUsePIDnSigma;//\r
-  Bool_t fUsePIDPropabilities;//\r
-  Double_t fPIDNSigma;//\r
-  Double_t fMinAcceptedPIDProbability;//\r
+  kParticleOfInterest  fParticleOfInterest;//analyzed particle\r
+  kDetectorUsedForPID   fPidDetectorConfig;//used detector for PID\r
+\r
+  Bool_t fUsePID; //flag to use PID \r
+  Bool_t fUsePIDnSigma;//flag to use nsigma method for PID\r
+  Bool_t fUsePIDPropabilities;//flag to use probability method for PID\r
+  Double_t fPIDNSigma;//nsigma cut for PID\r
+  Double_t fMinAcceptedPIDProbability;//probability cut for PID\r
   //============PID============//\r
 \r
   AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r
index dc18bc9..fa8d441 100755 (executable)
@@ -387,6 +387,7 @@ void AliAnalysisTaskEventMixingBF::Terminate(Option_t *) {
 \r
 void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)\r
 {\r
+  // Main loop for event mixing\r
 \r
   TString gAnalysisLevel = fBalance->GetAnalysisLevel();\r
 \r
@@ -403,13 +404,13 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
     chargeVector[i]        = new vector<Double_t>;\r
   }\r
   \r
-  Double_t v_charge;\r
-  Double_t v_y;\r
-  Double_t v_eta;\r
-  Double_t v_phi;\r
-  Double_t v_p[3];\r
-  Double_t v_pt;\r
-  Double_t v_E;\r
+  Double_t vCharge;\r
+  Double_t vY;\r
+  Double_t vEta;\r
+  Double_t vPhi;\r
+  Double_t vP[3];\r
+  Double_t vPt;\r
+  Double_t vE;\r
 \r
   Int_t iMainTrackUsed = -1;\r
 \r
@@ -520,25 +521,25 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
                      fHistTrackStats->Fill(aodTrackMain->GetFilterMap());\r
                      if(!aodTrackMain->TestFilterBit(nAODtrackCutBit)) continue;\r
                      \r
-                     v_charge = aodTrackMain->Charge();\r
-                     v_y      = aodTrackMain->Y();\r
-                     v_eta    = aodTrackMain->Eta();\r
-                     v_phi    = aodTrackMain->Phi() * TMath::RadToDeg();\r
-                     v_E      = aodTrackMain->E();\r
-                     v_pt     = aodTrackMain->Pt();\r
-                     aodTrackMain->PxPyPz(v_p);\r
+                     vCharge = aodTrackMain->Charge();\r
+                     vY      = aodTrackMain->Y();\r
+                     vEta    = aodTrackMain->Eta();\r
+                     vPhi    = aodTrackMain->Phi() * TMath::RadToDeg();\r
+                     vE      = aodTrackMain->E();\r
+                     vPt     = aodTrackMain->Pt();\r
+                     aodTrackMain->PxPyPz(vP);\r
                      \r
-                     Float_t DCAxyMain = aodTrackMain->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
-                     Float_t DCAzMain  = aodTrackMain->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
+                     Float_t dcaXYMain = aodTrackMain->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
+                     Float_t dcaZMain  = aodTrackMain->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
                      \r
                      \r
                      // Kinematics cuts from ESD track cuts\r
-                     if( v_pt < fPtMin || v_pt > fPtMax)      continue;\r
-                     if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;\r
+                     if( vPt < fPtMin || vPt > fPtMax)      continue;\r
+                     if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
                      \r
                      // Extra DCA cuts (for systematic studies [!= -1])\r
                      if( fDCAxyCut != -1 && fDCAzCut != -1){\r
-                       if(TMath::Sqrt((DCAxyMain*DCAxyMain)/(fDCAxyCut*fDCAxyCut)+(DCAzMain*DCAzMain)/(fDCAzCut*fDCAzCut)) > 1 ){\r
+                       if(TMath::Sqrt((dcaXYMain*dcaXYMain)/(fDCAxyCut*fDCAxyCut)+(dcaZMain*dcaZMain)/(fDCAzCut*fDCAzCut)) > 1 ){\r
                          continue;  // 2D cut\r
                        }\r
                      }\r
@@ -553,22 +554,22 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
                      \r
                      // fill QA histograms\r
                      fHistClus->Fill(aodTrackMain->GetITSNcls(),aodTrackMain->GetTPCNcls());\r
-                     fHistDCA->Fill(DCAzMain,DCAxyMain);\r
+                     fHistDCA->Fill(dcaZMain,dcaXYMain);\r
                      fHistChi2->Fill(aodTrackMain->Chi2perNDF());\r
-                     fHistPt->Fill(v_pt);\r
-                     fHistEta->Fill(v_eta);\r
-                     fHistPhi->Fill(v_phi);\r
+                     fHistPt->Fill(vPt);\r
+                     fHistEta->Fill(vEta);\r
+                     fHistPhi->Fill(vPhi);\r
                      \r
                      // fill charge vector\r
-                     chargeVector[0]->push_back(v_charge);\r
-                     chargeVector[1]->push_back(v_y);\r
-                     chargeVector[2]->push_back(v_eta);\r
-                     chargeVector[3]->push_back(v_phi);\r
-                     chargeVector[4]->push_back(v_p[0]);\r
-                     chargeVector[5]->push_back(v_p[1]);\r
-                     chargeVector[6]->push_back(v_p[2]);\r
-                     chargeVector[7]->push_back(v_pt);\r
-                     chargeVector[8]->push_back(v_E);\r
+                     chargeVector[0]->push_back(vCharge);\r
+                     chargeVector[1]->push_back(vY);\r
+                     chargeVector[2]->push_back(vEta);\r
+                     chargeVector[3]->push_back(vPhi);\r
+                     chargeVector[4]->push_back(vP[0]);\r
+                     chargeVector[5]->push_back(vP[1]);\r
+                     chargeVector[6]->push_back(vP[2]);\r
+                     chargeVector[7]->push_back(vPt);\r
+                     chargeVector[8]->push_back(vE);\r
 \r
                      // -------------------------------------------------------------               \r
                      // for each track in main event loop over all tracks in mix event\r
@@ -587,25 +588,25 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
                        fHistTrackStats->Fill(aodTrackMix->GetFilterMap());\r
                        if(!aodTrackMix->TestFilterBit(nAODtrackCutBit)) continue;\r
                        \r
-                       v_charge = aodTrackMix->Charge();\r
-                       v_y      = aodTrackMix->Y();\r
-                       v_eta    = aodTrackMix->Eta();\r
-                       v_phi    = aodTrackMix->Phi() * TMath::RadToDeg();\r
-                       v_E      = aodTrackMix->E();\r
-                       v_pt     = aodTrackMix->Pt();\r
-                       aodTrackMix->PxPyPz(v_p);\r
+                       vCharge = aodTrackMix->Charge();\r
+                       vY      = aodTrackMix->Y();\r
+                       vEta    = aodTrackMix->Eta();\r
+                       vPhi    = aodTrackMix->Phi() * TMath::RadToDeg();\r
+                       vE      = aodTrackMix->E();\r
+                       vPt     = aodTrackMix->Pt();\r
+                       aodTrackMix->PxPyPz(vP);\r
                      \r
-                       Float_t DCAxyMix = aodTrackMix->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
-                       Float_t DCAzMix  = aodTrackMix->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
+                       Float_t dcaXYMix = aodTrackMix->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
+                       Float_t dcaZMix  = aodTrackMix->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
                        \r
                        \r
                        // Kinematics cuts from ESD track cuts\r
-                       if( v_pt < fPtMin || v_pt > fPtMax)      continue;\r
-                       if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;\r
+                       if( vPt < fPtMin || vPt > fPtMax)      continue;\r
+                       if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
                        \r
                        // Extra DCA cuts (for systematic studies [!= -1])\r
                        if( fDCAxyCut != -1 && fDCAxyCut != -1){\r
-                         if(TMath::Sqrt((DCAxyMix*DCAxyMix)/(fDCAxyCut*fDCAxyCut)+(DCAzMix*DCAzMix)/(fDCAzCut*fDCAzCut)) > 1 ){\r
+                         if(TMath::Sqrt((dcaXYMix*dcaXYMix)/(fDCAxyCut*fDCAxyCut)+(dcaZMix*dcaZMix)/(fDCAzCut*fDCAzCut)) > 1 ){\r
                            continue;  // 2D cut\r
                          }\r
                        }\r
@@ -620,22 +621,22 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
                        \r
                        // fill QA histograms\r
                        fHistClus->Fill(aodTrackMix->GetITSNcls(),aodTrackMix->GetTPCNcls());\r
-                       fHistDCA->Fill(DCAzMix,DCAxyMix);\r
+                       fHistDCA->Fill(dcaZMix,dcaXYMix);\r
                        fHistChi2->Fill(aodTrackMix->Chi2perNDF());\r
-                       fHistPt->Fill(v_pt);\r
-                       fHistEta->Fill(v_eta);\r
-                       fHistPhi->Fill(v_phi);\r
+                       fHistPt->Fill(vPt);\r
+                       fHistEta->Fill(vEta);\r
+                       fHistPhi->Fill(vPhi);\r
                        \r
                        // fill charge vector\r
-                       chargeVector[0]->push_back(v_charge);\r
-                       chargeVector[1]->push_back(v_y);\r
-                       chargeVector[2]->push_back(v_eta);\r
-                       chargeVector[3]->push_back(v_phi);\r
-                       chargeVector[4]->push_back(v_p[0]);\r
-                       chargeVector[5]->push_back(v_p[1]);\r
-                       chargeVector[6]->push_back(v_p[2]);\r
-                       chargeVector[7]->push_back(v_pt);\r
-                       chargeVector[8]->push_back(v_E);\r
+                       chargeVector[0]->push_back(vCharge);\r
+                       chargeVector[1]->push_back(vY);\r
+                       chargeVector[2]->push_back(vEta);\r
+                       chargeVector[3]->push_back(vPhi);\r
+                       chargeVector[4]->push_back(vP[0]);\r
+                       chargeVector[5]->push_back(vP[1]);\r
+                       chargeVector[6]->push_back(vP[2]);\r
+                       chargeVector[7]->push_back(vPt);\r
+                       chargeVector[8]->push_back(vE);\r
                        \r
                        \r
                        \r
@@ -664,6 +665,7 @@ void AliAnalysisTaskEventMixingBF::UserExecMix(Option_t *)
 }\r
 \r
 AliMixInputEventHandler *AliAnalysisTaskEventMixingBF::SetupEventsForMixing() {\r
+  //sets the input handlers for event mixing\r
 \r
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();\r
   AliMultiInputEventHandler *inEvHMain = dynamic_cast<AliMultiInputEventHandler *>(mgr->GetInputEventHandler());\r
index b0c06f5..0755f0d 100755 (executable)
@@ -54,10 +54,8 @@ class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE {
   }\r
 \r
   void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
-    fPtMin  = ptmin;\r
-    fPtMax  = ptmax;\r
-    fEtaMin = etamin;\r
-    fEtaMax = etamax;\r
+    fPtMin  = ptmin;  fPtMax  = ptmax;\r
+    fEtaMin = etamin; fEtaMax = etamax;\r
 \r
   }\r
 \r
@@ -90,7 +88,7 @@ class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE {
 \r
   //Centrality\r
   void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
-  const char* GetCentralityEstimator(void)                     {return fCentralityEstimator;}\r
+  const char* GetCentralityEstimator(void)    const            {return fCentralityEstimator;}\r
   void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
     fUseCentrality = kTRUE;\r
     fCentralityPercentileMin=min;\r
@@ -148,44 +146,44 @@ class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE {
   TH1F *fHistVy; //y coordinate of the primary vertex\r
   TH1F *fHistVz; //z coordinate of the primary vertex\r
 \r
-  TH2F *fHistClus;//\r
-  TH2F *fHistDCA;//\r
-  TH1F *fHistChi2;//\r
-  TH1F *fHistPt;//\r
-  TH1F *fHistEta;//\r
-  TH1F *fHistPhi;//\r
-  TH1F *fHistPhiBefore;//\r
-  TH1F *fHistPhiAfter;//\r
-  TH2F *fHistV0M;//\r
-  TH2F *fHistRefTracks;//\r
+  TH2F *fHistClus;//number of clusters (QA histogram)\r
+  TH2F *fHistDCA;//DCA  (QA histogram)\r
+  TH1F *fHistChi2;//track chi2 (QA histogram)\r
+  TH1F *fHistPt;//transverse momentum (QA histogram)\r
+  TH1F *fHistEta;//pseudorapidity (QA histogram)\r
+  TH1F *fHistPhi;//phi (QA histogram)\r
+  TH1F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)\r
+  TH1F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)\r
+  TH2F *fHistV0M;//V0 multiplicities (QA histogram)\r
+  TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)\r
 \r
   //============PID============//\r
-  TH2D *fHistdEdxVsPTPCbeforePID;//\r
-  TH2D *fHistBetavsPTOFbeforePID;//\r
-  TH2D *fHistProbTPCvsPtbeforePID; //\r
-  TH2D *fHistProbTOFvsPtbeforePID;//\r
-  TH2D *fHistProbTPCTOFvsPtbeforePID;//\r
-  TH2D *fHistNSigmaTPCvsPtbeforePID;//\r
-  TH2D *fHistNSigmaTOFvsPtbeforePID;//\r
-  TH2D *fHistdEdxVsPTPCafterPID;//\r
-  TH2D *fHistBetavsPTOFafterPID;//\r
-  TH2D *fHistProbTPCvsPtafterPID;//\r
-  TH2D *fHistProbTOFvsPtafterPID;//\r
-  TH2D *fHistProbTPCTOFvsPtafterPID;//\r
-  TH2D *fHistNSigmaTPCvsPtafterPID;//\r
-  TH2D *fHistNSigmaTOFvsPtafterPID; //\r
+  TH2D *fHistdEdxVsPTPCbeforePID;//TPC dEdx vs momentum before PID cuts (QA histogram)\r
+  TH2D *fHistBetavsPTOFbeforePID;//beta vs momentum before PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCvsPtbeforePID; //TPC probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistProbTOFvsPtbeforePID;//TOF probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCTOFvsPtbeforePID;//TOF/TPC probability vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTPCvsPtbeforePID;//TPC nsigma vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTOFvsPtbeforePID;//TOF nsigma vs pT before PID cuts (QA histogram)\r
+  TH2D *fHistdEdxVsPTPCafterPID;//TPC dEdx vs momentum after PID cuts (QA histogram)\r
+  TH2D *fHistBetavsPTOFafterPID;//beta vs momentum after PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCvsPtafterPID; //TPC probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistProbTOFvsPtafterPID;//TOF probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistProbTPCTOFvsPtafterPID;//TOF/TPC probability vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTPCvsPtafterPID;//TPC nsigma vs pT after PID cuts (QA histogram)\r
+  TH2D *fHistNSigmaTOFvsPtafterPID;//TOF nsigma vs pT after PID cuts (QA histogram)\r
 \r
   AliPIDResponse *fPIDResponse;     //! PID response object\r
   AliPIDCombined       *fPIDCombined;     //! combined PID object\r
   \r
-  kParticleOfInterest  fParticleOfInterest;\r
-  kDetectorUsedForPID   fPidDetectorConfig;\r
-\r
-  Bool_t fUsePID; //\r
-  Bool_t fUsePIDnSigma;//\r
-  Bool_t fUsePIDPropabilities;//\r
-  Double_t fPIDNSigma;//\r
-  Double_t fMinAcceptedPIDProbability;//\r
+  kParticleOfInterest  fParticleOfInterest;//analyzed particle\r
+  kDetectorUsedForPID   fPidDetectorConfig;//used detector for PID\r
+\r
+  Bool_t fUsePID; //flag to use PID \r
+  Bool_t fUsePIDnSigma;//flag to use nsigma method for PID\r
+  Bool_t fUsePIDPropabilities;//flag to use probability method for PID\r
+  Double_t fPIDNSigma;//nsigma cut for PID\r
+  Double_t fMinAcceptedPIDProbability;//probability cut for PID\r
   //============PID============//\r
 \r
   AliESDtrackCuts *fESDtrackCuts; //ESD track cuts\r
@@ -231,8 +229,8 @@ class AliAnalysisTaskEventMixingBF : public AliAnalysisTaskSE {
   Int_t fPDGCodeToBeAnalyzed; //Analyze a set of particles in MC\r
 \r
   // Event Mixing\r
-  AliVEvent       *fMainEvent;\r
-  AliVEvent       *fMixEvent;\r
+  AliVEvent       *fMainEvent;//main event in the event mixing loop\r
+  AliVEvent       *fMixEvent;//second event in the event mixing loop\r
 \r
   AliMixInputEventHandler *SetupEventsForMixing();  \r
 \r
index 5806819..1cd6ac8 100755 (executable)
@@ -305,13 +305,13 @@ void AliAnalysisTaskToyModel::CreateOutputObjects() {
 void AliAnalysisTaskToyModel::Run(Int_t nEvents) {\r
   // Main loop\r
   // Called for each event\r
-  Double_t v_charge = 0;\r
-  Double_t v_y = 0.0;\r
-  Double_t v_eta = 0.0;\r
-  Double_t v_phi = 0.0;\r
-  Double_t v_p[3] = {0.,0.,0.};\r
-  Double_t v_pt = 0.0;\r
-  Double_t v_E = 0.0;\r
+  Double_t vCharge = 0;\r
+  Double_t vY = 0.0;\r
+  Double_t vEta = 0.0;\r
+  Double_t vPhi = 0.0;\r
+  Double_t vP[3] = {0.,0.,0.};\r
+  Double_t vPt = 0.0;\r
+  Double_t vE = 0.0;\r
   Bool_t isPion = kFALSE, isKaon = kFALSE, isProton = kFALSE;\r
 \r
   if(fUseAllCharges) {\r
@@ -401,112 +401,112 @@ void AliAnalysisTaskToyModel::Run(Int_t nEvents) {
        Printf("Generating positive: %d(%d)",iParticleCount+1,nGeneratedPositive);\r
 \r
       //Pseudo-rapidity sampled from a Gaussian centered @ 0\r
-      v_eta = gRandom->Gaus(0.0,4.0);\r
+      vEta = gRandom->Gaus(0.0,4.0);\r
 \r
       //Fill QA histograms (full phase space)\r
-      fHistEtaTotal->Fill(v_eta);\r
+      fHistEtaTotal->Fill(vEta);\r
 \r
-      v_charge = 1.0;\r
+      vCharge = 1.0;\r
       //nGeneratedPositive += 1;\r
       \r
       //Acceptance\r
-      if((v_eta < fEtaMin) || (v_eta > fEtaMax)) continue;\r
+      if((vEta < fEtaMin) || (vEta > fEtaMax)) continue;\r
 \r
       if(!fUseAllCharges) {\r
        //Decide the specie\r
        Double_t randomNumberSpecies = gRandom->Rndm();\r
        if((randomNumberSpecies >= 0.0)&&(randomNumberSpecies < fPionPercentage)) {\r
          nGeneratedPions += 1;\r
-         v_pt = fPtSpectraPions->GetRandom();\r
-         v_phi = fAzimuthalAnglePions->GetRandom();\r
+         vPt = fPtSpectraPions->GetRandom();\r
+         vPhi = fAzimuthalAnglePions->GetRandom();\r
          fParticleMass = fPionMass;\r
          isPion = kTRUE;\r
        }\r
        else if((randomNumberSpecies >= fPionPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage)) {\r
          nGeneratedKaons += 1;\r
-         v_pt = fPtSpectraKaons->GetRandom();\r
-         v_phi = fAzimuthalAngleKaons->GetRandom();\r
+         vPt = fPtSpectraKaons->GetRandom();\r
+         vPhi = fAzimuthalAngleKaons->GetRandom();\r
          fParticleMass = fKaonMass;\r
          isKaon = kTRUE;\r
        }\r
        else if((randomNumberSpecies >= fPionPercentage + fKaonPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage + fProtonPercentage)) {\r
          nGeneratedProtons += 1;\r
-         v_pt = fPtSpectraProtons->GetRandom();\r
-         v_phi = fAzimuthalAngleProtons->GetRandom();\r
+         vPt = fPtSpectraProtons->GetRandom();\r
+         vPhi = fAzimuthalAngleProtons->GetRandom();\r
          fParticleMass = fProtonMass;\r
          isProton = kTRUE;\r
        }\r
       }\r
       else {\r
-       v_pt = fPtSpectraAllCharges->GetRandom();\r
-       v_phi = fAzimuthalAngleAllCharges->GetRandom();\r
+       vPt = fPtSpectraAllCharges->GetRandom();\r
+       vPhi = fAzimuthalAngleAllCharges->GetRandom();\r
       }\r
       \r
-      v_p[0] = v_pt*TMath::Cos(v_phi);\r
-      v_p[1] = v_pt*TMath::Sin(v_phi);\r
-      v_p[2] = v_pt*TMath::SinH(v_eta);\r
-      v_E = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
-                       TMath::Power(v_p[0],2) +\r
-                       TMath::Power(v_p[1],2) +\r
-                       TMath::Power(v_p[2],2));\r
+      vP[0] = vPt*TMath::Cos(vPhi);\r
+      vP[1] = vPt*TMath::Sin(vPhi);\r
+      vP[2] = vPt*TMath::SinH(vEta);\r
+      vE = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
+                       TMath::Power(vP[0],2) +\r
+                       TMath::Power(vP[1],2) +\r
+                       TMath::Power(vP[2],2));\r
       \r
-      v_y = 0.5*TMath::Log((v_E + v_p[2])/(v_E - v_p[2]));\r
+      vY = 0.5*TMath::Log((vE + vP[2])/(vE - vP[2]));\r
       \r
       //pt coverage\r
-      if((v_pt < fPtMin) || (v_pt > fPtMax)) continue;\r
-      //Printf("pt: %lf - mins: %lf - max: %lf",v_pt,fPtMin,fPtMax);\r
+      if((vPt < fPtMin) || (vPt > fPtMax)) continue;\r
+      //Printf("pt: %lf - mins: %lf - max: %lf",vPt,fPtMin,fPtMax);\r
 \r
       //acceptance filter\r
       if(fUseAcceptanceParameterization) {\r
        Double_t gRandomNumberForAcceptance = gRandom->Rndm();\r
-       if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(v_pt)) \r
+       if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(vPt)) \r
          continue;\r
       }\r
 \r
       gNumberOfAcceptedPositiveParticles += 1;\r
 \r
       //Fill QA histograms (acceptance);\r
-      fHistEta->Fill(v_eta);\r
-      fHistRapidity->Fill(v_y);\r
-      fHistPhi->Fill(v_phi);\r
-      fHistPt->Fill(v_pt);\r
+      fHistEta->Fill(vEta);\r
+      fHistRapidity->Fill(vY);\r
+      fHistPhi->Fill(vPhi);\r
+      fHistPt->Fill(vPt);\r
       if(isPion) {\r
-       fHistRapidityPions->Fill(v_y);\r
-       fHistPhiPions->Fill(v_phi);\r
-       fHistPtPions->Fill(v_pt);\r
+       fHistRapidityPions->Fill(vY);\r
+       fHistPhiPions->Fill(vPhi);\r
+       fHistPtPions->Fill(vPt);\r
       }\r
       else if(isKaon) {\r
-       fHistRapidityKaons->Fill(v_y);\r
-       fHistPhiKaons->Fill(v_phi);\r
-       fHistPtKaons->Fill(v_pt);\r
+       fHistRapidityKaons->Fill(vY);\r
+       fHistPhiKaons->Fill(vPhi);\r
+       fHistPtKaons->Fill(vPt);\r
       }\r
       else if(isProton) {\r
-       fHistRapidityProtons->Fill(v_y);\r
-       fHistPhiProtons->Fill(v_phi);\r
-       fHistPtProtons->Fill(v_pt);\r
+       fHistRapidityProtons->Fill(vY);\r
+       fHistPhiProtons->Fill(vPhi);\r
+       fHistPtProtons->Fill(vPt);\r
       }\r
 \r
       // fill charge vector\r
-      chargeVector[0]->push_back(v_charge);\r
-      chargeVector[1]->push_back(v_y);\r
-      chargeVector[2]->push_back(v_eta);\r
-      chargeVector[3]->push_back(TMath::RadToDeg()*v_phi);\r
-      chargeVector[4]->push_back(v_p[0]);\r
-      chargeVector[5]->push_back(v_p[1]);\r
-      chargeVector[6]->push_back(v_p[2]);\r
-      chargeVector[7]->push_back(v_pt);\r
-      chargeVector[8]->push_back(v_E);\r
+      chargeVector[0]->push_back(vCharge);\r
+      chargeVector[1]->push_back(vY);\r
+      chargeVector[2]->push_back(vEta);\r
+      chargeVector[3]->push_back(TMath::RadToDeg()*vPhi);\r
+      chargeVector[4]->push_back(vP[0]);\r
+      chargeVector[5]->push_back(vP[1]);\r
+      chargeVector[6]->push_back(vP[2]);\r
+      chargeVector[7]->push_back(vPt);\r
+      chargeVector[8]->push_back(vE);\r
       \r
       if(fRunShuffling) {\r
-       chargeVectorShuffle[0]->push_back(v_charge);\r
-       chargeVectorShuffle[1]->push_back(v_y);\r
-       chargeVectorShuffle[2]->push_back(v_eta);\r
-       chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*v_phi);\r
-       chargeVectorShuffle[4]->push_back(v_p[0]);\r
-       chargeVectorShuffle[5]->push_back(v_p[1]);\r
-       chargeVectorShuffle[6]->push_back(v_p[2]);\r
-       chargeVectorShuffle[7]->push_back(v_pt);\r
-       chargeVectorShuffle[8]->push_back(v_E);\r
+       chargeVectorShuffle[0]->push_back(vCharge);\r
+       chargeVectorShuffle[1]->push_back(vY);\r
+       chargeVectorShuffle[2]->push_back(vEta);\r
+       chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*vPhi);\r
+       chargeVectorShuffle[4]->push_back(vP[0]);\r
+       chargeVectorShuffle[5]->push_back(vP[1]);\r
+       chargeVectorShuffle[6]->push_back(vP[2]);\r
+       chargeVectorShuffle[7]->push_back(vPt);\r
+       chargeVectorShuffle[8]->push_back(vE);\r
       }\r
       gNumberOfAcceptedParticles += 1;\r
     }//generated positive particle loop\r
@@ -518,124 +518,124 @@ void AliAnalysisTaskToyModel::Run(Int_t nEvents) {
        Printf("Generating negative: %d(%d)",iParticleCount+1,nGeneratedNegative);\r
 \r
       //Pseudo-rapidity sampled from a Gaussian centered @ 0\r
-      v_eta = gRandom->Gaus(0.0,4.0);\r
+      vEta = gRandom->Gaus(0.0,4.0);\r
 \r
       //Fill QA histograms (full phase space)\r
-      fHistEtaTotal->Fill(v_eta);\r
+      fHistEtaTotal->Fill(vEta);\r
 \r
-      v_charge = -1.0;\r
+      vCharge = -1.0;\r
       //nGeneratedNegative += 1;\r
       \r
       //Acceptance\r
-      if((v_eta < fEtaMin) || (v_eta > fEtaMax)) continue;\r
+      if((vEta < fEtaMin) || (vEta > fEtaMax)) continue;\r
 \r
       if(!fUseAllCharges) {\r
        //Decide the specie\r
        Double_t randomNumberSpecies = gRandom->Rndm();\r
        if((randomNumberSpecies >= 0.0)&&(randomNumberSpecies < fPionPercentage)) {\r
          nGeneratedPions += 1;\r
-         v_pt = fPtSpectraPions->GetRandom();\r
-         v_phi = fAzimuthalAnglePions->GetRandom();\r
+         vPt = fPtSpectraPions->GetRandom();\r
+         vPhi = fAzimuthalAnglePions->GetRandom();\r
          fParticleMass = fPionMass;\r
          isPion = kTRUE;\r
        }\r
        else if((randomNumberSpecies >= fPionPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage)) {\r
          nGeneratedKaons += 1;\r
-         v_pt = fPtSpectraKaons->GetRandom();\r
-         v_phi = fAzimuthalAngleKaons->GetRandom();\r
+         vPt = fPtSpectraKaons->GetRandom();\r
+         vPhi = fAzimuthalAngleKaons->GetRandom();\r
          fParticleMass = fKaonMass;\r
          isKaon = kTRUE;\r
        }\r
        else if((randomNumberSpecies >= fPionPercentage + fKaonPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage + fProtonPercentage)) {\r
          nGeneratedProtons += 1;\r
-         v_pt = fPtSpectraProtons->GetRandom();\r
-         v_phi = fAzimuthalAngleProtons->GetRandom();\r
+         vPt = fPtSpectraProtons->GetRandom();\r
+         vPhi = fAzimuthalAngleProtons->GetRandom();\r
          fParticleMass = fProtonMass;\r
          isProton = kTRUE;\r
        }\r
       }\r
       else {\r
-       v_pt = fPtSpectraAllCharges->GetRandom();\r
-       v_phi = fAzimuthalAngleAllCharges->GetRandom();\r
+       vPt = fPtSpectraAllCharges->GetRandom();\r
+       vPhi = fAzimuthalAngleAllCharges->GetRandom();\r
       }\r
       \r
-      v_p[0] = v_pt*TMath::Cos(v_phi);\r
-      v_p[1] = v_pt*TMath::Sin(v_phi);\r
-      v_p[2] = v_pt*TMath::SinH(v_eta);\r
-      v_E = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
-                       TMath::Power(v_p[0],2) +\r
-                       TMath::Power(v_p[1],2) +\r
-                       TMath::Power(v_p[2],2));\r
+      vP[0] = vPt*TMath::Cos(vPhi);\r
+      vP[1] = vPt*TMath::Sin(vPhi);\r
+      vP[2] = vPt*TMath::SinH(vEta);\r
+      vE = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
+                       TMath::Power(vP[0],2) +\r
+                       TMath::Power(vP[1],2) +\r
+                       TMath::Power(vP[2],2));\r
       \r
-      v_y = 0.5*TMath::Log((v_E + v_p[2])/(v_E - v_p[2]));\r
+      vY = 0.5*TMath::Log((vE + vP[2])/(vE - vP[2]));\r
       \r
       //pt coverage\r
-      if((v_pt < fPtMin) || (v_pt > fPtMax)) continue;\r
-      //Printf("pt: %lf - mins: %lf - max: %lf",v_pt,fPtMin,fPtMax);\r
+      if((vPt < fPtMin) || (vPt > fPtMax)) continue;\r
+      //Printf("pt: %lf - mins: %lf - max: %lf",vPt,fPtMin,fPtMax);\r
 \r
      //acceptance filter\r
       if(fUseAcceptanceParameterization) {\r
        Double_t gRandomNumberForAcceptance = gRandom->Rndm();\r
-       if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(v_pt)) \r
+       if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(vPt)) \r
          continue;\r
       }\r
 \r
       gNumberOfAcceptedNegativeParticles += 1;\r
 \r
       //Fill QA histograms (acceptance);\r
-      fHistEta->Fill(v_eta);\r
-      fHistRapidity->Fill(v_y);\r
-      fHistPhi->Fill(v_phi);\r
-      fHistPt->Fill(v_pt);\r
+      fHistEta->Fill(vEta);\r
+      fHistRapidity->Fill(vY);\r
+      fHistPhi->Fill(vPhi);\r
+      fHistPt->Fill(vPt);\r
       if(isPion) {\r
-       fHistRapidityPions->Fill(v_y);\r
-       fHistPhiPions->Fill(v_phi);\r
-       fHistPtPions->Fill(v_pt);\r
+       fHistRapidityPions->Fill(vY);\r
+       fHistPhiPions->Fill(vPhi);\r
+       fHistPtPions->Fill(vPt);\r
       }\r
       else if(isKaon) {\r
-       fHistRapidityKaons->Fill(v_y);\r
-       fHistPhiKaons->Fill(v_phi);\r
-       fHistPtKaons->Fill(v_pt);\r
+       fHistRapidityKaons->Fill(vY);\r
+       fHistPhiKaons->Fill(vPhi);\r
+       fHistPtKaons->Fill(vPt);\r
       }\r
       else if(isProton) {\r
-       fHistRapidityProtons->Fill(v_y);\r
-       fHistPhiProtons->Fill(v_phi);\r
-       fHistPtProtons->Fill(v_pt);\r
+       fHistRapidityProtons->Fill(vY);\r
+       fHistPhiProtons->Fill(vPhi);\r
+       fHistPtProtons->Fill(vPt);\r
       }\r
 \r
       // fill charge vector\r
-      chargeVector[0]->push_back(v_charge);\r
-      chargeVector[1]->push_back(v_y);\r
-      chargeVector[2]->push_back(v_eta);\r
-      chargeVector[3]->push_back(TMath::RadToDeg()*v_phi);\r
-      chargeVector[4]->push_back(v_p[0]);\r
-      chargeVector[5]->push_back(v_p[1]);\r
-      chargeVector[6]->push_back(v_p[2]);\r
-      chargeVector[7]->push_back(v_pt);\r
-      chargeVector[8]->push_back(v_E);\r
+      chargeVector[0]->push_back(vCharge);\r
+      chargeVector[1]->push_back(vY);\r
+      chargeVector[2]->push_back(vEta);\r
+      chargeVector[3]->push_back(TMath::RadToDeg()*vPhi);\r
+      chargeVector[4]->push_back(vP[0]);\r
+      chargeVector[5]->push_back(vP[1]);\r
+      chargeVector[6]->push_back(vP[2]);\r
+      chargeVector[7]->push_back(vPt);\r
+      chargeVector[8]->push_back(vE);\r
       \r
       if(fRunShuffling) {\r
-       chargeVectorShuffle[0]->push_back(v_charge);\r
-       chargeVectorShuffle[1]->push_back(v_y);\r
-       chargeVectorShuffle[2]->push_back(v_eta);\r
-       chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*v_phi);\r
-       chargeVectorShuffle[4]->push_back(v_p[0]);\r
-       chargeVectorShuffle[5]->push_back(v_p[1]);\r
-       chargeVectorShuffle[6]->push_back(v_p[2]);\r
-       chargeVectorShuffle[7]->push_back(v_pt);\r
-       chargeVectorShuffle[8]->push_back(v_E);\r
+       chargeVectorShuffle[0]->push_back(vCharge);\r
+       chargeVectorShuffle[1]->push_back(vY);\r
+       chargeVectorShuffle[2]->push_back(vEta);\r
+       chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*vPhi);\r
+       chargeVectorShuffle[4]->push_back(vP[0]);\r
+       chargeVectorShuffle[5]->push_back(vP[1]);\r
+       chargeVectorShuffle[6]->push_back(vP[2]);\r
+       chargeVectorShuffle[7]->push_back(vPt);\r
+       chargeVectorShuffle[8]->push_back(vE);\r
       }\r
       gNumberOfAcceptedParticles += 1;\r
     }//generated negative particle loop\r
     \r
     //Dynamical correlations\r
-    Double_t v_chargePrime = 0;\r
-    Double_t v_yPrime = 0.0;\r
-    Double_t v_etaPrime = 0.0;\r
-    Double_t v_phiPrime = 0.0;\r
-    Double_t v_pPrime[3] = {0.,0.,0.};\r
-    Double_t v_ptPrime = 0.0;\r
-    Double_t v_EPrime = 0.0;\r
+    Double_t vChargePrime = 0;\r
+    Double_t vYPrime = 0.0;\r
+    Double_t vEtaPrime = 0.0;\r
+    Double_t vPhiPrime = 0.0;\r
+    Double_t vPPrime[3] = {0.,0.,0.};\r
+    Double_t vPtPrime = 0.0;\r
+    Double_t vEPrime = 0.0;\r
     Int_t nGeneratedPositiveDynamicalCorrelations = 0;\r
     Int_t nGeneratedNegativeDynamicalCorrelations = 0;\r
     //Generate "correlated" particles \r
@@ -645,130 +645,130 @@ void AliAnalysisTaskToyModel::Run(Int_t nEvents) {
        isPion = kFALSE; isKaon = kFALSE; isProton = kFALSE;\r
        \r
        //Pseudo-rapidity sampled from a Gaussian centered @ 0\r
-       v_eta = gRandom->Gaus(0.0,0.1);\r
-       v_charge = 1.0;\r
+       vEta = gRandom->Gaus(0.0,0.1);\r
+       vCharge = 1.0;\r
        nGeneratedPositiveDynamicalCorrelations += 1;\r
        \r
-       v_etaPrime = -v_eta;\r
-       v_chargePrime = -1.0;\r
+       vEtaPrime = -vEta;\r
+       vChargePrime = -1.0;\r
        nGeneratedNegativeDynamicalCorrelations += 1;\r
          \r
        //Acceptance\r
-       if((v_eta < fEtaMin) || (v_eta > fEtaMax)) continue;\r
-       if((v_etaPrime < fEtaMin) || (v_etaPrime > fEtaMax)) continue;\r
+       if((vEta < fEtaMin) || (vEta > fEtaMax)) continue;\r
+       if((vEtaPrime < fEtaMin) || (vEtaPrime > fEtaMax)) continue;\r
       \r
        if(!fUseAllCharges) {\r
          //Decide the specie\r
          Double_t randomNumberSpecies = gRandom->Rndm();\r
          if((randomNumberSpecies >= 0.0)&&(randomNumberSpecies < fPionPercentage)) {\r
            nGeneratedPions += 1;\r
-           v_pt = fPtSpectraPions->GetRandom();\r
-           v_phi = fAzimuthalAnglePions->GetRandom();\r
+           vPt = fPtSpectraPions->GetRandom();\r
+           vPhi = fAzimuthalAnglePions->GetRandom();\r
            fParticleMass = fPionMass;\r
            isPion = kTRUE;\r
          }\r
          else if((randomNumberSpecies >= fPionPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage)) {\r
            nGeneratedKaons += 1;\r
-           v_pt = fPtSpectraKaons->GetRandom();\r
-           v_phi = fAzimuthalAngleKaons->GetRandom();\r
+           vPt = fPtSpectraKaons->GetRandom();\r
+           vPhi = fAzimuthalAngleKaons->GetRandom();\r
            fParticleMass = fKaonMass;\r
            isKaon = kTRUE;\r
          }\r
          else if((randomNumberSpecies >= fPionPercentage + fKaonPercentage)&&(randomNumberSpecies < fPionPercentage + fKaonPercentage + fProtonPercentage)) {\r
            nGeneratedProtons += 1;\r
-           v_pt = fPtSpectraProtons->GetRandom();\r
-           v_ptPrime = v_pt;\r
-           v_phi = fAzimuthalAngleProtons->GetRandom();\r
+           vPt = fPtSpectraProtons->GetRandom();\r
+           vPtPrime = vPt;\r
+           vPhi = fAzimuthalAngleProtons->GetRandom();\r
            fParticleMass = fProtonMass;\r
            isProton = kTRUE;\r
          }\r
        }\r
        else {\r
-         v_pt = fPtSpectraAllCharges->GetRandom();\r
-         v_phi = fAzimuthalAngleAllCharges->GetRandom();\r
+         vPt = fPtSpectraAllCharges->GetRandom();\r
+         vPhi = fAzimuthalAngleAllCharges->GetRandom();\r
        }\r
-       v_ptPrime = v_pt;\r
-       v_phiPrime = v_phi;\r
-\r
-       v_p[0] = v_pt*TMath::Cos(v_phi);\r
-       v_p[1] = v_pt*TMath::Sin(v_phi);\r
-       v_p[2] = v_pt*TMath::SinH(v_eta);\r
-       v_E = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
-                         TMath::Power(v_p[0],2) +\r
-                         TMath::Power(v_p[1],2) +\r
-                         TMath::Power(v_p[2],2));\r
+       vPtPrime = vPt;\r
+       vPhiPrime = vPhi;\r
+\r
+       vP[0] = vPt*TMath::Cos(vPhi);\r
+       vP[1] = vPt*TMath::Sin(vPhi);\r
+       vP[2] = vPt*TMath::SinH(vEta);\r
+       vE = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
+                         TMath::Power(vP[0],2) +\r
+                         TMath::Power(vP[1],2) +\r
+                         TMath::Power(vP[2],2));\r
        \r
-       v_y = 0.5*TMath::Log((v_E + v_p[2])/(v_E - v_p[2]));\r
-\r
-       v_pPrime[0] = v_ptPrime*TMath::Cos(v_phiPrime);\r
-       v_pPrime[1] = v_ptPrime*TMath::Sin(v_phiPrime);\r
-       v_pPrime[2] = v_ptPrime*TMath::SinH(v_etaPrime);\r
-       v_EPrime = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
-                         TMath::Power(v_pPrime[0],2) +\r
-                         TMath::Power(v_pPrime[1],2) +\r
-                         TMath::Power(v_pPrime[2],2));\r
+       vY = 0.5*TMath::Log((vE + vP[2])/(vE - vP[2]));\r
+\r
+       vPPrime[0] = vPtPrime*TMath::Cos(vPhiPrime);\r
+       vPPrime[1] = vPtPrime*TMath::Sin(vPhiPrime);\r
+       vPPrime[2] = vPtPrime*TMath::SinH(vEtaPrime);\r
+       vEPrime = TMath::Sqrt(TMath::Power(fParticleMass,2) +\r
+                         TMath::Power(vPPrime[0],2) +\r
+                         TMath::Power(vPPrime[1],2) +\r
+                         TMath::Power(vPPrime[2],2));\r
        \r
-       v_yPrime = 0.5*TMath::Log((v_EPrime + v_pPrime[2])/(v_EPrime - v_pPrime[2]));\r
+       vYPrime = 0.5*TMath::Log((vEPrime + vPPrime[2])/(vEPrime - vPPrime[2]));\r
       \r
        //pt coverage\r
-       if((v_pt < fPtMin) || (v_pt > fPtMax)) continue;\r
-       if((v_ptPrime < fPtMin) || (v_ptPrime > fPtMax)) continue;\r
+       if((vPt < fPtMin) || (vPt > fPtMax)) continue;\r
+       if((vPtPrime < fPtMin) || (vPtPrime > fPtMax)) continue;\r
 \r
        //acceptance filter\r
        if(fUseAcceptanceParameterization) {\r
          Double_t gRandomNumberForAcceptance = gRandom->Rndm();\r
-         if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(v_pt)) \r
+         if(gRandomNumberForAcceptance > fAcceptanceParameterization->Eval(vPt)) \r
            continue;\r
          \r
          Double_t gRandomNumberForAcceptancePrime = gRandom->Rndm();\r
-         if(gRandomNumberForAcceptancePrime > fAcceptanceParameterization->Eval(v_ptPrime)) \r
+         if(gRandomNumberForAcceptancePrime > fAcceptanceParameterization->Eval(vPtPrime)) \r
            continue;\r
        }\r
       \r
        // fill charge vector (positive)\r
-       chargeVector[0]->push_back(v_charge);\r
-       chargeVector[1]->push_back(v_y);\r
-       chargeVector[2]->push_back(v_eta);\r
-       chargeVector[3]->push_back(TMath::RadToDeg()*v_phi);\r
-       chargeVector[4]->push_back(v_p[0]);\r
-       chargeVector[5]->push_back(v_p[1]);\r
-       chargeVector[6]->push_back(v_p[2]);\r
-       chargeVector[7]->push_back(v_pt);\r
-       chargeVector[8]->push_back(v_E);\r
+       chargeVector[0]->push_back(vCharge);\r
+       chargeVector[1]->push_back(vY);\r
+       chargeVector[2]->push_back(vEta);\r
+       chargeVector[3]->push_back(TMath::RadToDeg()*vPhi);\r
+       chargeVector[4]->push_back(vP[0]);\r
+       chargeVector[5]->push_back(vP[1]);\r
+       chargeVector[6]->push_back(vP[2]);\r
+       chargeVector[7]->push_back(vPt);\r
+       chargeVector[8]->push_back(vE);\r
        \r
        if(fRunShuffling) {\r
-         chargeVectorShuffle[0]->push_back(v_charge);\r
-         chargeVectorShuffle[1]->push_back(v_y);\r
-         chargeVectorShuffle[2]->push_back(v_eta);\r
-         chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*v_phi);\r
-         chargeVectorShuffle[4]->push_back(v_p[0]);\r
-         chargeVectorShuffle[5]->push_back(v_p[1]);\r
-         chargeVectorShuffle[6]->push_back(v_p[2]);\r
-         chargeVectorShuffle[7]->push_back(v_pt);\r
-         chargeVectorShuffle[8]->push_back(v_E);\r
+         chargeVectorShuffle[0]->push_back(vCharge);\r
+         chargeVectorShuffle[1]->push_back(vY);\r
+         chargeVectorShuffle[2]->push_back(vEta);\r
+         chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*vPhi);\r
+         chargeVectorShuffle[4]->push_back(vP[0]);\r
+         chargeVectorShuffle[5]->push_back(vP[1]);\r
+         chargeVectorShuffle[6]->push_back(vP[2]);\r
+         chargeVectorShuffle[7]->push_back(vPt);\r
+         chargeVectorShuffle[8]->push_back(vE);\r
        }\r
 \r
        // fill charge vector (negative)\r
-       chargeVector[0]->push_back(v_chargePrime);\r
-       chargeVector[1]->push_back(v_yPrime);\r
-       chargeVector[2]->push_back(v_etaPrime);\r
-       chargeVector[3]->push_back(TMath::RadToDeg()*v_phiPrime);\r
-       chargeVector[4]->push_back(v_pPrime[0]);\r
-       chargeVector[5]->push_back(v_pPrime[1]);\r
-       chargeVector[6]->push_back(v_pPrime[2]);\r
-       chargeVector[7]->push_back(v_ptPrime);\r
-       chargeVector[8]->push_back(v_EPrime);\r
+       chargeVector[0]->push_back(vChargePrime);\r
+       chargeVector[1]->push_back(vYPrime);\r
+       chargeVector[2]->push_back(vEtaPrime);\r
+       chargeVector[3]->push_back(TMath::RadToDeg()*vPhiPrime);\r
+       chargeVector[4]->push_back(vPPrime[0]);\r
+       chargeVector[5]->push_back(vPPrime[1]);\r
+       chargeVector[6]->push_back(vPPrime[2]);\r
+       chargeVector[7]->push_back(vPtPrime);\r
+       chargeVector[8]->push_back(vEPrime);\r
        \r
        if(fRunShuffling) {\r
-         chargeVectorShuffle[0]->push_back(v_chargePrime);\r
-         chargeVectorShuffle[1]->push_back(v_yPrime);\r
-         chargeVectorShuffle[2]->push_back(v_etaPrime);\r
-         chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*v_phiPrime);\r
-         chargeVectorShuffle[4]->push_back(v_pPrime[0]);\r
-         chargeVectorShuffle[5]->push_back(v_pPrime[1]);\r
-         chargeVectorShuffle[6]->push_back(v_pPrime[2]);\r
-         chargeVectorShuffle[7]->push_back(v_ptPrime);\r
-         chargeVectorShuffle[8]->push_back(v_EPrime);\r
+         chargeVectorShuffle[0]->push_back(vChargePrime);\r
+         chargeVectorShuffle[1]->push_back(vYPrime);\r
+         chargeVectorShuffle[2]->push_back(vEtaPrime);\r
+         chargeVectorShuffle[3]->push_back(TMath::RadToDeg()*vPhiPrime);\r
+         chargeVectorShuffle[4]->push_back(vPPrime[0]);\r
+         chargeVectorShuffle[5]->push_back(vPPrime[1]);\r
+         chargeVectorShuffle[6]->push_back(vPPrime[2]);\r
+         chargeVectorShuffle[7]->push_back(vPtPrime);\r
+         chargeVectorShuffle[8]->push_back(vEPrime);\r
        }\r
 \r
        gNumberOfAcceptedParticles += 2;\r
index f428ada..351d8e4 100755 (executable)
@@ -698,10 +698,10 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedTracks(AliVEvent *event){
   TObjArray* tracksAccepted = new TObjArray;\r
   tracksAccepted->SetOwner(kTRUE);\r
 \r
-  Double_t v_charge;\r
-  Double_t v_eta;\r
-  Double_t v_phi;\r
-  Double_t v_pt;\r
+  Double_t vCharge;\r
+  Double_t vEta;\r
+  Double_t vPhi;\r
+  Double_t vPt;\r
   \r
   // Loop over tracks in event\r
   for (Int_t iTracks = 0; iTracks < event->GetNumberOfTracks(); iTracks++) {\r
@@ -718,22 +718,22 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedTracks(AliVEvent *event){
     fHistTrackStats->Fill(aodTrack->GetFilterMap());\r
     if(!aodTrack->TestFilterBit(nAODtrackCutBit)) continue;\r
     \r
-    v_charge = aodTrack->Charge();\r
-    v_eta    = aodTrack->Eta();\r
-    v_phi    = aodTrack->Phi() * TMath::RadToDeg();\r
-    v_pt     = aodTrack->Pt();\r
+    vCharge = aodTrack->Charge();\r
+    vEta    = aodTrack->Eta();\r
+    vPhi    = aodTrack->Phi() * TMath::RadToDeg();\r
+    vPt     = aodTrack->Pt();\r
     \r
-    Float_t DCAxy = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
-    Float_t DCAz  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
+    Float_t dcaXY = aodTrack->DCA();      // this is the DCA from global track (not exactly what is cut on)\r
+    Float_t dcaZ  = aodTrack->ZAtDCA();   // this is the DCA from global track (not exactly what is cut on)\r
     \r
     \r
     // Kinematics cuts from ESD track cuts\r
-    if( v_pt < fPtMin || v_pt > fPtMax)      continue;\r
-    if( v_eta < fEtaMin || v_eta > fEtaMax)  continue;\r
+    if( vPt < fPtMin || vPt > fPtMax)      continue;\r
+    if( vEta < fEtaMin || vEta > fEtaMax)  continue;\r
     \r
     // Extra DCA cuts (for systematic studies [!= -1])\r
     if( fDCAxyCut != -1 && fDCAzCut != -1){\r
-      if(TMath::Sqrt((DCAxy*DCAxy)/(fDCAxyCut*fDCAxyCut)+(DCAz*DCAz)/(fDCAzCut*fDCAzCut)) > 1 ){\r
+      if(TMath::Sqrt((dcaXY*dcaXY)/(fDCAxyCut*fDCAxyCut)+(dcaZ*dcaZ)/(fDCAzCut*fDCAzCut)) > 1 ){\r
        continue;  // 2D cut\r
       }\r
     }\r
@@ -748,14 +748,14 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedTracks(AliVEvent *event){
     \r
     // fill QA histograms\r
     fHistClus->Fill(aodTrack->GetITSNcls(),aodTrack->GetTPCNcls());\r
-    fHistDCA->Fill(DCAz,DCAxy);\r
+    fHistDCA->Fill(dcaZ,dcaXY);\r
     fHistChi2->Fill(aodTrack->Chi2perNDF());\r
-    fHistPt->Fill(v_pt);\r
-    fHistEta->Fill(v_eta);\r
-    fHistPhi->Fill(v_phi);\r
+    fHistPt->Fill(vPt);\r
+    fHistEta->Fill(vEta);\r
+    fHistPhi->Fill(vPhi);\r
     \r
     // add the track to the TObjArray\r
-    tracksAccepted->Add(new AliBFBasicParticle(v_eta, v_phi, v_pt, v_charge));\r
+    tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge));\r
   }\r
 \r
   return tracksAccepted;\r
@@ -770,10 +770,10 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedV0s(AliVEvent *event){
   TObjArray* tracksAccepted = new TObjArray;\r
   tracksAccepted->SetOwner(kTRUE);\r
 \r
-  Double_t v_charge;\r
-  Double_t v_eta;\r
-  Double_t v_phi;\r
-  Double_t v_pt;\r
+  Double_t vCharge;\r
+  Double_t vEta;\r
+  Double_t vPhi;\r
+  Double_t vPt;\r
   \r
   //------------------------------------------------\r
   // MAIN LAMBDA LOOP STARTS HERE (basically a copy of AliAnalysisTaskExtractV0AOD)\r
@@ -1019,19 +1019,19 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetAcceptedV0s(AliVEvent *event){
 \r
                    fHistV0SelArmenteros->Fill(lAlphaV0,lPtArmV0);                \r
 \r
-                   v_eta    = lEta;\r
-                   v_phi    = lPhi;\r
-                   v_pt     = lPt;\r
-                   if(lAlphaV0 > 0) v_charge = 1;\r
-                   if(lAlphaV0 < 0) v_charge = -1;\r
+                   vEta    = lEta;\r
+                   vPhi    = lPhi;\r
+                   vPt     = lPt;\r
+                   if(lAlphaV0 > 0) vCharge = 1;\r
+                   if(lAlphaV0 < 0) vCharge = -1;\r
 \r
                    // fill QA histograms\r
-                   fHistPt->Fill(v_pt);\r
-                   fHistEta->Fill(v_eta);\r
-                   fHistPhi->Fill(v_phi);\r
+                   fHistPt->Fill(vPt);\r
+                   fHistEta->Fill(vEta);\r
+                   fHistPhi->Fill(vPhi);\r
                    \r
                    // add the track to the TObjArray\r
-                   tracksAccepted->Add(new AliBFBasicParticle(v_eta, v_phi, v_pt, v_charge));\r
+                   tracksAccepted->Add(new AliBFBasicParticle(vEta, vPhi, vPt, vCharge));\r
                  }\r
                }\r
              }\r
@@ -1073,7 +1073,7 @@ TObjArray* AliAnalysisTaskTriggeredBF::GetShuffledTracks(TObjArray *tracks){
 \r
 //________________________________________________________________________\r
 void  AliAnalysisTaskTriggeredBF::FinishTaskOutput(){\r
-\r
+  //checks if Balance Function objects are there (needed to write the histograms)\r
   if (!fBalance) {\r
     AliError("fBalance not available");\r
     return;\r
index db5a6a8..4274322 100755 (executable)
@@ -57,10 +57,8 @@ class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {
   }\r
 \r
   void SetKinematicsCutsAOD(Double_t ptmin, Double_t ptmax, Double_t etamin, Double_t etamax){\r
-    fPtMin  = ptmin;\r
-    fPtMax  = ptmax;\r
-    fEtaMin = etamin;\r
-    fEtaMax = etamax;\r
+    fPtMin  = ptmin;  fPtMax  = ptmax;\r
+    fEtaMin = etamin; fEtaMax = etamax;\r
 \r
   }\r
 \r
@@ -76,7 +74,7 @@ class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {
 \r
   //Centrality\r
   void SetCentralityEstimator(const char* centralityEstimator) {fCentralityEstimator = centralityEstimator;}\r
-  const char* GetCentralityEstimator(void)                     {return fCentralityEstimator;}\r
+  const char* GetCentralityEstimator(void)  const              {return fCentralityEstimator;}\r
   void SetCentralityPercentileRange(Double_t min, Double_t max) { \r
     fUseCentrality = kTRUE;\r
     fCentralityPercentileMin=min;\r
@@ -107,7 +105,7 @@ class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {
   Bool_t fRunShuffling;//run shuffling or not\r
   AliBalanceTriggered *fShuffledBalance; //TriggeredBF object (shuffled)\r
   Bool_t fRunMixing;//run mixing or not\r
-  Int_t  fMixingTracks;\r
+  Int_t  fMixingTracks;//number of tracks to mix\r
   AliBalanceTriggered *fMixedBalance; //TriggeredBF object (mixed)\r
   AliEventPoolManager*     fPoolMgr;         //! event pool manager\r
   Bool_t fRunV0;\r
@@ -130,16 +128,16 @@ class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {
   TH1F *fHistVy; //y coordinate of the primary vertex\r
   TH1F *fHistVz; //z coordinate of the primary vertex\r
 \r
-  TH2F *fHistClus;//\r
-  TH2F *fHistDCA;//\r
-  TH1F *fHistChi2;//\r
-  TH1F *fHistPt;//\r
-  TH1F *fHistEta;//\r
-  TH1F *fHistPhi;//\r
-  TH1F *fHistPhiBefore;//\r
-  TH1F *fHistPhiAfter;//\r
-  TH2F *fHistV0M;//\r
-  TH2F *fHistRefTracks;//\r
+  TH2F *fHistClus;//number of clusters (QA histogram)\r
+  TH2F *fHistDCA;//DCA  (QA histogram)\r
+  TH1F *fHistChi2;//track chi2 (QA histogram)\r
+  TH1F *fHistPt;//transverse momentum (QA histogram)\r
+  TH1F *fHistEta;//pseudorapidity (QA histogram)\r
+  TH1F *fHistPhi;//phi (QA histogram)\r
+  TH1F *fHistPhiBefore;//phi before v2 afterburner (QA histogram)\r
+  TH1F *fHistPhiAfter;//phi after v2 afterburner (QA histogram)\r
+  TH2F *fHistV0M;//V0 multiplicities (QA histogram)\r
+  TH2F *fHistRefTracks;//reference track multiplicities (QA histogram)\r
 \r
   // V0 histograms\r
   TH1F    *fHistV0MultiplicityBeforeTrigSel;             //! V0 multiplicity distribution\r
@@ -149,10 +147,10 @@ class AliAnalysisTaskTriggeredBF : public AliAnalysisTaskSE {
   TH1F    *fHistV0MultiplicityForSelEvtNoTPCOnlyNoPileup;//! V0 multiplicity distribution\r
   \r
   TH1F    *fHistMultiplicityBeforeTrigSel;             //! multiplicity distribution    \r
-  TH1F    *fHistMultiplicityForTrigEvt;                        //! multiplicity distribution\r
-  TH1F    *fHistMultiplicity;                                                  //! multiplicity distribution\r
-  TH1F    *fHistMultiplicityNoTPCOnly;                         //! multiplicity distribution\r
-  TH1F    *fHistMultiplicityNoTPCOnlyNoPileup;                 //! multiplicity distribution\r
+  TH1F    *fHistMultiplicityForTrigEvt;                //! multiplicity distribution\r
+  TH1F    *fHistMultiplicity;                          //! multiplicity distribution\r
+  TH1F    *fHistMultiplicityNoTPCOnly;                 //! multiplicity distribution\r
+  TH1F    *fHistMultiplicityNoTPCOnlyNoPileup;         //! multiplicity distribution\r
 \r
   //before selection\r
   TH1F* fHistV0InvMassK0;                           // Invariant mass K0\r
index 2a36e1a..ad314d2 100644 (file)
@@ -46,9 +46,9 @@ ClassImp(AliBalance)
 //____________________________________________________________________//
 AliBalance::AliBalance() :
   TObject(), 
-  bShuffle(kFALSE),
-  bHBTcut(kFALSE),
-  bConversionCut(kFALSE),
+  fShuffle(kFALSE),
+  fHBTcut(kFALSE),
+  fConversionCut(kFALSE),
   fAnalysisLevel("ESD"),
   fAnalyzedEvents(0) ,
   fCentralityId(0) ,
@@ -110,9 +110,9 @@ AliBalance::AliBalance() :
 //____________________________________________________________________//
 AliBalance::AliBalance(const AliBalance& balance):
   TObject(balance), 
-  bShuffle(balance.bShuffle),
-  bHBTcut(balance.bHBTcut), 
-  bConversionCut(balance.bConversionCut), 
+  fShuffle(balance.fShuffle),
+  fHBTcut(balance.fHBTcut), 
+  fConversionCut(balance.fConversionCut), 
   fAnalysisLevel(balance.fAnalysisLevel),
   fAnalyzedEvents(balance.fAnalyzedEvents), 
   fCentralityId(balance.fCentralityId),
@@ -203,33 +203,33 @@ void AliBalance::InitHistograms() {
   //Initialize the histograms
   TString histName;
   for(Int_t iAnalysisType = 0; iAnalysisType < ANALYSIS_TYPES; iAnalysisType++) {
-    histName = "fHistP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
 
-    histName = "fHistN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
   
-    histName = "fHistPN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistPN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistNP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistNP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistPP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistPP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistNN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistNN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
   }
@@ -244,6 +244,7 @@ void AliBalance::InitHistograms() {
 
 //____________________________________________________________________//
 void AliBalance::PrintAnalysisSettings() {
+  //prints the analysis settings
   
   Printf("======================================");
   Printf("Analysis level: %s",fAnalysisLevel.Data());
@@ -412,7 +413,7 @@ void AliBalance::CalculateBalance(Float_t fCentrality,vector<Double_t> **chargeV
        if(dphi>180) dphi = 360 - dphi;  //dphi should be between 0 and 180!
 
        // HBT like cut
-       if(bHBTcut && charge1 * charge2 > 0){
+       if(fHBTcut && charge1 * charge2 > 0){
          //if( dphi < 3 || deta < 0.01 ){   // VERSION 1
          //  continue;
          
@@ -464,7 +465,7 @@ void AliBalance::CalculateBalance(Float_t fCentrality,vector<Double_t> **chargeV
        }
        
        // conversions
-       if(bConversionCut){
+       if(fConversionCut){
          if (charge1 * charge2 < 0)
            {
 
@@ -803,7 +804,7 @@ void AliBalance::PrintResults(Int_t iAnalysisType, TH1D *gHistBalance) {
   
   Double_t delta = gSumBiXi / gSumBi;
   Double_t deltaError = (gSumBiXi / gSumBi) * TMath::Sqrt(TMath::Power((TMath::Sqrt(gSumXi2DeltaBi2)/gSumBiXi),2) + TMath::Power((gSumDeltaBi2/gSumBi),2) );
-  cout<<"Analysis type: "<<gBFAnalysisType[iAnalysisType].Data()<<endl;
+  cout<<"Analysis type: "<<kBFAnalysisType[iAnalysisType].Data()<<endl;
   cout<<"Width: "<<delta<<"\t Error: "<<deltaError<<endl;
   cout<<"New error: "<<deltaErrorNew<<endl;
   cout<<"Integral: "<<integral<<"\t Error: "<<integralError<<endl;
index 86097be..5ba08c2 100644 (file)
@@ -25,7 +25,7 @@ class TGraphErrors;
 class TH1D;
 class TH2D;
 
-const TString gBFAnalysisType[ANALYSIS_TYPES] = {"y","eta","qlong","qout","qside","qinv","phi"};
+const TString kBFAnalysisType[ANALYSIS_TYPES] = {"y","eta","qlong","qout","qside","qinv","phi"};
 
 class AliBalance : public TObject {
  public:
@@ -48,9 +48,9 @@ class AliBalance : public TObject {
   
   void SetAnalysisLevel(const char* analysisLevel) {
     fAnalysisLevel = analysisLevel;}
-  void SetShuffle(Bool_t shuffle) {bShuffle = shuffle;}
-  void SetHBTcut(Bool_t HBTcut) {bHBTcut = HBTcut;}
-  void SetConversionCut(Bool_t ConversionCut) {bConversionCut = ConversionCut;}
+  void SetShuffle(Bool_t shuffle) {fShuffle = shuffle;}
+  void SetHBTcut(Bool_t HBTcut) {fHBTcut = HBTcut;}
+  void SetConversionCut(Bool_t ConversionCut) {fConversionCut = ConversionCut;}
   void SetInterval(Int_t iAnalysisType, Double_t p1Start, Double_t p1Stop,
                   Int_t ibins, Double_t p2Start, Double_t p2Stop);
   void SetCentralityInterval(Double_t cStart, Double_t cStop)  { fCentStart = cStart; fCentStop = cStop;};
@@ -64,13 +64,13 @@ class AliBalance : public TObject {
   void InitHistograms(void);
 
   const char* GetAnalysisLevel() {return fAnalysisLevel.Data();}
-  Int_t GetNumberOfAnalyzedEvent() {return fAnalyzedEvents;}
+  Int_t GetNumberOfAnalyzedEvent()  const {return fAnalyzedEvents;}
 
-  Int_t GetNumberOfBins(Int_t ibin) {return fNumberOfBins[ibin];}
-  Double_t GetP1Start(Int_t ibin){return fP1Start[ibin];}
-  Double_t GetP1Stop(Int_t ibin){return fP1Stop[ibin];}   
-  Double_t GetP2Start(Int_t ibin){return fP2Start[ibin];}
-  Double_t GetP2Stop(Int_t ibin){return fP2Stop[ibin];}    
+  Int_t GetNumberOfBins(Int_t ibin) const {return fNumberOfBins[ibin];}
+  Double_t GetP1Start(Int_t ibin)   const {return fP1Start[ibin];}
+  Double_t GetP1Stop(Int_t ibin)    const {return fP1Stop[ibin];}   
+  Double_t GetP2Start(Int_t ibin)   const {return fP2Start[ibin];}
+  Double_t GetP2Stop(Int_t ibin)    const {return fP2Stop[ibin];}    
  
   Double_t GetNp(Int_t analysisType) const { return 1.0*fNp[analysisType]; }
   Double_t GetNn(Int_t analysisType) const { return 1.0*fNn[analysisType]; }
@@ -88,12 +88,12 @@ class AliBalance : public TObject {
   Double_t GetBalance(Int_t a, Int_t p2);
   Double_t GetError(Int_t a, Int_t p2);
 
-  TH2D *GetHistNp(Int_t iAnalysisType) { return fHistP[iAnalysisType];}
-  TH2D *GetHistNn(Int_t iAnalysisType) { return fHistN[iAnalysisType];}
-  TH2D *GetHistNpn(Int_t iAnalysisType) { return fHistPN[iAnalysisType];}
-  TH2D *GetHistNnp(Int_t iAnalysisType) { return fHistNP[iAnalysisType];}
-  TH2D *GetHistNpp(Int_t iAnalysisType) { return fHistPP[iAnalysisType];}
-  TH2D *GetHistNnn(Int_t iAnalysisType) { return fHistNN[iAnalysisType];}
+  TH2D *GetHistNp(Int_t iAnalysisType)  const { return fHistP[iAnalysisType];}
+  TH2D *GetHistNn(Int_t iAnalysisType)  const { return fHistN[iAnalysisType];}
+  TH2D *GetHistNpn(Int_t iAnalysisType) const { return fHistPN[iAnalysisType];}
+  TH2D *GetHistNnp(Int_t iAnalysisType) const { return fHistNP[iAnalysisType];}
+  TH2D *GetHistNpp(Int_t iAnalysisType) const { return fHistPP[iAnalysisType];}
+  TH2D *GetHistNnn(Int_t iAnalysisType) const { return fHistNN[iAnalysisType];}
 
   TH2D *GetQAHistHBTbefore()         {return fHistHBTbefore;};
   TH2D *GetQAHistHBTafter()          {return fHistHBTafter;};
@@ -120,11 +120,11 @@ class AliBalance : public TObject {
   void PrintResults(Int_t iAnalysisType, TH1D *gHist);
 
  private:
-  inline Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign);
+  inline Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign); 
 
-  Bool_t bShuffle; // shuffled balance function object
-  Bool_t bHBTcut;  // apply HBT like cuts
-  Bool_t bConversionCut;  // apply conversion cuts
+  Bool_t fShuffle; // shuffled balance function object
+  Bool_t fHBTcut;  // apply HBT like cuts
+  Bool_t fConversionCut;  // apply conversion cuts
 
   TString fAnalysisLevel; //ESD, AOD or MC
   Int_t fAnalyzedEvents; //number of events that have been analyzed
@@ -132,13 +132,13 @@ class AliBalance : public TObject {
   TString fCentralityId;//Centrality identifier to be used for the histo naming
 
   Int_t fNumberOfBins[ANALYSIS_TYPES];//number of bins of the analyzed interval
-  Double_t fP1Start[ANALYSIS_TYPES];
-  Double_t fP1Stop[ANALYSIS_TYPES];
-  Double_t fP2Start[ANALYSIS_TYPES];
-  Double_t fP2Stop[ANALYSIS_TYPES];
-  Double_t fP2Step[ANALYSIS_TYPES]; 
-  Double_t fCentStart;
-  Double_t fCentStop;
+  Double_t fP1Start[ANALYSIS_TYPES];//lower boundaries for single particle histograms 
+  Double_t fP1Stop[ANALYSIS_TYPES];//upper boundaries for single particle histograms 
+  Double_t fP2Start[ANALYSIS_TYPES];//lower boundaries for pair histograms 
+  Double_t fP2Stop[ANALYSIS_TYPES];//upper boundaries for pair histograms 
+  Double_t fP2Step[ANALYSIS_TYPES];//bin size for pair histograms 
+  Double_t fCentStart;//lower boundary for centrality
+  Double_t fCentStop;//upper boundary for centrality
 
        
   Double_t fNnn[ANALYSIS_TYPES][MAXIMUM_NUMBER_OF_STEPS]; //N(--)
index de76981..0ca01e0 100644 (file)
@@ -46,9 +46,9 @@ ClassImp(AliBalanceEventMixing)
 //____________________________________________________________________//
 AliBalanceEventMixing::AliBalanceEventMixing() :
   TObject(), 
-  bShuffle(kFALSE),
-  bHBTcut(kFALSE),
-  bConversionCut(kFALSE),
+  fShuffle(kFALSE),
+  fHBTcut(kFALSE),
+  fConversionCut(kFALSE),
   fAnalysisLevel("ESD"),
   fAnalyzedEvents(0) ,
   fCentralityId(0) ,
@@ -102,9 +102,9 @@ AliBalanceEventMixing::AliBalanceEventMixing() :
 
 //____________________________________________________________________//
 AliBalanceEventMixing::AliBalanceEventMixing(const AliBalanceEventMixing& balance):
-  TObject(balance), bShuffle(balance.bShuffle),
-  bHBTcut(balance.bHBTcut), 
-  bConversionCut(balance.bConversionCut),  
+  TObject(balance), fShuffle(balance.fShuffle),
+  fHBTcut(balance.fHBTcut), 
+  fConversionCut(balance.fConversionCut),  
   fAnalysisLevel(balance.fAnalysisLevel),
   fAnalyzedEvents(balance.fAnalyzedEvents), 
   fCentralityId(balance.fCentralityId),
@@ -195,33 +195,33 @@ void AliBalanceEventMixing::InitHistograms() {
   //Initialize the histograms
   TString histName;
   for(Int_t iAnalysisType = 0; iAnalysisType < ANALYSIS_TYPES; iAnalysisType++) {
-    histName = "fHistP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
 
-    histName = "fHistN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,100,fP1Start[iAnalysisType],fP1Stop[iAnalysisType]);
   
-    histName = "fHistPN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistPN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistNP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistNP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistPP"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistPP"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistPP[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
     
-    histName = "fHistNN"; histName += gBFAnalysisType[iAnalysisType]; 
-    if(bShuffle) histName.Append("_shuffle");
+    histName = "fHistNN"; histName += kBFAnalysisType[iAnalysisType]; 
+    if(fShuffle) histName.Append("_shuffle");
     if(fCentralityId) histName += fCentralityId.Data();
     fHistNN[iAnalysisType] = new TH2D(histName.Data(),"",fCentStop-fCentStart,fCentStart,fCentStop,fNumberOfBins[iAnalysisType],fP2Start[iAnalysisType],fP2Stop[iAnalysisType]);
   }
@@ -229,6 +229,7 @@ void AliBalanceEventMixing::InitHistograms() {
 
 //____________________________________________________________________//
 void AliBalanceEventMixing::PrintAnalysisSettings() {
+  //prints the analysis settings
   
   Printf("======================================");
   Printf("Analysis level: %s",fAnalysisLevel.Data());
@@ -409,7 +410,7 @@ void AliBalanceEventMixing::CalculateBalance(Float_t fCentrality,vector<Double_t
        if(dphi>180) dphi = 360 - dphi;  //dphi should be between 0 and 180!
 
        // HBT like cut
-       if(bHBTcut && charge1 * charge2 > 0){
+       if(fHBTcut && charge1 * charge2 > 0){
          //if( dphi < 3 || deta < 0.01 ){   // VERSION 1
          //  continue;
          
@@ -458,7 +459,7 @@ void AliBalanceEventMixing::CalculateBalance(Float_t fCentrality,vector<Double_t
        }
        
        // conversions
-       if(bConversionCut){
+       if(fConversionCut){
          if (charge1 * charge2 < 0)
            {
 
@@ -795,7 +796,7 @@ void AliBalanceEventMixing::PrintResults(Int_t iAnalysisType, TH1D *gHistBalance
   
   Double_t delta = gSumBiXi / gSumBi;
   Double_t deltaError = (gSumBiXi / gSumBi) * TMath::Sqrt(TMath::Power((TMath::Sqrt(gSumXi2DeltaBi2)/gSumBiXi),2) + TMath::Power((gSumDeltaBi2/gSumBi),2) );
-  cout<<"Analysis type: "<<gBFAnalysisType[iAnalysisType].Data()<<endl;
+  cout<<"Analysis type: "<<kBFAnalysisType[iAnalysisType].Data()<<endl;
   cout<<"Width: "<<delta<<"\t Error: "<<deltaError<<endl;
   cout<<"New error: "<<deltaErrorNew<<endl;
   cout<<"Integral: "<<integral<<"\t Error: "<<integralError<<endl;
index 2419f76..03c8002 100644 (file)
@@ -45,9 +45,9 @@ class AliBalanceEventMixing : public TObject {
   
   void SetAnalysisLevel(const char* analysisLevel) {
     fAnalysisLevel = analysisLevel;}
-  void SetShuffle(Bool_t shuffle) {bShuffle = shuffle;}
-  void SetHBTcut(Bool_t HBTcut) {bHBTcut = HBTcut;}
-  void SetConversionCut(Bool_t ConversionCut) {bConversionCut = ConversionCut;}
+  void SetShuffle(Bool_t shuffle) {fShuffle = shuffle;}
+  void SetHBTcut(Bool_t HBTcut) {fHBTcut = HBTcut;}
+  void SetConversionCut(Bool_t ConversionCut) {fConversionCut = ConversionCut;}
   void SetInterval(Int_t iAnalysisType, Double_t p1Start, Double_t p1Stop,
                   Int_t ibins, Double_t p2Start, Double_t p2Stop);
   void SetCentralityInterval(Double_t cStart, Double_t cStop)  { fCentStart = cStart; fCentStop = cStop;};
@@ -61,13 +61,13 @@ class AliBalanceEventMixing : public TObject {
   void InitHistograms(void);
 
   const char* GetAnalysisLevel() {return fAnalysisLevel.Data();}
-  Int_t GetNumberOfAnalyzedEvent() {return fAnalyzedEvents;}
+  Int_t GetNumberOfAnalyzedEvent()  const {return fAnalyzedEvents;}
 
-  Int_t GetNumberOfBins(Int_t ibin) {return fNumberOfBins[ibin];}
-  Double_t GetP1Start(Int_t ibin){return fP1Start[ibin];}
-  Double_t GetP1Stop(Int_t ibin){return fP1Stop[ibin];}   
-  Double_t GetP2Start(Int_t ibin){return fP2Start[ibin];}
-  Double_t GetP2Stop(Int_t ibin){return fP2Stop[ibin];}    
+  Int_t GetNumberOfBins(Int_t ibin) const {return fNumberOfBins[ibin];}
+  Double_t GetP1Start(Int_t ibin)   const {return fP1Start[ibin];}
+  Double_t GetP1Stop(Int_t ibin)    const {return fP1Stop[ibin];}   
+  Double_t GetP2Start(Int_t ibin)   const {return fP2Start[ibin];}
+  Double_t GetP2Stop(Int_t ibin)    const {return fP2Stop[ibin];}    
  
   Double_t GetNp(Int_t analysisType) const { return 1.0*fNp[analysisType]; }
   Double_t GetNn(Int_t analysisType) const { return 1.0*fNn[analysisType]; }
@@ -85,12 +85,12 @@ class AliBalanceEventMixing : public TObject {
   Double_t GetBalance(Int_t a, Int_t p2);
   Double_t GetError(Int_t a, Int_t p2);
 
-  TH2D *GetHistNp(Int_t iAnalysisType) { return fHistP[iAnalysisType];}
-  TH2D *GetHistNn(Int_t iAnalysisType) { return fHistN[iAnalysisType];}
-  TH2D *GetHistNpn(Int_t iAnalysisType) { return fHistPN[iAnalysisType];}
-  TH2D *GetHistNnp(Int_t iAnalysisType) { return fHistNP[iAnalysisType];}
-  TH2D *GetHistNpp(Int_t iAnalysisType) { return fHistPP[iAnalysisType];}
-  TH2D *GetHistNnn(Int_t iAnalysisType) { return fHistNN[iAnalysisType];}
+  TH2D *GetHistNp(Int_t iAnalysisType)  const { return fHistP[iAnalysisType];}
+  TH2D *GetHistNn(Int_t iAnalysisType)  const { return fHistN[iAnalysisType];}
+  TH2D *GetHistNpn(Int_t iAnalysisType) const { return fHistPN[iAnalysisType];}
+  TH2D *GetHistNnp(Int_t iAnalysisType) const { return fHistNP[iAnalysisType];}
+  TH2D *GetHistNpp(Int_t iAnalysisType) const { return fHistPP[iAnalysisType];}
+  TH2D *GetHistNnn(Int_t iAnalysisType) const { return fHistNN[iAnalysisType];}
 
   void PrintAnalysisSettings();
   TGraphErrors *DrawBalance(Int_t fAnalysisType);
@@ -112,11 +112,11 @@ class AliBalanceEventMixing : public TObject {
   void PrintResults(Int_t iAnalysisType, TH1D *gHist);
 
  private:
-  inline Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign);
+  inline Float_t GetDPhiStar(Float_t phi1, Float_t pt1, Float_t charge1, Float_t phi2, Float_t pt2, Float_t charge2, Float_t radius, Float_t bSign); 
 
-  Bool_t bShuffle; //shuffled balance function object
-  Bool_t bHBTcut;  // apply HBT like cuts
-  Bool_t bConversionCut;  // apply conversion cuts
+  Bool_t fShuffle; //shuffled balance function object
+  Bool_t fHBTcut;  // apply HBT like cuts
+  Bool_t fConversionCut;  // apply conversion cuts
 
   TString fAnalysisLevel; //ESD, AOD or MC
   Int_t fAnalyzedEvents; //number of events that have been analyzed
@@ -124,13 +124,13 @@ class AliBalanceEventMixing : public TObject {
   TString fCentralityId;//Centrality identifier to be used for the histo naming
 
   Int_t fNumberOfBins[ANALYSIS_TYPES];//number of bins of the analyzed interval
-  Double_t fP1Start[ANALYSIS_TYPES];
-  Double_t fP1Stop[ANALYSIS_TYPES];
-  Double_t fP2Start[ANALYSIS_TYPES];
-  Double_t fP2Stop[ANALYSIS_TYPES];
-  Double_t fP2Step[ANALYSIS_TYPES]; 
-  Double_t fCentStart;
-  Double_t fCentStop;
+  Double_t fP1Start[ANALYSIS_TYPES];//lower boundaries for single particle histograms 
+  Double_t fP1Stop[ANALYSIS_TYPES];//upper boundaries for single particle histograms 
+  Double_t fP2Start[ANALYSIS_TYPES];//lower boundaries for pair histograms 
+  Double_t fP2Stop[ANALYSIS_TYPES];//upper boundaries for pair histograms 
+  Double_t fP2Step[ANALYSIS_TYPES];//bin size for pair histograms 
+  Double_t fCentStart;//lower boundary for centrality
+  Double_t fCentStop;//upper boundary for centrality
 
        
   Double_t fNnn[ANALYSIS_TYPES][MAXIMUM_NUMBER_OF_STEPS]; //N(--)
index cf54283..a791217 100644 (file)
@@ -45,7 +45,7 @@ ClassImp(AliBalancePsi)
 //____________________________________________________________________//
 AliBalancePsi::AliBalancePsi() :
   TObject(), 
-  bShuffle(kFALSE),
+  fShuffle(kFALSE),
   fAnalysisLevel("ESD"),
   fAnalyzedEvents(0) ,
   fCentralityId(0) ,
@@ -63,7 +63,7 @@ AliBalancePsi::AliBalancePsi() :
 
 //____________________________________________________________________//
 AliBalancePsi::AliBalancePsi(const AliBalancePsi& balance):
-  TObject(balance), bShuffle(balance.bShuffle), 
+  TObject(balance), fShuffle(balance.fShuffle), 
   fAnalysisLevel(balance.fAnalysisLevel),
   fAnalyzedEvents(balance.fAnalyzedEvents), 
   fCentralityId(balance.fCentralityId),
@@ -94,14 +94,14 @@ AliBalancePsi::~AliBalancePsi() {
 void AliBalancePsi::InitHistograms() {
   // single particle histograms
   Int_t anaSteps   = 1;       // analysis steps
-  Int_t iBinSingle[nTrackVariablesSingle];        // binning for track variables
-  Double_t* dBinsSingle[nTrackVariablesSingle];   // bins for track variables  
-  TString axisTitleSingle[nTrackVariablesSingle]; // axis titles for track variables
+  Int_t iBinSingle[kTrackVariablesSingle];        // binning for track variables
+  Double_t* dBinsSingle[kTrackVariablesSingle];   // bins for track variables  
+  TString axisTitleSingle[kTrackVariablesSingle]; // axis titles for track variables
   
   // two particle histograms
-  Int_t iBinPair[nTrackVariablesPair];         // binning for track variables
-  Double_t* dBinsPair[nTrackVariablesPair];    // bins for track variables  
-  TString axisTitlePair[nTrackVariablesPair];  // axis titles for track variables
+  Int_t iBinPair[kTrackVariablesPair];         // binning for track variables
+  Double_t* dBinsPair[kTrackVariablesPair];    // bins for track variables  
+  TString axisTitlePair[kTrackVariablesPair];  // axis titles for track variables
 
   //centrality
   /*const Int_t kNCentralityBins = 9;
@@ -163,60 +163,60 @@ void AliBalancePsi::InitHistograms() {
   TString histName;
   //+ triggered particles
   histName = "fHistP"; 
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistP = new AliTHn(histName.Data(),histName.Data(),anaSteps,nTrackVariablesSingle,iBinSingle);
-  for (Int_t j=0; j<nTrackVariablesSingle; j++) {
+  fHistP = new AliTHn(histName.Data(),histName.Data(),anaSteps,kTrackVariablesSingle,iBinSingle);
+  for (Int_t j=0; j<kTrackVariablesSingle; j++) {
     fHistP->SetBinLimits(j, dBinsSingle[j]);
     fHistP->SetVarTitle(j, axisTitleSingle[j]);
   }
 
   //- triggered particles
   histName = "fHistN"; 
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistN = new AliTHn(histName.Data(),histName.Data(),anaSteps,nTrackVariablesSingle,iBinSingle);
-  for (Int_t j=0; j<nTrackVariablesSingle; j++) {
+  fHistN = new AliTHn(histName.Data(),histName.Data(),anaSteps,kTrackVariablesSingle,iBinSingle);
+  for (Int_t j=0; j<kTrackVariablesSingle; j++) {
     fHistN->SetBinLimits(j, dBinsSingle[j]);
     fHistN->SetVarTitle(j, axisTitleSingle[j]);
   }
   
   //+- pairs
   histName = "fHistPN";
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistPN = new AliTHn(histName.Data(),histName.Data(),anaSteps, nTrackVariablesPair, iBinPair);
-  for (Int_t j=0; j<nTrackVariablesPair; j++) {
+  fHistPN = new AliTHn(histName.Data(),histName.Data(),anaSteps, kTrackVariablesPair, iBinPair);
+  for (Int_t j=0; j<kTrackVariablesPair; j++) {
     fHistPN->SetBinLimits(j, dBinsPair[j]);
     fHistPN->SetVarTitle(j, axisTitlePair[j]);
   }
 
   //-+ pairs
   histName = "fHistNP";
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistNP = new AliTHn(histName.Data(),histName.Data(),anaSteps, nTrackVariablesPair, iBinPair);
-  for (Int_t j=0; j<nTrackVariablesPair; j++) {
+  fHistNP = new AliTHn(histName.Data(),histName.Data(),anaSteps, kTrackVariablesPair, iBinPair);
+  for (Int_t j=0; j<kTrackVariablesPair; j++) {
     fHistNP->SetBinLimits(j, dBinsPair[j]);
     fHistNP->SetVarTitle(j, axisTitlePair[j]);
   }
 
   //++ pairs
   histName = "fHistPP";
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistPP = new AliTHn(histName.Data(),histName.Data(),anaSteps, nTrackVariablesPair, iBinPair);
-  for (Int_t j=0; j<nTrackVariablesPair; j++) {
+  fHistPP = new AliTHn(histName.Data(),histName.Data(),anaSteps, kTrackVariablesPair, iBinPair);
+  for (Int_t j=0; j<kTrackVariablesPair; j++) {
     fHistPP->SetBinLimits(j, dBinsPair[j]);
     fHistPP->SetVarTitle(j, axisTitlePair[j]);
   }
 
   //-- pairs
   histName = "fHistNN";
-  if(bShuffle) histName.Append("_shuffle");
+  if(fShuffle) histName.Append("_shuffle");
   if(fCentralityId) histName += fCentralityId.Data();
-  fHistNN = new AliTHn(histName.Data(),histName.Data(),anaSteps, nTrackVariablesPair, iBinPair);
-  for (Int_t j=0; j<nTrackVariablesPair; j++) {
+  fHistNN = new AliTHn(histName.Data(),histName.Data(),anaSteps, kTrackVariablesPair, iBinPair);
+  for (Int_t j=0; j<kTrackVariablesPair; j++) {
     fHistNN->SetBinLimits(j, dBinsPair[j]);
     fHistNN->SetVarTitle(j, axisTitlePair[j]);
   }
@@ -237,8 +237,8 @@ void AliBalancePsi::CalculateBalance(Double_t gReactionPlane,
     InitHistograms();
   }
 
-  Double_t trackVariablesSingle[nTrackVariablesSingle];
-  Double_t trackVariablesPair[nTrackVariablesPair];
+  Double_t trackVariablesSingle[kTrackVariablesSingle];
+  Double_t trackVariablesPair[kTrackVariablesPair];
 
   if (!particles){
     AliWarning("particles TObjArray is NULL pointer --> return");
index 5e76601..190ebcc 100644 (file)
@@ -28,8 +28,8 @@ class TH1D;
 class TH2D;
 class TH3D;
 
-const Int_t nTrackVariablesSingle = 2;       // track variables in histogram (centrality, phi-Psi2, eta, phi, pTtrig)
-const Int_t nTrackVariablesPair   = 5;       // track variables in histogram (centrality, phi-Psi2, dEta, dPhi, pTtrig, ptAssociated)
+const Int_t kTrackVariablesSingle = 2;       // track variables in histogram (centrality, phi-Psi2, eta, phi, pTtrig)
+const Int_t kTrackVariablesPair   = 5;       // track variables in histogram (centrality, phi-Psi2, dEta, dPhi, pTtrig, ptAssociated)
 const TString gBFPsiAnalysisType[ANALYSIS_TYPES] = {"y","eta","qlong","qout","qside","qinv","phi"};
 
 class AliBalancePsi : public TObject {
@@ -53,7 +53,7 @@ class AliBalancePsi : public TObject {
   
   void SetAnalysisLevel(const char* analysisLevel) {
     fAnalysisLevel = analysisLevel;}
-  void SetShuffle(Bool_t shuffle) {bShuffle = shuffle;}
+  void SetShuffle(Bool_t shuffle) {fShuffle = shuffle;}
   void SetCentralityInterval(Double_t cStart, Double_t cStop)  { fCentStart = cStart; fCentStop = cStop;};
 
   void InitHistograms(void);
@@ -97,7 +97,7 @@ class AliBalancePsi : public TObject {
   TH2D *GetBalanceFunctionDeltaEtaDeltaPhi(Double_t psiMin, Double_t psiMax);
   
  private:
-  Bool_t bShuffle; //shuffled balance function object
+  Bool_t fShuffle; //shuffled balance function object
   TString fAnalysisLevel; //ESD, AOD or MC
   Int_t fAnalyzedEvents; //number of events that have been analyzed
 
index 8f889f2..f2e2b70 100644 (file)
@@ -96,14 +96,14 @@ void AliBalanceTriggered::InitHistograms() {
   Int_t anaSteps   = 1;       // analysis steps
 
   // single particle histograms
-  Int_t iBinSingle[nTrackVarsSingle];         // binning for track variables
-  Double_t* dBinsSingle[nTrackVarsSingle];    // bins for track variables  
-  TString axisTitleSingle[nTrackVarsSingle];  // axis titles for track variables
+  Int_t iBinSingle[kTrackVarsSingle];         // binning for track variables
+  Double_t* dBinsSingle[kTrackVarsSingle];    // bins for track variables  
+  TString axisTitleSingle[kTrackVarsSingle];  // axis titles for track variables
   
   // two particle histograms
-  Int_t iBinPair[nTrackVarsPair];         // binning for track variables
-  Double_t* dBinsPair[nTrackVarsPair];    // bins for track variables  
-  TString axisTitlePair[nTrackVarsPair];  // axis titles for track variables
+  Int_t iBinPair[kTrackVarsPair];         // binning for track variables
+  Double_t* dBinsPair[kTrackVarsPair];    // bins for track variables  
+  TString axisTitlePair[kTrackVarsPair];  // axis titles for track variables
 
    
   //-----------------------------------------------------------
@@ -191,48 +191,48 @@ void AliBalanceTriggered::InitHistograms() {
   // Histogram creation
 
   // histogram for negative particles
-  fHistN = new AliTHn(Form("fHistN"), Form("%s_N",title.Data()), anaSteps, nTrackVarsSingle, iBinSingle);
-  for (Int_t j=0; j<nTrackVarsSingle; j++)
+  fHistN = new AliTHn(Form("fHistN"), Form("%s_N",title.Data()), anaSteps, kTrackVarsSingle, iBinSingle);
+  for (Int_t j=0; j<kTrackVarsSingle; j++)
     {
       fHistN->SetBinLimits(j, dBinsSingle[j]);
       fHistN->SetVarTitle(j, axisTitleSingle[j]);
     }
 
   // histogram for positive particles
-  fHistP = new AliTHn(Form("fHistP"), Form("%s_P",title.Data()), anaSteps, nTrackVarsSingle, iBinSingle);
-  for (Int_t j=0; j<nTrackVarsSingle; j++)
+  fHistP = new AliTHn(Form("fHistP"), Form("%s_P",title.Data()), anaSteps, kTrackVarsSingle, iBinSingle);
+  for (Int_t j=0; j<kTrackVarsSingle; j++)
     {
       fHistP->SetBinLimits(j, dBinsSingle[j]);
       fHistP->SetVarTitle(j, axisTitleSingle[j]);
     }
 
   // histogram for +- pairs
-  fHistPN = new AliTHn(Form("fHistPN"), Form("%s_PN",title.Data()), anaSteps, nTrackVarsPair, iBinPair);
-  for (Int_t j=0; j<nTrackVarsPair; j++)
+  fHistPN = new AliTHn(Form("fHistPN"), Form("%s_PN",title.Data()), anaSteps, kTrackVarsPair, iBinPair);
+  for (Int_t j=0; j<kTrackVarsPair; j++)
     {
       fHistPN->SetBinLimits(j, dBinsPair[j]);
       fHistPN->SetVarTitle(j, axisTitlePair[j]);
     }
 
   // histogram for -+ pairs
-  fHistNP = new AliTHn(Form("fHistNP"), Form("%s_NP",title.Data()), anaSteps, nTrackVarsPair, iBinPair);
-  for (Int_t j=0; j<nTrackVarsPair; j++)
+  fHistNP = new AliTHn(Form("fHistNP"), Form("%s_NP",title.Data()), anaSteps, kTrackVarsPair, iBinPair);
+  for (Int_t j=0; j<kTrackVarsPair; j++)
     {
       fHistNP->SetBinLimits(j, dBinsPair[j]);
       fHistNP->SetVarTitle(j, axisTitlePair[j]);
     }
 
   // histogram for ++ pairs
-  fHistPP = new AliTHn(Form("fHistPP"), Form("%s_PP",title.Data()), anaSteps, nTrackVarsPair, iBinPair);
-  for (Int_t j=0; j<nTrackVarsPair; j++)
+  fHistPP = new AliTHn(Form("fHistPP"), Form("%s_PP",title.Data()), anaSteps, kTrackVarsPair, iBinPair);
+  for (Int_t j=0; j<kTrackVarsPair; j++)
     {
       fHistPP->SetBinLimits(j, dBinsPair[j]);
       fHistPP->SetVarTitle(j, axisTitlePair[j]);
     }
 
   // histogram for -- pairs
-  fHistNN = new AliTHn(Form("fHistNN"), Form("%s_NN",title.Data()), anaSteps, nTrackVarsPair, iBinPair);
-  for (Int_t j=0; j<nTrackVarsPair; j++)
+  fHistNN = new AliTHn(Form("fHistNN"), Form("%s_NN",title.Data()), anaSteps, kTrackVarsPair, iBinPair);
+  for (Int_t j=0; j<kTrackVarsPair; j++)
     {
       fHistNN->SetBinLimits(j, dBinsPair[j]);
       fHistNN->SetVarTitle(j, axisTitlePair[j]);
@@ -256,8 +256,8 @@ void AliBalanceTriggered::FillBalance(Float_t fCentrality,TObjArray *particles,
     InitHistograms();
   }
 
-  Double_t trackVarsSingle[nTrackVarsSingle];
-  Double_t trackVarsPair[nTrackVarsPair];
+  Double_t trackVarsSingle[kTrackVarsSingle];
+  Double_t trackVarsPair[kTrackVarsPair];
 
   if (!particles){
     AliWarning("particles TObjArray is NULL pointer --> return");
index 83f9440..943c363 100644 (file)
@@ -18,8 +18,8 @@ class TGraphErrors;
 class TH1D;
 class AliTHn;
 
-const Int_t nTrackVarsSingle = 4;       // track variables in histogram (eta, phi, pTtrig, centrality)
-const Int_t nTrackVarsPair   = 5;       // track variables in histogram (dEta, dPhi, pT, pTtrig, centrality)
+const Int_t kTrackVarsSingle = 4;       // track variables in histogram (eta, phi, pTtrig, centrality)
+const Int_t kTrackVarsPair   = 5;       // track variables in histogram (dEta, dPhi, pT, pTtrig, centrality)
 
 class AliBalanceTriggered : public TObject {
  public: