updated physics selection: the ZDC cut time windows are configured from the OADB
authormfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Apr 2011 14:58:07 +0000 (14:58 +0000)
committermfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Apr 2011 14:58:07 +0000 (14:58 +0000)
ANALYSIS/ANALYSISaliceLinkDef.h
ANALYSIS/AliPhysicsSelection.cxx
ANALYSIS/AliPhysicsSelection.h
ANALYSIS/CMakelibANALYSISalice.pkg
ANALYSIS/macros/BrowseAndFillPhysicsSelectionOADB.C

index bd4b8e0..1a2042c 100644 (file)
@@ -40,6 +40,8 @@
 #pragma link C++ class AliMultiInputEventHandler+;
 #pragma link C++ class AliAnalysisTaskPIDResponse+;
 #pragma link C++ class AliPIDResponseInputHandler+;
+#pragma link C++ class AliHEPDataParser+;
+
 
 #ifdef WITHXML
 #pragma link C++ class AliTagAnalysis+;
index 0668fd1..ef9306e 100644 (file)
 #include <AliOADBContainer.h>
 #include "AliOADBPhysicsSelection.h"
 #include "AliOADBFillingScheme.h"
+#include "AliOADBTriggerAnalysis.h"
 
 ClassImp(AliPhysicsSelection)
 
@@ -154,6 +155,7 @@ AliPhysicsSelection::AliPhysicsSelection() :
   fIsPP(kFALSE),
   fPSOADB(0),
   fFillOADB(0),
+  fTriggerOADB(0),
   fRegexp(0),
   fCashedTokens(0)
   
@@ -214,14 +216,18 @@ AliPhysicsSelection::~AliPhysicsSelection()
   if (fPSOADB)
   { 
     delete fPSOADB;
-    fPSOADB = 0;
-    
+    fPSOADB = 0;    
   }  
   if (fFillOADB)
   { 
     delete fFillOADB;
     fFillOADB = 0;
   }  
+  if (fTriggerOADB)
+  { 
+    delete fTriggerOADB;
+    fTriggerOADB = 0;
+  }  
   
   if (fRegexp)
   {
@@ -884,6 +890,13 @@ Bool_t AliPhysicsSelection::Initialize(Int_t runNumber)
     fFillOADB = (AliOADBFillingScheme*) fillContainer->GetObject(runNumber, "Default");
     if (!fFillOADB) AliFatal(Form("Cannot find  filling scheme object for run %d", runNumber));
   }
+  if(!fTriggerOADB || !fUsingCustomClasses) { // if it's already set and custom class is required, we use the one provided by the user
+    AliOADBContainer * triggerContainer = (AliOADBContainer*) foadb->Get("trigAnalysis");
+    if (!triggerContainer) AliFatal("Cannot fetch OADB container for trigger analysis");
+    fTriggerOADB = (AliOADBTriggerAnalysis*) triggerContainer->GetObject(runNumber, "Default");
+    fTriggerOADB->Print();
+    if (!fTriggerOADB) AliFatal(Form("Cannot find  trigger analysis object for run %d", runNumber));
+  }
 
   
   if(!fBin0CallBack) 
@@ -977,6 +990,10 @@ Bool_t AliPhysicsSelection::Initialize(Int_t runNumber)
       triggerAnalysis->EnableHistograms();
       triggerAnalysis->SetSPDGFOThreshhold(1);
       triggerAnalysis->SetDoFMD(kFALSE);
+      triggerAnalysis->SetCorrZDCCutParams(fTriggerOADB->GetZDCCutRefSumCorr(),
+                                          fTriggerOADB->GetZDCCutRefDeltaCorr(), 
+                                          fTriggerOADB->GetZDCCutSigmaSumCorr(),
+                                          fTriggerOADB->GetZDCCutSigmaDeltaCorr());
       fTriggerAnalysis.Add(triggerAnalysis);
     }
 
index 3cdae30..296bc4f 100644 (file)
@@ -32,6 +32,7 @@ class AliTriggerAnalysis;
 class AliAnalysisTaskSE;
 class AliOADBPhysicsSelection ;
 class AliOADBFillingScheme    ;
+class AliOADBTriggerAnalysis;
 class TPRegexp;
 
 class AliPhysicsSelection : public AliAnalysisCuts
@@ -80,9 +81,10 @@ public:
   const TList* GetBGTriggerClasses()        const { return &fBGTrigClasses; }
   void AddCollisionTriggerClass(const char* className);
   void AddBGTriggerClass(const char* className)       ;
-  void SetCustomOADBObjects(AliOADBPhysicsSelection * oadbPS, AliOADBFillingScheme * oadbFS) { fPSOADB = oadbPS; fFillOADB = oadbFS; fUsingCustomClasses = kTRUE;}
+  void SetCustomOADBObjects(AliOADBPhysicsSelection * oadbPS, AliOADBFillingScheme * oadbFS, AliOADBTriggerAnalysis * oadbTA = 0) { fPSOADB = oadbPS; fFillOADB = oadbFS; fTriggerOADB = oadbTA; fUsingCustomClasses = kTRUE;}
   const AliOADBPhysicsSelection * GetOADBPhysicsSelection() const {return fPSOADB;  }
   const AliOADBFillingScheme    * GetOADBFillingScheme()    const {return fFillOADB;}
+  const AliOADBTriggerAnalysis  * GetOADBTriggerAnalysis()  const {return fTriggerOADB;}
 
   const Int_t GetBGStatOffset() const { return fBGStatOffset; }
 
@@ -149,11 +151,12 @@ protected:
 
   AliOADBPhysicsSelection * fPSOADB; // Physics selection OADB object
   AliOADBFillingScheme    * fFillOADB; // Filling scheme OADB object
+  AliOADBTriggerAnalysis  * fTriggerOADB; // Trigger analysis OADB object
 
   TPRegexp* fRegexp; //! regular expression for trigger tokens
   TList* fCashedTokens; //! trigger token lookup list
 
-  ClassDef(AliPhysicsSelection, 13)
+  ClassDef(AliPhysicsSelection, 14)
     
     private:
   AliPhysicsSelection(const AliPhysicsSelection&);
index b66caa3..ded0335 100644 (file)
@@ -25,7 +25,7 @@
 # SHLIBS - Shared Libraries and objects for linking (Executables only)           #
 #--------------------------------------------------------------------------------#
 
-set ( SRCS     AliAnalysisTaskSE.cxx AliAnalysisTaskME.cxx AliAnalysisTaskESDfilter.cxx AliAnalysisTaskMCParticleFilter.cxx AliKineTrackCuts.cxx AliESDtrackCuts.cxx  AliESDpidCuts.cxx AliESDv0Cuts.cxx AliEventPoolOTF.cxx AliEventPoolLoop.cxx AliEventPoolSparse.cxx AliAnalysisTaskTagCreator.cxx AliMultiEventInputHandler.cxx AliTriggerAnalysis.cxx AliPhysicsSelection.cxx AliBackgroundSelection.cxx AliPhysicsSelectionTask.cxx AliAnalysisFilter.cxx AliAnalysisCuts.cxx AliCollisionNormalization.cxx AliCollisionNormalizationTask.cxx AliCentralitySelectionTask.cxx AliAnalysisTaskAODCentralityMaker.cxx AliEPSelectionTask.cxx AliAnalysisTaskStat.cxx AliMultiInputEventHandler.cxx AliESDv0KineCuts.cxx AliAnalysisTaskPIDResponse.cxx AliPIDResponseInputHandler.cxx)
+set ( SRCS     AliAnalysisTaskSE.cxx AliAnalysisTaskME.cxx AliAnalysisTaskESDfilter.cxx AliAnalysisTaskMCParticleFilter.cxx AliKineTrackCuts.cxx AliESDtrackCuts.cxx  AliESDpidCuts.cxx AliESDv0Cuts.cxx AliEventPoolOTF.cxx AliEventPoolLoop.cxx AliEventPoolSparse.cxx AliAnalysisTaskTagCreator.cxx AliMultiEventInputHandler.cxx AliTriggerAnalysis.cxx AliPhysicsSelection.cxx AliBackgroundSelection.cxx AliPhysicsSelectionTask.cxx AliAnalysisFilter.cxx AliAnalysisCuts.cxx AliCollisionNormalization.cxx AliCollisionNormalizationTask.cxx AliCentralitySelectionTask.cxx AliAnalysisTaskAODCentralityMaker.cxx AliEPSelectionTask.cxx AliAnalysisTaskStat.cxx AliMultiInputEventHandler.cxx AliESDv0KineCuts.cxx AliAnalysisTaskPIDResponse.cxx AliPIDResponseInputHandler.cxx AliHEPDataParser.cxx)
 
 if( ROOTHASALIEN STREQUAL "yes")
        
index a15a9dd..c2804be 100644 (file)
@@ -27,6 +27,7 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
 
   AliOADBContainer * oadbContPS = new AliOADBContainer("physSel");
   AliOADBContainer * oadbContFillingScheme = new AliOADBContainer("fillScheme");
+  AliOADBContainer * oadbContTriggerAnalysis = new AliOADBContainer("trigAnalysis");
 
   // Defaults
   AliOADBFillingScheme * fsDefault = new AliOADBFillingScheme("Default");
@@ -88,6 +89,11 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
 
   oadbContPS->AddDefaultObject(oadbDefaultPbPb);
 
+  // Trigger analysis defaults
+  AliOADBTriggerAnalysis * oadbTrigAnalysis = new AliOADBTriggerAnalysis("Default");
+  oadbTrigAnalysis->SetZDCCorrParameters(-66.5, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AddDefaultObject(oadbTrigAnalysis);  
+
   // ----- 2009 - 2010 -----
   // ----- proton-proton -----
   // LHC09d+LHC10(abcde)
@@ -533,12 +539,47 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbContPS->AppendObject(oadbLHC10h9, 139328,139517);
 
 
+  // Trigger Analysis: ZDC timing cuts
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC1 = new AliOADBTriggerAnalysis("ZDCCut1");
+  oadbTrigAnalysisZDC1->SetZDCCorrParameters(-66.9, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC1, 136851, 137848);  
+
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC2 = new AliOADBTriggerAnalysis("ZDCCut2");
+  oadbTrigAnalysisZDC2->SetZDCCorrParameters(-66.2, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC2, 138125, 138275);  
+
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC3 = new AliOADBTriggerAnalysis("ZDCCut3");
+  oadbTrigAnalysisZDC3->SetZDCCorrParameters(-65.4, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC3, 138359, 138469);  
+
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC4 = new AliOADBTriggerAnalysis("ZDCCut4");
+  oadbTrigAnalysisZDC4->SetZDCCorrParameters(-67.7, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC4, 138533, 138742);  
+
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC5 = new AliOADBTriggerAnalysis("ZDCCut5");
+  oadbTrigAnalysisZDC5->SetZDCCorrParameters(-67.2, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC5, 138795, 138872);  
+
+  AliOADBTriggerAnalysis * oadbTrigAnalysisZDC6 = new AliOADBTriggerAnalysis("ZDCCut6");
+  oadbTrigAnalysisZDC6->SetZDCCorrParameters(-65.6, -2.1, 4*0.58, 4*0.5);
+  oadbContTriggerAnalysis->AppendObject(oadbTrigAnalysisZDC6, 138924, 139517);  
+
+  oadbTrigAnalysisZDC1->Print();
+  oadbTrigAnalysisZDC2->Print();
+  oadbTrigAnalysisZDC3->Print();
+  oadbTrigAnalysisZDC4->Print();
+  oadbTrigAnalysisZDC5->Print();
+  oadbTrigAnalysisZDC6->Print();
+
+
   // ----- 2011 -----
   // ----- proton-proton -----
 
 
   oadbContPS->WriteToFile(oadbfilename.Data());
   oadbContFillingScheme->WriteToFile(oadbfilename.Data());
+  oadbContTriggerAnalysis->WriteToFile(oadbfilename.Data());
 
   TFile * fopen = new TFile (oadbfilename); 
   new TBrowser;