]>
Commit | Line | Data |
---|---|---|
cf6522d1 | 1 | //_________________________________________________________________________ |
2 | // Utility Class for transverse energy studies | |
3 | // Base class for ESD analysis, for PHOS | |
4 | // - reconstruction output | |
5 | // implementation file | |
6 | // | |
7 | //*-- Authors: Oystein Djuvsland (Bergen), David Silvermyr (ORNL) | |
8 | //_________________________________________________________________________ | |
2fbf38ac | 9 | #include "AliAnalysisEtReconstructedPhos.h" |
ef647350 | 10 | #include "AliAnalysisEtSelectorPhos.h" |
2fbf38ac | 11 | #include "AliAnalysisEtCuts.h" |
12 | #include "AliESDtrack.h" | |
ef647350 | 13 | #include <fstream> |
14 | #include <iostream> | |
15 | #include <AliPHOSGeoUtils.h> | |
16 | #include "AliPHOSGeometry.h" | |
17 | #include <vector> | |
18 | #include "TH2I.h" | |
19 | ||
16abb579 | 20 | using namespace std; |
21 | ||
22 | ClassImp(AliAnalysisEtReconstructedPhos); | |
23 | ||
6deef1fa | 24 | /*// Worst case (protons and neutrons): |
3825c7d6 | 25 | const Double_t kMEANCHARGED = 0.335; |
26 | const Double_t kMEANNEUTRAL = 0.434; | |
27 | const Double_t kMEANGAMMA = 0.374; | |
6deef1fa | 28 | |
ef647350 | 29 | // Best case (pions and K0s): |
3825c7d6 | 30 | const Double_t kMEANCHARGED = 0.304; |
31 | const Double_t kMEANNEUTRAL = 0.3356; | |
32 | const Double_t kMEANGAMMA = 0.374; | |
6deef1fa | 33 | */ |
34 | // Simulated case: | |
b2c10007 | 35 | //corrEnergy =cluster->E()/(0.31 + 0.02*cluster->E()); |
36 | const Double_t kMEANCHARGED = 0.48/(0.31 + 0.00*0.48); | |
37 | const Double_t kMEANNEUTRAL = 0.53/(0.31 + 0.00*0.53); | |
38 | const Double_t kMEANGAMMA = 0.51/(0.31 + 0.00*0.31); | |
6deef1fa | 39 | |
16abb579 | 40 | |
2fbf38ac | 41 | AliAnalysisEtReconstructedPhos::AliAnalysisEtReconstructedPhos() : |
ef647350 | 42 | AliAnalysisEtReconstructed() |
4d376d01 | 43 | { // ctor |
ef647350 | 44 | fHistogramNameSuffix = TString("PhosRec"); |
45 | ||
f61cec2f | 46 | // fChargedContributionCorrectionParameters[0] = -0.017; |
47 | // fChargedContributionCorrectionParameters[1] = 0.065; | |
48 | // | |
49 | // fNeutralContributionCorrectionParameters[0] = -0.002; | |
50 | // fNeutralContributionCorrectionParameters[1] = 0.017; | |
51 | // fNeutralContributionCorrectionParameters[2] = -3.6e-5; | |
52 | // | |
53 | // fRemovedGammaContributionCorrectionParameters[0] = 0.001; | |
54 | // fRemovedGammaContributionCorrectionParameters[1] = 0.37e-5; | |
55 | // fRemovedGammaContributionCorrectionParameters[2] = 0.0003; | |
56 | ||
b2c10007 | 57 | fChargedContributionCorrectionParameters[0] = -0.06; |
58 | fChargedContributionCorrectionParameters[1] = 0.316; | |
59 | fChargedContributionCorrectionParameters[2] = 0.0022; | |
f61cec2f | 60 | |
b2c10007 | 61 | fNeutralContributionCorrectionParameters[0] = -0.003; |
62 | fNeutralContributionCorrectionParameters[1] = 0.232; | |
63 | fNeutralContributionCorrectionParameters[2] = 0.002; | |
f61cec2f | 64 | |
b2c10007 | 65 | fRemovedGammaContributionCorrectionParameters[0] = 0.001; |
66 | fRemovedGammaContributionCorrectionParameters[1] = 0.009; | |
67 | fRemovedGammaContributionCorrectionParameters[2] = 0.0; | |
f61cec2f | 68 | |
b2c10007 | 69 | fSecondaryContributionCorrectionParameters[0] = -0.03; |
70 | fSecondaryContributionCorrectionParameters[1] = 0.221; | |
71 | fSecondaryContributionCorrectionParameters[2] = 0.002; | |
311c6540 | 72 | |
2fbf38ac | 73 | } |
74 | ||
ef647350 | 75 | AliAnalysisEtReconstructedPhos::~AliAnalysisEtReconstructedPhos() |
cf6522d1 | 76 | { |
77 | } | |
2fbf38ac | 78 | |
79 | void AliAnalysisEtReconstructedPhos::Init() | |
cf6522d1 | 80 | { // Init |
ef647350 | 81 | AliAnalysisEtReconstructed::Init(); |
82 | ||
2fbf38ac | 83 | |
ef647350 | 84 | fDetectorRadius = fCuts->GetGeometryPhosDetectorRadius(); |
ef647350 | 85 | fSingleCellEnergyCut = fCuts->GetReconstructedPhosSingleCellEnergyCut(); |
6ebd4c36 | 86 | fSelector = new AliAnalysisEtSelectorPhos(fCuts); |
4998becf | 87 | |
2fbf38ac | 88 | } |
89 | ||
90 | bool AliAnalysisEtReconstructedPhos::TrackHitsCalorimeter(AliVParticle* track, Double_t magField) | |
4d376d01 | 91 | { |
ef647350 | 92 | return AliAnalysisEtReconstructed::TrackHitsCalorimeter(track, magField); |
2fbf38ac | 93 | } |
94 | ||
6deef1fa | 95 | |
311c6540 | 96 | |
97 | void AliAnalysisEtReconstructedPhos::CreateHistograms() | |
98 | { // add some extra histograms & objects to the ones from base class | |
2aab9269 | 99 | if(!fSelector){ |
100 | cout<<__FILE__<<" "<<"Creating new fSelector"<<endl; | |
101 | fSelector = new AliAnalysisEtSelectorPhos(fCuts); | |
102 | } | |
311c6540 | 103 | AliAnalysisEtReconstructed::CreateHistograms(); |
311c6540 | 104 | } |
d3ce32b8 | 105 | |
31c813d5 | 106 | Double_t AliAnalysisEtReconstructedPhos::GetCorrectionModification(const AliESDCaloCluster& cluster,Int_t nonLinCorr, Int_t effCorr, Int_t cent){//nonLinCorr 0 = nominal 1 = high -1 = low, effCorr 0 = nominal 1 = high -1 = low |
d3ce32b8 | 107 | Double_t factor = 1.0; |
d3ce32b8 | 108 | if(nonLinCorr!=0){ |
109 | if(nonLinCorr==1){//high bound on nonlinearity | |
27d85daa | 110 | Double_t a1=0.045-0.010; |
111 | Double_t a2=0.045+0.010; | |
112 | Double_t b1=1.055-0.450 ; | |
113 | Double_t b2=1.055+0.450 ; | |
114 | Double_t y = (1+a2/(1+cluster.E()*cluster.E()/b2/b2))/(1+a1/(1+cluster.E()*cluster.E()/b1/b1)) ; | |
115 | factor *=y*GetCorrectionModification(cluster,0,0,cent); | |
d3ce32b8 | 116 | } |
117 | else{//nonLinCorr==-1 | |
27d85daa | 118 | Double_t a1=0.045-0.010; |
119 | Double_t a2=0.045+0.010; | |
120 | Double_t b1=1.055-0.450 ; | |
121 | Double_t b2=1.055+0.450 ; | |
122 | Double_t y = (1+a1/(1+cluster.E()*cluster.E()/b1/b1))/(1+a2/(1+cluster.E()*cluster.E()/b2/b2)) ; | |
123 | factor *=y*GetCorrectionModification(cluster,0,0,cent); | |
d3ce32b8 | 124 | } |
125 | } | |
27d85daa | 126 | else{//nonlinearity correction |
127 | factor = 0.9728*(1+0.02/(1+cluster.E()*cluster.E()/1.5)); | |
128 | } | |
d3ce32b8 | 129 | if(effCorr!=0){ |
130 | if(effCorr==1){//high bound | |
27d85daa | 131 | factor *=1.005*GetCorrectionModification(cluster,0,0,cent); |
d3ce32b8 | 132 | } |
133 | else{//low bound | |
27d85daa | 134 | factor *=0.995*GetCorrectionModification(cluster,0,0,cent); |
d3ce32b8 | 135 | } |
31c813d5 | 136 | if(cent<0){//this condition will never be met but it will stop a compiler warning that results in Coverity sending me an email about once every two weeks. |
ac610b08 | 137 | Double_t E = cluster.E(); |
138 | factor = 1.0*E; | |
139 | } | |
d3ce32b8 | 140 | } |
141 | return factor; | |
142 | } |