X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FMakeITSPlaneEfficiencySDD.C;h=e283359886c220a0edf3248d656494c84214e8a8;hb=c95e0219956777b748e2d9b5c925cf585cd13448;hp=a0053af12f02504a03979174f5a580abe94dc2d9;hpb=6344adccca6954adb6dd4cc566b3703fcce0ed94;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/MakeITSPlaneEfficiencySDD.C b/ITS/MakeITSPlaneEfficiencySDD.C index a0053af12f0..e283359886c 100644 --- a/ITS/MakeITSPlaneEfficiencySDD.C +++ b/ITS/MakeITSPlaneEfficiencySDD.C @@ -1,18 +1,28 @@ +#if !defined(__CINT__) || defined(__MAKECINT__) +#include +#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"); + 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 02/01/08"); //root version + 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); @@ -27,10 +37,14 @@ void MakeITSPlaneEfficiencySDD(Int_t firstRun=0,Int_t lastRun=AliCDBRunRange::In // 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 (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)) - {cout << "Riuscito " << endl;} + printf("Local CDB file with random SDD plane efficiencies written \n"); + delete gran; + delete planeeffSDD; + delete md1; }