Adding the possibility to use or not the online/offline trigger in the data analysis
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Feb 2010 16:15:31 +0000 (16:15 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Feb 2010 16:15:31 +0000 (16:15 +0000)
PWG2/SPECTRA/AliAnalysisTaskProtons.cxx
PWG2/SPECTRA/macros/configProtonAnalysis.C
PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C
PWG2/SPECTRA/macros/configProtonCorrectionAnalysisTask.C
PWG2/SPECTRA/macros/drawProtonResults.C
PWG2/SPECTRA/macros/runProtonAnalysis.C
PWG2/SPECTRA/macros/runProtonAnalysisQA.C

index c70914f..771ebc4 100644 (file)
@@ -135,10 +135,46 @@ void AliAnalysisTaskProtons::Exec(Option_t *) {
     }
     
     fHistEventStats->Fill(1);
-    //online trigger
-    if(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->IsEventTriggered(fESD,dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetTriggerMode())) {
+    if(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->IsOnlineTriggerUsed()) {
+      //online trigger
+      if(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->IsEventTriggered(fESD,dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetTriggerMode())) {
+       fHistEventStats->Fill(2);
+       AliDebug(1,Form("Fired trigger class: %s",fESD->GetFiredTriggerClasses().Data()));
+       
+       //offline trigger
+       if(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->IsOfflineTriggerUsed()) {
+         AliPhysicsSelection *gPhysicselection = dynamic_cast<AliPhysicsSelection *>(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetPhysicsSelectionObject());
+         if(gPhysicselection->IsCollisionCandidate(fESD)) {
+           fHistEventStats->Fill(3);
+           AliDebug(1,Form("Fired trigger class: %s",fESD->GetFiredTriggerClasses().Data()));
+           //Reconstructed vertex
+           const AliESDVertex *vertex = dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVertex(fESD,dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetAnalysisMode(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVxMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVyMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVzMax());
+           fHistEventStats->Fill(4);
+           if(vertex) {
+             AliDebug(1,Form("Proton ESD analysis task: There are %d tracks in this event",fESD->GetNumberOfTracks()));
+             fProtonAnalysis->Analyze(fESD,vertex);
+             fHistEventStats->Fill(5);
+           }//reconstructed vertex
+         }//offline trigger
+       }//usage of the offline trigger
+       else {
+         fHistEventStats->Fill(3);
+         AliDebug(1,Form("Fired trigger class: %s",fESD->GetFiredTriggerClasses().Data()));
+         //Reconstructed vertex
+         const AliESDVertex *vertex = dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVertex(fESD,dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetAnalysisMode(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVxMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVyMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVzMax());
+         fHistEventStats->Fill(4);
+         if(vertex) {
+           AliDebug(1,Form("Proton ESD analysis task: There are %d tracks in this event",fESD->GetNumberOfTracks()));
+           fProtonAnalysis->Analyze(fESD,vertex);
+           fHistEventStats->Fill(5);
+           }//reconstructed vertex
+       }//offline trigger not used
+      }//triggered event - online
+    }//online trigger used
+    else {
       fHistEventStats->Fill(2);
       AliDebug(1,Form("Fired trigger class: %s",fESD->GetFiredTriggerClasses().Data()));
+      
       //offline trigger
       if(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->IsOfflineTriggerUsed()) {
        AliPhysicsSelection *gPhysicselection = dynamic_cast<AliPhysicsSelection *>(dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetPhysicsSelectionObject());
@@ -155,7 +191,19 @@ void AliAnalysisTaskProtons::Exec(Option_t *) {
          }//reconstructed vertex
        }//offline trigger
       }//usage of the offline trigger
-    }//triggered event - online
+      else {
+       fHistEventStats->Fill(3);
+       AliDebug(1,Form("Fired trigger class: %s",fESD->GetFiredTriggerClasses().Data()));
+       //Reconstructed vertex
+       const AliESDVertex *vertex = dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVertex(fESD,dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetAnalysisMode(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVxMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVyMax(),dynamic_cast<AliProtonAnalysisBase*>(fProtonAnalysis->GetProtonAnalysisBaseObject())->GetVzMax());
+       fHistEventStats->Fill(4);
+       if(vertex) {
+         AliDebug(1,Form("Proton ESD analysis task: There are %d tracks in this event",fESD->GetNumberOfTracks()));
+         fProtonAnalysis->Analyze(fESD,vertex);
+         fHistEventStats->Fill(5);
+       }//reconstructed vertex
+      }//offline trigger not used
+    }//online trigger not used
   }//ESD analysis              
   
   else if(gAnalysisLevel == "AOD") {
index 8aee882..43e6252 100644 (file)
@@ -3,10 +3,11 @@ AliProtonAnalysis *GetProtonAnalysisObject(const char* analysisLevel = "ESD",
                                           Bool_t kAnalyzeMC = kTRUE,
                                           const char* esdAnalysisType = "Hybrid", 
                                           const char* pidMode = "Bayesian",
-                                          Bool_t kUseOnlineTrigger = kFALSE) {
+                                          Bool_t kUseOnlineTrigger = kFALSE,
+                                          Bool_t kUseOfflineTrigger = kFALSE) {
   gROOT->LoadMacro("configProtonAnalysisBaseObject.C");  
   //Function to setup the AliProtonAnalysis object and return it
-  AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,kAnalyzeMC,esdAnalysisType,pidMode,kUseOnlineTrigger);
+  AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,kAnalyzeMC,esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger);
 
   AliProtonAnalysis *analysis = new AliProtonAnalysis();
   analysis->SetBaseAnalysis(baseAnalysis);
@@ -32,10 +33,11 @@ AliProtonAnalysis *GetProtonAnalysisObject(const char* analysisLevel = "ESD",
 AliProtonQAAnalysis *GetProtonQAAnalysisObject(const char* analysisLevel = "ESD",
                                               const char* esdAnalysisType = "Hybrid",
                                               const char* pidMode = "Bayesian",
-                                              Bool_t kUseOnlineTrigger = kFALSE) {
+                                              Bool_t kUseOnlineTrigger = kFALSE,
+                                              Bool_t kUseOfflineTrigger = kFALSE) {
   gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
   //Function to setup the AliProtonQAAnalysis object and return it
-  AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,kTRUE,esdAnalysisType,pidMode,kUseOnlineTrigger);
+  AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(analysisLevel,kTRUE,esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger);
 
   AliProtonQAAnalysis *analysis = new AliProtonQAAnalysis();
   analysis->SetBaseAnalysis(baseAnalysis);
index 3af0c15..87f6b50 100644 (file)
@@ -2,7 +2,8 @@ AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "
                                                   Bool_t kAnalyzeMC = kTRUE,\r
                                                   const char* esdAnalysisType = "Hybrid",\r
                                                   const char* pidMode = "Bayesian",\r
-                                                  Bool_t kUseOnlineTrigger = kFALSE) {\r
+                                                  Bool_t kUseOnlineTrigger = kFALSE,\r
+                                                  Bool_t kUseOfflineTrigger = kFALSE) {\r
   //Function to setup the AliProtonAnalysisBase object and return it\r
   AliProtonAnalysisBase *baseAnalysis = new AliProtonAnalysisBase();\r
   //baseAnalysis->SetDebugMode();\r
@@ -14,7 +15,7 @@ AliProtonAnalysisBase *GetProtonAnalysisBaseObject(const char* analysisLevel = "
     if(kUseOnlineTrigger) baseAnalysis->UseOnlineTrigger();\r
 \r
     //use the offline trigger\r
-    baseAnalysis->OfflineTriggerInit();\r
+    if(kUseOfflineTrigger) baseAnalysis->OfflineTriggerInit();\r
 \r
     baseAnalysis->SetMinTPCClusters(80);\r
     baseAnalysis->SetMaxChi2PerTPCCluster(3.5);\r
index 9160233..4b370b6 100644 (file)
@@ -3,7 +3,7 @@ AliProtonCorrectionAnalysisTask* GetAliProtonCorrectionAnalysisTask(const char*
   AliProtonCorrectionAnalysisTask *taskProtons = new AliProtonCorrectionAnalysisTask("TaskProtonsProtonCorrection");
   if(fIsOn_AliProtonAbsorptionCorrection||fIsOn_AliProtonFeedDownAnalysis||fIsOn_AliProtonSpectraCorrection) {
     gROOT->LoadMacro("$ALICE_ROOT/PWG2/SPECTRA/macros/configProtonAnalysisBaseObject.C"); 
-    AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,kTRUE,analysisType,pidMode);
+    AliProtonAnalysisBase *baseAnalysis = GetProtonAnalysisBaseObject(mode,kTRUE,analysisType,pidMode,kTRUE,kTRUE);
     taskProtons->SetBaseAnalysis(baseAnalysis);
   }    
   else
index ffffd29..6457f3d 100644 (file)
@@ -1125,13 +1125,12 @@ void drawMCvsData(const char* analysisOutputMC,
   gDataProtonsITSClustersPass->SetTitle("Protons");
   gDataProtonsITSClustersPass->GetYaxis()->SetTitle("Data/MC");
   gDataProtonsITSClustersPass->Draw("E"); 
-  //gMCProtonsITSClustersPass->Draw("ESAME"); 
   c1->cd(2); 
   gDataAntiProtonsITSClustersPass->Divide(gMCAntiProtonsITSClustersPass);
   gDataAntiProtonsITSClustersPass->SetTitle("Antiprotons");
   gDataAntiProtonsITSClustersPass->GetYaxis()->SetTitle("Data/MC");
   gDataAntiProtonsITSClustersPass->Draw("E"); 
-  //gMCAntiProtonsITSClustersPass->Draw("ESAME"); 
+  c1->SaveAs("NClustersITS.gif");
 
   TCanvas *c3 = new TCanvas("c3","TPC clusters",0,200,600,400);
   c3->SetFillColor(10); c3->SetHighLightColor(10);
@@ -1140,13 +1139,12 @@ void drawMCvsData(const char* analysisOutputMC,
   gDataProtonsTPCClustersPass->SetTitle("Protons");
   gDataProtonsTPCClustersPass->GetYaxis()->SetTitle("Data/MC");
   gDataProtonsTPCClustersPass->Draw("E");
-  //gMCProtonsTPCClustersPass->Draw("ESAME");
   c3->cd(2); 
   gDataAntiProtonsTPCClustersPass->Divide(gMCAntiProtonsTPCClustersPass);
   gDataAntiProtonsTPCClustersPass->SetTitle("Antirotons");
   gDataAntiProtonsTPCClustersPass->GetYaxis()->SetTitle("Data/MC");
   gDataAntiProtonsTPCClustersPass->Draw("E");
-  //gMCAntiProtonsTPCClustersPass->Draw("ESAME");
+  c3->SaveAs("NClustersTPC.gif");
 
   TCanvas *c4 = new TCanvas("c4","chi^2 per TPC cluster",0,300,600,400);
   c4->SetFillColor(10); c4->SetHighLightColor(10);
@@ -1156,13 +1154,12 @@ void drawMCvsData(const char* analysisOutputMC,
   gDataProtonsChi2PerClusterTPCPass->SetTitle("Protons");
   gDataProtonsChi2PerClusterTPCPass->GetYaxis()->SetTitle("Data/MC");
   gDataProtonsChi2PerClusterTPCPass->Draw("E"); 
-  //gMCProtonsChi2PerClusterTPCPass->Draw("ESAME"); 
   c4->cd(2); 
   gDataAntiProtonsChi2PerClusterTPCPass->Divide(gMCAntiProtonsChi2PerClusterTPCPass);
   gDataAntiProtonsChi2PerClusterTPCPass->SetTitle("Antirotons");
   gDataAntiProtonsChi2PerClusterTPCPass->GetYaxis()->SetTitle("Data/MC");
   gDataAntiProtonsChi2PerClusterTPCPass->Draw("E"); 
-  //gMCAntiProtonsChi2PerClusterTPCPass->Draw("ESAME"); 
+  c4->SaveAs("Chi2PerTPCCluster.gif");
 
   if(gMCProtonsExtCov11Pass->GetEntries() != 0) {
     TCanvas *c5 = new TCanvas("c5","Cov11",0,400,600,400);
@@ -1173,13 +1170,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsExtCov11Pass->SetTitle("Protons");
     gDataProtonsExtCov11Pass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsExtCov11Pass->Draw("E"); 
-    //gMCProtonsExtCov11Pass->Draw("ESAME"); 
     c5->cd(2); 
     gDataAntiProtonsExtCov11Pass->Divide(gMCAntiProtonsExtCov11Pass);
     gDataAntiProtonsExtCov11Pass->SetTitle("Antiprotons");
     gDataAntiProtonsExtCov11Pass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsExtCov11Pass->Draw("E"); 
-    //gMCAntiProtonsExtCov11Pass->Draw("ESAME"); 
+    c5->SaveAs("cov11.gif");
   }
 
   if(gMCProtonsExtCov22Pass->GetEntries() != 0) {
@@ -1191,13 +1187,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsExtCov22Pass->SetTitle("Protons");
     gDataProtonsExtCov22Pass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsExtCov22Pass->Draw("E"); 
-    //gMCProtonsExtCov22Pass->Draw("ESAME"); 
     c6->cd(2); 
     gDataAntiProtonsExtCov22Pass->Divide(gMCAntiProtonsExtCov22Pass);
     gDataAntiProtonsExtCov22Pass->SetTitle("Antiprotons");
     gDataAntiProtonsExtCov22Pass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsExtCov22Pass->Draw("E"); 
-    //gMCAntiProtonsExtCov22Pass->Draw("ESAME"); 
+    c6->SaveAs("cov22.gif");
   }
 
   if(gMCProtonsExtCov33Pass->GetEntries() != 0) {
@@ -1209,13 +1204,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsExtCov33Pass->SetTitle("Protons");
     gDataProtonsExtCov33Pass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsExtCov33Pass->Draw("E"); 
-    //gMCProtonsExtCov33Pass->Draw("ESAME"); 
     c7->cd(2); 
     gDataAntiProtonsExtCov33Pass->Divide(gMCAntiProtonsExtCov33Pass);
     gDataAntiProtonsExtCov33Pass->SetTitle("Antiprotons");
     gDataAntiProtonsExtCov33Pass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsExtCov33Pass->Draw("E"); 
-    //gMCAntiProtonsExtCov33Pass->Draw("ESAME"); 
+    c7->SaveAs("cov33.gif");
   }
 
   if(gMCProtonsExtCov44Pass->GetEntries() != 0) {
@@ -1227,13 +1221,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsExtCov44Pass->SetTitle("Protons");
     gDataProtonsExtCov44Pass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsExtCov44Pass->Draw("E"); 
-    //gMCProtonsExtCov44Pass->Draw("ESAME"); 
     c8->cd(2); 
     gDataAntiProtonsExtCov44Pass->Divide(gMCAntiProtonsExtCov44Pass);
     gDataAntiProtonsExtCov44Pass->SetTitle("Antiprotons");
     gDataAntiProtonsExtCov44Pass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsExtCov44Pass->Draw("E"); 
-    //gMCAntiProtonsExtCov44Pass->Draw("ESAME"); 
+    c8->SaveAs("cov44.gif");
   }
 
   if(gMCProtonsExtCov55Pass->GetEntries() != 0) {
@@ -1245,13 +1238,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsExtCov55Pass->SetTitle("Protons");
     gDataProtonsExtCov55Pass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsExtCov55Pass->Draw("E"); 
-    //gMCProtonsExtCov55Pass->Draw("ESAME"); 
     c9->cd(2); 
     gDataAntiProtonsExtCov55Pass->Divide(gMCAntiProtonsExtCov55Pass);
     gDataAntiProtonsExtCov55Pass->SetTitle("Antiprotons");
     gDataAntiProtonsExtCov55Pass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsExtCov55Pass->Draw("E"); 
-    //gMCAntiProtonsExtCov55Pass->Draw("ESAME"); 
+    c9->SaveAs("cov55.gif");
   }
 
   if(gMCProtonsDCAXYPass->GetEntries() != 0) {
@@ -1263,13 +1255,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsDCAXYPass->SetTitle("Protons");
     gDataProtonsDCAXYPass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsDCAXYPass->Draw("E"); 
-    //gMCProtonsDCAXYPass->Draw("ESAME"); 
     c12->cd(2); 
     gDataAntiProtonsDCAXYPass->Divide(gMCAntiProtonsDCAXYPass);
     gDataAntiProtonsDCAXYPass->SetTitle("Antiprotons");
     gDataAntiProtonsDCAXYPass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsDCAXYPass->Draw("E"); 
-    //gMCAntiProtonsDCAXYPass->Draw("ESAME"); 
+    c12->SaveAs("dcaXY.gif");
   }
 
   if(gMCProtonsDCAZPass->GetEntries() != 0) {
@@ -1281,13 +1272,12 @@ void drawMCvsData(const char* analysisOutputMC,
     gDataProtonsDCAZPass->SetTitle("Protons");
     gDataProtonsDCAZPass->GetYaxis()->SetTitle("Data/MC");
     gDataProtonsDCAZPass->Draw("E"); 
-    //gMCProtonsDCAZPass->Draw("ESAME"); 
     c14->cd(2); 
     gDataAntiProtonsDCAZPass->Divide(gMCAntiProtonsDCAZPass);
     gDataAntiProtonsDCAZPass->SetTitle("Antiprotons");
     gDataAntiProtonsDCAZPass->GetYaxis()->SetTitle("Data/MC");
     gDataAntiProtonsDCAZPass->Draw("E"); 
-    //gMCAntiProtonsDCAZPass->Draw("ESAME"); 
+    c14->SaveAs("dcaZ.gif");
   }
 
   TCanvas *c16 = new TCanvas("c16","TPC clusters (dE/dx)",1200,300,600,400);
@@ -1298,12 +1288,11 @@ void drawMCvsData(const char* analysisOutputMC,
   gDataProtonsNumberOfTPCdEdxPointsPass->SetTitle("Protons");
   gDataProtonsNumberOfTPCdEdxPointsPass->GetYaxis()->SetTitle("Data/MC");
   gDataProtonsNumberOfTPCdEdxPointsPass->Draw("E"); 
-  //gMCProtonsNumberOfTPCdEdxPointsPass->Draw("ESAME"); 
   c16->cd(2); 
   gDataAntiProtonsNumberOfTPCdEdxPointsPass->Divide(gMCAntiProtonsNumberOfTPCdEdxPointsPass);
   gDataAntiProtonsNumberOfTPCdEdxPointsPass->SetTitle("Antiprotons");
   gDataAntiProtonsNumberOfTPCdEdxPointsPass->GetYaxis()->SetTitle("Data/MC");
   gDataAntiProtonsNumberOfTPCdEdxPointsPass->Draw("E"); 
-  //gMCAntiProtonsNumberOfTPCdEdxPointsPass->Draw("ESAME"); 
+  c16->SaveAs("NClustersTPCdEdx.gif");
 }
 
index 17250a7..0eae932 100644 (file)
@@ -1,7 +1,8 @@
 void runProtonAnalysis(Bool_t kAnalyzeMC = kTRUE,
                       const char* esdAnalysisType = "Hybrid",
                       const char* pidMode = "Sigma1",
-                      Bool_t kUseOnlineTrigger = kTRUE) {
+                      Bool_t kUseOnlineTrigger = kTRUE,
+                      Bool_t kUseOfflineTrigger = kTRUE) {
   //Macro to run the proton analysis tested for local, proof & GRID.
   //Local: Takes six arguments, the analysis mode, a boolean to define the ESD
   //       analysis of MC data, the type of the ESD analysis, the PID mode, 
@@ -35,11 +36,12 @@ void runProtonAnalysis(Bool_t kAnalyzeMC = kTRUE,
   /*runLocal("ESD", 
           kAnalyzeMC,
           esdAnalysisType,
-          pidMode, kUseOnlineTrigger,
+          pidMode, kUseOnlineTrigger,kUseOfflineTrigger,
           "/home/pchrist/ALICE/Baryons/Data/104070");*/
-  //runInteractive("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger, "tag.xml");
-  //runBatch("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger, "wn.xml");  
-  runProof("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger,
+  //runInteractive("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger, kUseOfflineTrigger, "tag.xml");
+  //runBatch("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger, kUseOfflineTrigger, "wn.xml");  
+  runProof("ESD", kAnalyzeMC, esdAnalysisType, pidMode, kUseOnlineTrigger, 
+          kUseOfflineTrigger,
           250000,0,"/COMMON/COMMON/LHC09d10_run104792-3#esdTree");
 
   timer.Stop();
@@ -52,6 +54,7 @@ void runLocal(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              const char* path = "/home/pchrist/ALICE/Alien/Tutorial/November2007/Tags") {
   TString smode = mode;
   TString outputFilename = "Protons."; outputFilename += mode;
@@ -98,7 +101,8 @@ void runLocal(const char* mode = "ESD",
   AliProtonAnalysis *analysis = GetProtonAnalysisObject(mode,kAnalyzeMC,
                                                        analysisType,
                                                        pidMode,
-                                                       kUseOnlineTrigger);
+                                                       kUseOnlineTrigger,
+                                                       kUseOfflineTrigger);
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisManager");
@@ -141,6 +145,7 @@ void runInteractive(const char* mode = "ESD",
                    const char* analysisType = 0x0,
                    const char* pidMode = 0x0,
                    Bool_t kUseOnlineTrigger = kTRUE,
+                   Bool_t kUseOfflineTrigger = kTRUE,
                    const char* collectionName = "tag.xml") {
   gSystem->Load("libProofPlayer.so");
 
@@ -195,7 +200,8 @@ void runInteractive(const char* mode = "ESD",
   AliProtonAnalysis *analysis = GetProtonAnalysisObject(mode,kAnalyzeMC,
                                                        analysisType,
                                                        pidMode,
-                                                       kUseOnlineTrigger);
+                                                       kUseOnlineTrigger,
+                                                       kUseOfflineTrigger);
   //runNumberForOfflineTtrigger);
   //____________________________________________//
   // Make the analysis manager
@@ -239,6 +245,7 @@ void runBatch(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              const char *collectionfile = "wn.xml") {
   TString smode = mode;
   TString outputFilename = "Protons."; outputFilename += mode;
@@ -283,7 +290,8 @@ void runBatch(const char* mode = "ESD",
   AliProtonAnalysis *analysis = GetProtonAnalysisObject(mode,kAnalyzeMC,
                                                        analysisType,
                                                        pidMode,
-                                                       kUseOnlineTrigger);
+                                                       kUseOnlineTrigger,
+                                                       kUseOfflineTrigger);
   //runNumberForOfflineTtrigger);
   //____________________________________________//
   // Make the analysis manager
@@ -327,6 +335,7 @@ void runProof(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              Int_t stats = 0, Int_t startingPoint = 0,
              const char* dataset = 0x0) {  
   TString smode = mode;
@@ -362,7 +371,8 @@ void runProof(const char* mode = "ESD",
   AliProtonAnalysis *analysis = GetProtonAnalysisObject(mode,kAnalyzeMC,
                                                        analysisType,
                                                        pidMode,
-                                                       kUseOnlineTrigger);
+                                                       kUseOnlineTrigger,
+                                                       kUseOfflineTrigger);
   //____________________________________________//
 
   //____________________________________________//
index c6cebfc..0c3876e 100644 (file)
@@ -1,6 +1,7 @@
 void runProtonAnalysisQA(const char* esdAnalysisType = "Hybrid",
                         const char* pidMode = "Sigma1",
-                        Bool_t kUseOnlineTrigger = kTRUE) {
+                        Bool_t kUseOnlineTrigger = kTRUE,
+                        Bool_t kUseOfflineTrigger = kTRUE) {
   //Macro to run the proton QA analysis tested for local, proof & GRID.
   //Local: Takes four arguments, the analysis mode, the type of the ESD 
   //       analysis, the PID mode and the path where the tag and ESD or 
@@ -23,10 +24,10 @@ void runProtonAnalysisQA(const char* esdAnalysisType = "Hybrid",
   TStopwatch timer;
   timer.Start();
   
-  //runLocal("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,"/home/pchrist/ALICE/Baryons/QA/Local");
-  runProof("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,100000,"/COMMON/COMMON/LHC09d10_run104792-3#esdTree");
-  //runInteractive("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,"wn.xml");
-  //runBatch("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,"wn.xml");
+  //runLocal("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger,"/home/pchrist/ALICE/Baryons/QA/Local");
+  runProof("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger,100000,"/COMMON/COMMON/LHC09d10_run104792-3#esdTree");
+  //runInteractive("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger,"wn.xml");
+  //runBatch("ESD",esdAnalysisType,pidMode,kUseOnlineTrigger,kUseOfflineTrigger,"wn.xml");
 
   timer.Stop();
   timer.Print();
@@ -37,6 +38,7 @@ void runLocal(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              const char* path = 0x0) {
   TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
   outputFilename1 += "."; outputFilename1 += pidMode; 
@@ -90,7 +92,8 @@ void runLocal(const char* mode = "ESD",
   AliProtonQAAnalysis *analysis = GetProtonQAAnalysisObject(mode,
                                                            analysisType,
                                                            pidMode,
-                                                           kUseOnlineTrigger);
+                                                           kUseOnlineTrigger,
+                                                           kUseOfflineTrigger);
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisQAManager");
@@ -169,6 +172,7 @@ void runInteractive(const char* mode = "ESD",
                    const char* analysisType = 0x0,
                    const char* pidMode = 0x0,
                    Bool_t kUseOnlineTrigger = kTRUE,
+                   Bool_t kUseOfflineTrigger = kTRUE,
                    const char* collectionName = "tag.xml") {
   TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
   outputFilename1 += "."; outputFilename1 += pidMode; 
@@ -225,7 +229,8 @@ void runInteractive(const char* mode = "ESD",
   AliProtonQAAnalysis *analysis = GetProtonQAAnalysisObject(mode,
                                                            analysisType,
                                                            pidMode,
-                                                           kUseOnlineTrigger);
+                                                           kUseOnlineTrigger,
+                                                           kUseOfflineTrigger);
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisQAManager");
@@ -304,6 +309,7 @@ void runBatch(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              const char *collectionfile = "wn.xml") {
   TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
   outputFilename1 += "."; outputFilename1 += pidMode; 
@@ -352,7 +358,8 @@ void runBatch(const char* mode = "ESD",
   AliProtonQAAnalysis *analysis = GetProtonQAAnalysisObject(mode,
                                                            analysisType,
                                                            pidMode,
-                                                           kUseOnlineTrigger);
+                                                           kUseOnlineTrigger,
+                                                           kUseOfflineTrigger);
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisQAManager");
@@ -431,6 +438,7 @@ void runProof(const char* mode = "ESD",
              const char* analysisType = 0x0,
              const char* pidMode = 0x0,
              Bool_t kUseOnlineTrigger = kTRUE,
+             Bool_t kUseOfflineTrigger = kTRUE,
              Int_t stats = 0, 
              const char* dataset = 0x0) {
   TString outputFilename1 = "Protons.QA."; outputFilename1 += analysisType;
@@ -476,7 +484,8 @@ void runProof(const char* mode = "ESD",
   AliProtonQAAnalysis *analysis = GetProtonQAAnalysisObject(mode,
                                                            analysisType,
                                                            pidMode,
-                                                           kUseOnlineTrigger);
+                                                           kUseOnlineTrigger,
+                                                           kUseOfflineTrigger);
   //____________________________________________//
   // Make the analysis manager
   AliAnalysisManager *mgr = new AliAnalysisManager("protonAnalysisQAManager");