]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PWGPP/TPC/AliPerformanceEff.cxx
TENDER becomes Tender
[u/mrichter/AliRoot.git] / PWGPP / TPC / AliPerformanceEff.cxx
index 16fe00c30e2bc0d94d9d83c0e4c3e382d037eb4e..efc8efa0175f4809e38092c626565be6af5eeb1b 100644 (file)
@@ -57,27 +57,7 @@ using namespace std;
 ClassImp(AliPerformanceEff)
 
 //_____________________________________________________________________________
-AliPerformanceEff::AliPerformanceEff():
-  AliPerformanceObject("AliPerformanceEff"),
-
-  // histograms
-  fEffHisto(0),
-  fEffSecHisto(0),
-
-  // Cuts 
-  fCutsRC(0), 
-  fCutsMC(0),
-
-  // histogram folder 
-  fAnalysisFolder(0)
-{
-  // default consttructor      
-  Init();
-}
-
-//_____________________________________________________________________________
-AliPerformanceEff::AliPerformanceEff(Char_t* name="AliPerformanceEff",Char_t*title="AliPerformanceEff",Int_t analysisMode=0, Bool_t hptGenerator=kFALSE):
-  AliPerformanceObject(name,title),
+AliPerformanceEff::AliPerformanceEff(const Char_t* name, const Char_t* title, Int_t analysisMode, Bool_t hptGenerator):  AliPerformanceObject(name,title),
 
   // histograms
   fEffHisto(0),
@@ -140,7 +120,7 @@ void AliPerformanceEff::Init()
   //mceta:mcphi:mcpt:pid:recStatus:findable:charge
   Int_t binsEffHisto[9]={30,144,nPtBins,5,2,2,3,fgkMaxClones+1,fgkMaxFakes+1};
   Double_t minEffHisto[9]={-1.5,0.,ptMin,0.,0.,0.,-1.5,0,0};
-  Double_t maxEffHisto[9]={ 1.5,2.*TMath::Pi(), ptMax,5.,2.,2.,1.5,fgkMaxClones,fgkMaxFakes};
+  Double_t maxEffHisto[9]={ 1.5,2.*TMath::Pi(), ptMax,5.,2.,2.,1.5,fgkMaxClones+1,fgkMaxFakes+1};
 
   fEffHisto = new THnSparseF("fEffHisto","mceta:mcphi:mcpt:pid:recStatus:findable:charge:nclones:nfakes",9,binsEffHisto,minEffHisto,maxEffHisto);
   fEffHisto->SetBinEdges(2,binsPt);
@@ -159,7 +139,7 @@ void AliPerformanceEff::Init()
   //mceta:mcphi:mcpt:pid:recStatus:findable:mcR:mother_phi:mother_eta:charge
   Int_t binsEffSecHisto[12]={30,60,nPtBins,5,2,2,100,60,30,3,fgkMaxClones+1,fgkMaxFakes+1};
   Double_t minEffSecHisto[12]={-1.5,0.,ptMin,0.,0.,0.,0.,0.,-1.5,-1.5,0,0};
-  Double_t maxEffSecHisto[12]={ 1.5,2.*TMath::Pi(), ptMax,5.,2.,2.,200,2.*TMath::Pi(),1.5,1.5,fgkMaxClones,fgkMaxFakes};
+  Double_t maxEffSecHisto[12]={ 1.5,2.*TMath::Pi(), ptMax,5.,2.,2.,200,2.*TMath::Pi(),1.5,1.5,fgkMaxClones+1,fgkMaxFakes+1};
 
   fEffSecHisto = new THnSparseF("fEffSecHisto","mceta:mcphi:mcpt:pid:recStatus:findable:mcR:mother_phi:mother_eta:charge:nclones:nfakes",12,binsEffSecHisto,minEffSecHisto,maxEffSecHisto);
   fEffSecHisto->SetBinEdges(2,binsPt);
@@ -312,7 +292,7 @@ void AliPerformanceEff::ProcessTPC(AliMCEvent* const mcEvent, AliESDEvent *const
     else if (particle->GetPDG()->Charge() > 0)  charge = 1.;
 
     // Fill histograms
-    Double_t vEffHisto[9] = {mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes}; 
+    Double_t vEffHisto[9] = {mceta, mcphi, mcpt, static_cast<Double_t>(pid), static_cast<Double_t>(recStatus), static_cast<Double_t>(findable), static_cast<Double_t>(charge), static_cast<Double_t>(nClones), static_cast<Double_t>(nFakes)}; 
     fEffHisto->Fill(vEffHisto);
   }
   if(labelsRec) delete [] labelsRec; labelsRec = 0;
@@ -451,7 +431,7 @@ void AliPerformanceEff::ProcessTPCSec(AliMCEvent* const mcEvent, AliESDEvent *co
     else if (particle->GetPDG()->Charge() > 0)  charge = 1.;
 
     // Fill histograms
-    Double_t vEffSecHisto[12] = { mceta, mcphi, mcpt, pid, recStatus, findable, mcR, mother_phi, mother_eta, charge, nClones, nFakes }; 
+    Double_t vEffSecHisto[12] = { mceta, mcphi, mcpt, static_cast<Double_t>(pid), static_cast<Double_t>(recStatus), static_cast<Double_t>(findable), mcR, mother_phi, mother_eta, static_cast<Double_t>(charge), static_cast<Double_t>(nClones), static_cast<Double_t>(nFakes) }; 
     fEffSecHisto->Fill(vEffSecHisto);
   }
   }
@@ -575,7 +555,7 @@ void AliPerformanceEff::ProcessTPCITS(AliMCEvent* const mcEvent, AliESDEvent *co
     else if (particle->GetPDG()->Charge() > 0)  charge = 1.;
     
     // Fill histograms
-    Double_t vEffHisto[9] = { mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes}; 
+    Double_t vEffHisto[9] = { mceta, mcphi, mcpt, static_cast<Double_t>(pid), static_cast<Double_t>(recStatus), static_cast<Double_t>(findable), static_cast<Double_t>(charge), static_cast<Double_t>(nClones), static_cast<Double_t>(nFakes)}; 
     fEffHisto->Fill(vEffHisto);
   }
 
@@ -696,7 +676,7 @@ void AliPerformanceEff::ProcessConstrained(AliMCEvent* const mcEvent, AliESDEven
     else if (particle->GetPDG()->Charge() > 0)  charge = 1.;
 
     // Fill histograms
-    Double_t vEffHisto[9] = { mceta, mcphi, mcpt, pid, recStatus, findable, charge, nClones, nFakes }; 
+    Double_t vEffHisto[9] = { mceta, mcphi, mcpt, static_cast<Double_t>(pid), static_cast<Double_t>(recStatus), static_cast<Double_t>(findable), static_cast<Double_t>(charge), static_cast<Double_t>(nClones), static_cast<Double_t>(nFakes) }; 
     fEffHisto->Fill(vEffHisto);
   }
 
@@ -949,7 +929,7 @@ void AliPerformanceEff::Analyse()
   if(GetAnalysisMode() != 5) {
 
   fEffHisto->GetAxis(0)->SetRangeUser(-0.9,0.89); // eta range
-  fEffHisto->GetAxis(2)->SetRangeUser(0.1,20.);   // pt range  // FIXME maybe remove since range is defined in THnSparse 
+  fEffHisto->GetAxis(2)->SetRangeUser(0.1,19.99);   // pt range  // FIXME maybe remove since range is defined in THnSparse 
 
   // rec efficiency vs pt
   fEffHisto->GetAxis(3)->SetRangeUser(0.,3.99);  // reconstructed 
@@ -1021,9 +1001,9 @@ void AliPerformanceEff::Analyse()
   // efficiency vs eta
   //
 
-  fEffHisto->GetAxis(0)->SetRangeUser(-1.5,1.5); // eta range
-  fEffHisto->GetAxis(2)->SetRangeUser(0.1,20.); // pt range
-  fEffHisto->GetAxis(5)->SetRangeUser(0.,1.);   // all
+  fEffHisto->GetAxis(0)->SetRangeUser(-1.5,1.49); // eta range
+  fEffHisto->GetAxis(2)->SetRangeUser(0.1,19.99); // pt range
+  fEffHisto->GetAxis(5)->SetRangeUser(0.,1.0);   // all
 
   // rec efficiency vs eta
   fEffHisto->GetAxis(3)->SetRangeUser(0.,4.);  // reconstructed 
@@ -1096,8 +1076,8 @@ void AliPerformanceEff::Analyse()
   // efficiency vs phi
   //
 
-  fEffHisto->GetAxis(0)->SetRangeUser(-0.9,0.9); // eta range
-  fEffHisto->GetAxis(2)->SetRangeUser(0.1,20.); // pt range
+  fEffHisto->GetAxis(0)->SetRangeUser(-0.9,0.89); // eta range
+  fEffHisto->GetAxis(2)->SetRangeUser(0.1,19.99); // pt range
   fEffHisto->GetAxis(5)->SetRangeUser(0.,1.);   // all
 
   // rec efficiency vs phi
@@ -1168,9 +1148,9 @@ void AliPerformanceEff::Analyse()
   }
   else {
   // 
-  Float_t minEta=-1.5, maxEta=1.5;
+  Float_t minEta=-1.5, maxEta=1.49;
   Float_t minR=0.0, maxR=150.0;
-  Float_t minPt=0.10, maxPt=20.0;
+  Float_t minPt=0.10, maxPt=19.99;
 
   // mother eta range
   fEffSecHisto->GetAxis(8)->SetRangeUser(minEta,maxEta);