]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGLF/totEt/AliAnalysisEtTrackMatchCorrections.cxx
add default options for kepler gpu family
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEtTrackMatchCorrections.cxx
CommitLineData
b2c10007 1
2
3#include "AliAnalysisEtTrackMatchCorrections.h"
4
5ClassImp(AliAnalysisEtTrackMatchCorrections);
6
7AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections() : TNamed("TMCorr","TMCorr")
02c62614 8 ,fChargedContr(new TF1)
9 ,fNeutralContr(new TF1)
10 ,fGammaContr(new TF1)
11 ,fSecondaryContr(new TF1)
6a152780 12 ,fRecoEff(0)
b2c10007 13 ,fMeanCharged(0)
14 ,fMeanNeutral(0)
15 ,fMeanGamma(0)
16 ,fMeanSecondary(0)
17{}
18
6a152780 19AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, const TH2F &recoEff,
b2c10007 20 Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary) : TNamed(name,name)
6a152780 21 ,fChargedContr(new TF1(chargedContr))
22 ,fNeutralContr(new TF1(neutralContr))
23 ,fGammaContr(new TF1(gammaContr))
24 ,fSecondaryContr(new TF1(secondaryContr)) ,fRecoEff(new TH2F(recoEff))
25 //,fRecoEff(0)
26 ,fMeanCharged(meanCharged)
27 ,fMeanNeutral(meanNeutral)
28 ,fMeanGamma(meanGammas)
29 ,fMeanSecondary(meanSecondary)
b2c10007 30{}
31
32//! Copy constructor
33AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const AliAnalysisEtTrackMatchCorrections &obj) : TNamed(obj)
02c62614 34 ,fChargedContr(new TF1(*(obj.fChargedContr)))
35 ,fNeutralContr(new TF1(*(obj.fNeutralContr)))
36 ,fGammaContr(new TF1(*(obj.fGammaContr)))
37 ,fSecondaryContr(new TF1(*(obj.fSecondaryContr)))
6a152780 38 ,fRecoEff(new TH2F(*(obj.fRecoEff)))
b2c10007 39 ,fMeanCharged(obj.fMeanCharged)
40 ,fMeanNeutral(obj.fMeanNeutral)
41 ,fMeanGamma(obj.fMeanGamma)
42 ,fMeanSecondary(obj.fMeanSecondary)
43
44{}
45
46//! Destructor
47AliAnalysisEtTrackMatchCorrections::~AliAnalysisEtTrackMatchCorrections()
6a152780 48{
49// delete fChargedContr;
50// delete fNeutralContr;
51// delete fGammaContr;
52// delete fSecondaryContr;
53// delete fRecoEff;
54}
b2c10007 55
56//! Assignment operator
57AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator=(const AliAnalysisEtTrackMatchCorrections &other)
58{
59 if (this != &other)
60 {
02c62614 61 *fChargedContr = *(other.fChargedContr);
62 *fNeutralContr = *(other.fNeutralContr);
63 *fGammaContr = *(other.fGammaContr);
6a152780 64 ; *fSecondaryContr = *(other.fSecondaryContr);
b2c10007 65 fMeanCharged = other.fMeanCharged;
66 fMeanNeutral = other.fMeanNeutral;
67 fMeanGamma = other.fMeanGamma;
68 fMeanSecondary = other.fMeanSecondary;
69
70 }
71 return *this;
72}
73
31c813d5 74Double_t AliAnalysisEtTrackMatchCorrections::TrackMatchingEfficiency(Float_t pT, Int_t cent) const{
6a152780 75 Double_t eff = 1.0;
43dd5a38 76 if(fRecoEff) eff = fRecoEff->GetBinContent(fRecoEff->GetXaxis()->FindBin(pT),fRecoEff->GetYaxis()->FindBin(cent));
6a152780 77 //cout <<"eff "<<eff<<endl;
43dd5a38 78 //cout <<"eff "<<eff<<" bin pT "<<fRecoEff->GetXaxis()->FindBin(pT)<<" bin centrality "<<fRecoEff->GetYaxis()->FindBin(cent)<<endl;
ac610b08 79 if(eff>1e-5){return eff;}
80 else{return 1.0;}
6a152780 81}