AliPhysics  vAN-20150822 (d56cf94)
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
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;
24 
25 namespace EMCalTriggerPtAnalysis{
26 class AliEMCalPtTaskVTrackSelection;
27 }
28 
29 namespace HighPtTracks {
30 
31 class AliReducedHighPtEvent;
32 class AliReducedPatchContainer;
33 
38 class AliReducedTrackSelectionContainer : public TObject{
39 public:
40  AliReducedTrackSelectionContainer();
41  AliReducedTrackSelectionContainer(Int_t index, EMCalTriggerPtAnalysis::AliEMCalPtTaskVTrackSelection * sel);
42  virtual ~AliReducedTrackSelectionContainer();
43 
48  void SetIndex(Int_t index) { fIndex = index; }
53  void SetTrackSelection(EMCalTriggerPtAnalysis::AliEMCalPtTaskVTrackSelection *trackSelection) { fTrackSelection = trackSelection;}
54 
59  Int_t GetIndex() const { return fIndex; }
64  EMCalTriggerPtAnalysis::AliEMCalPtTaskVTrackSelection *GetTrackSelection() const { return fTrackSelection; }
65 
66 protected:
67  Int_t fIndex;
69 
70 private:
71  AliReducedTrackSelectionContainer(AliReducedTrackSelectionContainer &);
72  AliReducedTrackSelectionContainer &operator=(AliReducedTrackSelectionContainer &);
73 
75  ClassDef(AliReducedTrackSelectionContainer, 1);
77 };
78 
83 class AliReducedHighPtEventCreator: public AliAnalysisTaskEmcal {
84 public:
85  AliReducedHighPtEventCreator();
86  AliReducedHighPtEventCreator(const char *name);
87  virtual ~AliReducedHighPtEventCreator();
88 
89  virtual void UserCreateOutputObjects();
90  virtual Bool_t Run();
91 
92  void AddVirtualTrackSelection(EMCalTriggerPtAnalysis::AliEMCalPtTaskVTrackSelection * sel, Int_t index);
97  void SetSwapTriggerThresholds(Bool_t doswap) { fSwapTriggerThresholds = doswap; }
103  void SetClusterEnergyCut(Double_t minE, Double_t maxE) {
104  fMinClusterE = minE;
105  fMaxClusterE = maxE;
106  }
112  void SetPtRange(Double_t minpt, Double_t maxpt){
113  fMinPt = minpt;
114  fMaxPt = maxpt;
115  }
121  void SetEtaRange(Double_t mineta, Double_t maxeta){
122  fMinEta = mineta;
123  fMaxEta = maxeta;
124  }
125 
130  void SetCentralityMethod(const char *centmethod){
131  fCentralityMethod = centmethod;
132  }
137  void SetMinBiasSelection(AliVEvent::EOfflineTriggerTypes minbiasbit) { fMinBiasSelection = minbiasbit; }
138 
143  void SetApplyCentralitySelection(Bool_t doApply = kTRUE) { fApplyCentralitySelection = doApply; }
144 
150  void SetCentraltityRange(Float_t mincent, Float_t maxcent) {
151  fSelectCentralityRange[0] = mincent;
152  fSelectCentralityRange[1] = maxcent;
153  }
158  void SetTriggerSetup(const char *triggersetup){
159  fTriggerSetup = triggersetup;
160  }
165  void SetBasicEventSelection(UInt_t selection) { fEventSelectionBits = selection; }
166 
172  void SetFractionOfEventsToKeep(Double_t frac){
173  if(frac < 0) fKeepFractionEvents = 0.;
174  else if(frac > 1) fKeepFractionEvents = 1.;
175  else fKeepFractionEvents = frac;
176  }
177 
178 protected:
179  Bool_t SelectEvent(AliVEvent *event) const;
180  Bool_t SelectCluster(const AliVCluster *clust) const;
181  Int_t SelectTrack(AliVTrack *track, TArrayI &cutindices) const;
182  void ConvertTriggerPatches(TClonesArray *patches, AliReducedPatchContainer *cont);
183  void FixTrackInputEvent(AliVTrack *trk);
184  Int_t GetTPCCrossedRows(const AliVTrack *trk) const;
185  void GetCellEnergies(AliVCluster *emccluster, TArrayD &energies) const;
186  TTree *fOutputTree;
187  AliReducedHighPtEvent *fOutputEvent;
188  TObjArray *fTrackSelections;
189 
190  UInt_t fEventSelectionBits;
191  Bool_t fSwapTriggerThresholds;
192  Double_t fMinClusterE;
193  Double_t fMaxClusterE;
194  Double_t fMinPt;
195  Double_t fMaxPt;
196  Double_t fMinEta;
197  Double_t fMaxEta;
198  Float_t fKeepFractionEvents;
199  Bool_t fApplyCentralitySelection;
200  TString fCentralityMethod;
201  TString fTriggerSetup;
202  Float_t fSelectCentralityRange[2]; // Range for centraltity selection
203  AliVEvent::EOfflineTriggerTypes fMinBiasSelection;
204 
205 private:
206  AliReducedHighPtEventCreator(const AliReducedHighPtEventCreator &);
207  AliReducedHighPtEventCreator &operator=(const AliReducedHighPtEventCreator &);
208 
210  ClassDef(AliReducedHighPtEventCreator, 1)
212 };
213 
214 } /* namespace HighPtTracks */
215 
216 #endif /* ALIREDUCEDHIGHPTEVENTCREATOR_H */
Int_t GetIndex(TObjArray *triggersB, Int_t trigNr, Int_t centNr)
Definition: PlotMuonQA.C:2048