]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/GammaConv/AliAnaConvIsolation.h
remaining histograms with hardcoded binning parameters fixed
[u/mrichter/AliRoot.git] / PWGGA / GammaConv / AliAnaConvIsolation.h
CommitLineData
a65a7e70 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
5/// @file AliAnalysisTaskGammaJet.h
6/// @author Svein Lindal
7/// @brief Class used to run isolation studies of conversion gamma/pions
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>
18class TH2F;
19class TH1F;
20class AliAODConversionPhoton;
21class AliAODConversionParticle;
22class TClonesArray;
23class TList;
24
25using namespace std;
26
27class AliAnaConvIsolation : public TObject {
28
29public:
30
31 AliAnaConvIsolation();
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
39 ///Set And get cone size
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
94 ///Evaluate whether particle is isolated according to criterie
95 Bool_t EvaluateIsolationCriteria(Float_t ptSum, Float_t pt) const;
96
97 TF1 * fIsoCurve; ///Curve defining if particle is isolated or not
98 TString fCurveFunction; ///Funtion defining curve
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