AliPhysics  b555aef (b555aef)
AliV0ReaderStrange.h
Go to the documentation of this file.
1 #ifndef ALIV0READERSTRANGE_H
2 #define ALIV0READERSTRANGE_H
3 
4 #include "AliAnalysisTaskSE.h"
5 #include "AliAODv0.h"
6 #include "AliESDv0.h"
8 #include "AliV0CutsStrange.h"
9 #include "AliConvEventCuts.h"
10 #include "AliExternalTrackParam.h"
11 #include "TObject.h"
12 #include "AliMCEvent.h"
13 #include "AliESDEvent.h"
14 #include "AliKFParticle.h"
15 #include "TParticle.h"
16 #include <vector>
17 #include "AliESDpid.h"
18 #include "TF1.h"
19 #include "TRandom3.h"
20 #include "AliAnalysisManager.h"
21 #include "AliV0ParticleStrange.h"
22 
23 
24 class TRandom3;
25 class TList;
27 class TString;
28 class TClonesArray;
29 class TH1F;
30 class TH2F;
32 
33 using namespace std;
34 
36 
37  public:
38  AliV0ReaderStrange(const char *name="V0ReaderStrange");
39  virtual ~AliV0ReaderStrange(); //virtual destructor
40 
41  void UserCreateOutputObjects();
42  virtual void UserExec(Option_t *option);
43  virtual void Init();
44 
45  Bool_t ProcessEvent (AliVEvent *inputEvent, AliMCEvent *mcEvent=NULL);
46 
47  AliV0ParticleStrange *ReconstructV0(AliESDEvent *fESDEvent, AliESDv0 *fCurrentV0,Int_t currentV0Index);
48  AliV0ParticleStrange *ReconstructV0(AliAODEvent *fAODEvent, AliAODv0 *fCurrentV0,Int_t currentV0Index);
49 
50  // Return Reconstructed Gammas
51  TClonesArray* GetReconstructedV0s() {return fConversionGammas;}
52  Int_t GetNReconstructedV0s() {if(fConversionGammas){return fConversionGammas->GetEntriesFast();} else{ return 0;}}
53 
54  AliV0CutsStrange* GetV0Cuts() {return fV0Cuts;}
55  AliConvEventCuts* GetEventCuts() {return fEventCuts;}
56 // TList* GetCutHistograms() {if(fConversionCuts) {return fConversionCuts->GetCutHistograms();}
57 // return NULL;}
58  TList* GetEventCutHistograms() {if(fEventCuts) {return fEventCuts->GetCutHistograms();}
59  return NULL;}
60 
61  // Set Options
62  void SetEventCuts(const TString cut);
63  void SetEventCuts(AliConvEventCuts *cuts) {fEventCuts=cuts; return;}
64 
65  void SetV0Cuts(const TString cut);
66  void SetV0Cuts(AliV0CutsStrange *cuts) {fV0Cuts=cuts; return;}
67 
68  protected:
69  const AliExternalTrackParam* GetExternalTrackParam(AliESDv0 *fCurrentV0, Int_t &tracklabel, Int_t charge);
70 
71  Bool_t ProcessESDV0s();
72  Bool_t ProcessAODV0s();
73  Bool_t GetAODConversionGammas();
74 
75  AliConvEventCuts *fEventCuts; // Pointer to the Event Cut Selection
77  TClonesArray *fConversionGammas; // TClonesArray holding the reconstructed photons
78 
80 
81  vector<Int_t> fVectorFoundGammas; // vector with found MC labels of gammas
82 
83  private:
85  AliV0ReaderStrange &operator=(const AliV0ReaderStrange &ref);
86 
87  ClassDef(AliV0ReaderStrange, 1)
88 
89 };
90 
92  if(fEventCuts != NULL){
93  delete fEventCuts;
94  fEventCuts=NULL;
95  }
96  if(fEventCuts == NULL){
97  fEventCuts=new AliConvEventCuts("V0ReaderEventCuts","V0ReaderEventCuts");
98  fEventCuts->InitializeCutsFromCutString(cut.Data());
99  }
100 }
101 
102 inline void AliV0ReaderStrange::SetV0Cuts(const TString cut){
103  if(fV0Cuts != NULL){
104  delete fV0Cuts;
105  fV0Cuts=NULL;
106  }
107  if(fV0Cuts == NULL){
108  fV0Cuts=new AliV0CutsStrange("V0ReaderCutsStrange","V0ReaderCutsStrange");
109  fV0Cuts->InitializeCutsFromCutString(cut.Data());
110  }
111 }
112 
113 
114 
115 #endif
Int_t charge
AliConvEventCuts * fEventCuts
Definition: External.C:236
TList * GetEventCutHistograms()
void SetEventCuts(AliConvEventCuts *cuts)
void SetEventCuts(const TString cut)
void SetV0Cuts(const TString cut)
void SetV0Cuts(AliV0CutsStrange *cuts)
int Int_t
Definition: External.C:63
AliV0CutsStrange * GetV0Cuts()
Class handling all kinds of selection cuts for Gamma Conversion analysis.
const char Option_t
Definition: External.C:48
vector< Int_t > fVectorFoundGammas
AliConvEventCuts * GetEventCuts()
bool Bool_t
Definition: External.C:53
TClonesArray * GetReconstructedV0s()
AliV0CutsStrange * fV0Cuts
TClonesArray * fConversionGammas