ROOT logo
#ifndef ALIBACKGROUNDSELECTION_H
#define ALIBACKGROUNDSELECTION_H
 

// Select events which are not flagged as backgroud
// Author Michele Floris
// michele.floris@cern.ch

#include "AliAnalysisCuts.h"
#include "AliLog.h"

class TList;
class TH2F;
class TH1F;
class TCollection;


class AliBackgroundSelection : public AliAnalysisCuts
{
public:
  // Inherited methods
  AliBackgroundSelection();
  AliBackgroundSelection(const char* name, const char* title);
  AliBackgroundSelection(const AliBackgroundSelection& obj);  
  virtual ~AliBackgroundSelection();
  virtual Bool_t IsSelected(TObject* const obj);
  virtual Bool_t IsSelected(TList*  ) {AliFatal("Not implemented");return 0;}
  virtual void   Init();
  virtual TList * GetOutput() {return fOutputHist;}

  // Helper Methods
  void BookClusterVsTrackletsHisto(const char * trigger_name);
  void BookDeltaPhiHisto(const char * trigger_name);

  TH2F * GetClusterVsTrackletsHisto(const char * trigger_name);
  TH2F * GetClusterVsTrackletsHistoAccepted(const char * trigger_name);
  const char *  GetClusterVsTrackletsHistoName(const char * trigger_name);
  const char *  GetClusterVsTrackletsHistoNameAccepted(const char * trigger_name);

  TH1F * GetDeltaPhiHisto(const char * trigger_name);
  TH1F * GetDeltaPhiHistoAccepted(const char * trigger_name);
  const char *  GetDeltaPhiHistoName(const char * trigger_name);
  const char *  GetDeltaPhiHistoNameAccepted(const char * trigger_name);

  Long64_t Merge(TCollection* const list);
  // Cuts Setters & Getters
  void SetCutParameters(Float_t a,Float_t b) {fACut = a; fBCut =b;}
  void SetDeltaPhiCut(Float_t cut) { fDeltaPhiCut = cut;}
  Float_t GetCutParameterA() const {return fACut;}
  Float_t GetCutParameterB() const {return fBCut;}
  Float_t GetDeltaPhiCut()   const {return fDeltaPhiCut;}

  // TODO: implement cut on global vertex DCA?

private:
  TList * fOutputHist; // contains 2 histo Cluster vs Tracklets and delta phiper trigger type (all and accepted)
  Float_t fACut; // Cut on y = ax + b in the Cluster Vs Tracklets correlation. This is the "a" parameter of the cut
  Float_t fBCut; // Cut on y = ax + b in the Cluster Vs Tracklets correlation. This is the "b" parameter of the cut
  Float_t fDeltaPhiCut; // events with vertex from vertexer Z and DeltaPhi>fDeltaPhiCut are rejected

  AliBackgroundSelection& operator=(const AliBackgroundSelection&);

  ClassDef(AliBackgroundSelection, 1); 
};
 
#endif
 AliBackgroundSelection.h:1
 AliBackgroundSelection.h:2
 AliBackgroundSelection.h:3
 AliBackgroundSelection.h:4
 AliBackgroundSelection.h:5
 AliBackgroundSelection.h:6
 AliBackgroundSelection.h:7
 AliBackgroundSelection.h:8
 AliBackgroundSelection.h:9
 AliBackgroundSelection.h:10
 AliBackgroundSelection.h:11
 AliBackgroundSelection.h:12
 AliBackgroundSelection.h:13
 AliBackgroundSelection.h:14
 AliBackgroundSelection.h:15
 AliBackgroundSelection.h:16
 AliBackgroundSelection.h:17
 AliBackgroundSelection.h:18
 AliBackgroundSelection.h:19
 AliBackgroundSelection.h:20
 AliBackgroundSelection.h:21
 AliBackgroundSelection.h:22
 AliBackgroundSelection.h:23
 AliBackgroundSelection.h:24
 AliBackgroundSelection.h:25
 AliBackgroundSelection.h:26
 AliBackgroundSelection.h:27
 AliBackgroundSelection.h:28
 AliBackgroundSelection.h:29
 AliBackgroundSelection.h:30
 AliBackgroundSelection.h:31
 AliBackgroundSelection.h:32
 AliBackgroundSelection.h:33
 AliBackgroundSelection.h:34
 AliBackgroundSelection.h:35
 AliBackgroundSelection.h:36
 AliBackgroundSelection.h:37
 AliBackgroundSelection.h:38
 AliBackgroundSelection.h:39
 AliBackgroundSelection.h:40
 AliBackgroundSelection.h:41
 AliBackgroundSelection.h:42
 AliBackgroundSelection.h:43
 AliBackgroundSelection.h:44
 AliBackgroundSelection.h:45
 AliBackgroundSelection.h:46
 AliBackgroundSelection.h:47
 AliBackgroundSelection.h:48
 AliBackgroundSelection.h:49
 AliBackgroundSelection.h:50
 AliBackgroundSelection.h:51
 AliBackgroundSelection.h:52
 AliBackgroundSelection.h:53
 AliBackgroundSelection.h:54
 AliBackgroundSelection.h:55
 AliBackgroundSelection.h:56
 AliBackgroundSelection.h:57
 AliBackgroundSelection.h:58
 AliBackgroundSelection.h:59
 AliBackgroundSelection.h:60
 AliBackgroundSelection.h:61
 AliBackgroundSelection.h:62
 AliBackgroundSelection.h:63
 AliBackgroundSelection.h:64
 AliBackgroundSelection.h:65
 AliBackgroundSelection.h:66