update track selection QA (M. Verweij)
authorkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jul 2011 17:56:57 +0000 (17:56 +0000)
committerkleinb <kleinb@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jul 2011 17:56:57 +0000 (17:56 +0000)
PWG4/JetTasks/AliPWG4HighPtQAMC.cxx
PWG4/JetTasks/AliPWG4HighPtQAMC.h
PWG4/JetTasks/AliPWG4HighPtSpectra.cxx
PWG4/JetTasks/AliPWG4HighPtSpectra.h
PWG4/JetTasks/AliPWG4HighPtTrackQA.cxx
PWG4/macros/AddTaskPWG4HighPtQAMC.C
PWG4/macros/AddTaskPWG4HighPtSpectra.C
PWG4/macros/AddTaskPWG4HighPtTrackQA.C

index cfad16a..91aad90 100644 (file)
@@ -62,6 +62,7 @@ AliPWG4HighPtQAMC::AliPWG4HighPtQAMC()
   fStack(0),
   fVtx(0x0),
   fTrackCuts(0), 
+  fTrackCutsReject(),
   fTrackType(0),
   fSigmaConstrainedMax(1e6),
   fPtMax(100.),
@@ -117,6 +118,7 @@ AliPWG4HighPtQAMC::AliPWG4HighPtQAMC(const char *name):
   fStack(0),
   fVtx(0x0),
   fTrackCuts(),
+  fTrackCutsReject(),
   fTrackType(0),
   fSigmaConstrainedMax(1e6),
   fPtMax(100.),
@@ -722,12 +724,17 @@ void AliPWG4HighPtQAMC::Exec(Option_t *) {
     if (fTrackCuts->AcceptTrack(track)) {
 
       if(fTrackType==7) {
+       if(fTrackCutsReject ) {
+         if(fTrackCutsReject->AcceptTrack(track) )
+           continue;
+       }
+       
        if(esdtrack->GetConstrainedParam()) 
          track->Set(esdtrack->GetConstrainedParam()->GetX(),esdtrack->GetConstrainedParam()->GetAlpha(),esdtrack->GetConstrainedParam()->GetParameter(),esdtrack->GetConstrainedParam()->GetCovariance());
-       else
-         continue;
       }
 
+      if(!track) continue;
+
       pt  = track->Pt();
       phi = track->Phi();
 
index 1672aa5..f882ced 100644 (file)
@@ -52,6 +52,7 @@ class AliPWG4HighPtQAMC: public AliAnalysisTask {
   Bool_t SelectEvent();    //decides if event is used for analysis
 
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
+  void SetCutsReject(AliESDtrackCuts* trackCuts) {fTrackCutsReject = trackCuts;}
 
   void SetTrackType(Int_t trackType) {fTrackType = trackType;}
   void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
@@ -75,6 +76,7 @@ class AliPWG4HighPtQAMC: public AliAnalysisTask {
   const AliESDVertex   *fVtx;     //! vertex object
 
   AliESDtrackCuts *fTrackCuts;    // TrackCuts for global reconstructed vs MC comparison
+  AliESDtrackCuts *fTrackCutsReject;     // trackCuts to reject tracks (hybrid case)
 
   Int_t   fTrackType;             // 0: global track; 1:TPConly track 2: TPConly constrained track 3: global ITSrefit
 
index fd7cafc..da5822d 100644 (file)
@@ -75,6 +75,7 @@ AliPWG4HighPtSpectra::AliPWG4HighPtSpectra() : AliAnalysisTask("AliPWG4HighPtSpe
   fCentClass(10),
   fTrackType(0),
   fTrackCuts(0x0),
+  fTrackCutsReject(0x0),
   fSigmaConstrainedMax(5.),
   fAvgTrials(1),
   fHistList(0),
@@ -105,6 +106,7 @@ AliPWG4HighPtSpectra::AliPWG4HighPtSpectra(const Char_t* name) :
   fCentClass(10),
   fTrackType(0),
   fTrackCuts(0x0),
+  fTrackCutsReject(0x0),
   fSigmaConstrainedMax(5.),
   fAvgTrials(1),
   fHistList(0),
@@ -397,17 +399,20 @@ void AliPWG4HighPtSpectra::Exec(Option_t *)
        }
       }
 
-
-   
       if (fTrackCuts->AcceptTrack(track)) {
 
        if(fTrackType==7) {
+         if(fTrackCutsReject ) {
+           if(fTrackCutsReject->AcceptTrack(track) )
+             continue;
+         }
+         
          if(esdtrack->GetConstrainedParam()) 
            track->Set(esdtrack->GetConstrainedParam()->GetX(),esdtrack->GetConstrainedParam()->GetAlpha(),esdtrack->GetConstrainedParam()->GetParameter(),esdtrack->GetConstrainedParam()->GetCovariance());
-         else
-           continue;
        }
 
+       if(!track) continue;
+
        //fill the container
        containerInputRec[0] = track->Pt();
        containerInputRec[1] = track->Phi();
index b56cfeb..a98cd94 100644 (file)
@@ -82,6 +82,7 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
   void SetTrackType(Int_t trackType) {fTrackType = trackType;}
   //AliESDtrackCuts setters
   void SetCuts(AliESDtrackCuts* trackCuts) {fTrackCuts = trackCuts;}
+  void SetCutsReject(AliESDtrackCuts* trackCuts) {fTrackCutsReject = trackCuts;}
 
   void SetSigmaConstrainedMax(Double_t sigma) {fSigmaConstrainedMax=sigma;}
 
@@ -109,6 +110,7 @@ class AliPWG4HighPtSpectra : public AliAnalysisTask {
   Int_t   fTrackType;     // Type of track to be used in analysis
   //AliESDtrackCuts options. Must be setted in AddTaskPWG4HighPTSpectra.C. They correspond with different steps in container.
   AliESDtrackCuts *fTrackCuts;           // trackCuts applied to global tracks
+  AliESDtrackCuts *fTrackCutsReject;     // trackCuts to reject tracks (hybrid case)
 
   Double_t fSigmaConstrainedMax;  // max sigma on constrained fit
 
index 22d1299..5960f57 100644 (file)
@@ -986,12 +986,17 @@ void AliPWG4HighPtTrackQA::DoAnalysisESD() {
     }
 
     if(fTrackType==7) {
+      if(fTrackCutsITSLoose ) {
+       if(fTrackCutsITSLoose->AcceptTrack(track) )
+         continue;
+      }
+      
       if(esdtrack->GetConstrainedParam()) 
        track->Set(esdtrack->GetConstrainedParam()->GetX(),esdtrack->GetConstrainedParam()->GetAlpha(),esdtrack->GetConstrainedParam()->GetParameter(),esdtrack->GetConstrainedParam()->GetCovariance());
-      else
-       continue;
     }
 
+    if(!track) continue;
+
     fh1NTracksSel->Fill(0.);
 
     fVariables->Reset(0.);
index 570b73f..8d21a0a 100644 (file)
@@ -3,9 +3,10 @@ void AddTaskPWG4HighPtQAMCAll(char *prodType = "LHC10e14") {
   AliPWG4HighPtQAMC *taskQAMC00 = AddTaskPWG4HighPtQAMC(prodType,0,0);
   AliPWG4HighPtQAMC *taskQAMC00 = AddTaskPWG4HighPtQAMC(prodType,0,1);
   AliPWG4HighPtQAMC *taskQAMC00 = AddTaskPWG4HighPtQAMC(prodType,0,2);
-  AliPWG4HighPtQAMC *taskQAMC10 = AddTaskPWG4HighPtQAMC(prodType,1,0);
-  AliPWG4HighPtQAMC *taskQAMC20 = AddTaskPWG4HighPtQAMC(prodType,2,0);
+  //  AliPWG4HighPtQAMC *taskQAMC10 = AddTaskPWG4HighPtQAMC(prodType,1,0);
+  //  AliPWG4HighPtQAMC *taskQAMC20 = AddTaskPWG4HighPtQAMC(prodType,2,0);
   AliPWG4HighPtQAMC *taskQAMC70 = AddTaskPWG4HighPtQAMC(prodType,7,0);
+  AliPWG4HighPtQAMC *taskQAMC70 = AddTaskPWG4HighPtQAMC(prodType,7,1);
 }
 
 AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC(char *prodType = "LHC10e14", Int_t trackType = 0, Int_t cuts =0)
@@ -45,6 +46,7 @@ AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC(char *prodType = "LHC10e14", Int_t trac
   //CREATE THE  CUTS -----------------------------------------------
   //Use AliESDtrackCuts
   AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
+  AliESDtrackCuts *trackCutsReject = 0x0;
   //Standard Cuts
   //Set track cuts for global tracks
   if(trackType==0 && cuts==0) {
@@ -62,6 +64,7 @@ AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC(char *prodType = "LHC10e14", Int_t trac
   if(trackType==7 && cuts==0) {
     // tight global tracks
     trackCuts = CreateTrackCutsPWG4(10041001);
+    trackCutsReject = CreateTrackCutsPWG4(1001);
   }
   if(trackType==7 && cuts==1) {
     // tight global tracks
@@ -76,8 +79,9 @@ AliPWG4HighPtQAMC* AddTaskPWG4HighPtQAMC(char *prodType = "LHC10e14", Int_t trac
   trackCuts->SetPtRange(0.15, 1e10);
   
   //Create the task
-  AliPWG4HighPtQAMC *taskPWG4QAMC = new AliPWG4HighPtQAMC(Form("AliPWG4HighPtQAMC%d",trackType));
+  AliPWG4HighPtQAMC *taskPWG4QAMC = new AliPWG4HighPtQAMC(Form("AliPWG4HighPtQAMC%d%d",trackType,cuts));
   taskPWG4QAMC->SetCuts(trackCuts);
+  taskPWG4QAMC->SetCutsReject(trackCutsReject);
   taskPWG4QAMC->SetTrackType(trackType);
   
   if(!strcmp(prodType, "LHC10e14")) taskPWG4QAMC->SetPtMax(500.);
index 3e92009..100fd70 100644 (file)
@@ -156,7 +156,8 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", Bool
   
   //CREATE THE  CUTS -----------------------------------------------
   //Use AliESDtrackCuts
- AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
+  AliESDtrackCuts *trackCuts = new AliESDtrackCuts("AliESDtrackCuts","Standard Cuts");
+  AliESDtrackCuts *trackCutsReject = 0x0;
   //Standard Cuts
   //Set track cuts for global tracks
   if(trackType==0 && cuts==0) {
@@ -174,6 +175,7 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", Bool
   if(trackType==7 && cuts==0) {
     // tight global tracks
     trackCuts = CreateTrackCutsPWG4(10041001);
+    trackCutsReject = CreateTrackCutsPWG4(1001);
   }
   if(trackType==7 && cuts==1) {
     // tight global tracks
@@ -228,10 +230,10 @@ AliPWG4HighPtSpectra* AddTaskPWG4HighPtSpectra(char *prodType = "LHC10e14", Bool
   manNeg->SetParticleCutsList(kStepMCAcceptance,mcList);
 
 
-  printf("Create task AliPWG4HighPtSpectra\n");
   AliPWG4HighPtSpectra *taskPWG4HighPtSpectra = new AliPWG4HighPtSpectra(Form("AliPWG4HighPtSpectraCent%dTrackType%dCuts%d",centClass,trackType,cuts));
   taskPWG4HighPtSpectra->SetTrackType(trackType);
   taskPWG4HighPtSpectra->SetCuts(trackCuts);
+  taskPWG4HighPtSpectra->SetCutsReject(trackCutsReject);
   taskPWG4HighPtSpectra->SetCFManagerPos(manPos); //here is set the CF manager +
   taskPWG4HighPtSpectra->SetCFManagerNeg(manNeg); //here is set the CF manager -
 
index 9082539..db77dac 100644 (file)
@@ -11,9 +11,9 @@ void AddTaskPWG4HighPtTrackQAAll(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE,
   //  AliPWG4HighPtTrackQA *taskTrackQA20cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,0);
   //  AliPWG4HighPtTrackQA *taskTrackQA21cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1);
   AliPWG4HighPtTrackQA *taskTrackQA40cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,0);
-  AliPWG4HighPtTrackQA *taskTrackQA41cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
-  AliPWG4HighPtTrackQA *taskTrackQA50cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
-  AliPWG4HighPtTrackQA *taskTrackQA60cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
+  //  AliPWG4HighPtTrackQA *taskTrackQA41cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
+  //  AliPWG4HighPtTrackQA *taskTrackQA50cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
+  //  AliPWG4HighPtTrackQA *taskTrackQA60cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
   AliPWG4HighPtTrackQA *taskTrackQA70cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0);
   AliPWG4HighPtTrackQA *taskTrackQA71cent10 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1);
 
@@ -27,9 +27,9 @@ void AddTaskPWG4HighPtTrackQAAll(char *prodType = "LHC10h",Bool_t isPbPb=kTRUE,
       //      AliPWG4HighPtTrackQA *taskTrackQA20 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,0);
       //      AliPWG4HighPtTrackQA *taskTrackQA21 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,2,1);
       AliPWG4HighPtTrackQA *taskTrackQA40 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,0);
-      AliPWG4HighPtTrackQA *taskTrackQA41 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
-      AliPWG4HighPtTrackQA *taskTrackQA50 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
-      AliPWG4HighPtTrackQA *taskTrackQA60 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
+      //      AliPWG4HighPtTrackQA *taskTrackQA41 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,4,1);
+      //      AliPWG4HighPtTrackQA *taskTrackQA50 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,5,0);
+      //      AliPWG4HighPtTrackQA *taskTrackQA60 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,6,0);
       AliPWG4HighPtTrackQA *taskTrackQA70 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,0);
       AliPWG4HighPtTrackQA *taskTrackQA71 = AddTaskPWG4HighPtTrackQA(prodType,isPbPb,iAODanalysis,cent,7,1);
     }
@@ -126,6 +126,7 @@ AliPWG4HighPtTrackQA* AddTaskPWG4HighPtTrackQA(char *prodType = "LHC10e14",Bool_
   if(trackType==7 && cuts==0) {
     // tight global tracks
     trackCuts = CreateTrackCutsPWG4(10041001);
+    trackCutsITSLoose = CreateTrackCutsPWG4(1001);
   }
   if(trackType==7 && cuts==1) {
     // tight global tracks