]>
Commit | Line | Data |
---|---|---|
5ca85244 | 1 | void MakeCalibrationSSD(Int_t firstRun=0,Int_t lastRun=9999999 ){ |
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("AliITSCalibration"); | |
9 | md1->SetResponsible("Enrico Fragiacomo"); | |
10 | md1->SetBeamPeriod(0); | |
11 | md1->SetAliRootVersion("head 23/08/07"); //root version | |
12 | ||
13 | AliCDBId idNoiseSSD("ITS/Calib/NoiseSSD",firstRun, lastRun); | |
14 | AliCDBId idGainSSD("ITS/Calib/GainSSD",firstRun, lastRun); | |
15 | AliCDBId idBadChannelsSSD("ITS/Calib/BadChannelsSSD",firstRun, lastRun); | |
16 | ||
17 | TObjArray noiseSSD(1698); | |
18 | TObjArray gainSSD(1698); | |
19 | TObjArray badchannelsSSD(1698); | |
20 | ||
21 | noiseSSD.SetOwner(kFALSE); | |
22 | gainSSD.SetOwner(kFALSE); | |
23 | badchannelsSSD.SetOwner(kFALSE); | |
24 | ||
25 | Double_t noiseP[768]; | |
26 | Double_t noiseN[768]; | |
27 | ||
28 | Double_t gainP[768]; | |
29 | Double_t gainN[768]; | |
30 | ||
31 | // loop over SSD modules | |
32 | for(Int_t i=0;i<1698;i++){ | |
33 | ||
34 | AliITSNoiseSSD* noise = new AliITSNoiseSSD(); | |
35 | AliITSGainSSD* gain = new AliITSGainSSD(); | |
36 | AliITSBadChannelsSSD* badchannels = new AliITSBadChannelsSSD(); | |
37 | ||
38 | // 768 strips on P- and N-side | |
39 | noise->SetNNoiseP(768); | |
40 | noise->SetNNoiseN(768); | |
41 | gain->SetNGainP(768); | |
42 | gain->SetNGainN(768); | |
43 | badchannels->SetNBadPChannelsList(10); | |
44 | badchannels->SetNBadNChannelsList(10); | |
45 | ||
46 | // take a reasonable averaged value for the noise on P- and N-side strips | |
47 | for(Int_t j=0; j<768; j++) { | |
48 | noise->AddNoiseP(j,2.); | |
49 | gain->AddGainP(j,1.); | |
50 | noise->AddNoiseN(j,4.); | |
51 | gain->AddGainN(j,1.); | |
52 | } | |
53 | ||
54 | // 10 random strips per module tagged as "bad" | |
55 | for(Int_t j=0; j<10; j++) { | |
56 | badchannels->AddBadPChannel(j,gRandom->Uniform(0,767)); | |
57 | badchannels->AddBadNChannel(j,gRandom->Uniform(0,767)); | |
58 | } | |
59 | ||
60 | noiseSSD.Add(noise); | |
61 | gainSSD.Add(gain); | |
62 | badchannelsSSD.Add(badchannels); | |
63 | ||
64 | } | |
65 | ||
66 | AliCDBManager::Instance()->GetDefaultStorage()->Put(&noiseSSD, idNoiseSSD, md1); | |
67 | AliCDBManager::Instance()->GetDefaultStorage()->Put(&gainSSD, idGainSSD, md1); | |
68 | AliCDBManager::Instance()->GetDefaultStorage()->Put(&badchannelsSSD, idBadChannelsSSD, md1); | |
69 | ||
70 | } |