1 /* This file is property of and copyright *
2 * ALICE Experiment at CERN, All rights reserved. *
3 * See cxx source for full Copyright notice */
5 /// @file AliAnalysisTaskGammaJet.h
6 /// @author Svein Lindal
7 /// @brief Class used to run isolation studies of conversion gamma/pions
10 #ifndef ALIANACONVISOLATION_CXX
11 #define ALIANACONVISOLATION_CXX
20 class AliAODConversionPhoton;
21 class AliAODConversionParticle;
27 class AliAnaConvIsolation : public TObject {
31 AliAnaConvIsolation();
32 AliAnaConvIsolation(Float_t coneSize, Float_t maxPtThreshold, Float_t sumPtThreshold, Float_t maxPtFraction, Float_t sumPtFraction);
33 virtual ~AliAnaConvIsolation();
36 //void CreateHistograms();
39 ///Set And get cone size
40 void SetConeSize(Float_t cs) {fConeSize = cs*cs;}
41 Float_t GetConeSize() const {return TMath::Sqrt(fConeSize);}
44 //Set and get max pt threshold
45 void SetMaxPtThreshold(Float_t cs) {fMaxPtThreshold = cs;}
46 Float_t GetPtThreshold() const {return fMaxPtThreshold;}
49 //Set and get sum pt threshold
50 void SetSumPtThreshold(Float_t cs) {fSumPtThreshold = cs;}
51 Float_t GetPtSumThreshold() const {return fSumPtThreshold;}
53 //Set and get max Pt fraction threshold
54 void SetMaxPtFraction(Float_t cs) {fMaxPtFraction = cs;}
55 Float_t GetPtFraction() const {return fMaxPtFraction;}
57 //Set and get sum pt fraction threshold
58 void SetSumPtFraction(Float_t cs) {fSumPtFraction = cs;}
59 Float_t GetPtSumFraction() const {return fSumPtFraction;}
61 //Set min pt for a particle to be counted in bg
62 void SetMinPt( Float_t minpt) {fMinPt = minpt; }
65 TF1 * GetIsolationCurve() const { return fIsoCurve; }
67 //Set function of isolation curve
68 void SetIsolationCurve(TString curve) {
69 fCurveFunction = curve;
72 Bool_t IsLeading(AliAODConversionParticle * particle, const TObjArray * tracks, const TObjArray * aodParticles);
76 //void FillHistograms(Float_t pt, Float_t ptMax, Float_t ptSum, Bool_t isolated, Int_t nTracks);
78 //Get list of histograms
79 //TList * GetHistograms() const { return fHistograms;}
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;
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);
94 ///Evaluate whether particle is isolated according to criterie
95 Bool_t EvaluateIsolationCriteria(Float_t ptSum, Float_t pt) const;
97 TF1 * fIsoCurve; ///Curve defining if particle is isolated or not
98 TString fCurveFunction; ///Funtion defining curve
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
107 // TList * fHistograms; //list of histograms
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
113 // // TH1F * fHistSumPt[2][2];
114 // // TH1F * fHistMaxPt[2][2];
116 // TH1F * fhPtCandidates[2]; //pt distribution of isolation candidates
117 // TH1F * fhTrackMult[2]; //Track multiplicity of events with / wo isolated particles
120 // Float_t fHistogramMaxPt; //Upper pt limit in histograms
123 AliAnaConvIsolation(const AliAnaConvIsolation&); // not implemented
124 AliAnaConvIsolation& operator=(const AliAnaConvIsolation&); // not implemented
125 ClassDef(AliAnaConvIsolation, 2); // example of analysis