AliPhysics  master (3d17d9d)
AliPrimaryDeuteronSelector.h
Go to the documentation of this file.
1 #ifndef ALIPRIMARYDEUTERONSELECTOR_H
2 #define ALIPRIMARYDEUTERONSELECTOR_H
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliAODv0.h"
6 #include "AliESDv0.h"
7 #include "AliPrimaryDeuteronCuts.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  AliPrimaryDeuteronSelector(const char *name="DeuteronSelector");
23  //Uncopyable & operator=(const Uncopyable&);
24 
25  virtual ~AliPrimaryDeuteronSelector(); //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> GetReconstructedNegDeuteronIndex(){ return fNegDeuteronsIndex; }
37  vector <Int_t> GetReconstructedPosDeuteronIndex(){ return fPosDeuteronsIndex; }
38  AliPrimaryDeuteronCuts *GetPrimaryDeuteronCuts(){ return fDeuteronCuts; }
39  TList *GetCutHistograms(){ if(fDeuteronCuts){return fDeuteronCuts->GetCutHistograms();} return NULL;}
40  // Set Options
41 
42  void SetPrimaryDeuteronCuts(const TString cut);
43  void SetPrimaryDeuteronCuts(AliPrimaryDeuteronCuts *cuts){fDeuteronCuts=cuts;}
44 
45  protected:
46  //selected electron arrays
47 
48  Bool_t ProcessESDs();
49  Bool_t ProcessAODs();
50  AliPrimaryDeuteronCuts *fDeuteronCuts; // Pointer to the ConversionCut Selection
51  vector<Int_t> fPosDeuteronsIndex;
52  vector<Int_t> fNegDeuteronsIndex;
54 
55  private:
56  AliPrimaryDeuteronSelector (const AliPrimaryDeuteronSelector&); // not implemented
57  AliPrimaryDeuteronSelector & operator=(const AliPrimaryDeuteronSelector&); // not implemented
58 
59 
60 
61  ClassDef(AliPrimaryDeuteronSelector,2)
62  };
63 
65  if(fDeuteronCuts != NULL){
66  delete fDeuteronCuts;
67  fDeuteronCuts=NULL;
68  }
69  if(fDeuteronCuts == NULL){
70  fDeuteronCuts=new AliPrimaryDeuteronCuts("DeuteronCuts","DeuteronCuts");
71  fDeuteronCuts->InitializeCutsFromCutString(cut.Data());
72  }
73 }
74 
75 
76 #endif
vector< Int_t > GetReconstructedPosDeuteronIndex()
Definition: External.C:236
vector< Int_t > GetReconstructedNegDeuteronIndex()
void SetPrimaryDeuteronCuts(AliPrimaryDeuteronCuts *cuts)
void SetPrimaryDeuteronCuts(const TString cut)
AliPrimaryDeuteronCuts * GetPrimaryDeuteronCuts()
const char Option_t
Definition: External.C:48
AliPrimaryDeuteronCuts * fDeuteronCuts
bool Bool_t
Definition: External.C:53