]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/MakeITSPlaneEfficiencySSD.C
Plane efficiency for SDD and SSD. Minor modifications for SPD (G. Bruno)
[u/mrichter/AliRoot.git] / ITS / MakeITSPlaneEfficiencySSD.C
CommitLineData
6344adcc 1void MakeITSPlaneEfficiencySSD(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 02/01/08"); //root version
12
13 AliCDBId idplaneeffSSD("ITS/PlaneEff/PlaneEffSSD",firstRun, lastRun);
14
15 AliITSPlaneEffSSD* planeeffSSD = new AliITSPlaneEffSSD();
16
17// planeeffSSD->SetOwner(kFALSE);
18
19 // loop over SSD modules
20 Bool_t BFound=kFALSE;
21 for(UInt_t mod=0;mod<1698;mod++){
22 // suppose to have 1000 tracks in each module and an average efficiency of 99%
23 for(Int_t j=0; j<1000; j++) {
24 BFound=kFALSE;
25 if (gRandom->Uniform(0,1000)>10) BFound=kTRUE;
26 planeeffSSD->UpDatePlaneEff(BFound,mod);
27 }
28 }
29 if(AliCDBManager::Instance()->GetDefaultStorage()->Put(planeeffSSD, idplaneeffSSD, md1))
30 {cout << "Riuscito " << endl;}
31}