small corrections
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 13:34:43 +0000 (13:34 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 21 Dec 2009 13:34:43 +0000 (13:34 +0000)
PWG0/dNdPt/AlidNdPtAnalysis.cxx
PWG0/dNdPt/AlidNdPtCorrection.cxx
PWG0/dNdPt/AlidNdPtCutAnalysis.cxx

index 42c88c7..921e8ce 100644 (file)
@@ -861,9 +861,13 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
   // trigger selection\r
   Bool_t isEventTriggered = kTRUE;\r
   if(evtCuts->IsTriggerRequired())  {\r
-    //static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
-    //isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
-    isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    if(IsUseMCInfo()) { \r
+      static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
+      isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
+    }\r
+    else {\r
+      isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    }\r
   }\r
 \r
   // use MC information\r
@@ -1518,29 +1522,7 @@ void AlidNdPtAnalysis::Analyse()
 \r
   char name[256];\r
   TObjArray *aFolderObj = new TObjArray;\r
-\r
-  //\r
-  // get cuts\r
-  //\r
-  AlidNdPtEventCuts *evtCuts = GetEventCuts(); \r
-  AlidNdPtAcceptanceCuts *accCuts = GetAcceptanceCuts(); \r
-  AliESDtrackCuts *esdTrackCuts = GetTrackCuts(); \r
-\r
-  if(!evtCuts || !accCuts || !esdTrackCuts) {\r
-    Error("AlidNdPtCutAnalysis::Analyse()", "cuts not available");\r
-    return;\r
-  }\r
-\r
-  //\r
-  // set min and max values\r
-  //\r
-  Double_t minZv = evtCuts->GetMinZv();\r
-  Double_t maxZv = evtCuts->GetMaxZv()-0.00001;\r
-  Double_t minPt = accCuts->GetMinPt();\r
-  Double_t maxPt = accCuts->GetMaxPt();\r
-  Double_t minEta = accCuts->GetMinEta();\r
-  Double_t maxEta = accCuts->GetMaxEta()-0.00001;\r
-\r
\r
   //\r
   // Reconstructed event vertex\r
   //\r
@@ -1780,14 +1762,10 @@ void AlidNdPtAnalysis::Analyse()
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenNDEventMatrix->Projection(0),fTriggerEventMatrix->Projection(0),"zv_trig_MBtoND_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenNDEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fTriggerEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenNDEventMatrix->Projection(1),fTriggerEventMatrix->Projection(1),"mult_trig_MBtoND_corr_matrix");\r
 \r
   aFolderObj->Add(h);\r
-  fGenNDEventMatrix->GetAxis(0)->SetRange(1,fGenNDEventMatrix->GetAxis(0)->GetNbins());\r
-  fTriggerEventMatrix->GetAxis(0)->SetRange(1,fTriggerEventMatrix->GetAxis(0)->GetNbins());\r
 \r
   //\r
   // trigger bias correction (MB to NSD)\r
@@ -1801,14 +1779,10 @@ void AlidNdPtAnalysis::Analyse()
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenNSDEventMatrix->Projection(0),fTriggerEventMatrix->Projection(0),"zv_trig_MBtoNSD_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenNSDEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fTriggerEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenNSDEventMatrix->Projection(1),fTriggerEventMatrix->Projection(1),"mult_trig_MBtoNSD_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenNSDEventMatrix->GetAxis(0)->SetRange(1,fGenNSDEventMatrix->GetAxis(0)->GetNbins());\r
-  fTriggerEventMatrix->GetAxis(0)->SetRange(1,fTriggerEventMatrix->GetAxis(0)->GetNbins());\r
 \r
   //\r
   // trigger bias correction (MB to INEL)\r
@@ -1822,14 +1796,10 @@ void AlidNdPtAnalysis::Analyse()
   h2D = AlidNdPtHelper::GenerateCorrMatrix(fGenEventMatrix->Projection(0,1),fTriggerEventMatrix->Projection(0,1),"zv_mult_trig_MBtoInel_corr_matrix_2D");\r
   aFolderObj->Add(h2D);\r
 \r
-  fGenEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fTriggerEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenEventMatrix->Projection(1),fTriggerEventMatrix->Projection(1),"mult_trig_MBtoInel_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenEventMatrix->GetAxis(0)->SetRange(1,fGenEventMatrix->GetAxis(0)->GetNbins());\r
-  fTriggerEventMatrix->GetAxis(0)->SetRange(1,fTriggerEventMatrix->GetAxis(0)->GetNbins());\r
 \r
   //\r
   // event vertex reconstruction correction (MB)\r
@@ -1840,14 +1810,10 @@ void AlidNdPtAnalysis::Analyse()
   h2D = AlidNdPtHelper::GenerateCorrMatrix(fTriggerEventMatrix->Projection(0,1),fRecEventMatrix->Projection(0,1),"zv_mult_event_corr_matrix_2D");\r
   aFolderObj->Add(h2D);\r
 \r
-  fTriggerEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fRecEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fTriggerEventMatrix->Projection(1),fRecEventMatrix->Projection(1),"mult_event_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fTriggerEventMatrix->GetAxis(0)->SetRange(1,fTriggerEventMatrix->GetAxis(0)->GetNbins());\r
-  fRecEventMatrix->GetAxis(0)->SetRange(1,fRecEventMatrix->GetAxis(0)->GetNbins());\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fTriggerEventMatrix->Projection(0),fRecEventMatrix->Projection(0),"zv_event_corr_matrix");\r
   aFolderObj->Add(h);\r
@@ -1900,19 +1866,10 @@ void AlidNdPtAnalysis::Analyse()
   aFolderObj->Add(h2D);\r
 \r
   // efficiency\r
-  fTriggerTrackEventMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fGenTrackEventMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fTriggerTrackEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fGenTrackEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fTriggerTrackEventMatrix->Projection(1),fGenTrackEventMatrix->Projection(1),"pt_track_trig_MBtoInel_eff_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fTriggerTrackEventMatrix->GetAxis(2)->SetRange(1,fTriggerTrackEventMatrix->GetAxis(2)->GetNbins());\r
-  fGenTrackEventMatrix->GetAxis(2)->SetRange(1,fGenTrackEventMatrix->GetAxis(2)->GetNbins());\r
-  fTriggerTrackEventMatrix->GetAxis(0)->SetRange(1,fTriggerTrackEventMatrix->GetAxis(0)->GetNbins());\r
-  fGenTrackEventMatrix->GetAxis(0)->SetRange(1,fGenTrackEventMatrix->GetAxis(0)->GetNbins());\r
-\r
 \r
   //\r
   // track-event vertex reconstruction correction (MB)\r
@@ -1930,18 +1887,10 @@ void AlidNdPtAnalysis::Analyse()
   aFolderObj->Add(h2D);\r
   \r
   // efficiency\r
-  fTriggerTrackEventMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecTrackEventMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fTriggerTrackEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fRecTrackEventMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
 \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecTrackEventMatrix->Projection(1),fTriggerTrackEventMatrix->Projection(1),"pt_track_event_eff_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fTriggerTrackEventMatrix->GetAxis(2)->SetRange(1,fTriggerTrackEventMatrix->GetAxis(2)->GetNbins());\r
-  fRecTrackEventMatrix->GetAxis(2)->SetRange(1,fRecTrackEventMatrix->GetAxis(2)->GetNbins());\r
-  fTriggerTrackEventMatrix->GetAxis(0)->SetRange(1,fTriggerTrackEventMatrix->GetAxis(0)->GetNbins());\r
-  fRecTrackEventMatrix->GetAxis(0)->SetRange(1,fRecTrackEventMatrix->GetAxis(0)->GetNbins());\r
 \r
   //\r
   // track rec. efficiency correction\r
@@ -1958,19 +1907,10 @@ void AlidNdPtAnalysis::Analyse()
   h2D = AlidNdPtHelper::GenerateCorrMatrix(fGenPrimTrackMatrix->Projection(2,0),fRecPrimTrackMatrix->Projection(2,0),"zv_eta_track_corr_matrix");\r
   aFolderObj->Add(h2D);\r
 \r
-  fGenPrimTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecPrimTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fGenPrimTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecPrimTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
   \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenPrimTrackMatrix->Projection(0),fRecPrimTrackMatrix->Projection(0),"zv_track_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenPrimTrackMatrix->GetAxis(1)->SetRange(1,fGenPrimTrackMatrix->GetAxis(1)->GetNbins());\r
-  fRecPrimTrackMatrix->GetAxis(1)->SetRange(1,fRecPrimTrackMatrix->GetAxis(1)->GetNbins());\r
-  fGenPrimTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fRecPrimTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenPrimTrackMatrix->Projection(1),fRecPrimTrackMatrix->Projection(1),"pt_track_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
@@ -1978,19 +1918,9 @@ void AlidNdPtAnalysis::Analyse()
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecPrimTrackMatrix->Projection(1), fGenPrimTrackMatrix->Projection(1),"pt_track_eff_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenPrimTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecPrimTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fGenPrimTrackMatrix->GetAxis(2)->SetRange(1,fGenPrimTrackMatrix->GetAxis(2)->GetNbins());\r
-  fRecPrimTrackMatrix->GetAxis(2)->SetRange(1,fRecPrimTrackMatrix->GetAxis(2)->GetNbins());\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fGenPrimTrackMatrix->Projection(2),fRecPrimTrackMatrix->Projection(2),"eta_track_corr_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fGenPrimTrackMatrix->GetAxis(1)->SetRange(1,fGenPrimTrackMatrix->GetAxis(1)->GetNbins());\r
-  fRecPrimTrackMatrix->GetAxis(1)->SetRange(1,fRecPrimTrackMatrix->GetAxis(1)->GetNbins());\r
-  fGenPrimTrackMatrix->GetAxis(0)->SetRange(1,fGenPrimTrackMatrix->GetAxis(0)->GetNbins());\r
-  fRecPrimTrackMatrix->GetAxis(0)->SetRange(1,fRecPrimTrackMatrix->GetAxis(0)->GetNbins());\r
-\r
   //\r
   // secondary track contamination correction\r
   //\r
@@ -2007,36 +1937,15 @@ void AlidNdPtAnalysis::Analyse()
   h2D = AlidNdPtHelper::GenerateCorrMatrix(fRecSecTrackMatrix->Projection(2,0),fRecTrackMatrix->Projection(2,0),"zv_eta_track_cont_matrix");\r
   aFolderObj->Add(h2D);\r
 \r
-  fRecSecTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecSecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecSecTrackMatrix->Projection(0),fRecTrackMatrix->Projection(0),"zv_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecSecTrackMatrix->GetAxis(1)->SetRange(1,fRecSecTrackMatrix->GetAxis(1)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(1)->SetRange(1,fRecTrackMatrix->GetAxis(1)->GetNbins());\r
-  fRecSecTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fRecTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecSecTrackMatrix->Projection(1),fRecTrackMatrix->Projection(1),"pt_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecSecTrackMatrix->GetAxis(2)->SetRange(1,fRecSecTrackMatrix->GetAxis(2)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(2)->SetRange(1,fRecTrackMatrix->GetAxis(2)->GetNbins());\r
-\r
-  fRecSecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecSecTrackMatrix->Projection(2),fRecTrackMatrix->Projection(2),"eta_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecSecTrackMatrix->GetAxis(0)->SetRange(1,fRecSecTrackMatrix->GetAxis(0)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(0)->SetRange(1,fRecTrackMatrix->GetAxis(0)->GetNbins());\r
-  fRecSecTrackMatrix->GetAxis(1)->SetRange(1,fRecSecTrackMatrix->GetAxis(1)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(1)->SetRange(1,fRecTrackMatrix->GetAxis(1)->GetNbins());\r
-\r
   //\r
   // multiple track reconstruction correction\r
   //\r
@@ -2053,37 +1962,15 @@ void AlidNdPtAnalysis::Analyse()
   h2D = AlidNdPtHelper::GenerateCorrMatrix(fRecMultTrackMatrix->Projection(2,0),fRecTrackMatrix->Projection(2,0),"zv_eta_mult_track_cont_matrix");\r
   aFolderObj->Add(h2D);\r
 \r
-  fRecMultTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecTrackMatrix->GetAxis(2)->SetRangeUser(minEta,maxEta);\r
-  fRecMultTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  \r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecMultTrackMatrix->Projection(0),fRecTrackMatrix->Projection(0),"zv_mult_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecMultTrackMatrix->GetAxis(1)->SetRangeUser(0.,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(0.,maxPt);\r
-  fRecMultTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-  fRecTrackMatrix->GetAxis(0)->SetRangeUser(minZv,maxZv);\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecMultTrackMatrix->Projection(1),fRecTrackMatrix->Projection(1),"pt_mult_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecMultTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(minPt,maxPt);\r
-\r
-  fRecMultTrackMatrix->GetAxis(2)->SetRange(1,fRecMultTrackMatrix->GetAxis(2)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(2)->SetRange(1,fRecTrackMatrix->GetAxis(2)->GetNbins());\r
-\r
   h = AlidNdPtHelper::GenerateCorrMatrix(fRecMultTrackMatrix->Projection(2),fRecTrackMatrix->Projection(2),"eta_mult_track_cont_matrix");\r
   aFolderObj->Add(h);\r
 \r
-  fRecMultTrackMatrix->GetAxis(1)->SetRangeUser(0.,maxPt);\r
-  fRecTrackMatrix->GetAxis(1)->SetRangeUser(0.,maxPt);\r
-\r
-  fRecMultTrackMatrix->GetAxis(0)->SetRange(1,fRecMultTrackMatrix->GetAxis(0)->GetNbins());\r
-  fRecTrackMatrix->GetAxis(0)->SetRange(1,fRecTrackMatrix->GetAxis(0)->GetNbins());\r
-\r
   //\r
   // Control histograms\r
   //\r
@@ -2091,9 +1978,6 @@ void AlidNdPtAnalysis::Analyse()
   if(fHistogramsOn) {\r
 \r
   // Efficiency electrons, muons, pions, kaons, protons, all\r
-  fMCPrimTrackHist1[1]->GetAxis(1)->SetRangeUser(minEta,maxEta); \r
-  fMCPrimTrackHist1[2]->GetAxis(1)->SetRangeUser(minEta,maxEta);\r
-\r
   fMCPrimTrackHist1[1]->GetAxis(2)->SetRange(1,1); \r
   fMCPrimTrackHist1[2]->GetAxis(2)->SetRange(1,1); \r
   h1 = fMCPrimTrackHist1[1]->Projection(0);\r
@@ -2327,7 +2211,6 @@ void AlidNdPtAnalysis::Analyse()
   \r
   // \r
   fRecMCTrackHist1->GetAxis(1)->SetRange(1,fRecMCTrackHist1->GetAxis(1)->GetNbins()); \r
-  fRecMCTrackHist1->GetAxis(0)->SetRangeUser(minPt,maxPt); \r
 \r
   h2F = (TH2F*)fRecMCTrackHist1->Projection(2,1);\r
   h = AlidNdPtHelper::MakeResol(h2F,1,0,kTRUE,10);\r
index 8c25a46..743dad8 100644 (file)
@@ -525,9 +525,13 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
   // trigger selection\r
   Bool_t isEventTriggered = kTRUE;\r
   if(evtCuts->IsTriggerRequired())  {\r
-    //static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
-    //isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
-    isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    if(IsUseMCInfo()) { \r
+      static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
+      isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
+    }\r
+    else {\r
+      isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    }\r
   }\r
 \r
   // use MC information\r
@@ -753,8 +757,7 @@ void AlidNdPtCorrection::Process(AliESDEvent *esdEvent, AliMCEvent *mcEvent)
   if(allChargedTracks) delete allChargedTracks; allChargedTracks = 0;\r
   if(labelsRec) delete [] labelsRec; labelsRec = 0;\r
 \r
-  if(!evtCuts->IsRecVertexRequired() && vtxESD != NULL) \r
-  delete vtxESD;\r
+  if(!evtCuts->IsRecVertexRequired() && vtxESD != NULL) delete vtxESD;\r
 }\r
 \r
 //_____________________________________________________________________________\r
index 3448f91..ed9325f 100644 (file)
@@ -98,7 +98,7 @@ void AlidNdPtCutAnalysis::Init(){
   fEventCount->Sumw2();\r
 \r
   //Xv:Yv:Zv:ResZv:Mult\r
-  Int_t binsRecEventHist[5]={100,100,140,100,150};\r
+  Int_t binsRecEventHist[5]={80,80,100,80,150};\r
   Double_t minRecEventHist[5]={-3.,-3.,-35.,0.,0.}; \r
   Double_t maxRecEventHist[5]={3.,3.,35.,10.,150.}; \r
   fRecEventHist = new THnSparseF("fRecEventHist","Xv:Yv:Zv:ResZv:Mult",5,binsRecEventHist,minRecEventHist,maxRecEventHist);\r
@@ -110,7 +110,7 @@ void AlidNdPtCutAnalysis::Init(){
   fRecEventHist->Sumw2();\r
 \r
   //Xv:Yv:Zv\r
-  Int_t binsMCEventHist[3]={100,100,140};\r
+  Int_t binsMCEventHist[3]={80,80,100};\r
   Double_t minMCEventHist[3]={-0.1,-0.1,-35.}; \r
   Double_t maxMCEventHist[3]={0.1,0.1,35.}; \r
   fMCEventHist = new THnSparseF("fMCEventHist","mcXv:mcYv:mcZv",3,binsMCEventHist,minMCEventHist,maxMCEventHist);\r
@@ -135,7 +135,7 @@ void AlidNdPtCutAnalysis::Init(){
   //\r
 \r
   //nClust:chi2PerClust:nClust/nFindableClust:DCAy:DCAz:eta:phi:pt:isKink:isPrim\r
-  Int_t binsRecMCTrackHist[10]={160,100,100,100,100,30,90,ptNbins, 2,2};\r
+  Int_t binsRecMCTrackHist[10]={160,80,80,80,80,30,90,ptNbins, 2,2};\r
   Double_t minRecMCTrackHist[10]={0., 0., 0., -10.,-10.,-1.5, 0., ptMin, 0., 0.};\r
   Double_t maxRecMCTrackHist[10]={160.,10.,1.2, 10.,10.,1.5, 2.*TMath::Pi(), ptMax, 2.,2.};\r
 \r
@@ -183,9 +183,13 @@ void AlidNdPtCutAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent * cons
   // trigger selection\r
   Bool_t isEventTriggered = kTRUE;\r
   if(evtCuts->IsTriggerRequired())  {\r
-    //static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
-    //isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
-    isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    if(IsUseMCInfo()) { \r
+      static AliTriggerAnalysis* triggerAnalysis = new AliTriggerAnalysis;\r
+      isEventTriggered = triggerAnalysis->IsTriggerFired(esdEvent, GetTrigger());\r
+    }\r
+    else {\r
+      isEventTriggered = esdEvent->IsTriggerClassFired(GetTriggerClass());\r
+    }\r
   }\r
 \r
   // use MC information\r
@@ -283,6 +287,7 @@ void AlidNdPtCutAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent * cons
   }\r
 \r
   if(allChargedTracks) delete allChargedTracks; allChargedTracks = 0;\r
+\r
 }\r
 \r
 //_____________________________________________________________________________\r