AliPhysics  d565ceb (d565ceb)
AliPrimaryPionSelector.h
Go to the documentation of this file.
1 #ifndef ALIPRIMARYPIONSELECTOR_H
2 #define ALIPRIMARYPIONSELECTOR_H
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliAODv0.h"
6 #include "AliESDv0.h"
7 #include "AliPrimaryPionCuts.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  AliPrimaryPionSelector(const char *name="PionSelector");
23  //Uncopyable & operator=(const Uncopyable&);
24 
25  virtual ~AliPrimaryPionSelector(); //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> GetReconstructedNegPionIndex(){ return fNegPionsIndex; }
37  vector <Int_t> GetReconstructedPosPionIndex(){ return fPosPionsIndex; }
38  AliPrimaryPionCuts *GetPrimaryPionCuts(){ return fPionCuts; }
39  TList *GetCutHistograms(){ if(fPionCuts){return fPionCuts->GetCutHistograms();} return NULL;}
40  // Set Options
41 
42  void SetPrimaryPionCuts(const TString cut);
43  void SetPrimaryPionCuts(AliPrimaryPionCuts *cuts){fPionCuts=cuts;}
44 
45  protected:
46  //selected electron arrays
47 
48  Bool_t ProcessESDs();
49  AliPrimaryPionCuts *fPionCuts; // Pointer to the ConversionCut Selection
50  vector<Int_t> fPosPionsIndex;
51  vector<Int_t> fNegPionsIndex;
53 
54  private:
55  AliPrimaryPionSelector (const AliPrimaryPionSelector&); // not implemented
56  AliPrimaryPionSelector & operator=(const AliPrimaryPionSelector&); // not implemented
57 
58 
59 
60  ClassDef(AliPrimaryPionSelector,1)
61  };
62 
64  if(fPionCuts != NULL){
65  delete fPionCuts;
66  fPionCuts=NULL;
67  }
68  if(fPionCuts == NULL){
69  fPionCuts=new AliPrimaryPionCuts("ElectronCuts","ElectronCuts");
70  fPionCuts->InitializeCutsFromCutString(cut.Data());
71  }
72 }
73 
74 
75 #endif
vector< Int_t > GetReconstructedPosPionIndex()
Definition: External.C:236
void SetPrimaryPionCuts(const TString cut)
AliPrimaryPionCuts * GetPrimaryPionCuts()
const char Option_t
Definition: External.C:48
bool Bool_t
Definition: External.C:53
vector< Int_t > GetReconstructedNegPionIndex()
AliPrimaryPionCuts * fPionCuts
void SetPrimaryPionCuts(AliPrimaryPionCuts *cuts)