Updated QA task for constraint global tracks (M. Verweij)
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Jun 2011 19:41:26 +0000 (19:41 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Jun 2011 19:41:26 +0000 (19:41 +0000)
PWG4/JetTasks/AliPWG4HighPtTrackQA.cxx
PWG4/JetTasks/AliPWG4HighPtTrackQA.h

index da114d0c9a6c6b3343dea8cd06111d6e48b8dcf1..6a96d6700a8c607cd80bbc9d09b4b92f38bc2a59 100644 (file)
@@ -64,7 +64,9 @@ AliPWG4HighPtTrackQA::AliPWG4HighPtTrackQA()
   fEvent(0x0),
   fESD(0x0),
   fVtx(0x0),
-  fTrackCuts(0), 
+  fTrackCuts(0x0), 
+  fTrackCutsITSLoose(0x0), 
+  fTrackCutsTPConly(0x0), 
   fTrackType(0),
   fFilterMask(0),
   fSigmaConstrainedMax(-1.),
@@ -133,7 +135,9 @@ AliPWG4HighPtTrackQA::AliPWG4HighPtTrackQA(const char *name):
   fEvent(0x0),
   fESD(0x0),
   fVtx(0x0),
-  fTrackCuts(),
+  fTrackCuts(0x0),
+  fTrackCutsITSLoose(0x0), 
+  fTrackCutsTPConly(0x0), 
   fTrackType(0),
   fFilterMask(0),
   fSigmaConstrainedMax(-1.),
@@ -882,6 +886,33 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
       }
       track->Set(exParam.GetX(),exParam.GetAlpha(),exParam.GetParameter(),exParam.GetCovariance());
     }
+    else if(fTrackType==5 || fTrackType==6) {
+      if(fTrackCuts->AcceptTrack(esdtrack)) {
+       continue;
+      }
+      else {
+       if( !(fTrackCutsITSLoose->AcceptTrack(esdtrack)) && fTrackCutsTPConly->AcceptTrack(esdtrack) ) {
+
+         if(fTrackType==5) {
+           //use TPConly constrained track
+           track = AliESDtrackCuts::GetTPCOnlyTrack(fESD,esdtrack->GetID());
+           AliExternalTrackParam exParam;
+           Bool_t relate = track->RelateToVertexTPC(fVtx,fESD->GetMagneticField(),kVeryBig,&exParam);
+           if( !relate ) {
+             fh1NTracksReject->Fill("relate",1);
+             delete track;
+             continue;
+           }
+           track->Set(exParam.GetX(),exParam.GetAlpha(),exParam.GetParameter(),exParam.GetCovariance());
+         }
+         else if(fTrackType==6) {
+           //use global constrained track
+           track->Set(esdtrack->GetConstrainedParam()->GetX(),esdtrack->GetConstrainedParam()->GetAlpha(),esdtrack->GetConstrainedParam()->GetParameter(),esdtrack->GetConstrainedParam()->GetCovariance());
+
+         }
+       }
+      }
+    }
     else
       track = esdtrack;
     
@@ -904,19 +935,12 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
 
     fPtAll->Fill(track->Pt());
 
-    if (!(fTrackCuts->AcceptTrack(track)) && fTrackType!=4) {
+    if (!(fTrackCuts->AcceptTrack(track)) && fTrackType!=4 && fTrackType!=5 && fTrackType!=6) {
       fh1NTracksReject->Fill("trackCuts",1);
       if(fTrackType==1 || fTrackType==2) delete track;
       continue;
     }
 
-    //Cut out laser tracks
-    if(track->GetTPCsignal()<10) { //Cut on laser tracks
-      fh1NTracksReject->Fill("laser",1);
-      if(fTrackType==1 || fTrackType==2 || fTrackType==4) delete track;
-      continue; 
-    }
-
     fh1NTracksSel->Fill(0.);
 
     fVariables->Reset(0.);
@@ -955,11 +979,9 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
   
     if(fVariables->At(5)>0.) fVariables->SetAt(track->GetTPCchi2()/fVariables->At(5),10);
     
-    //cout << "#crossed rows (1): " << track->GetTPCClusterInfo(1) << endl;
-    //cout << "#crossed rows (2): " << track->GetTPCClusterInfo(2) << endl;
     fVariables->SetAt(track->GetTPCClusterInfo(2,1),11); //#crossed rows
-    Float_t crossedRowsTPCNClsF = track->GetTPCClusterInfo(2,0);
-    //if(track->GetTPCNclsF()>0.) crossedRowsTPCNClsF = fVariables->At(11)/track->GetTPCNclsF();
+    Float_t crossedRowsTPCNClsF = 1.;//track->GetTPCClusterInfo(2,0);
+    if(track->GetTPCNclsF()>0.) crossedRowsTPCNClsF = fVariables->At(11)/track->GetTPCNclsF();
     fVariables->SetAt(crossedRowsTPCNClsF,12);//(#crossed rows)/(#findable clusters)
     fVariables->SetAt(track->GetSigmaY2(),13);
     fVariables->SetAt(track->GetSigmaZ2(),14);
@@ -971,7 +993,7 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
   
     //      int mult = fTrackCuts->CountAcceptedTracks(fESD);
 
-    if(fTrackType==1  || fTrackType==2 || fTrackType==4) delete track;
+    if(fTrackType==1  || fTrackType==2 || fTrackType==4 || fTrackType==5) delete track;
     
   }//track loop
 
index 4dced3cb92e8c827934773c25bec6e716723d15b..6cfe2181bf45b4393ed27b3b5ddb22d66175b2aa 100644 (file)
@@ -74,6 +74,8 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
   void SetIsPbPb(Bool_t cs)                {fIsPbPb = cs;}
   void SetCentralityClass(int cent)        {fCentClass=cent;}
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
+  void SetCutsITSLoose(AliESDtrackCuts* trackCuts) {fTrackCutsITSLoose = trackCuts;}
+  void SetCutsTPConly(AliESDtrackCuts* trackCuts) {fTrackCutsTPConly = trackCuts;}
   void SetTrackType(Int_t trackType) {fTrackType = trackType;}
   void SetFilterMask(UInt_t filterMask)    {fFilterMask = filterMask;}
 
@@ -100,9 +102,11 @@ class AliPWG4HighPtTrackQA: public AliAnalysisTaskSE {
   AliESDEvent *fESD;              //! ESD object
   const AliESDVertex   *fVtx;     //! vertex object
 
-  AliESDtrackCuts *fTrackCuts;    // TrackCuts
-  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
+  AliESDtrackCuts *fTrackCuts;         // TrackCuts
+  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
 
   Double_t fSigmaConstrainedMax;  // max sigma on constrained fit
   Float_t fPtMax;                 // Maximum pT for histograms