two extra histos (M. Verweij)
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Jun 2011 16:54:02 +0000 (16:54 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 27 Jun 2011 16:54:02 +0000 (16:54 +0000)
PWG4/JetTasks/AliPWG4HighPtTrackQA.cxx
PWG4/JetTasks/AliPWG4HighPtTrackQA.h

index ca1cfbd..d7c70a4 100644 (file)
@@ -98,6 +98,9 @@ AliPWG4HighPtTrackQA::AliPWG4HighPtTrackQA()
   fPtChi2C(0x0),
   fPtNSigmaToVertex(0x0),
   fPtRelUncertainty1Pt(0x0),
+  fPtRelUncertainty1PtNClus(0x0),
+  fPtRelUncertainty1PtChi2(0x0),
+  fPtRelUncertainty1PtTrkLength(0x0),
   fPtUncertainty1Pt(0x0),
   fPtChi2PerClusterTPC(0x0),
   fPtNCrossedRows(0x0),
@@ -169,6 +172,9 @@ AliPWG4HighPtTrackQA::AliPWG4HighPtTrackQA(const char *name):
   fPtChi2C(0x0),
   fPtNSigmaToVertex(0x0),
   fPtRelUncertainty1Pt(0x0),
+  fPtRelUncertainty1PtNClus(0x0),
+  fPtRelUncertainty1PtChi2(0x0),
+  fPtRelUncertainty1PtTrkLength(0x0),
   fPtUncertainty1Pt(0x0),
   fPtChi2PerClusterTPC(0x0),
   fPtNCrossedRows(0x0),
@@ -502,6 +508,15 @@ void AliPWG4HighPtTrackQA::UserCreateOutputObjects() {
   fPtRelUncertainty1Pt = new TH2F("fPtRelUncertainty1Pt","fPtRelUncertainty1Pt",fgkNPtBins,binsPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty);
   fHistList->Add(fPtRelUncertainty1Pt);
 
+  fPtRelUncertainty1PtNClus = new TH3F("fPtRelUncertainty1PtNClus","fPtRelUncertainty1PtNClus",fgkNPtBins,binsPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNNClustersTPCBins,binsNClustersTPC);
+  fHistList->Add(fPtRelUncertainty1PtNClus);
+
+  fPtRelUncertainty1PtChi2 = new TH3F("fPtRelUncertainty1PtChi2","fPtRelUncertainty1PtChi2",fgkNPtBins,binsPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNChi2PerClusBins,binsChi2PerClus);
+  fHistList->Add(fPtRelUncertainty1PtChi2);
+
+  fPtRelUncertainty1PtTrkLength = new TH3F("fPtRelUncertainty1PtTrkLength","fPtRelUncertainty1PtTrkLength",fgkNPtBins,binsPt,fgkNRel1PtUncertaintyBins,binsRel1PtUncertainty,fgkNNClustersTPCBins,binsNClustersTPC);
+  fHistList->Add(fPtRelUncertainty1PtTrkLength);
+
   fPtUncertainty1Pt = new TH2F("fPtUncertainty1Pt","fPtUncertainty1Pt",fgkNPtBins,binsPt,fgkNUncertainty1PtBins,binsUncertainty1Pt);
   fHistList->Add(fPtUncertainty1Pt);
  
@@ -798,6 +813,9 @@ void AliPWG4HighPtTrackQA::UserExec(Option_t *) {
 
 //________________________________________________________________________
 void AliPWG4HighPtTrackQA::DoAnalysisESD() {
+  //
+  // Run analysis on ESD
+  //
 
   if(!fESD) {
     PostData(1, fHistList);
@@ -839,7 +857,7 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
     6: nPointITS   
     7: chi2C       
     8: nSigmaToVertex
-    9: relUncertainty1Pt
+    9: trackLengthTPC
     10: chi2PerClusterTPC
     11: #crossed rows
     12: (#crossed rows)/(#findable clusters)
@@ -981,7 +999,7 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
     fVariables->SetAt(chi2C,7);
     fVariables->SetAt(fTrackCuts->GetSigmaToVertex(track),8);// Calculates the number of sigma to the vertex for a track.
   
-    fVariables->SetAt(TMath::Sqrt(track->GetSigma1Pt2())*fVariables->At(0),9);
+    fVariables->SetAt(GetTrackLengthTPC(track),9);
   
     if(fVariables->At(5)>0.) fVariables->SetAt(track->GetTPCchi2()/fVariables->At(5),10);
     
@@ -1062,8 +1080,11 @@ void AliPWG4HighPtTrackQA::FillHistograms() {
   if(fDataType==kESD) {
     fPtChi2C->Fill(fVariables->At(0),fVariables->At(7));
     fPtNSigmaToVertex->Fill(fVariables->At(0),fVariables->At(8));
-    fPtRelUncertainty1Pt->Fill(fVariables->At(0),fVariables->At(9));
-    fPtUncertainty1Pt->Fill(fVariables->At(0),fVariables->At(0)*fVariables->At(9));
+    fPtRelUncertainty1Pt->Fill(fVariables->At(0),fVariables->At(0)*TMath::Sqrt(fVariables->At(17)));
+    fPtRelUncertainty1PtNClus->Fill(fVariables->At(0),fVariables->At(0)*TMath::Sqrt(fVariables->At(17)),fVariables->At(5));
+    fPtRelUncertainty1PtChi2->Fill(fVariables->At(0),fVariables->At(0)*TMath::Sqrt(fVariables->At(17)),fVariables->At(10));
+    fPtRelUncertainty1PtTrkLength->Fill(fVariables->At(0),fVariables->At(0)*TMath::Sqrt(fVariables->At(17)),fVariables->At(9));
+    fPtUncertainty1Pt->Fill(fVariables->At(0),TMath::Sqrt(fVariables->At(17)));
     fPtSigmaY2->Fill(1./fVariables->At(0),TMath::Sqrt(fVariables->At(13)));
     fPtSigmaZ2->Fill(1./fVariables->At(0),TMath::Sqrt(fVariables->At(14)));
     fPtSigmaSnp2->Fill(1./fVariables->At(0),TMath::Sqrt(fVariables->At(15)));
@@ -1271,6 +1292,28 @@ Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbour
   return 0;  // undefined type - default value
 }
 
+//_______________________________________________________________________
+Int_t AliPWG4HighPtTrackQA::GetTrackLengthTPC(AliESDtrack *track) {
+  //
+  // returns distance between 2st and last hit in TPC
+  // distance given in number of padrows
+  //
+
+  TBits fTPCClusterMap = track->GetTPCClusterMap(); 
+  int firstHit = 0;
+  int lastHit = 0;
+
+  for(int i=0; i<159; i++) {
+    if(fTPCClusterMap[i]>0) firstHit = fTPCClusterMap[i];
+  }
+  for(int i=159; i>=0; i--) {
+    if(fTPCClusterMap[i]>0) lastHit = fTPCClusterMap[i];
+  }
+
+  return lastHit - firstHit;
+}
+
+//_______________________________________________________________________
 void AliPWG4HighPtTrackQA::FillSystematicCutHist(AliESDtrack *track) {
 
   fSystTrackCuts->Fill("noCut",1);
index 6cfe218..a79b960 100644 (file)
@@ -86,6 +86,7 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
 
   Float_t GetPtMax()           {return fPtMax;}
   Float_t GetTPCClusterInfo(AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
+  Int_t   GetTrackLengthTPC(AliESDtrack *track);
 
   static AliGenPythiaEventHeader*  GetPythiaEventHeader(AliMCEvent *mcEvent);
   static Bool_t PythiaInfoFromFile(const char* currFile,Float_t &fXsec,Float_t &fTrials);// get the cross section and the trails either from pyxsec.root or from pysec_hists.root
@@ -103,8 +104,8 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
   const AliESDVertex   *fVtx;     //! vertex object
 
   AliESDtrackCuts *fTrackCuts;         // TrackCuts
-  AliESDtrackCuts *fTrackCutsITSLoose; //Loose ITS track cuts
-  AliESDtrackCuts *fTrackCutsTPConly;  //TPC track cuts
+  AliESDtrackCuts *fTrackCutsITSLoose; // Loose ITS track cuts
+  AliESDtrackCuts *fTrackCutsTPConly;  // TPC track cuts
   Int_t   fTrackType;                  // 0: global track; 1:TPConly track 2: TPConly constrained track 3: global ITSrefit 4: TPConly constrained track with QA selection based on global track
   UInt_t fFilterMask;                  //! Select tracks from specific track cuts belonging to certain filter mask for AOD analysis
 
@@ -161,6 +162,9 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
   TH2F *fPtChi2C;                              //! Pt vs Chi2C
   TH2F *fPtNSigmaToVertex;                     //! Pt vs nSigmaToVertex
   TH2F *fPtRelUncertainty1Pt;                  //! Pt vs relUncertainty1Pt
+  TH3F *fPtRelUncertainty1PtNClus;             //! Pt vs relUncertainty1Pt vs NClustersTPC
+  TH3F *fPtRelUncertainty1PtChi2;              //! Pt vs relUncertainty1Pt vs Chi2TPC/NClus
+  TH3F *fPtRelUncertainty1PtTrkLength;         //! Pt vs relUncertainty1Pt vs track length in TPC
   TH2F *fPtUncertainty1Pt;                     //! Pt vs Uncertainty1Pt
   TH2F *fPtChi2PerClusterTPC;                  //! Pt vs Chi2PerClusterTPC
   TH2F *fPtNCrossedRows;                       //! Pt vs NCrossedRows