]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWGLF/totEt/AliAnalysisEtTrackMatchCorrections.cxx
Changing storage of correction functions to fix crash when quitting aliroot.
[u/mrichter/AliRoot.git] / PWGLF / totEt / AliAnalysisEtTrackMatchCorrections.cxx
1
2
3 #include "AliAnalysisEtTrackMatchCorrections.h"
4
5 ClassImp(AliAnalysisEtTrackMatchCorrections);
6
7 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections() : TNamed("TMCorr","TMCorr")
8     ,fChargedContr(new TF1)
9     ,fNeutralContr(new TF1)
10     ,fGammaContr(new TF1)
11     ,fSecondaryContr(new TF1)
12     ,fMeanCharged(0)
13     ,fMeanNeutral(0)
14     ,fMeanGamma(0)
15     ,fMeanSecondary(0)
16 {}
17
18 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const TString name, const TF1 &chargedContr, const TF1 &neutralContr, const TF1 &gammaContr, const TF1 &secondaryContr,
19                                                                        Double_t meanCharged, Double_t meanNeutral, Double_t meanGammas, Double_t meanSecondary) : TNamed(name,name)
20     ,fChargedContr(new TF1(chargedContr))
21     ,fNeutralContr(new TF1(neutralContr))
22     ,fGammaContr(new TF1(gammaContr))
23     ,fSecondaryContr(new TF1(secondaryContr))
24     ,fMeanCharged(meanCharged)
25     ,fMeanNeutral(meanNeutral)
26     ,fMeanGamma(meanGammas)
27     ,fMeanSecondary(meanSecondary)
28 {}
29
30 //! Copy constructor
31 AliAnalysisEtTrackMatchCorrections::AliAnalysisEtTrackMatchCorrections(const AliAnalysisEtTrackMatchCorrections &obj) : TNamed(obj)
32     ,fChargedContr(new TF1(*(obj.fChargedContr)))
33     ,fNeutralContr(new TF1(*(obj.fNeutralContr)))
34     ,fGammaContr(new TF1(*(obj.fGammaContr)))
35     ,fSecondaryContr(new TF1(*(obj.fSecondaryContr)))
36     ,fMeanCharged(obj.fMeanCharged)
37     ,fMeanNeutral(obj.fMeanNeutral)
38     ,fMeanGamma(obj.fMeanGamma)
39     ,fMeanSecondary(obj.fMeanSecondary)
40     
41 {}
42
43 //! Destructor
44 AliAnalysisEtTrackMatchCorrections::~AliAnalysisEtTrackMatchCorrections()
45 {}
46
47 //! Assignment operator
48 AliAnalysisEtTrackMatchCorrections& AliAnalysisEtTrackMatchCorrections::operator=(const AliAnalysisEtTrackMatchCorrections &other)
49 {
50     if (this != &other)
51     {
52         *fChargedContr = *(other.fChargedContr);
53         *fNeutralContr = *(other.fNeutralContr);
54         *fGammaContr = *(other.fGammaContr);
55         *fSecondaryContr = *(other.fSecondaryContr);
56         fMeanCharged = other.fMeanCharged;
57         fMeanNeutral = other.fMeanNeutral;
58         fMeanGamma = other.fMeanGamma;
59         fMeanSecondary = other.fMeanSecondary;
60         
61     }
62     return *this;
63 }
64