Important update of the Physics selection: the BG cut based on cluster vs tracklets...
authormfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2011 14:08:23 +0000 (14:08 +0000)
committermfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 21 Oct 2011 14:08:23 +0000 (14:08 +0000)
ANALYSIS/AliPhysicsSelection.cxx
ANALYSIS/AliPhysicsSelection.h
ANALYSIS/AliPhysicsSelectionTask.cxx
ANALYSIS/AliTriggerAnalysis.cxx
ANALYSIS/AliTriggerAnalysis.h
ANALYSIS/macros/AddTaskPhysicsSelection.C
ANALYSIS/macros/BrowseAndFillPhysicsSelectionOADB.C
OADB/COMMON/PHYSICSSELECTION/data/physicsSelection.root
PWG1/background/AliAnalysisTaskBGvsTime.cxx

index db8662f..8adcc4b 100644 (file)
@@ -134,7 +134,6 @@ AliPhysicsSelection::AliPhysicsSelection() :
   fCollTrigClasses(),
   fBGTrigClasses(),
   fTriggerAnalysis(),
-  fBackgroundIdentification(0),
 //  fHistStatisticsTokens(0),
   fHistBunchCrossing(0),
   fHistTriggerPattern(0),
@@ -206,11 +205,6 @@ AliPhysicsSelection::~AliPhysicsSelection()
     delete fHistTriggerPattern;
     fHistTriggerPattern = 0;
   }
-  if (fBackgroundIdentification)
-  { 
-    delete fBackgroundIdentification;
-    fBackgroundIdentification = 0;
-  }  
 
   if (fPSOADB)
   { 
@@ -422,12 +416,7 @@ UInt_t AliPhysicsSelection::IsCollisionCandidate(const AliESDEvent* aEsd)
   } 
   mgr->LoadBranch("AliESDHeader.");
   mgr->LoadBranch("AliESDRun.");
-  mgr->LoadBranch("AliMultiplicity.");
-  mgr->LoadBranch("AliESDFMD.");
-  mgr->LoadBranch("AliESDVZERO.");
-  mgr->LoadBranch("AliESDZDC.");
-  mgr->LoadBranch("SPDVertex.");
-  mgr->LoadBranch("PrimaryVertex.");
+
   if (fCurrentRun != aEsd->GetRunNumber()) {
     if (!Initialize(aEsd))
       AliFatal(Form("Could not initialize for run %d", aEsd->GetRunNumber()));
@@ -452,6 +441,16 @@ UInt_t AliPhysicsSelection::IsCollisionCandidate(const AliESDEvent* aEsd)
       AliFatal(Form("Invalid event type for MC: %d", esdHeader->GetEventType()));
   }
   
+  mgr->LoadBranch("AliMultiplicity.");
+//mgr->LoadBranch("AliESDFMD.");
+  mgr->LoadBranch("AliESDVZERO.");
+  mgr->LoadBranch("AliESDZDC.");
+  mgr->LoadBranch("SPDVertex.");
+  mgr->LoadBranch("PrimaryVertex.");
+  mgr->LoadBranch("TPCVertex.");
+  mgr->LoadBranch("Tracks");
+  mgr->LoadBranch("SPDPileupVertices");
+
   UInt_t accept = 0;
     
   Int_t count = fCollTrigClasses.GetEntries() + fBGTrigClasses.GetEntries();
@@ -527,9 +526,7 @@ UInt_t AliPhysicsSelection::IsCollisionCandidate(const AliESDEvent* aEsd)
 
       // Background rejection
       Bool_t bgID = kFALSE;
-      if (fBackgroundIdentification)
-        bgID = ! fBackgroundIdentification->IsSelected(const_cast<AliESDEvent*> (aEsd));
-        
+      bgID = triggerAnalysis->EvaluateTrigger(aEsd,  (AliTriggerAnalysis::Trigger) (AliTriggerAnalysis::kSPDClsVsTrkBG | AliTriggerAnalysis::kOfflineFlag)); // FIXME: temporarily, we keep both ways to validate the new one. if the external BG id is not set, it will use the new one
       
       /*Int_t ntrig = fastOROffline; // any 2 hits
       if(v0A)              ntrig += 1;
@@ -623,7 +620,8 @@ UInt_t AliPhysicsSelection::IsCollisionCandidate(const AliESDEvent* aEsd)
        if (v0A && v0C && !v0BG && (!bgID && fIsPP))
          fHistStatistics[iHistStat]->Fill(kStatV0, i);
 
-
+       if (bgID && !v0BG) 
+         fHistStatistics[iHistStat]->Fill(kStatBG, i);
 
        // FIXME: check lines below
        if ( offlineTrigger )
@@ -631,25 +629,16 @@ UInt_t AliPhysicsSelection::IsCollisionCandidate(const AliESDEvent* aEsd)
            if (!v0BG || fSkipV0)
              {
                if (!v0BG) fHistStatistics[iHistStat]->Fill(kStatOffline, i);
-      
-               if (fBackgroundIdentification && bgID && fIsPP)
-                 {
-                   AliDebug(AliLog::kDebug, "Rejecting event because of background identification");
-                   fHistStatistics[iHistStat]->Fill(kStatBG, i);
-                 }
-               else
-                 {
-                   AliDebug(AliLog::kDebug, Form("Accepted event for histograms with trigger logic %d", triggerLogic));
+               AliDebug(AliLog::kDebug, Form("Accepted event for histograms with trigger logic %d", triggerLogic));
             
-                   fHistStatistics[iHistStat]->Fill(kStatAccepted, i);
-
-                   if (aEsd->IsPileupFromSPD())
-                     fHistStatistics[iHistStat]->Fill(kStatAcceptedPileUp, i);
-
+               fHistStatistics[iHistStat]->Fill(kStatAccepted, i);
+               
+               if (aEsd->IsPileupFromSPD())
+                 fHistStatistics[iHistStat]->Fill(kStatAcceptedPileUp, i);
+               
                    // if(iHistStat == kStatIdxAll) fHistBunchCrossing->Fill(aEsd->GetBunchCrossNumber(), i); // Fill only for all (avoid double counting)
-                   if((i < fCollTrigClasses.GetEntries() || fSkipTriggerClassSelection) && (iHistStat==kStatIdxAll))
-                     accept |= singleTriggerResult; // only set for "all" (should not really matter)
-                 }
+               if((i < fCollTrigClasses.GetEntries() || fSkipTriggerClassSelection) && (iHistStat==kStatIdxAll))
+                 accept |= singleTriggerResult; // only set for "all" (should not really matter)
              }
            else
              AliDebug(AliLog::kDebug, "Rejecting event because of V0 BG flag");
@@ -1330,7 +1319,7 @@ Long64_t AliPhysicsSelection::Merge(TCollection* list)
   TObject* obj;
   
   // collections of all histograms
-  const Int_t nHists = 9;
+  const Int_t nHists = 8;
   TList collections[nHists];
 
   Int_t count = 0;
@@ -1393,8 +1382,6 @@ Long64_t AliPhysicsSelection::Merge(TCollection* list)
       collections[3].Add(entry->fHistBunchCrossing);
     if (entry->fHistTriggerPattern)
       collections[4].Add(entry->fHistTriggerPattern);
-    if (entry->fBackgroundIdentification)
-      collections[5].Add(entry->fBackgroundIdentification);
 
     count++;
   }
@@ -1441,15 +1428,7 @@ Long64_t AliPhysicsSelection::Merge(TCollection* list)
   }
   if (fHistTriggerPattern)
     fHistTriggerPattern->Merge(&collections[4]);
-  
-  if (!fBackgroundIdentification && collections[5].GetEntries() > 0)
-  {
-    fBackgroundIdentification = (AliAnalysisCuts*) collections[5].First()->Clone();
-    collections[5].RemoveAt(0);
-  }
-  if (fBackgroundIdentification)
-    fBackgroundIdentification->Merge(&collections[5]);
-  
+    
   delete iter;
 
   return count+1;
@@ -1660,17 +1639,7 @@ void AliPhysicsSelection::SaveHistograms(const char* folder)
       
       gDirectory->cd("..");
     }
-  
-  if (fBackgroundIdentification)
-    {
-      gDirectory->mkdir("background_identification");
-      gDirectory->cd("background_identification");
-      
-      fBackgroundIdentification->GetOutput()->Write();
-      
-      gDirectory->cd("..");
-    }
-  
+    
   if (folder)
     gDirectory->cd("..");
   
index f88637d..04fca84 100644 (file)
@@ -71,7 +71,7 @@ public:
   void SetSkipTriggerClassSelection(Bool_t flag = kTRUE) { fSkipTriggerClassSelection = flag; }
   void SetSkipV0(Bool_t flag=kTRUE) { AliError ("This method is deprecated! Please change the OADB configuration instead") ; fSkipV0 = flag;}
    
-  void AddBackgroundIdentification(AliAnalysisCuts* background) { fBackgroundIdentification = background; }
+  void AddBackgroundIdentification(AliAnalysisCuts* background) { AliFatal ("This method is deprecated. Please use the kSPDClsVsTrkBG tag in the OADB configuration instead"); }
     
   virtual void Print(const Option_t* option = "") const;
   virtual Long64_t Merge(TCollection* list);
@@ -119,9 +119,7 @@ protected:
   TList fBGTrigClasses;   // trigger classes identifying background events
     
   TList fTriggerAnalysis; // list of offline trigger objects (several are needed to keep the control histograms separate per trigger class)
-  
-  AliAnalysisCuts* fBackgroundIdentification; // class that performs additional background identification
-    
+      
   TH2F* fHistStatistics[2];      // how many events are cut away why {all,bin 0}
   //  TH2F* fHistStatisticsTokens;   // how many events are cut away why (new version, bins for all tokens. Only used tokens are filled)
   TH2F* fHistBunchCrossing;   // histograms of accepted bunch crossing numbers
index 813384d..ef6826a 100644 (file)
@@ -47,7 +47,8 @@ AliPhysicsSelectionTask::AliPhysicsSelectionTask(const char* opt) :
   }
   // Define input and output slots here
   DefineOutput(1, TList::Class());
-  fBranchNames = "ESD:AliESDRun.,AliESDHeader.,AliMultiplicity.,AliESDFMD.,AliESDVZERO.,AliESDZDC.,SPDVertex.,PrimaryVertex.";
+  fBranchNames = "ESD:AliESDRun.,AliESDHeader.,AliMultiplicity.,AliESDVZERO.,"
+                 "AliESDZDC.,SPDVertex.,PrimaryVertex.,TPCVertex.,Tracks,SPDPileupVertices";
   
   AliLog::SetClassDebugLevel("AliPhysicsSelectionTask", AliLog::kWarning);
 }
index c2dd10c..2f4747a 100644 (file)
@@ -62,11 +62,14 @@ AliTriggerAnalysis::AliTriggerAnalysis() :
   fZDCCutRefDeltaCorr(-2.1),
   fZDCCutSigmaSumCorr(6.0),
   fZDCCutSigmaDeltaCorr(1.2),
+  fASPDCvsTCut(65),
+  fBSPDCvsTCut(4),
   fDoFMD(kTRUE),
   fFMDLowCut(0.2),
   fFMDHitCut(0.5),
   fHistBitsSPD(0),
   fHistFiredBitsSPD(0),
+  fHistSPDClsVsTrk(0),
   fHistV0A(0),       
   fHistV0C(0),
   fHistZDC(0),    
@@ -101,6 +104,12 @@ AliTriggerAnalysis::~AliTriggerAnalysis()
     fHistFiredBitsSPD = 0;
   }
 
+  if (fHistSPDClsVsTrk)
+  {
+    delete fHistSPDClsVsTrk;
+    fHistSPDClsVsTrk = 0;
+  }
+
   if (fHistV0A)
   {
     delete fHistV0A;
@@ -181,6 +190,7 @@ void AliTriggerAnalysis::EnableHistograms()
   
   fHistBitsSPD = new TH2F("fHistBitsSPD", "SPD GFO;number of fired chips (offline);number of fired chips (hardware)", 1202, -1.5, 1200.5, 1202, -1.5, 1200.5);
   fHistFiredBitsSPD = new TH1F("fHistFiredBitsSPD", "SPD GFO Hardware;chip number;events", 1200, -0.5, 1199.5);
+  fHistSPDClsVsTrk = new TH2F("fHistSPDClsVsTrk", "SPD Clusters vs Tracklets", 300, -0.5, 2999.5, 1000, -0.5, 9999.5);
   fHistV0A = new TH1F("fHistV0A", "V0A;leading time (ns);events", 400, -100, 100);
   fHistV0C = new TH1F("fHistV0C", "V0C;leading time (ns);events", 400, -100, 100);
   fHistZDC = new TH1F("fHistZDC", "ZDC;trigger bits;events", 8, -1.5, 6.5);
@@ -220,6 +230,7 @@ const char* AliTriggerAnalysis::GetTriggerName(Trigger trigger)
     case kSPDGFOBits : str = "SPD GFO Bits"; break;
     case kSPDGFOL0 : str = "SPD GFO L0 (first layer)"; break;
     case kSPDGFOL1 : str = "SPD GFO L1 (second layer)"; break;
+    case kSPDClsVsTrkBG :  str = "Cluster vs Tracklets"; break;
     case kV0A : str = "V0 A BB"; break;
     case kV0C : str = "V0 C BB"; break;
     case kV0OR : str = "V0 OR BB"; break;
@@ -354,6 +365,13 @@ Int_t AliTriggerAnalysis::EvaluateTrigger(const AliESDEvent* aEsd, Trigger trigg
     {
       decision = SPDFiredChips(aEsd, (offline) ? 0 : 1, kFALSE, 2);
       break;
+    } 
+    case kSPDClsVsTrkBG:
+    {
+      if(!offline) 
+        AliFatal(Form("Online trigger not available for trigger %d", triggerNoFlags));
+      decision = IsSPDClusterVsTrackletBG(aEsd);
+      break;
     }
     case kV0A:
     {
@@ -812,6 +830,7 @@ void AliTriggerAnalysis::FillHistograms(const AliESDEvent* aEsd)
   V0Trigger(aEsd, kCSide, kFALSE, kTRUE);
   ZDCTDCTrigger(aEsd,kASide,kFALSE,kFALSE,kTRUE);
   ZDCTimeTrigger(aEsd,kTRUE);
+  IsSPDClusterVsTrackletBG(aEsd, kTRUE);
 
   AliESDZDC* zdcData = aEsd->GetESDZDC();
   if (zdcData)
@@ -934,6 +953,34 @@ Bool_t AliTriggerAnalysis::SPDGFOTrigger(const AliESDEvent* aEsd, Int_t origin)
   return kFALSE;
 }
 
+Bool_t AliTriggerAnalysis::IsSPDClusterVsTrackletBG(const AliESDEvent* aEsd, Bool_t fillHists){
+  //rejects BG based on the cluster vs tracklet correlation
+  // returns true if the event is BG
+  const AliMultiplicity* mult = aEsd->GetMultiplicity();
+  if (!mult){
+    AliFatal("No multiplicity object"); // TODO: Should this be fatal?
+  }
+  Int_t ntracklet = mult->GetNumberOfTracklets();
+
+  Int_t spdClusters = 0;
+  for(Int_t ilayer = 0; ilayer < 2; ilayer++){
+    spdClusters += mult->GetNumberOfITSClusters(ilayer);
+  }
+
+  if(fillHists) {
+    fHistSPDClsVsTrk->Fill(ntracklet,spdClusters);
+  }
+
+  Bool_t isCvsTOk = kFALSE;
+  Float_t limit = Float_t(fASPDCvsTCut) + Float_t(ntracklet) * fBSPDCvsTCut;  
+  if (spdClusters > limit)        isCvsTOk = kTRUE;
+  else                            isCvsTOk = kFALSE ;
+
+  return isCvsTOk;
+
+}
+  
+
 AliTriggerAnalysis::V0Decision AliTriggerAnalysis::V0Trigger(const AliESDEvent* aEsd, AliceSide side, Bool_t online, Bool_t fillHists)
 {
   // Returns the V0 trigger decision in V0A | V0C
@@ -1388,6 +1435,7 @@ Long64_t AliTriggerAnalysis::Merge(TCollection* list)
     collections[n++].Add(entry->fHistFMDSum);
     collections[n++].Add(entry->fHistBitsSPD);
     collections[n++].Add(entry->fHistFiredBitsSPD);
+    collections[n++].Add(entry->fHistSPDClsVsTrk);
 
     // merge fTriggerClasses
     TIterator* iter2 = entry->fTriggerClasses->MakeIterator();
@@ -1432,7 +1480,7 @@ Long64_t AliTriggerAnalysis::Merge(TCollection* list)
   fHistFMDSum->Merge(&collections[n++]);
   fHistBitsSPD->Merge(&collections[n++]);
   fHistFiredBitsSPD->Merge(&collections[n++]);
-  
+  fHistSPDClsVsTrk->Merge(&collections[n++]);
   delete iter;
 
   return count+1;
@@ -1474,6 +1522,7 @@ void AliTriggerAnalysis::SaveHistograms() const
   if (fHistFMDSum) fHistFMDSum->Write();
   else Printf("Cannot save fHistFMDSum");
   if (fSPDGFOEfficiency) fSPDGFOEfficiency->Write("fSPDGFOEfficiency");
+  if (fHistSPDClsVsTrk) fHistSPDClsVsTrk->Write("fHistSPDClsVsTrk");
   //  else Printf("Cannot save fSPDGFOEfficiency");
   
   fTriggerClasses->Write("fTriggerClasses", TObject::kSingleKey);
index 1898d08..8244283 100644 (file)
@@ -26,9 +26,9 @@ class AliTriggerAnalysis : public TObject
 {
   public:
     enum Trigger { kAcceptAll = 1, kMB1 = 2, kMB2, kMB3, kSPDGFO, kSPDGFOBits, kV0A, kV0C, kV0OR, kV0AND, 
-      kV0ABG, kV0CBG, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kNSD1, kMB1Prime, 
-      kSPDGFOL0, kSPDGFOL1, kZDCTDCA, kZDCTDCC, kZDCTime, kCTPV0A, kCTPV0C, kTPCLaserWarmUp, 
-      kStartOfFlags = 0x0100, kOfflineFlag = 0x8000, kOneParticle = 0x10000, kOneTrack = 0x20000}; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
+                  kV0ABG, kV0CBG, kZDC, kZDCA, kZDCC, kFMDA, kFMDC, kFPANY, kNSD1, kMB1Prime, 
+                  kSPDGFOL0, kSPDGFOL1, kZDCTDCA, kZDCTDCC, kZDCTime, kCTPV0A, kCTPV0C, kTPCLaserWarmUp, kSPDClsVsTrkBG,
+                  kStartOfFlags = 0x0100, kOfflineFlag = 0x8000, kOneParticle = 0x10000, kOneTrack = 0x20000}; // MB1, MB2, MB3 definition from ALICE-INT-2005-025
     enum AliceSide { kASide = 1, kCSide, kCentralBarrel };
     enum V0Decision { kV0Invalid = -1, kV0Empty = 0, kV0BB, kV0BG, kV0Fake };
     
@@ -55,6 +55,7 @@ class AliTriggerAnalysis : public TObject
     // some "raw" trigger functions
     Int_t SPDFiredChips(const AliESDEvent* aEsd, Int_t origin, Bool_t fillHists = kFALSE, Int_t layer = 0);
     Bool_t SPDGFOTrigger(const AliESDEvent* aEsd, Int_t origin);
+  Bool_t IsSPDClusterVsTrackletBG(const AliESDEvent* esd, Bool_t fillHists = kFALSE);
     V0Decision V0Trigger(const AliESDEvent* aEsd, AliceSide side, Bool_t online, Bool_t fillHists = kFALSE);
     Bool_t ZDCTrigger   (const AliESDEvent* aEsd, AliceSide side) const;
     Bool_t ZDCTDCTrigger(const AliESDEvent* aEsd, AliceSide side, Bool_t useZN=kTRUE, Bool_t useZP=kFALSE, Bool_t fillHists=kFALSE) const;
@@ -70,6 +71,7 @@ class AliTriggerAnalysis : public TObject
     
     void SetSPDGFOThreshhold(Int_t t) { fSPDGFOThreshold = t; }
     void SetSPDGFOEfficiency(TH1F* hist) { fSPDGFOEfficiency = hist; }
+    void SetSPDClustersVsTrackletsParameters(Float_t a, Float_t b) { fASPDCvsTCut = a; fBSPDCvsTCut =b;}
     void SetV0TimeOffset(Float_t offset) { fV0TimeOffset = offset; }
     void SetV0AdcThr(Float_t thr) { fV0AdcThr = thr; }
     void SetV0HwPars(Float_t thr, Float_t winLow, Float_t winHigh) { fV0HwAdcThr = thr; fV0HwWinLow = winLow; fV0HwWinHigh = winHigh; }
@@ -126,12 +128,18 @@ class AliTriggerAnalysis : public TObject
     Float_t fZDCCutSigmaSumCorr;    // Corrected ZDC time cut configuration
     Float_t fZDCCutSigmaDeltaCorr;  // Corrected ZDC time cut configuration
 
+    Float_t fASPDCvsTCut; // constant for the linear cut in SPD clusters vs tracklets
+    Float_t fBSPDCvsTCut; // slope for the linear cut in SPD  clusters vs tracklets
+
+
+
     Bool_t  fDoFMD;                 // If false, skips the FMD (physics selection runs much faster)
     Float_t fFMDLowCut;                    // 
     Float_t fFMDHitCut;                    // 
     
     TH2F* fHistBitsSPD;        // offline trigger bits (calculated from clusters) vs hardware trigger bits
     TH1F* fHistFiredBitsSPD;   // fired hardware bits
+    TH2F* fHistSPDClsVsTrk;    // histogram of clusters vs tracklet BG cut
     TH1F* fHistV0A;            // histograms that histogram the criterion the cut is applied on: bb triggers
     TH1F* fHistV0C;            // histograms that histogram the criterion the cut is applied on: bb triggers
     TH1F* fHistZDC;            //histograms that histogram the criterion the cut is applied on: fired bits (6 bins)
@@ -150,7 +158,7 @@ class AliTriggerAnalysis : public TObject
 
     Bool_t fTPCOnly;         // flag to set whether TPC only tracks have to be used for the offline trigger 
 
-    ClassDef(AliTriggerAnalysis, 16)
+    ClassDef(AliTriggerAnalysis, 17)
     
   private:
     AliTriggerAnalysis(const AliTriggerAnalysis&);
index 09b6273..8adc6a1 100644 (file)
@@ -1,4 +1,4 @@
-AliPhysicsSelectionTask* AddTaskPhysicsSelection(Bool_t mCAnalysisFlag = kFALSE, Bool_t withBckgndRejection = kTRUE, UInt_t computeBG = 0) 
+AliPhysicsSelectionTask* AddTaskPhysicsSelection(Bool_t mCAnalysisFlag = kFALSE, Bool_t deprecatedFlag = kTRUE, UInt_t computeBG = 0) 
 {
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
@@ -23,13 +23,14 @@ AliPhysicsSelectionTask* AddTaskPhysicsSelection(Bool_t mCAnalysisFlag = kFALSE,
   mgr->AddTask(task);
   
   AliPhysicsSelection* physSel = task->GetPhysicsSelection();
-  if (withBckgndRejection) 
-    physSel->AddBackgroundIdentification(new AliBackgroundSelection());
   if (mCAnalysisFlag)      
     physSel->SetAnalyzeMC();
   if (computeBG)
     physSel->SetComputeBG(computeBG);
 
+  if(!deprecatedFlag) 
+    AliFatal("The BG ID flag is deprecated. Please use the OADB to configure the cuts");
+
   AliAnalysisDataContainer *cinput0 = mgr->GetCommonInputContainer();
   AliAnalysisDataContainer *coutput1 = mgr->CreateContainer("cstatsout",
                 TList::Class(),
index 10647a6..c7cbecd 100644 (file)
@@ -143,14 +143,14 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC09d10e->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1C-ABCE-NOPF-ALL","C",0);
   oadbLHC09d10e->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL","E",0);  
   oadbLHC09d10e->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC09d10e->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC09d10e->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC09d10e->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1B-ABCE-NOPF-MUON","B",1);
   oadbLHC09d10e->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1A-ABCE-NOPF-MUON","A",1);
   oadbLHC09d10e->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1C-ABCE-NOPF-MUON","C",1);
   oadbLHC09d10e->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON","E",1);
   oadbLHC09d10e->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC09d10e->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC09d10e->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC09d10e, 104065,118555);
   oadbContPS->AppendObject(oadbLHC09d10e->Clone(), 118562,127711);
@@ -162,14 +162,14 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1C-ABCE-NOPF-ALL","C",0);
   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL","E",0);  
   oadbLHC10cV0Bug->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || CTPV0A || CTPV0C");
-  oadbLHC10cV0Bug->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10cV0Bug->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10cV0Bug->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1B-ABCE-NOPF-MUON","B",1);
   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1A-ABCE-NOPF-MUON","A",1);
   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1C-ABCE-NOPF-MUON","C",1);
   oadbLHC10cV0Bug->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON","E",1);
   oadbLHC10cV0Bug->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || CTPV0A || CTPV0C");                                         
-  oadbLHC10cV0Bug->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10cV0Bug->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
 
   oadbContPS->AppendObject(oadbLHC10cV0Bug, 118556,118561);
   
@@ -180,19 +180,19 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10e1->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10e1->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e1->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10e1->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10e1->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10e1->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e1->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbLHC10e1->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
   oadbLHC10e1->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
   oadbLHC10e1->SetHardwareTrigger         ( 2,"SPDGFO >= 1 || V0A || V0C");                      
-  oadbLHC10e1->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e1->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10e1, 127712,127718);
 
@@ -203,14 +203,14 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10e2->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1C-ABCE-NOPF-ALL","C",0);
   oadbLHC10e2->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALL","E",0);  
   oadbLHC10e2->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10e2->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e2->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10e2->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1B-ABCE-NOPF-MUON","B",1);
   oadbLHC10e2->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1A-ABCE-NOPF-MUON","A",1);
   oadbLHC10e2->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1C-ABCE-NOPF-MUON","C",1);
   oadbLHC10e2->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-MUON","E",1);
   oadbLHC10e2->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10e2->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e2->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10e2, 127719,127730);
 
@@ -220,19 +220,19 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10e3->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10e3->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e3->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10e3->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10e3->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10e3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbLHC10e3->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
   oadbLHC10e3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
   oadbLHC10e3->SetHardwareTrigger         ( 2,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10e3->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10e3->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10e3, 127813,130850);
 
@@ -243,19 +243,19 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10f1->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10f1->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f1->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10f1->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10f1->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10f1->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f1->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbLHC10f1->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
   oadbLHC10f1->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
   oadbLHC10f1->SetHardwareTrigger         ( 2,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10f1->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f1->SetOfflineTrigger          ( 2,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10f1, 133004,134690);
 
@@ -265,13 +265,13 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCINT5,"+CINT5-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10f2->SetHardwareTrigger         ( 0,"V0A || V0C");
-  oadbLHC10f2->SetOfflineTrigger          ( 0,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f2->SetOfflineTrigger          ( 0,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10f2->AddCollisionTriggerClass   ( AliVEvent::kCMUS5,"+CMUS5-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCMUS5,"+CMUS5-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10f2->AddBGTriggerClass          ( AliVEvent::kCMUS5,"+CMUS5-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10f2->SetHardwareTrigger         ( 1,"V0A || V0C");                                         
-  oadbLHC10f2->SetOfflineTrigger          ( 1,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f2->SetOfflineTrigger          ( 1,"(V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10f2, 134776,134931);
 
@@ -281,19 +281,19 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10f3->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10f3->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f3->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10f3->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10f3->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10f3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbLHC10f3->AddCollisionTriggerClass   ( AliVEvent::kHighMult,"+CSH1-B-NOPF-ALLNOTRD","B",2);
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-AC-NOPF-ALLNOTRD","AC",2);
   oadbLHC10f3->AddBGTriggerClass          ( AliVEvent::kHighMult,"+CSH1-E-NOPF-ALLNOTRD","E",2);
   oadbLHC10f3->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10f3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10f3->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10f3, 135029,135029);
 
@@ -304,13 +304,13 @@ void BrowseAndFillPhysicsSelectionOADB(Bool_t fill = kFALSE) {
   oadbLHC10g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-AC-NOPF-ALLNOTRD","AC",0);
   oadbLHC10g->AddBGTriggerClass          ( AliVEvent::kMB,"+CINT1-E-NOPF-ALLNOTRD","E",0);  
   oadbLHC10g->SetHardwareTrigger         ( 0,"SPDGFO >= 1 || V0A || V0C");
-  oadbLHC10g->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10g->SetOfflineTrigger          ( 0,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
   
   oadbLHC10g->AddCollisionTriggerClass   ( AliVEvent::kMUON,"+CMUS1-B-NOPF-ALLNOTRD","B",1);
   oadbLHC10g->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-AC-NOPF-ALLNOTRD","AC",1);
   oadbLHC10g->AddBGTriggerClass          ( AliVEvent::kMUON,"+CMUS1-E-NOPF-ALLNOTRD","E",1);
   oadbLHC10g->SetHardwareTrigger         ( 1,"SPDGFO >= 1 || V0A || V0C");                                         
-  oadbLHC10g->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp");
+  oadbLHC10g->SetOfflineTrigger          ( 1,"(SPDGFO >= 1 || V0A || V0C) && !V0ABG && !V0CBG  && !TPCLaserWarmUp && !SPDClsVsTrkBG");
     
   oadbContPS->AppendObject(oadbLHC10g, 135654,136377);
 
index f25a311..1447977 100644 (file)
Binary files a/OADB/COMMON/PHYSICSSELECTION/data/physicsSelection.root and b/OADB/COMMON/PHYSICSSELECTION/data/physicsSelection.root differ
index bb667f3..ec849ec 100644 (file)
@@ -36,7 +36,6 @@
 #include "AliMultiplicity.h"
 #include "AliLog.h"
 #include "AliAnalysisManager.h"
-#include "AliBackgroundSelection.h"
 #include <iostream>
 #include "TFile.h"
 #include "TCanvas.h"
@@ -161,9 +160,9 @@ void AliAnalysisTaskBGvsTime::UserCreateOutputObjects()
 
   fPhysicsSelection->SetSkipTriggerClassSelection();// 
 
-  AliBackgroundSelection * bg = new AliBackgroundSelection();
-  bg->SetDeltaPhiCut(10);
-  fPhysicsSelection->AddBackgroundIdentification(bg);
+  // AliBackgroundSelection * bg = new AliBackgroundSelection();
+  // bg->SetDeltaPhiCut(10);
+  // fPhysicsSelection->AddBackgroundIdentification(bg);
 
   if (fSkipV0) {
     fPhysicsSelection->SetSkipV0();