AliPhysics  aaf9c62 (aaf9c62)
AliReducedHighPtEventCreator.h
Go to the documentation of this file.
1 
8 #ifndef ALIREDUCEDHIGHPTEVENTCREATOR_H
9 #define ALIREDUCEDHIGHPTEVENTCREATOR_H
10 /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
11  * See cxx source for full Copyright notice */
12 
13 #include "AliAnalysisTaskEmcal.h"
14 #include "AliVEvent.h"
15 #include <TString.h>
16 
17 class TArrayI;
18 class TTree;
19 class TObjArray;
20 
21 class AliVCluster;
22 class AliVEvent;
23 class AliVParticle;
25 
26 namespace HighPtTracks {
27 
28 class AliReducedHighPtEvent;
29 class AliReducedPatchContainer;
30 
35 class AliReducedTrackSelectionContainer : public TObject{
36 public:
37  AliReducedTrackSelectionContainer();
38  AliReducedTrackSelectionContainer(Int_t index, AliEmcalTrackSelection * sel);
39  virtual ~AliReducedTrackSelectionContainer();
40 
45  void SetIndex(Int_t index) { fIndex = index; }
50  void SetTrackSelection(AliEmcalTrackSelection *trackSelection) { fTrackSelection = trackSelection;}
51 
56  Int_t GetIndex() const { return fIndex; }
61  AliEmcalTrackSelection *GetTrackSelection() const { return fTrackSelection; }
62 
63 protected:
64  Int_t fIndex;
65  AliEmcalTrackSelection *fTrackSelection;
66 
67 private:
68  AliReducedTrackSelectionContainer(AliReducedTrackSelectionContainer &);
69  AliReducedTrackSelectionContainer &operator=(AliReducedTrackSelectionContainer &);
70 
72  ClassDef(AliReducedTrackSelectionContainer, 1);
74 };
75 
80 class AliReducedHighPtEventCreator: public AliAnalysisTaskEmcal {
81 public:
82  AliReducedHighPtEventCreator();
83  AliReducedHighPtEventCreator(const char *name);
84  virtual ~AliReducedHighPtEventCreator();
85 
86  virtual void UserCreateOutputObjects();
87  virtual Bool_t Run();
88 
89  void AddVirtualTrackSelection(AliEmcalTrackSelection * sel, Int_t index);
94  void SetSwapTriggerThresholds(Bool_t doswap) { fSwapTriggerThresholds = doswap; }
100  void SetClusterEnergyCut(Double_t minE, Double_t maxE) {
101  fMinClusterE = minE;
102  fMaxClusterE = maxE;
103  }
109  void SetPtRange(Double_t minpt, Double_t maxpt){
110  fMinPt = minpt;
111  fMaxPt = maxpt;
112  }
118  void SetEtaRange(Double_t mineta, Double_t maxeta){
119  fMinEta = mineta;
120  fMaxEta = maxeta;
121  }
122 
127  void SetCentralityMethod(const char *centmethod){
128  fCentralityMethod = centmethod;
129  }
134  void SetMinBiasSelection(AliVEvent::EOfflineTriggerTypes minbiasbit) { fMinBiasSelection = minbiasbit; }
135 
140  void SetApplyCentralitySelection(Bool_t doApply = kTRUE) { fApplyCentralitySelection = doApply; }
141 
147  void SetCentraltityRange(Float_t mincent, Float_t maxcent) {
148  fSelectCentralityRange[0] = mincent;
149  fSelectCentralityRange[1] = maxcent;
150  }
155  void SetTriggerSetup(const char *triggersetup){
156  fTriggerSetup = triggersetup;
157  }
162  void SetBasicEventSelection(UInt_t selection) { fEventSelectionBits = selection; }
163 
169  void SetFractionOfEventsToKeep(Double_t frac){
170  if(frac < 0) fKeepFractionEvents = 0.;
171  else if(frac > 1) fKeepFractionEvents = 1.;
172  else fKeepFractionEvents = frac;
173  }
174 
175 protected:
176  Bool_t SelectEvent(AliVEvent *event) const;
177  Bool_t SelectCluster(const AliVCluster *clust) const;
178  Int_t SelectTrack(AliVTrack *track, TArrayI &cutindices) const;
179  void ConvertTriggerPatches(TClonesArray *patches, AliReducedPatchContainer *cont);
180  void FixTrackInputEvent(AliVTrack *trk);
181  Int_t GetTPCCrossedRows(const AliVTrack *trk) const;
182  void GetCellEnergies(AliVCluster *emccluster, TArrayD &energies) const;
183  TTree *fOutputTree;
184  AliReducedHighPtEvent *fOutputEvent;
185  TObjArray *fTrackSelections;
186 
187  UInt_t fEventSelectionBits;
188  Bool_t fSwapTriggerThresholds;
189  Double_t fMinClusterE;
190  Double_t fMaxClusterE;
191  Double_t fMinPt;
192  Double_t fMaxPt;
193  Double_t fMinEta;
194  Double_t fMaxEta;
195  Float_t fKeepFractionEvents;
196  Bool_t fApplyCentralitySelection;
197  TString fCentralityMethod;
198  TString fTriggerSetup;
199  Float_t fSelectCentralityRange[2]; // Range for centraltity selection
200  AliVEvent::EOfflineTriggerTypes fMinBiasSelection;
201 
202 private:
203  AliReducedHighPtEventCreator(const AliReducedHighPtEventCreator &);
204  AliReducedHighPtEventCreator &operator=(const AliReducedHighPtEventCreator &);
205 
207  ClassDef(AliReducedHighPtEventCreator, 1)
209 };
210 
211 } /* namespace HighPtTracks */
212 
213 #endif /* ALIREDUCEDHIGHPTEVENTCREATOR_H */
Interface for virtual track selection.
double Double_t
Definition: External.C:58
Base task in the EMCAL framework.
int Int_t
Definition: External.C:63
unsigned int UInt_t
Definition: External.C:33
float Float_t
Definition: External.C:68
Namespace for classes creating trees of events with jets.
Int_t GetIndex(TObjArray *triggersB, Int_t trigNr, Int_t centNr)
Definition: PlotMuonQA.C:2046
bool Bool_t
Definition: External.C:53