AliPhysics  aaf9c62 (aaf9c62)
AliAnaConvIsolation.h
Go to the documentation of this file.
1 /* This file is property of and copyright *
2  * ALICE Experiment at CERN, All rights reserved. *
3  * See cxx source for full Copyright notice */
4 
8 
9 
10 #ifndef ALIANACONVISOLATION_CXX
11 #define ALIANACONVISOLATION_CXX
12 
13 #include <iostream>
14 #include "TObject.h"
15 #include "Rtypes.h"
16 #include "TF1.h"
17 #include <TMath.h>
18 class TH2F;
19 class TH1F;
22 class TClonesArray;
23 class TList;
24 
25 using namespace std;
26 
27 class AliAnaConvIsolation : public TObject {
28 
29 public:
30 
32  AliAnaConvIsolation(Float_t coneSize, Float_t maxPtThreshold, Float_t sumPtThreshold, Float_t maxPtFraction, Float_t sumPtFraction);
33  virtual ~AliAnaConvIsolation();
34 
35 
36  //void CreateHistograms();
37 
38 
40  void SetConeSize(Float_t cs) {fConeSize = cs*cs;}
41  Float_t GetConeSize() const {return TMath::Sqrt(fConeSize);}
42 
43 
44  //Set and get max pt threshold
45  void SetMaxPtThreshold(Float_t cs) {fMaxPtThreshold = cs;}
46  Float_t GetPtThreshold() const {return fMaxPtThreshold;}
47 
48 
49  //Set and get sum pt threshold
50  void SetSumPtThreshold(Float_t cs) {fSumPtThreshold = cs;}
51  Float_t GetPtSumThreshold() const {return fSumPtThreshold;}
52 
53  //Set and get max Pt fraction threshold
54  void SetMaxPtFraction(Float_t cs) {fMaxPtFraction = cs;}
55  Float_t GetPtFraction() const {return fMaxPtFraction;}
56 
57  //Set and get sum pt fraction threshold
58  void SetSumPtFraction(Float_t cs) {fSumPtFraction = cs;}
59  Float_t GetPtSumFraction() const {return fSumPtFraction;}
60 
61  //Set min pt for a particle to be counted in bg
62  void SetMinPt( Float_t minpt) {fMinPt = minpt; }
63 
64  //Get isolation curve
65  TF1 * GetIsolationCurve() const { return fIsoCurve; }
66 
67  //Set function of isolation curve
68  void SetIsolationCurve(TString curve) {
69  fCurveFunction = curve;
70  }
71 
72  Bool_t IsLeading(AliAODConversionParticle * particle, const TObjArray * tracks, const TObjArray * aodParticles);
73 
74 
75  //Fill histograms
76  //void FillHistograms(Float_t pt, Float_t ptMax, Float_t ptSum, Bool_t isolated, Int_t nTracks);
77 
78  //Get list of histograms
79  //TList * GetHistograms() const { return fHistograms;}
80 
81  //Is particle isolated
82  Bool_t IsIsolated( const AliAODConversionPhoton * const particle, const TClonesArray * const tracks, Bool_t &leading);
83  Bool_t IsIsolated( AliAODConversionPhoton * const particle, const TClonesArray * const tracks, const Int_t nSpawn, const Int_t * const spawn, Bool_t &leading );
84  Int_t IsLeading(const AliAODConversionParticle * particle, const TObjArray * tracks, const Int_t * tIDs) const;
85 
86  //Is eta - phi distance smaller than conesize ?
87  Bool_t IsInCone(Float_t dEta, Float_t dPhi, const Float_t coneSize) const {
88  dPhi = (TMath::Abs(dPhi) < TMath::Pi()) ? dPhi : TMath::TwoPi() - TMath::Abs(dPhi);
89  return ( (dEta*dEta + dPhi*dPhi) < coneSize);
90  }
91 
92  private:
93 
95  Bool_t EvaluateIsolationCriteria(Float_t ptSum, Float_t pt) const;
96 
97  TF1 * fIsoCurve;
99 
100  Float_t fConeSize; //Size of isolation cone
101  Float_t fMinPt; //min pt for bg particles
102  Float_t fMaxPtThreshold; //max pt threshold
103  Float_t fSumPtThreshold; //sum pt threhold
104  Float_t fMaxPtFraction; //max pt fraction threshold
105  Float_t fSumPtFraction; //sum pt fraction threshold
106 
107  // TList * fHistograms; //list of histograms
108 
109  // TH2F * fhMaxPtInCone[2]; //histogram of max pt in cone
110  // TH2F * fhSumPtInCone[2]; //histogram of sum pt in cone
111  // TH2F * fhSumPtVsMaxPt[2];//sum pt vs max pt
112 
113  // // TH1F * fHistSumPt[2][2];
114  // // TH1F * fHistMaxPt[2][2];
115 
116  // TH1F * fhPtCandidates[2]; //pt distribution of isolation candidates
117  // TH1F * fhTrackMult[2]; //Track multiplicity of events with / wo isolated particles
118 
119 
120  // Float_t fHistogramMaxPt; //Upper pt limit in histograms
121 
122 
123  AliAnaConvIsolation(const AliAnaConvIsolation&); // not implemented
124  AliAnaConvIsolation& operator=(const AliAnaConvIsolation&); // not implemented
125  ClassDef(AliAnaConvIsolation, 2); // example of analysis
126 };
127 
128 #endif
TString fCurveFunction
Curve defining if particle is isolated or not.
Definition: External.C:236
void SetConeSize(Float_t cs)
Set And get cone size.
void SetMaxPtThreshold(Float_t cs)
Float_t GetConeSize() const
Float_t GetPtSumThreshold() const
Float_t GetPtSumFraction() const
int Int_t
Definition: External.C:63
float Float_t
Definition: External.C:68
void SetMinPt(Float_t minpt)
TF1 * GetIsolationCurve() const
void SetSumPtFraction(Float_t cs)
Float_t fConeSize
Funtion defining curve.
Float_t GetPtThreshold() const
void SetSumPtThreshold(Float_t cs)
void SetIsolationCurve(TString curve)
void SetMaxPtFraction(Float_t cs)
Bool_t IsInCone(Float_t dEta, Float_t dPhi, const Float_t coneSize) const
Float_t GetPtFraction() const
bool Bool_t
Definition: External.C:53