Adding to ESD the primary vertex reconstructed with TPC stand-alone
[u/mrichter/AliRoot.git] / TOF / CreateOnlineCalibPars.C
CommitLineData
be2ca2e7 1void CreateOnlineCalibPars(){
2 // Create TOF Online Calibration Object for reconstruction
3 // and write it on CDB
4 AliTOFcalib *tofcalib = new AliTOFcalib();
5 tofcalib->CreateCalArrays();
6 TObjArray *tofCalOnline = (TObjArray*) tofcalib->GetTOFCalArrayOnline();
7 // Write the offline calibration object on CDB
8
9 AliCDBManager *man = AliCDBManager::Instance();
10 man->SetDefaultStorage("local://$ALICE");
11 Int_t nChannels = AliTOFGeometry::NSectors()*(2*(AliTOFGeometry::NStripC()+AliTOFGeometry::NStripB())+AliTOFGeometry::NStripA())*AliTOFGeometry::NpadZ()*AliTOFGeometry::NpadX();
12 Float_t delay=0.;
13 Float_t meanDelay=0.3;
14 Float_t sigmaDelay=0.08;
15 TRandom *rnd = new TRandom(4357);
16 for (Int_t ipad = 0 ; ipad<nChannels; ipad++){
17 AliTOFChannelOnline *calChannelOnline = (AliTOFChannelOnline*)tofCalOnline->At(ipad);
18 delay = rnd->Gaus(meanDelay,sigmaDelay);
19 calChannelOnline->SetDelay(delay);
28c5479a 20 calChannelOnline->SetStatus(AliTOFChannelOnline::kTOFOnlineOk);
be2ca2e7 21 }
22 tofcalib->WriteParOnlineOnCDB("TOF/Calib");
23 return;
24}