Decalibrate simulated data
[u/mrichter/AliRoot.git] / PHOS / macros / CalibrationDB / AliPHOSDecalibrate.C
CommitLineData
377108bd 1/* $Id$ */
2
3// Digitize and decalibrate events assuming that SDigits
4// have been already produced.
5// Decalibration coefficients are located in the local file
6// DeCalibDB/PHOS/Calib/GainFactors_and_Pedestals/Run0-10_v0.root
7
8void AliPHOSDecalibrate(Int_t nevents=1)
9{
10 //Load calibration database into aliroot session
11 //and set it to AliPHOSGetter.
12 AliCDBLocal *loc = new AliCDBLocal("DeCalibDB");
13
14 AliPHOSCalibData* clb = (AliPHOSCalibData*)AliCDBStorage::Instance()
15 ->Get("PHOS/Calib/GainFactors_and_Pedestals",gAlice->GetRunNumber());
16
17 AliPHOSGetter* gime = AliPHOSGetter::Instance("galice.root");
18 gime->SetCalibData(clb);
19
20
21 AliSimulation sim ;
22 sim.SetRunGeneration(kFALSE) ;
23 sim.SetMakeSDigits("") ;
24 sim.SetMakeDigits("PHOS") ;
25 sim.Run(nevents) ;
26}