added tracks cuts and running on AODs
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Mar 2012 19:35:52 +0000 (19:35 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Mar 2012 19:35:52 +0000 (19:35 +0000)
PWGJE/AliPWG4HighPtTrackQA.cxx
PWGJE/AliPWG4HighPtTrackQA.h
PWGJE/macros/AddTaskPWG4HighPtTrackQA.C
PWGJE/macros/CreateTrackCutsPWGJE.C

index 05176cb..7118052 100644 (file)
@@ -987,6 +987,8 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
     20: nClustersTPCShared
     21: Golden Chi2 - global vs TPC constrained
     22: Chi2 between global and global constrained
+    23: #crossed rows from fit map
+    24: (#crossed rows)/(#findable clusters) from fit map
   */
 
   for (Int_t iTrack = 0; iTrack < nTracks; iTrack++) {
@@ -1232,7 +1234,7 @@ void AliPWG4HighPtTrackQA::DoAnalysisAOD() {
     fVariables->SetAt(0.,8);
     fVariables->SetAt(GetTrackLengthTPC(aodtrack),9);
     fVariables->SetAt(aodtrack->Chi2perNDF(),10);
-    fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1),11);
+    fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1,0,159,kFALSE),11);
     Float_t crossedRowsTPCNClsF = 0.;
     if(aodtrack->GetTPCNclsF()>0.) crossedRowsTPCNClsF = fVariables->At(11)/aodtrack->GetTPCNclsF();
     fVariables->SetAt(crossedRowsTPCNClsF,12);
@@ -1253,17 +1255,19 @@ void AliPWG4HighPtTrackQA::DoAnalysisAOD() {
     fVariables->SetAt(exParam->GetSigmaTgl2(),16);
     fVariables->SetAt(exParam->GetSigma1Pt2(),17);
 
-    fVariables->SetAt(0.,18);
-    fVariables->SetAt(0.,19);
+    fVariables->SetAt(0.,18); //NClustersTPCIter1
+    fVariables->SetAt(0.,19); //Chi2TPCIter1
 
     TBits sharedClusterMap = aodtrack->GetTPCSharedMap();
     fVariables->SetAt(sharedClusterMap.CountBits(),20);
     
-    fVariables->SetAt(0.,21); //not available in AOD
-    fVariables->SetAt(0.,22); //not available in AOD
+    fVariables->SetAt(0.,21); //not available in AOD golden chi2
+    fVariables->SetAt(0.,22); //not available in AOD  Chi2 between global and global constrained
 
-    fVariables->SetAt(0.,23); //not available in AOD
-    fVariables->SetAt(0.,24); //not available in AOD
+    fVariables->SetAt(GetTPCClusterInfo(aodtrack,2,1,0,159,kTRUE),23); //not available in AOD #crossed rows from fit map
+    Float_t crossedRowsTPCNClsFFit = 0.;
+    if(aodtrack->GetTPCNclsF()>0.) crossedRowsTPCNClsFFit = fVariables->At(23)/aodtrack->GetTPCNclsF();
+    fVariables->SetAt(crossedRowsTPCNClsFFit,24); //(#crossed rows)/(#findable clusters) from fit map
 
     fPtAll->Fill(fVariables->At(0));
 
@@ -1483,7 +1487,7 @@ AliGenPythiaEventHeader*  AliPWG4HighPtTrackQA::GetPythiaEventHeader(const AliMC
 }
 
 //_______________________________________________________________________
-Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1) const
+Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours/*=3*/, Int_t type/*=0*/, Int_t row0, Int_t row1, Bool_t useFitMap) const
 {
   //MV: copied from AliESDtrack since method is not available in AliAODTrack
 
@@ -1499,7 +1503,12 @@ Float_t AliPWG4HighPtTrackQA::GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNei
   //           effects with a very simple algorithm.
   //
 
-  TBits fTPCClusterMap = tr->GetTPCClusterMap(); 
+  TBits fTPCClusterMap = 0;
+  if(useFitMap)
+    fTPCClusterMap = tr->GetTPCFitMap(); 
+  else
+    fTPCClusterMap = tr->GetTPCClusterMap(); 
+
   if (type==2) return fTPCClusterMap.CountBits();
 
   Int_t found=0;
index d094ff1..934fdcf 100644 (file)
@@ -83,7 +83,7 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
   void SetNVariables(Int_t nv) {fNVariables = nv;}
 
   Float_t GetPtMax()           {return fPtMax;}
-  Float_t GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
+  Float_t GetTPCClusterInfo(const AliAODTrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159, Bool_t useFitMap=kFALSE) const;
   Float_t GetTPCClusterInfoFitMap(const AliESDtrack *tr,Int_t nNeighbours=3, Int_t type=0, Int_t row0=0, Int_t row1=159) const;
   Int_t   GetTrackLengthTPC(const AliESDtrack *track) const;
   Int_t   GetTrackLengthTPC(const AliAODTrack *track) const;
index b41fdd0..53dab67 100644 (file)
@@ -1,17 +1,22 @@
-void AddTaskPWG4HighPtTrackQA(TString year = "2010", TString prodType = "LHC10h",Bool_t isPbPb = kTRUE, Int_t iAODanalysis = 0, Bool_t bReduced = kTRUE)
+void AddTaskPWG4HighPtTrackQA(TString year = "2010", TString prodType = "LHC10h",Bool_t isPbPb = kTRUE, Int_t iAODanalysis = 0, Bool_t bReduced = kTRUE, Int_t filterBit = 272)
 {
 
-  if(year.Contains("2010")) {
-    if(bReduced)
-      AddTaskPWG4HighPtTrackQAAllReduced(prodType.Data(),isPbPb,iAODanalysis);
-    else
-      AddTaskPWG4HighPtTrackQAAll(prodType.Data(),isPbPb,iAODanalysis);
+  if(iAODanalysis==0) { //run on ESDs
+    if(year.Contains("2010")) {
+      if(bReduced)
+       AddTaskPWG4HighPtTrackQAAllReduced(prodType.Data(),isPbPb,iAODanalysis);
+      else
+       AddTaskPWG4HighPtTrackQAAll(prodType.Data(),isPbPb,iAODanalysis);
+    }
+    else if(year.Contains("2011")) {
+      if(bReduced)
+       AddTaskPWG4HighPtTrackQAAllReduced2011(prodType.Data(),isPbPb,iAODanalysis);
+      else
+       AddTaskPWG4HighPtTrackQAAll2011(prodType.Data(),isPbPb,iAODanalysis);
+    }
   }
-  else if(year.Contains("2011")) {
-    if(bReduced)
-      AddTaskPWG4HighPtTrackQAAllReduced2011(prodType.Data(),isPbPb,iAODanalysis);
-    else
-      AddTaskPWG4HighPtTrackQAAll2011(prodType.Data(),isPbPb,iAODanalysis);
+  else if(iAODanalysis==1) {
+    AddTaskPWG4HighPtTrackQAAOD(prodType.Data,isPbPb,iAODanalysis,filterBit); 
   }
 
 }
@@ -71,6 +76,10 @@ void AddTaskPWG4HighPtTrackQAAll2011(char *prodType = "LHC10h",Bool_t isPbPb=kTR
   AliPWG4HighPtTrackQA *taskTrackQA70cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlag);
   AliPWG4HighPtTrackQA *taskTrackQA71cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlag);
   AliPWG4HighPtTrackQA *taskTrackQA72cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlag);
+  
+  AliPWG4HighPtTrackQA *taskTrackQA05cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlag);
+  AliPWG4HighPtTrackQA *taskTrackQA74cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlag);
+  AliPWG4HighPtTrackQA *taskTrackQA75cent10 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlag);
 
   if(isPbPb) {
     for(cent=0; cent<4; cent++) {
@@ -79,6 +88,9 @@ void AddTaskPWG4HighPtTrackQAAll2011(char *prodType = "LHC10h",Bool_t isPbPb=kTR
       AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlag);
       AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlag);
       AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlag);
+      AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlag);
+      AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlag);
+      AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlag);
 
       if(cent==0) {
        AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagCentral);
@@ -86,6 +98,9 @@ void AddTaskPWG4HighPtTrackQAAll2011(char *prodType = "LHC10h",Bool_t isPbPb=kTR
        AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagCentral);
        AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagCentral);
        AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagCentral);
       }
       else {
        AliPWG4HighPtTrackQA *taskTrackQA00 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagSemiCentral);
@@ -93,6 +108,9 @@ void AddTaskPWG4HighPtTrackQAAll2011(char *prodType = "LHC10h",Bool_t isPbPb=kTR
        AliPWG4HighPtTrackQA *taskTrackQA70 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagSemiCentral);
        AliPWG4HighPtTrackQA *taskTrackQA71 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagSemiCentral);
        AliPWG4HighPtTrackQA *taskTrackQA72 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagSemiCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA05 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagSemiCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA74 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagSemiCentral);
+       AliPWG4HighPtTrackQA *taskTrackQA75 = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagSemiCentral);
       }
 
     }
@@ -131,6 +149,9 @@ void AddTaskPWG4HighPtTrackQAAllReduced2011(char *prodType = "LHC10h",Bool_t isP
   AliPWG4HighPtTrackQA *taskTrackQA70C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagCentral);
   AliPWG4HighPtTrackQA *taskTrackQA71C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagCentral);
   AliPWG4HighPtTrackQA *taskTrackQA72C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagCentral);
+  AliPWG4HighPtTrackQA *taskTrackQA05C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagCentral); 
+  AliPWG4HighPtTrackQA *taskTrackQA74C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagCentral);
+  AliPWG4HighPtTrackQA *taskTrackQA75C = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagCentral);
 
   AliPWG4HighPtTrackQA *taskTrackQA00SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,0,iPhysicsSelectionFlagSemiCentral);
   AliPWG4HighPtTrackQA *taskTrackQA01SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,1,iPhysicsSelectionFlagSemiCentral);
@@ -138,6 +159,9 @@ void AddTaskPWG4HighPtTrackQAAllReduced2011(char *prodType = "LHC10h",Bool_t isP
   AliPWG4HighPtTrackQA *taskTrackQA70SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0,iPhysicsSelectionFlagSemiCentral);
   AliPWG4HighPtTrackQA *taskTrackQA71SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1,iPhysicsSelectionFlagSemiCentral);
   AliPWG4HighPtTrackQA *taskTrackQA72SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,2,iPhysicsSelectionFlagSemiCentral);
+  AliPWG4HighPtTrackQA *taskTrackQA05SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,0,5,iPhysicsSelectionFlagSemiCentral);
+  AliPWG4HighPtTrackQA *taskTrackQA74SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,4,iPhysicsSelectionFlagSemiCentral);
+  AliPWG4HighPtTrackQA *taskTrackQA75SC = ConfigureTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,5,iPhysicsSelectionFlagSemiCentral);
 
 }
 
@@ -207,6 +231,11 @@ AliPWG4HighPtTrackQA* ConfigureTaskPWG4HighPtTrackQA(char *prodType = "LHC10e14"
     //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis
     trackCuts = CreateTrackCutsPWGJE(10001006);
   }
+  if(trackType==0 && cuts==5) {
+    //Cuts global tracks with ITSrefit requirement and SPDrequirement for jet analysis + NCrossedRowsCut>120 recommended in 2011
+    trackCuts = CreateTrackCutsPWGJE(10001007);
+  }
+  
   if(trackType==0 && cuts==2) {
     //Cuts global tracks with ITSrefit requirement but without SPD
     trackCuts = CreateTrackCutsPWGJE(10011006);
@@ -218,10 +247,21 @@ AliPWG4HighPtTrackQA* ConfigureTaskPWG4HighPtTrackQA(char *prodType = "LHC10e14"
     trackCutsReject->SetEtaRange(-0.9,0.9);
     trackCutsReject->SetPtRange(0.15, 1e10);
   }
+  if(trackType==7 && cuts==4) {
+    // tight global tracks +  NCrossedRowsCut>120 recommended in 2011
+    trackCuts = CreateTrackCutsPWGJE(10041007);
+    trackCutsReject = CreateTrackCutsPWGJE(1007);
+    trackCutsReject->SetEtaRange(-0.9,0.9);
+    trackCutsReject->SetPtRange(0.15, 1e10);
+  }
   if(trackType==7 && cuts==1) {
     // tight global tracks
     trackCuts = CreateTrackCutsPWGJE(10011006);
   }
+  if(trackType==7 && cuts==5) {
+    // tight global tracks  + NCrossedRowsCut>120 recommended in 2011
+    trackCuts = CreateTrackCutsPWGJE(10011007);
+  }
   if(trackType==7 && cuts==2) {
     // no requirements on SPD and ITSrefit failed
     trackCuts = CreateTrackCutsPWGJE(10041006);       //no ITSrefit requirement filter 256
@@ -229,6 +269,13 @@ AliPWG4HighPtTrackQA* ConfigureTaskPWG4HighPtTrackQA(char *prodType = "LHC10e14"
     trackCutsReject->SetEtaRange(-0.9,0.9);
     trackCutsReject->SetPtRange(0.15, 1e10);
   }
+  if(trackType==7 && cuts==6) {
+    // no requirements on SPD and ITSrefit failed
+    trackCuts = CreateTrackCutsPWGJE(10041007);       //no ITSrefit requirement filter 256
+    trackCutsReject = CreateTrackCutsPWGJE(10001007); //ITSrefit requirement filter 16
+    trackCutsReject->SetEtaRange(-0.9,0.9);
+    trackCutsReject->SetPtRange(0.15, 1e10);
+  }
 
   if(trackType==1 && cuts==0) {
     //Set track cuts for TPConly tracks
index 354b80b..332aa93 100644 (file)
@@ -5,7 +5,7 @@ AliESDtrackCuts *CreateTrackCutsPWGJE(Int_t cutMode) {
   // User can select a specific set by indicating cutMode
   // cutMode has 8 digits: first 4 digits additional cuts, last 4 digits standard cuts
   //                       additional cuts are variations of standard cuts (used for hybrid track selection and QA)
-  // Numbering starts from 1000 for standard and additional cut numbers
+  // Numbering starts from 1000 For standard and additional cut numbers
 
   AliESDtrackCuts *trackCuts  = new AliESDtrackCuts("AliESDtrackCuts");
 
@@ -174,6 +174,7 @@ AliESDtrackCuts *CreateTrackCutsPWGJE(Int_t cutMode) {
     tag = "Global tracks jet analysis with ITSrefit and NclsIter1=70, noSPD requirement, no upper pt cut";
 
   }
+  
   if(stdCutMode == 1006) {
 
     bStdCutsDefined = kTRUE;
@@ -206,6 +207,25 @@ AliESDtrackCuts *CreateTrackCutsPWGJE(Int_t cutMode) {
 
   }
 
+  if(stdCutMode == 1007) {
+    
+    bStdCutsDefined = kTRUE;
+    
+    trackCuts = AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE);
+    //accept secondaries
+    trackCuts->SetMaxDCAToVertexXY(2.4);
+    trackCuts->SetMaxDCAToVertexZ(3.2);
+    trackCuts->SetDCAToVertex2D(kTRUE);
+
+    //
+    trackCuts->SetMaxChi2TPCConstrainedGlobal(36);
+
+    trackCuts->SetEtaRange(-0.9,0.9);
+    trackCuts->SetPtRange(0.15, 1E+15.);
+    tag = "Global tracks with AliESDtrackCuts::GetStandardITSTPCTrackCuts2011(kFALSE)";
+
+  }
 
 
   if(stdCutMode == 2000) {