TPC tracks and ZDC centrality selection (Michael and Jochen)
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Nov 2010 00:30:24 +0000 (00:30 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 28 Nov 2010 00:30:24 +0000 (00:30 +0000)
PWG0/dNdPt/AlidNdPtAnalysis.cxx
PWG0/dNdPt/AlidNdPtAnalysis.h
PWG0/dNdPt/AlidNdPtAnalysisPbPb.cxx
PWG0/dNdPt/AlidNdPtTask.cxx

index b8e39c4..0d31714 100644 (file)
@@ -133,7 +133,12 @@ ClassImp(AlidNdPtAnalysis)
   fMCMultRecTrackHist1(0), \r
 \r
   // rec. track control histograms\r
-  fRecTrackHist2(0)\r
+  fRecTrackHist2(0),\r
+\r
+  // Generic histograms to be corrected\r
+  fRecEventHist(0),\r
+  fRecTrackHist(0)\r
+\r
 {\r
   // default constructor\r
   for(Int_t i=0; i<AlidNdPtHelper::kCutSteps; i++) { \r
@@ -225,7 +230,11 @@ AlidNdPtAnalysis::AlidNdPtAnalysis(Char_t* name, Char_t* title): AlidNdPt(name,t
   fMCMultRecTrackHist1(0), \r
 \r
   // rec. track control histograms\r
-  fRecTrackHist2(0)\r
+  fRecTrackHist2(0),\r
+\r
+  // Generic histograms to be corrected\r
+  fRecEventHist(0),\r
+  fRecTrackHist(0)\r
 {\r
   //\r
   // constructor\r
@@ -318,6 +327,11 @@ AlidNdPtAnalysis::~AlidNdPtAnalysis() {
   if(fRecMCTrackHist1) delete fRecMCTrackHist1; fRecMCTrackHist1=0;\r
   if(fMCMultRecTrackHist1) delete fMCMultRecTrackHist1; fMCMultRecTrackHist1=0; \r
   if(fRecTrackHist2) delete fRecTrackHist2; fRecTrackHist2=0; \r
+\r
+  //\r
+  if(fRecEventHist) delete fRecEventHist; fRecEventHist=0; \r
+  if(fRecTrackHist) delete fRecTrackHist; fRecTrackHist=0; \r
+\r
   //\r
   if(fAnalysisFolder) delete fAnalysisFolder; fAnalysisFolder=0;\r
 }\r
@@ -350,6 +364,32 @@ void AlidNdPtAnalysis::Init(){
   //Int_t binsTrackMatrix[3]={zvNbins,ptNbins,etaNbins};\r
   Int_t binsTrackEventCorrMatrix[3]={zvNbins,ptNbinsTrackEventCorr,etaNbins};\r
 \r
+\r
+  //\r
+  // Generic histograms to be corrected\r
+  //\r
+  Int_t binsEventHist[2]={100,150};\r
+  Double_t minEventHist[2]={-25.,-0.5}; \r
+  Double_t maxEventHist[2]={25.,149.5}; \r
+\r
+  fRecEventHist = new THnSparseF("fRecEventHist","Zv:multMB",2,binsEventHist,minEventHist,maxEventHist);\r
+  fRecEventHist->GetAxis(0)->SetTitle("Zv (cm)");\r
+  fRecEventHist->GetAxis(1)->SetTitle("multiplicity MB");\r
+  fRecEventHist->Sumw2();\r
+\r
+  //\r
+  Int_t binsTrackHist[3]={100,ptNbins,etaNbins};\r
+  Double_t minTrackHist[3]={-25.,0.,-1.5}; \r
+  Double_t maxTrackHist[3]={25.,50.,1.5}; \r
+\r
+  fRecTrackHist = new THnSparseF("fRecTrackHist","Zv:pT:eta",3,binsTrackHist,minTrackHist,maxTrackHist);\r
+  fRecTrackHist->SetBinEdges(1,binsPt);\r
+  fRecTrackHist->SetBinEdges(2,binsEta);\r
+  fRecTrackHist->GetAxis(0)->SetTitle("Zv (cm)");\r
+  fRecTrackHist->GetAxis(1)->SetTitle("p_{T} (GeV/c)");\r
+  fRecTrackHist->GetAxis(2)->SetTitle("#eta");\r
+  fRecTrackHist->Sumw2();\r
+\r
   //\r
   // rec. vs MC correlation matrices\r
   //\r
@@ -925,6 +965,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
     return;\r
   }\r
 \r
+\r
   // trigger selection\r
   Bool_t isEventTriggered = kTRUE;\r
   AliPhysicsSelection *trigSel = NULL;\r
@@ -1053,9 +1094,6 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
   }\r
 \r
 \r
-\r
-\r
-\r
   // use MC information\r
   AliHeader* header = 0;\r
   AliGenEventHeader* genHeader = 0;\r
@@ -1275,7 +1313,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
         if(tpcTrack) delete tpcTrack; \r
       } \r
 \r
-      FillHistograms(track,stack,AlidNdPtHelper::kAllTracks); \r
+      FillHistograms(track,stack,vtxESD->GetZv(),AlidNdPtHelper::kAllTracks); \r
       labelsAll[multAll] = TMath::Abs(track->GetLabel());\r
       multAll++;\r
 \r
@@ -1324,7 +1362,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
             track->Set(cParam.GetX(),cParam.GetAlpha(),cParam.GetParameter(),cParam.GetCovariance());\r
 \r
              if(accCuts->AcceptTrack(track)) {\r
-               FillHistograms(track,stack,AlidNdPtHelper::kRecTracks); \r
+               FillHistograms(track,stack,vtxESD->GetZv(),AlidNdPtHelper::kRecTracks); \r
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
               multRec++;\r
             }  \r
@@ -1332,7 +1370,7 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
           else {\r
              if(accCuts->AcceptTrack(track)) \r
             {\r
-               FillHistograms(track,stack,AlidNdPtHelper::kRecTracks); \r
+               FillHistograms(track,stack,vtxESD->GetZv(),AlidNdPtHelper::kRecTracks); \r
               labelsRec[multRec] = TMath::Abs(track->GetLabel());\r
               multRec++;\r
             }\r
@@ -1355,6 +1393,11 @@ void AlidNdPtAnalysis::Process(AliESDEvent *const esdEvent, AliMCEvent *const mc
 \r
      Double_t vRecEventHist2[3] = {vtxESD->GetZv(),multMBTracks,multRec};\r
      fRecEventHist2->Fill(vRecEventHist2);\r
+\r
+     // \r
+     Double_t vRecEventHist[2] = {vtxESD->GetZv(),multMBTracks};\r
+     fRecEventHist->Fill(vRecEventHist);\r
+\r
    } \r
 \r
    if(IsUseMCInfo())  \r
@@ -1645,7 +1688,7 @@ void AlidNdPtAnalysis::FillHistograms(TObjArray *const allChargedTracks,Int_t *c
 }\r
 \r
 //_____________________________________________________________________________\r
-void AlidNdPtAnalysis::FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, AlidNdPtHelper::TrackObject trackObj)\r
+void AlidNdPtAnalysis::FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, const Double_t zv, AlidNdPtHelper::TrackObject trackObj)\r
 {\r
   //\r
   // Fill ESD track and MC histograms \r
@@ -1669,15 +1712,20 @@ void AlidNdPtAnalysis::FillHistograms(AliESDtrack *const esdTrack, AliStack *con
 \r
 \r
   // fill histograms\r
-  Double_t values[3] = {pt,eta,phi};     \r
-  fRecTrackHist1[trackObj]->Fill(values);\r
+  Double_t values1[3] = {pt,eta,phi};    \r
+  fRecTrackHist1[trackObj]->Fill(values1);\r
+\r
+  Double_t values[3] = {zv, pt,eta};     \r
+  if(trackObj == AlidNdPtHelper::kRecTracks) {\r
+    fRecTrackHist->Fill(values);\r
+  }\r
 \r
   /*\r
-  Double_t values1[5] = {nClust,chi2PerCluster,pt,eta,phi};      \r
+  Double_t values2[5] = {nClust,chi2PerCluster,pt,eta,phi};      \r
   if(trackObj == AlidNdPtHelper::kRecTracks)  \r
   {\r
     if(fHistogramsOn)\r
-      fRecTrackHist2->Fill(values1);\r
+      fRecTrackHist2->Fill(values2);\r
   }\r
   */\r
  \r
@@ -1811,6 +1859,10 @@ Long64_t AlidNdPtAnalysis::Merge(TCollection* const list)
     //printf("entry->GetPhysicsTriggerSelection() %p \n", entry->GetPhysicsTriggerSelection());\r
     collPhysSelection->Add(entry->GetPhysicsTriggerSelection());\r
     \r
+    //\r
+    fRecEventHist->Add(entry->fRecEventHist);\r
+    fRecTrackHist->Add(entry->fRecTrackHist);\r
+\r
     //\r
     fEventMultCorrelationMatrix->Add(entry->fEventMultCorrelationMatrix);\r
     fTrackPtCorrelationMatrix->Add(entry->fTrackPtCorrelationMatrix);\r
index c20552f..7306301 100644 (file)
@@ -63,7 +63,7 @@ public :
   TFolder *CreateFolder(TString folder = "folderdNdPtAnalysis",TString title = "Analysed dNdPt histograms");
 
   // Fill histograms
-  void FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, AlidNdPtHelper::TrackObject trackObj);
+  void FillHistograms(AliESDtrack *const esdTrack, AliStack *const stack, const Double_t zv, AlidNdPtHelper::TrackObject trackObj);
   void FillHistograms(AliStack *const stack, Int_t label, AlidNdPtHelper::TrackObject trackObj);
   void FillHistograms(TObjArray *const allChargedTracks,Int_t *const labelsAll,Int_t multAll,Int_t *const labelsAcc,Int_t multAcc,Int_t *const labelsRec,Int_t multRec);
 
@@ -141,6 +141,13 @@ public :
 
   THnSparseF *GetRecTrackHist2() const {return fRecTrackHist2;}
 
+
+  //
+  // Generic histograms to be corrected
+  //
+  THnSparseF *GetRecEventHist() const {return fRecEventHist;} 
+  THnSparseF *GetRecTrackHist() const {return fRecTrackHist;} 
+
 private:
 
   // analysis folder 
@@ -253,6 +260,12 @@ private:
   // track control histograms
   THnSparseF *fRecTrackHist2;  //-> nclust:chi2:Pt:Eta:Phi
 
+  //
+  // Generic histograms to be corrected
+  //
+  THnSparseF *fRecEventHist; //-> Zv:multMB
+  THnSparseF *fRecTrackHist; //-> Zv:pT:eta
+
   AlidNdPtAnalysis(const AlidNdPtAnalysis&); // not implemented
   AlidNdPtAnalysis& operator=(const AlidNdPtAnalysis&); // not implemented
 
index e25ec1f..153d977 100644 (file)
@@ -638,9 +638,11 @@ void AlidNdPtAnalysisPbPb::Process(AliESDEvent *const esdEvent, AliMCEvent *cons
     return;
   }
   
-   // zdc cut
-   if (!fTriggerAnalysis->ZDCTimeTrigger(esdEvent)) {
-     return; 
+   // zdc cut not for MC
+   if(!IsUseMCInfo()) {
+     if (!fTriggerAnalysis->ZDCTimeTrigger(esdEvent)) {
+       return; 
+     }
    }
 
   // track cuts from Jochen
index d15d3b6..8553876 100644 (file)
@@ -221,7 +221,8 @@ Int_t AlidNdPtTask::CalculateCentralityBin(){
     centralityF = esdCentrality->GetCentralityPercentile("V0M");\r
   else if ( fUseCentrality == 2 )\r
     centralityF = esdCentrality->GetCentralityPercentile("CL1");\r
-  \r
+  else if ( fUseCentrality == 3 )\r
+    centralityF = esdCentrality->GetCentralityPercentile("TRK"); \r
   if (centralityF == 0.)\r
     centralityF = 100.;\r
 \r