New light yields following the results from the first HI run in 2011, some aging...
[u/mrichter/AliRoot.git] / VZERO / CheckTriggerOCDB.C
CommitLineData
84c60d4c 1void CheckTriggerOCDB(Int_t run = 164744)
2{
3 AliCDBManager *man = AliCDBManager::Instance();
4
5 man->SetDefaultStorage("raw://");
6 man->SetRun(run);
7
8 AliCDBEntry *ent1 = man->Get("VZERO/Trigger/Data");
9 AliVZEROTriggerData *trigData = (AliVZEROTriggerData*)ent1->GetObject();
10 AliCDBEntry *ent2 = man->Get("VZERO/Calib/Data");
11 AliVZEROCalibData *calData = (AliVZEROCalibData*)ent2->GetObject();
12
13 printf("%d <= MTA <= %d %d <= MTC <= %d\n",
14 trigData->GetMultV0AThrLow(),
15 trigData->GetMultV0AThrHigh(),
16 trigData->GetMultV0CThrLow(),
17 trigData->GetMultV0CThrHigh());
18 printf("CTA1 = %hd CTC1 = %hd\n",
19 trigData->GetCentralityV0AThrLow(),
20 trigData->GetCentralityV0CThrLow());
21 printf("CTA2 = %hd CTC2 = %hd\n",
22 trigData->GetCentralityV0AThrHigh(),
23 trigData->GetCentralityV0CThrHigh());
24
25 UShort_t fPed[64][2];
26 UShort_t fPedCut[64][2];
27
28 for(Int_t pmNumber = 0; pmNumber < 64; ++pmNumber) {
29 Int_t board = AliVZEROCalibData::GetBoardNumber(pmNumber);
30 Int_t channel = AliVZEROCalibData::GetFEEChannelNumber(pmNumber);
31
32 // if(trigData->GetEnableCharge(board,channel)) {
33 // if(trigData->GetPedestalSubtraction(board)) {
34 fPedCut[pmNumber][0] = trigData->GetPedestalCut(0,board,channel);
35 fPedCut[pmNumber][1] = trigData->GetPedestalCut(1,board,channel);
36 fPed[pmNumber][0] = trigData->GetPedestal(0,board,channel);
37 fPed[pmNumber][1] = trigData->GetPedestal(1,board,channel);
ae40a834 38 printf("Ch=%d Q=%s PedSub=%s Ped0=%.1f TrPed0=%hd TrPedCut0=%hd Ped1=%.1f TrPed1=%hd TrPedCut1=%hd delta(ped)=%.1f %.1f nsigma=%.1f %.1f\n",
84c60d4c 39 pmNumber,
40 trigData->GetEnableCharge(board,channel) ? "On" : "Off",
41 trigData->GetPedestalSubtraction(board) ? "On" : "Off",
42 calData->GetPedestal(pmNumber),fPed[pmNumber][0],fPedCut[pmNumber][0],
43 calData->GetPedestal(pmNumber+64),fPed[pmNumber][1],fPedCut[pmNumber][1],
44 (Float_t)fPed[pmNumber][0]-calData->GetPedestal(pmNumber),(Float_t)fPed[pmNumber][1]-calData->GetPedestal(pmNumber+64),
45 ((Float_t)fPedCut[pmNumber][0]-(Float_t)fPed[pmNumber][0])/calData->GetSigma(pmNumber),
46 ((Float_t)fPedCut[pmNumber][1]-(Float_t)fPed[pmNumber][1])/calData->GetSigma(pmNumber+64));
47 }
48
49}