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