1 /**************************************************************************
2 * Copyright(c) 2007-2009, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 ///////////////////////////////////////////////////////////////////////////////
18 // Class with ZDC reconstruction parameters //
19 // Origin: Chiara.Oppedisano@to.infn.it //
21 ///////////////////////////////////////////////////////////////////////////////
28 #include "AliZDCRecoParam.h"
29 #include "AliZDCRecoParamPbPb.h"
31 ClassImp(AliZDCRecoParamPbPb)
33 //_____________________________________________________________________________
34 AliZDCRecoParamPbPb::AliZDCRecoParamPbPb() :
46 //_____________________________________________________________________________
47 AliZDCRecoParamPbPb::AliZDCRecoParamPbPb(TH2F *hZDCvsZEM, TH2F *hZDCCvsZEM, TH2F *hZDCAvsZEM) :
49 fhZDCvsZEM(hZDCvsZEM),
50 fhZDCCvsZEM(hZDCCvsZEM),
51 fhZDCAvsZEM(hZDCAvsZEM),
57 //Standard constructor
60 //_____________________________________________________________________________
61 AliZDCRecoParamPbPb::AliZDCRecoParamPbPb(TH2F *hZDCvsZEM, TH2F *hZDCCvsZEM, TH2F *hZDCAvsZEM,
62 TH1D *hNpart, TH1D *hb, Float_t clkCent) :
64 fhZDCvsZEM(hZDCvsZEM),
65 fhZDCCvsZEM(hZDCCvsZEM),
66 fhZDCAvsZEM(hZDCAvsZEM),
72 //Standard constructor
75 //______________________________________________________________________________
76 AliZDCRecoParamPbPb::AliZDCRecoParamPbPb(const AliZDCRecoParamPbPb &oldrecopar) :
83 fClkCenter(oldrecopar.fClkCenter)
86 if(oldrecopar.fhZDCvsZEM){
87 fhZDCvsZEM = new TH2F(*oldrecopar.fhZDCvsZEM);
88 fhZDCvsZEM->SetDirectory(0);
90 if(oldrecopar.fhZDCCvsZEM){
91 fhZDCCvsZEM = new TH2F(*oldrecopar.fhZDCCvsZEM);
92 fhZDCCvsZEM->SetDirectory(0);
94 if(oldrecopar.fhZDCAvsZEM){
95 fhZDCAvsZEM = new TH2F(*oldrecopar.fhZDCAvsZEM);
96 fhZDCAvsZEM->SetDirectory(0);
98 if(oldrecopar.fhNpartDist){
99 fhNpartDist = new TH1D(*oldrecopar.fhNpartDist);
100 fhNpartDist->SetDirectory(0);
102 if(oldrecopar.fhbDist){
103 fhbDist = new TH1D(*oldrecopar.fhbDist);
104 fhbDist->SetDirectory(0);
108 //_____________________________________________________________________________
109 AliZDCRecoParamPbPb &AliZDCRecoParamPbPb::operator =(const AliZDCRecoParamPbPb &recpar)
112 this->~AliZDCRecoParamPbPb();
113 new(this) AliZDCRecoParamPbPb(recpar);
118 //_____________________________________________________________________________
119 AliZDCRecoParamPbPb::~AliZDCRecoParamPbPb()
123 if(fhZDCvsZEM) delete fhZDCvsZEM;
124 if(fhZDCCvsZEM) delete fhZDCCvsZEM;
125 if(fhZDCAvsZEM) delete fhZDCAvsZEM;
126 if(fhNpartDist) delete fhNpartDist;
127 if(fhbDist) delete fhbDist;
130 //_____________________________________________________________________________
131 void AliZDCRecoParamPbPb::SetGlauberMCDist()
133 // Setting Glauber MC distributions
134 // from histos file stored in $ALICE_ROOT/ZDC
135 TFile * fileHistos = TFile::Open("$ALICE_ROOT/ZDC/GlauberMCHistos.root");
137 fhNpartDist = (TH1D*) fileHistos->Get("hDist");
138 fhNpartDist->SetDirectory(0);
139 fhbDist = (TH1D*) fileHistos->Get("hbDist");
140 fhbDist->SetDirectory(0);
145 //_____________________________________________________________________________
146 AliZDCRecoParamPbPb *AliZDCRecoParamPbPb::GetHighFluxParam()
148 // Create high flux reco parameter
149 TH1::AddDirectory(0);
150 TH2::AddDirectory(0);
152 TFile * fileHistos = TFile::Open("$ALICE_ROOT/ZDC/GlauberMCHistos.root");
155 TH2F *hZDCvsZEM = (TH2F*) fileHistos->Get("hZDCvsZEM");
156 hZDCvsZEM->SetDirectory(0);
158 TH2F *hZDCCvsZEM = (TH2F*) fileHistos->Get("hZDCCvsZEM");
159 hZDCCvsZEM->SetDirectory(0);
161 TH2F *hZDCAvsZEM = (TH2F*) fileHistos->Get("hZDCAvsZEM");
162 hZDCAvsZEM->SetDirectory(0);
164 TH1D* hDist = (TH1D*) fileHistos->Get("hDist");
165 hDist->SetDirectory(0);
167 TH1D* hbDist = (TH1D*) fileHistos->Get("hbDist");
168 hbDist->SetDirectory(0);
170 AliZDCRecoParamPbPb* zdcRecoParam = new AliZDCRecoParamPbPb(hZDCvsZEM, hZDCCvsZEM,
171 hZDCAvsZEM, hDist, hbDist, 0.1);