AliPhysics  9b6b435 (9b6b435)
AliDalitzElectronSelector.h
Go to the documentation of this file.
1 #ifndef ALIDALITZELECTRONSELECTOR_H
2 #define ALIDALITZELECTRONSELECTOR_H
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliAODv0.h"
6 #include "AliESDv0.h"
8 #include "AliExternalTrackParam.h"
9 
10 class TRandom3;
11 class TList;
12 class TString;
13 class TH1F;
14 class TH2F;
15 
16 using namespace std;
17 
19 
20  public:
21 
22  AliDalitzElectronSelector(const char *name="ElectronSelector");
23  //Uncopyable & operator=(const Uncopyable&);
24 
25  virtual ~AliDalitzElectronSelector(); //virtual destructor
26  void UserCreateOutputObjects();
27 
28  virtual void UserExec(Option_t *option);
29  virtual void Terminate(Option_t *);
30  virtual void Init();
31 
32  Bool_t ProcessEvent(AliVEvent *inputEvent,AliMCEvent *mcEvent=NULL);
33  Bool_t IsEventSelected(){return fEventIsSelected;}
34 
35  // Return selected electron/positron array
36  vector <Int_t> GetReconstructedElectronsIndex(){ return fElectronsIndex; }
37  vector <Int_t> GetReconstructedPositronsIndex(){ return fPositronsIndex; }
38  AliDalitzElectronCuts *GetDalitzElectronCuts(){ return fElectronCuts; }
39  TList *GetCutHistograms(){ if(fElectronCuts){return fElectronCuts->GetCutHistograms();} return NULL;}
40  // Set Options
41 
42  void SetDalitzElectronCuts(const TString cut);
43  void SetDalitzElectronCuts(AliDalitzElectronCuts *cuts){fElectronCuts=cuts;}
44 
45  protected:
46  //selected electron arrays
47  Bool_t ProcessESDs();
48  AliDalitzElectronCuts *fElectronCuts; // Pointer to the ConversionCut Selection
49  vector<Int_t> fPositronsIndex;
50  vector<Int_t> fElectronsIndex;
52 
53  private:
54  AliDalitzElectronSelector (const AliDalitzElectronSelector&); // not implemented
55  AliDalitzElectronSelector & operator=(const AliDalitzElectronSelector&); // not implemented
56  ClassDef(AliDalitzElectronSelector,1)
57 };
58 
60  if(fElectronCuts != NULL){
61  delete fElectronCuts;
62  fElectronCuts=NULL;
63  }
64  if(fElectronCuts == NULL){
65  fElectronCuts=new AliDalitzElectronCuts("ElectronCuts","ElectronCuts");
66  fElectronCuts->InitializeCutsFromCutString(cut.Data());
67  }
68 }
69 
70 
71 #endif
Definition: External.C:236
vector< Int_t > GetReconstructedPositronsIndex()
vector< Int_t > GetReconstructedElectronsIndex()
void SetDalitzElectronCuts(AliDalitzElectronCuts *cuts)
AliDalitzElectronCuts * GetDalitzElectronCuts()
const char Option_t
Definition: External.C:48
AliDalitzElectronCuts * fElectronCuts
bool Bool_t
Definition: External.C:53
void SetDalitzElectronCuts(const TString cut)