]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/MakeITSPlaneEfficiencySPD.C
Fix of parsing bug related to the reading of the calib header. Added consistency...
[u/mrichter/AliRoot.git] / ITS / MakeITSPlaneEfficiencySPD.C
1 void MakeITSPlaneEfficiencySPD(Int_t firstRun=0,Int_t lastRun=AliCDBRunRange::Infinity()){
2   
3   if(!AliCDBManager::Instance()->IsDefaultStorageSet()) {
4     AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
5   }
6   
7   AliCDBMetaData *md1= new AliCDBMetaData(); // metaData describing the object
8   md1->SetObjectClassName("AliITSPlaneEff");
9   md1->SetResponsible("Giuseppe Bruno");
10   md1->SetBeamPeriod(0);
11   md1->SetAliRootVersion("head 19/11/07"); //root version
12
13   AliCDBId idplaneeffSPD("ITS/PlaneEff/PlaneEffSPD",firstRun, lastRun);
14   
15   AliITSPlaneEffSPD* planeeffSPD = new AliITSPlaneEffSPD();
16
17 //  planeeffSPD->SetOwner(kFALSE);
18   
19
20   // loop over SPD chip
21   Bool_t BFound=kFALSE;
22   //for(Int_t key=0;key<1200;key++){
23   for(UInt_t mod=0;mod<240;mod++){
24   for(UInt_t chip=0;chip<5;chip++){
25   // suppose to have 1000 tracks in each chip and an average efficiency of 99%
26     for(Int_t j=0; j<1000; j++) {
27       BFound=kFALSE;
28       if (gRandom->Uniform(0,1000)>10) BFound=kTRUE;
29       planeeffSPD->UpDatePlaneEff(BFound,mod,chip);
30     }
31   }}
32   if(AliCDBManager::Instance()->GetDefaultStorage()->Put(planeeffSPD, idplaneeffSPD, md1))
33   {cout << "Riuscito " << endl;}
34 }