3 #include "AliAnalysisEtTrackMatchCorrections.h"
5 ClassImp(AliAnalysisEtTrackMatchCorrections);
7 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections() : TNamed("TMCorr","TMCorr")
8 ,fChargedContr(new TF1)
9 ,fNeutralContr(new TF1)
11 ,fSecondaryContr(new TF1)
17 // ,fNeutronCorrection(0)
19 //fNeutronCorrection = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
20 for(int i=0;i<20;i++){
21 fMinEtCorrection[i] = 0.0;
22 fNeutronCorrection[i] = 0.0;
23 fHadronCorrection[i] = 0.0;
24 fKaonCorrection[i] = 0.0;
25 fSecondaryCorrection[i] = 0.0;
29 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr, const TH2F &recoEff,
30 Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary) : TNamed(name,name)
31 ,fChargedContr(new TF1(chargedContr))
32 ,fNeutralContr(new TF1(neutralContr))
33 ,fGammaContr(new TF1(gammaContr))
34 ,fSecondaryContr(new TF1(secondaryContr)) ,fRecoEff(new TH2F(recoEff))
36 ,fMeanCharged(meanCharged)
37 ,fMeanNeutral(meanNeutral)
38 ,fMeanGamma(meanGammas)
39 ,fMeanSecondary(meanSecondary)
41 for(int i=0;i<20;i++){
42 fMinEtCorrection[i] = 0.0;
43 fNeutronCorrection[i] = 0.0;
44 fHadronCorrection[i] = 0.0;
45 fKaonCorrection[i] = 0.0;
46 fSecondaryCorrection[i] = 0.0;
51 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const AliAnalysisEtTrackMatchCorrections &obj) : TNamed(obj)
52 ,fChargedContr(new TF1(*(obj.fChargedContr)))
53 ,fNeutralContr(new TF1(*(obj.fNeutralContr)))
54 ,fGammaContr(new TF1(*(obj.fGammaContr)))
55 ,fSecondaryContr(new TF1(*(obj.fSecondaryContr)))
56 ,fRecoEff(new TH2F(*(obj.fRecoEff)))
57 ,fMeanCharged(obj.fMeanCharged)
58 ,fMeanNeutral(obj.fMeanNeutral)
59 ,fMeanGamma(obj.fMeanGamma)
60 ,fMeanSecondary(obj.fMeanSecondary)
63 for(int i=0;i<20;i++){
64 fMinEtCorrection[i] = obj.fMinEtCorrection[i];
65 fNeutronCorrection[i] = obj.fNeutronCorrection[i];
66 fHadronCorrection[i] = obj.fHadronCorrection[i];
67 fKaonCorrection[i] = obj.fKaonCorrection[i];
68 fSecondaryCorrection[i] = obj.fSecondaryCorrection[i];
73 AliAnalysisEtTrackMatchCorrections::~AliAnalysisEtTrackMatchCorrections()
75 // delete fChargedContr;
76 // delete fNeutralContr;
77 // delete fGammaContr;
78 // delete fSecondaryContr;
82 //! Assignment operator
83 AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator=(const AliAnalysisEtTrackMatchCorrections &other)
87 *fChargedContr = *(other.fChargedContr);
88 *fNeutralContr = *(other.fNeutralContr);
89 *fGammaContr = *(other.fGammaContr);
90 ; *fSecondaryContr = *(other.fSecondaryContr);
91 fMeanCharged = other.fMeanCharged;
92 fMeanNeutral = other.fMeanNeutral;
93 fMeanGamma = other.fMeanGamma;
94 fMeanSecondary = other.fMeanSecondary;
100 Double_t AliAnalysisEtTrackMatchCorrections::TrackMatchingEfficiency(Float_t pT, Int_t cent) const{
102 if(fRecoEff) eff = fRecoEff->GetBinContent(fRecoEff->GetXaxis()->FindBin(pT),fRecoEff->GetYaxis()->FindBin(cent));
103 //cout <<"eff "<<eff<<endl;
104 //cout <<"eff "<<eff<<" bin pT "<<fRecoEff->GetXaxis()->FindBin(pT)<<" bin centrality "<<fRecoEff->GetYaxis()->FindBin(cent)<<endl;
105 if(eff>1e-5){return eff;}