#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TRandom3.h>
#include "AliCDBManager.h"
#include "AliCDBMetaData.h"
#include "AliCDBStorage.h"
#include "AliCDBRunRange.h"
#include "AliCDBId.h"
#include "AliITSPlaneEffSDD.h"
#endif
void MakeITSPlaneEfficiencySDD(Int_t firstRun=0,Int_t lastRun=AliCDBRunRange::Infinity()){
if(!AliCDBManager::Instance()->IsDefaultStorageSet()) {
AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
}
AliCDBMetaData *md1= new AliCDBMetaData(); // metaData describing the object
md1->SetObjectClassName("AliITSPlaneEff");
md1->SetResponsible("Giuseppe Bruno");
md1->SetBeamPeriod(0);
md1->SetAliRootVersion("head 16/01/08"); //root version
AliCDBId idplaneeffSDD("ITS/PlaneEff/PlaneEffSDD",firstRun, lastRun);
AliITSPlaneEffSDD* planeeffSDD = new AliITSPlaneEffSDD();
TRandom3 *gran = new TRandom3();
// planeeffSDD->SetOwner(kFALSE);
// loop over SDD basic block
Bool_t BFound=kFALSE;
//for(Int_t key=0;key<2080;key++){
for(UInt_t mod=0;mod<260;mod++){
for(UInt_t chip=0;chip<4;chip++){
for(UInt_t wing=0;wing<2;wing++){
for(UInt_t subw=0;subw<1;subw++){
// suppose to have 1000 tracks in each block and an average efficiency of 99%
for(Int_t j=0; j<1000; j++) {
BFound=kFALSE;
//if (gRandom->Uniform(0,1000)>10) BFound=kTRUE;
if (1000*gran->Uniform()>10) BFound=kTRUE;
planeeffSDD->UpDatePlaneEff(BFound,mod,chip,wing,subw);
}
}}}}
if(AliCDBManager::Instance()->GetDefaultStorage()->Put(planeeffSDD, idplaneeffSDD, md1))
printf("Local CDB file with random SDD plane efficiencies written \n");
delete gran;
delete planeeffSDD;
delete md1;
}
MakeITSPlaneEfficiencySDD.C:1 MakeITSPlaneEfficiencySDD.C:2 MakeITSPlaneEfficiencySDD.C:3 MakeITSPlaneEfficiencySDD.C:4 MakeITSPlaneEfficiencySDD.C:5 MakeITSPlaneEfficiencySDD.C:6 MakeITSPlaneEfficiencySDD.C:7 MakeITSPlaneEfficiencySDD.C:8 MakeITSPlaneEfficiencySDD.C:9 MakeITSPlaneEfficiencySDD.C:10 MakeITSPlaneEfficiencySDD.C:11 MakeITSPlaneEfficiencySDD.C:12 MakeITSPlaneEfficiencySDD.C:13 MakeITSPlaneEfficiencySDD.C:14 MakeITSPlaneEfficiencySDD.C:15 MakeITSPlaneEfficiencySDD.C:16 MakeITSPlaneEfficiencySDD.C:17 MakeITSPlaneEfficiencySDD.C:18 MakeITSPlaneEfficiencySDD.C:19 MakeITSPlaneEfficiencySDD.C:20 MakeITSPlaneEfficiencySDD.C:21 MakeITSPlaneEfficiencySDD.C:22 MakeITSPlaneEfficiencySDD.C:23 MakeITSPlaneEfficiencySDD.C:24 MakeITSPlaneEfficiencySDD.C:25 MakeITSPlaneEfficiencySDD.C:26 MakeITSPlaneEfficiencySDD.C:27 MakeITSPlaneEfficiencySDD.C:28 MakeITSPlaneEfficiencySDD.C:29 MakeITSPlaneEfficiencySDD.C:30 MakeITSPlaneEfficiencySDD.C:31 MakeITSPlaneEfficiencySDD.C:32 MakeITSPlaneEfficiencySDD.C:33 MakeITSPlaneEfficiencySDD.C:34 MakeITSPlaneEfficiencySDD.C:35 MakeITSPlaneEfficiencySDD.C:36 MakeITSPlaneEfficiencySDD.C:37 MakeITSPlaneEfficiencySDD.C:38 MakeITSPlaneEfficiencySDD.C:39 MakeITSPlaneEfficiencySDD.C:40 MakeITSPlaneEfficiencySDD.C:41 MakeITSPlaneEfficiencySDD.C:42 MakeITSPlaneEfficiencySDD.C:43 MakeITSPlaneEfficiencySDD.C:44 MakeITSPlaneEfficiencySDD.C:45 MakeITSPlaneEfficiencySDD.C:46 MakeITSPlaneEfficiencySDD.C:47 MakeITSPlaneEfficiencySDD.C:48 MakeITSPlaneEfficiencySDD.C:49 MakeITSPlaneEfficiencySDD.C:50 MakeITSPlaneEfficiencySDD.C:51