1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include "AliCDBManager.h"
4 #include "AliCDBMetaData.h"
5 #include "AliCDBStorage.h"
6 #include "AliCDBRunRange.h"
8 #include "AliITSPlaneEffSSD.h"
11 void MakeITSPlaneEfficiencySSD(Int_t firstRun=0,Int_t lastRun=AliCDBRunRange::Infinity()){
13 if(!AliCDBManager::Instance()->IsDefaultStorageSet()) {
14 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
17 AliCDBMetaData *md1= new AliCDBMetaData(); // metaData describing the object
18 md1->SetObjectClassName("AliITSPlaneEff");
19 md1->SetResponsible("Giuseppe Bruno");
20 md1->SetBeamPeriod(0);
21 md1->SetAliRootVersion("head 02/01/08"); //root version
23 AliCDBId idplaneeffSSD("ITS/PlaneEff/PlaneEffSSD",firstRun, lastRun);
25 AliITSPlaneEffSSD* planeeffSSD = new AliITSPlaneEffSSD();
26 TRandom3 *gran = new TRandom3();
28 // planeeffSSD->SetOwner(kFALSE);
30 // loop over SSD modules
32 for(UInt_t mod=0;mod<1698;mod++){
33 // suppose to have 1000 tracks in each module and an average efficiency of 99%
34 for(Int_t j=0; j<1000; j++) {
36 //if (gRandom->Uniform(0,1000)>10) BFound=kTRUE;
37 if (1000*gran->Uniform()>10) BFound=kTRUE;
38 planeeffSSD->UpDatePlaneEff(BFound,mod);
41 if(AliCDBManager::Instance()->GetDefaultStorage()->Put(planeeffSSD, idplaneeffSSD, md1))
42 printf("Local CDB file with random SSD plane efficiencies written \n");