1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 ////////////////////////////////////////////////////////////////////////////
20 // Example: fill pedestal with Gaussian noise //
22 // AliTRDCalibPadStatus ped; //
23 // ped.TestEvent(numberofevent); //
25 // // Method without histo //
28 // // Create the histo of the AliTRDCalROC //
29 // TH2F * histo2dm = ped.GetCalRocMean(0,kFALSE)->MakeHisto2D(); //
30 // histo2dm->Scale(10.0); //
31 // TH1F * histo1dm = ped.GetCalRocMean(0,kFALSE)->MakeHisto1D(); //
32 // histo1dm->Scale(10.0); //
33 // TH2F * histo2ds = ped.GetCalRocSquares(0,kFALSE)->MakeHisto2D(); //
34 // histo2ds->Scale(10.0); //
35 // TH1F * histo1ds = ped.GetCalRocSquares(0,kFALSE)->MakeHisto1D(); //
36 // histo1ds->Scale(10.0) //
39 // TCanvas* c1 = new TCanvas; //
40 // c1->Divide(2,2); //
42 // histo2dm->Draw("colz"); //
44 // histo1dm->Draw(); //
46 // histo2ds->Draw("colz"); //
48 // histo1ds->Draw(); //
50 // // Method with histo //
51 // ped.AnalyseHisto(); //
53 // // Take the histo //
54 // TH1F *histo = ped.GetHisto(31); //
55 // histo->SetEntries(1); //
58 ////////////////////////////////////////////////////////////////////////////
61 #include <TObjArray.h>
66 #include <TDirectory.h>
70 #include <AliMathBase.h>
71 #include "AliRawReader.h"
72 #include "AliRawReaderRoot.h"
73 #include "AliRawReaderDate.h"
77 #include "AliTRDCalibPadStatus.h"
78 #include "AliTRDrawStreamBase.h"
79 #include "AliTRDgeometry.h"
80 #include "AliTRDCommonParam.h"
81 #include "./Cal/AliTRDCalROC.h"
82 #include "./Cal/AliTRDCalPadStatus.h"
83 #include "./Cal/AliTRDCalDet.h"
84 #include "./Cal/AliTRDCalPad.h"
85 #include "./Cal/AliTRDCalSingleChamberStatus.h"
91 ClassImp(AliTRDCalibPadStatus) /*FOLD00*/
93 //_____________________________________________________________________
94 AliTRDCalibPadStatus::AliTRDCalibPadStatus() : /*FOLD00*/
100 fNumberOfTimeBins(0),
101 fCalRocArrayMean(540),
102 fCalRocArrayRMS(540),
103 fCalRocArrayMeand(540),
104 fCalRocArrayRMSd(540),
108 // default constructor
111 fGeo = new AliTRDgeometry();
115 //_____________________________________________________________________
116 AliTRDCalibPadStatus::AliTRDCalibPadStatus(const AliTRDCalibPadStatus &ped) : /*FOLD00*/
119 fAdcMin(ped.GetAdcMin()),
120 fAdcMax(ped.GetAdcMax()),
121 fDetector(ped.fDetector),
122 fNumberOfTimeBins(ped.fNumberOfTimeBins),
123 fCalRocArrayMean(540),
124 fCalRocArrayRMS(540),
125 fCalRocArrayMeand(540),
126 fCalRocArrayRMSd(540),
132 for (Int_t idet = 0; idet < 540; idet++){
133 const AliTRDCalROC *calRocMean = (AliTRDCalROC*)ped.fCalRocArrayMean.UncheckedAt(idet);
134 const AliTRDCalROC *calRocRMS = (AliTRDCalROC*)ped.fCalRocArrayRMS.UncheckedAt(idet);
135 const AliTRDCalROC *calRocMeand = (AliTRDCalROC*)ped.fCalRocArrayMeand.UncheckedAt(idet);
136 const AliTRDCalROC *calRocRMSd = (AliTRDCalROC*)ped.fCalRocArrayRMSd.UncheckedAt(idet);
137 const TH2F *hped = (TH2F*)ped.fHistoArray.UncheckedAt(idet);
139 if ( calRocMean != 0x0 ) fCalRocArrayMean.AddAt(new AliTRDCalROC(*calRocMean), idet);
140 if ( calRocRMS != 0x0 ) fCalRocArrayRMS.AddAt(new AliTRDCalROC(*calRocRMS), idet);
142 if ( calRocMeand != 0x0 ) fCalRocArrayMeand.AddAt(new AliTRDCalROC(*calRocMeand), idet);
143 if ( calRocRMSd != 0x0 ) fCalRocArrayRMSd.AddAt(new AliTRDCalROC(*calRocRMSd), idet);
146 TH2F *hNew = new TH2F(*hped);
147 hNew->SetDirectory(0);
148 fHistoArray.AddAt(hNew,idet);
155 fGeo = new AliTRDgeometry();
158 //_____________________________________________________________________
159 AliTRDCalibPadStatus& AliTRDCalibPadStatus::operator = (const AliTRDCalibPadStatus &source)
162 // assignment operator
164 if (&source == this) return *this;
165 new (this) AliTRDCalibPadStatus(source);
170 //_____________________________________________________________________
171 AliTRDCalibPadStatus::~AliTRDCalibPadStatus() /*FOLD00*/
176 fCalRocArrayMean.Delete();
177 fCalRocArrayRMS.Delete();
178 fCalRocArrayMeand.Delete();
179 fCalRocArrayRMSd.Delete();
180 fHistoArray.Delete();
186 //_____________________________________________________________________
187 Int_t AliTRDCalibPadStatus::UpdateHisto(const Int_t icdet, /*FOLD00*/
196 // Signal filling methode
198 Int_t nbchannel = icRow+icCol*crowMax;
200 // now the case of double read channel
202 nbchannel = (((ccold-1)*8+ icMcm)*crowMax+icRow)+144*crowMax;
203 //printf("nbchannel %d, ccold %d, icMcm %d, crowMax %d, icRow %d\n",nbchannel,ccold,icMcm,crowMax,icRow);
206 // fast filling methode.
207 // Attention: the entry counter of the histogram is not increased
208 // this means that e.g. the colz draw option gives an empty plot
210 if ( !(((Int_t)csignal>=fAdcMax ) || ((Int_t)csignal<fAdcMin)) )
211 bin = (nbchannel+1)*(fAdcMax-fAdcMin+2)+((Int_t)csignal-fAdcMin+1);
213 //GetHisto(icdet,kTRUE)->Fill(csignal,nbchannel);
215 GetHisto(icdet,kTRUE)->GetArray()[bin]++;
219 //_____________________________________________________________________
220 Int_t AliTRDCalibPadStatus::ProcessEvent(AliTRDrawStreamBase *rawStream, Bool_t nocheck)
223 // Event Processing loop - AliTRDRawStreamCosmic
224 // 0 time bin problem or zero suppression
231 rawStream->SetSharedPadReadout(kTRUE);
234 while (rawStream->Next()) {
235 Int_t rawversion = rawStream->GetRawVersion(); // current raw version
236 //if(!rawStream->IsDataZeroSuppressed()) {
238 AliInfo(Form("this is not no-zero-suppressed data, the version is %d",rawversion));
241 Int_t idetector = rawStream->GetDet(); // current detector
242 Int_t iRow = rawStream->GetRow(); // current row
243 Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax
244 Int_t iCol = rawStream->GetCol(); // current col
247 Int_t iADC = 21-rawStream->GetADC(); // current ADC
249 if(iADC == 1) col = 1;
251 col = TMath::Max(0,(Int_t)(iADC-19));
254 Int_t mcm = (Int_t)(iCol/18); // current group of 18 col pads
255 if(col > 1) mcm -= 1;
256 if(col ==1) mcm += 1;
258 //Bool_t shared = rawStream->IsCurrentPadShared();
259 //printf("ADC %d, iCol %d, col %d, mcm %d, shared %d\n",iADC,iCol,col,mcm,(Int_t)shared);
261 Int_t *signal = rawStream->GetSignals(); // current ADC signal
262 Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
264 if((fDetector != -1) && (nbtimebin != fNumberOfTimeBins)) {
265 AliInfo(Form("the number of time bins is %d, is different from the previous one %d",nbtimebin,fNumberOfTimeBins));
268 fNumberOfTimeBins = nbtimebin;
270 for(Int_t k = 0; k < fNumberOfTimeBins; k++){
271 if(signal[k]>0) UpdateHisto(idetector,iRow,iCol,signal[k],iRowMax,col,mcm);
278 while (rawStream->Next()) {
279 Int_t idetector = rawStream->GetDet(); // current detector
280 Int_t iRow = rawStream->GetRow(); // current row
281 Int_t iRowMax = rawStream->GetMaxRow(); // current rowmax
282 Int_t iCol = rawStream->GetCol(); // current col
285 Int_t iADC = 21-rawStream->GetADC(); // current ADC
287 if(iADC == 1) col = 1;
289 col = TMath::Max(0,(Int_t)(iADC-19));
292 Int_t mcm = (Int_t)(iCol/18); // current group of 18 col pads
293 if(col > 1) mcm -= 1;
294 if(col ==1) mcm += 1;
296 Int_t *signal = rawStream->GetSignals(); // current ADC signal
297 Int_t nbtimebin = rawStream->GetNumberOfTimeBins(); // number of time bins read from data
300 //printf("det %d, row %d, signal[0] %d, signal[1] %d, signal [2] %d\n", idetector, iRow, signal[0], signal[1], signal[2]);
302 for(Int_t k = 0; k < nbtimebin; k++){
304 UpdateHisto(idetector,iRow,iCol,signal[k],iRowMax,col,mcm);
305 //printf("Update with det %d, row %d, col %d, signal %d, rowmax %d, col %d, mcm %d\n",idetector,iRow,iCol,signal[n],iRowMax,col,mcm);
316 //_____________________________________________________________________
317 Int_t AliTRDCalibPadStatus::ProcessEvent(AliRawReader *rawReader, Bool_t nocheck)
320 // Event processing loop - AliRawReader
325 rawReader->Select("TRD");
327 AliTRDrawStreamBase *pstream = AliTRDrawStreamBase::GetRawStream(rawReader);
329 result = ProcessEvent(pstream, nocheck);
336 //_________________________________________________________________________
337 Int_t AliTRDCalibPadStatus::ProcessEvent(
339 eventHeaderStruct *event,
342 eventHeaderStruct* /*event*/,
349 // process date event
352 AliRawReader *rawReader = new AliRawReaderDate((void*)event);
353 Bool_t result=ProcessEvent(rawReader, nocheck);
357 Fatal("AliTRDCalibPadStatus", "this class was compiled without DATE");
363 //_____________________________________________________________________
364 Bool_t AliTRDCalibPadStatus::TestEventHisto(Int_t nevent, Int_t sm, Int_t ch) /*FOLD00*/
368 // fill one oroc and one iroc with random gaus
373 for (Int_t ism=sm; ism<sm+1; ism++){
374 for (Int_t ich=ch; ich < ch+1; ich++){
375 for (Int_t ipl=0; ipl < 6; ipl++){
376 for(Int_t irow = 0; irow < fGeo->GetRowMax(ipl,ich,ism); irow++){
377 for(Int_t icol = 0; icol < fGeo->GetColMax(ipl); icol++){
378 for (Int_t iTimeBin=0; iTimeBin<(30*nevent); iTimeBin++){
379 Int_t signal=TMath::Nint(gRandom->Gaus(10,1.5));
380 if ( signal>0 )UpdateHisto((ipl+ich*6+ism*6*5),irow,icol,signal,fGeo->GetRowMax(ipl,ich,ism),0,0);
390 //_____________________________________________________________________
391 TH2F* AliTRDCalibPadStatus::GetHisto(Int_t det, TObjArray *arr, /*FOLD00*/
392 Int_t nbinsY, Float_t ymin, Float_t ymax,
393 Char_t *type, Bool_t force)
396 // return pointer to histogram
397 // if force is true create a new histogram if it doesn't exist allready
399 if ( !force || arr->UncheckedAt(det) )
400 return (TH2F*)arr->UncheckedAt(det);
402 // if we are forced and histogram doesn't yes exist create it
403 Char_t name[255], title[255];
405 sprintf(name,"hCalib%s%.3d",type,det);
406 sprintf(title,"%s calibration histogram detector %.2d;ADC channel;Channel (pad)",type,det);
409 Int_t nbchannels = fGeo->GetRowMax(GetLayer(det),GetStack(det),GetSector(det))*fGeo->GetColMax(GetLayer(det));
411 // we will add 3*8*rowMax channels at the end for the double counted
412 nbchannels += 3*8*(fGeo->GetRowMax(GetLayer(det),GetStack(det),GetSector(det)));
415 // new histogram with calib information. One value for each pad!
416 TH2F* hist = new TH2F(name,title,
418 nbchannels,0,nbchannels
420 hist->SetDirectory(0);
421 arr->AddAt(hist,det);
425 //_____________________________________________________________________
426 TH2F* AliTRDCalibPadStatus::GetHisto(Int_t det, Bool_t force) /*FOLD00*/
429 // return pointer to histogram
430 // if force is true create a new histogram if it doesn't exist allready
432 TObjArray *arr = &fHistoArray;
433 return GetHisto(det, arr, fAdcMax-fAdcMin, fAdcMin-0.5, fAdcMax-0.5, "Pedestal", force);
436 //_____________________________________________________________________
437 AliTRDCalROC* AliTRDCalibPadStatus::GetCalRoc(Int_t det, TObjArray* arr, Bool_t force) /*FOLD00*/
440 // return pointer to ROC Calibration
441 // if force is true create a new AliTRDCalROC if it doesn't exist allready
443 if ( !force || arr->UncheckedAt(det) )
444 return (AliTRDCalROC*)arr->UncheckedAt(det);
446 // if we are forced and histogram doesn't yes exist create it
448 // new AliTRDCalROC. One value for each pad!
449 AliTRDCalROC *croc = new AliTRDCalROC(GetLayer(det),GetStack(det));
450 arr->AddAt(croc,det);
453 //_____________________________________________________________________
454 AliTRDCalROC* AliTRDCalibPadStatus::GetCalRocMean(Int_t det, Bool_t force) /*FOLD00*/
457 // return pointer to Carge ROC Calibration
458 // if force is true create a new histogram if it doesn't exist allready
460 TObjArray *arr = &fCalRocArrayMean;
461 return GetCalRoc(det, arr, force);
464 //_____________________________________________________________________
465 AliTRDCalROC* AliTRDCalibPadStatus::GetCalRocRMS(Int_t det, Bool_t force) /*FOLD00*/
468 // return pointer to Carge ROC Calibration
469 // if force is true create a new histogram if it doesn't exist allready
471 TObjArray *arr = &fCalRocArrayRMS;
472 return GetCalRoc(det, arr, force);
474 //_____________________________________________________________________
475 AliTRDCalROC* AliTRDCalibPadStatus::GetCalRocMeand(Int_t det, Bool_t force) /*FOLD00*/
478 // return pointer to Carge ROC Calibration
479 // if force is true create a new histogram if it doesn't exist allready
481 TObjArray *arr = &fCalRocArrayMeand;
482 return GetCalRoc(det, arr, force);
485 //_____________________________________________________________________
486 AliTRDCalROC* AliTRDCalibPadStatus::GetCalRocRMSd(Int_t det, Bool_t force) /*FOLD00*/
489 // return pointer to Carge ROC Calibration
490 // if force is true create a new histogram if it doesn't exist allready
492 TObjArray *arr = &fCalRocArrayRMSd;
493 return GetCalRoc(det, arr, force);
496 //_____________________________________________________________________
497 void AliTRDCalibPadStatus::AnalyseHisto() /*FOLD00*/
500 // Calculate calibration constants
503 Int_t nbinsAdc = fAdcMax-fAdcMin;
511 for (Int_t idet=0; idet<540; idet++){
512 TH2F *hP = GetHisto(idet);
517 //printf("Entries for %d\n",idet);
519 AliTRDCalROC *rocMean = GetCalRocMean(idet,kTRUE);
520 AliTRDCalROC *rocRMS = GetCalRocRMS(idet,kTRUE);
522 arrayHP = hP->GetArray();
523 Int_t nChannels = rocMean->GetNchannels();
525 for (Int_t iChannel=0; iChannel<nChannels; iChannel++){
526 Int_t offset = (nbinsAdc+2)*(iChannel+1)+1;
527 Double_t ret = AliMathBase::FitGaus(arrayHP+offset,nbinsAdc,fAdcMin-0.5,fAdcMax-0.5,¶m,&dummy);
528 // if the fitting failed set noise and pedestal to 0
529 if ((ret==-4) || (ret==-1) || (ret==-2)) {
533 if((param[1]/10.0) > 65534.0) param[1] = 0.0;
534 if((param[2]/10.0) > 65534.0) param[2] = 0.0;
535 rocMean->SetValue(iChannel,param[1]/10.0);
536 rocRMS->SetValue(iChannel,param[2]/10.0);
539 // here we analyse doubled read channels
541 AliTRDCalROC *rocMeand = GetCalRocMeand(idet,kTRUE);
542 AliTRDCalROC *rocRMSd = GetCalRocRMSd(idet,kTRUE);
544 Int_t nrows = rocMeand->GetNrows();
545 Int_t shift = 144*nrows;
546 Int_t total = shift+3*8*nrows;
548 for (Int_t iChannel=shift; iChannel<total; iChannel++){
549 Int_t offset = (nbinsAdc+2)*(iChannel+1)+1;
550 Double_t ret = AliMathBase::FitGaus(arrayHP+offset,nbinsAdc,fAdcMin-0.5,fAdcMax-0.5,¶m,&dummy);
551 // if the fitting failed set noise and pedestal to 0
552 if ((ret==-4) || (ret==-1) || (ret==-2)) {
556 if((param[1]/10.0) > 65534.0) param[1] = 0.0;
557 if((param[2]/10.0) > 65534.0) param[2] = 0.0;
559 // here we have to recalculate backward
560 Int_t nb = iChannel-shift;
561 Int_t row = nb%nrows;
562 Int_t j = (Int_t)(nb/nrows);
564 Int_t icol = (Int_t)(j/8);
566 Int_t finalcol = 18*imcm;
567 if(icol > 0) icol += 17;
571 Int_t channel = row+finalcol*nrows;
573 //printf("iChannel %d, nrows %d, finalcol %d, row %d, channel %d\n",iChannel,nrows,finalcol,row,channel);
574 if((finalcol < 0) || (finalcol >= 144)) continue;
576 rocMeand->SetValue(channel,param[1]/10.0);
577 rocRMSd->SetValue(channel,param[2]/10.0);
584 //_______________________________________________________________________________________
585 AliTRDCalPadStatus* AliTRDCalibPadStatus::CreateCalPadStatus()
588 // Create Pad Status out of Mean and RMS values
589 // The chamber without data are masked, this is the corrected in the preprocessor
592 AliTRDCalPadStatus* obj = new AliTRDCalPadStatus("padstatus", "padstatus");
594 for (Int_t idet=0; idet<540; ++idet)
596 AliTRDCalSingleChamberStatus *calROC = obj->GetCalROC(idet);
599 if ( !GetCalRocMean(idet)) {
600 for(Int_t k = 0; k < calROC->GetNchannels(); k++){
601 calROC->SetStatus(k,AliTRDCalPadStatus::kNotConnected);
608 AliTRDCalROC *calRocMean = new AliTRDCalROC(*( (AliTRDCalROC *) GetCalRocMean(idet)));
609 AliTRDCalROC *calRocRMS = new AliTRDCalROC(*( (AliTRDCalROC *) GetCalRocRMS(idet)));
611 //Take the stuff second chance
612 AliTRDCalROC *calRocMeand = new AliTRDCalROC(*( (AliTRDCalROC *) GetCalRocMeand(idet)));
613 AliTRDCalROC *calRocRMSd = new AliTRDCalROC(*( (AliTRDCalROC *) GetCalRocRMSd(idet)));
616 calRocRMSd->Unfold();
620 Int_t row = calROC->GetNrows();
621 Int_t col = calROC->GetNcols();
623 Double_t rmsmean = calRocMean->GetRMS()*10.0;
624 Double_t meanmean = calRocMean->GetMean()*10.0;
625 Double_t meansquares = calRocRMS->GetMean();
628 for(Int_t irow = 0; irow < row; irow++){
631 Float_t meanprevious = 0.0;
632 Float_t rmsprevious = 0.0;
636 for(Int_t icol = 0; icol < col; icol++){
638 mean = calRocMean->GetValue(icol,irow)*10.0;
639 rms = calRocRMS->GetValue(icol,irow);
642 meanprevious = calRocMean->GetValue((icol -1),irow)*10.0;
643 rmsprevious = calRocRMS->GetValue((icol - 1),irow);
647 // masked if two noisy
648 if((rms <= 0.0001) || (TMath::Abs(mean-meanmean)>(5*rmsmean)) || (TMath::Abs(rms)>(5.0*TMath::Abs(meansquares)))) {
651 // look at second chance
652 Float_t meand = calRocMeand->GetValue(icol,irow)*10.0;
653 Float_t rmsd = calRocRMSd->GetValue(icol,irow);
655 if((rmsd <= 0.0001) || (TMath::Abs(meand-meanmean)>(5*rmsmean)) || (TMath::Abs(rmsd)>(5.0*TMath::Abs(meansquares)))) {
656 if((rmsd <= 0.0001) && (rms <= 0.0001)) {
657 calROC->SetStatus(icol,irow,AliTRDCalPadStatus::kNotConnected);
660 calROC->SetStatus(icol, irow, AliTRDCalPadStatus::kMasked);
664 calROC->SetStatus(icol, irow, AliTRDCalPadStatus::kReadSecond);
669 // bridge if previous pad found something
671 if((meanprevious == mean) && (rmsprevious == rms) && (mean > 0.0001)) {
672 //printf("mean previous %f, mean %f, rms %f, rmsprevious %f, col %d\n",meanprevious,mean,rms,rmsprevious,icol);
673 calROC->SetStatus(icol -1 ,irow, AliTRDCalPadStatus::kPadBridgedRight);
674 calROC->SetStatus(icol ,irow, AliTRDCalPadStatus::kPadBridgedLeft);
692 //_______________________________________________________________________________________
693 AliTRDCalPad* AliTRDCalibPadStatus::CreateCalPad()
696 // Create Pad Noise out of RMS values
699 AliTRDCalPad* obj = new AliTRDCalPad("PadNoise", "PadNoise");
702 for (Int_t det=0; det<AliTRDgeometry::kNdet; ++det) {
704 AliTRDCalROC *calROC22 = obj->GetCalROC(det);
706 AliTRDCalROC *calRocRMS = ((AliTRDCalROC *)GetCalRocRMS(det,kTRUE));
708 for(Int_t k = 0; k < calROC22->GetNchannels(); k++){
709 calROC22->SetValue(k,calRocRMS->GetValue(k));
718 //_______________________________________________________________________________________
719 AliTRDCalDet* AliTRDCalibPadStatus::CreateCalDet() const
722 // Create Det Noise correction factor
725 AliTRDCalDet* obj = new AliTRDCalDet("DetNoise", "DetNoise (correction factor)");
727 for(Int_t l = 0; l < 540; l++){
728 obj->SetValue(l,10.0);
735 //_____________________________________________________________________
736 void AliTRDCalibPadStatus::DumpToFile(const Char_t *filename, const Char_t *dir, Bool_t append) /*FOLD00*/
739 // Write class to file
750 TDirectory *backup = gDirectory;
751 TFile f(filename,option.Data());
753 if ( !sDir.IsNull() ){
754 f.mkdir(sDir.Data());
760 if ( backup ) backup->cd();
763 //_____________________________________________________________________
764 void AliTRDCalibPadStatus::SetCalRocMean(AliTRDCalROC *mean, Int_t det) /*FOLD00*/
767 // Put the AliTRDCalROC in the array fCalRocArrayMean
771 AliTRDCalROC *rocMean = GetCalRocMean(det,kTRUE);
773 Int_t nChannels = rocMean->GetNchannels();
775 for (Int_t iChannel=0; iChannel<nChannels; iChannel++){
777 rocMean->SetValue(iChannel,mean->GetValue(iChannel));
783 //_____________________________________________________________________
784 void AliTRDCalibPadStatus::SetCalRocRMS(AliTRDCalROC *rms, Int_t det) /*FOLD00*/
787 // Put the AliTRDCalROC in the array fCalRocArrayRMS
791 AliTRDCalROC *rocRms = GetCalRocRMS(det,kTRUE);
793 Int_t nChannels = rocRms->GetNchannels();
795 for (Int_t iChannel=0; iChannel<nChannels; iChannel++){
797 rocRms->SetValue(iChannel,rms->GetValue(iChannel));
802 //_____________________________________________________________________
803 void AliTRDCalibPadStatus::SetCalRocMeand(AliTRDCalROC *mean, Int_t det) /*FOLD00*/
806 // Put the AliTRDCalROC in the array fCalRocArrayMean
810 AliTRDCalROC *rocMean = GetCalRocMeand(det,kTRUE);
812 Int_t nChannels = rocMean->GetNchannels();
814 for (Int_t iChannel=0; iChannel<nChannels; iChannel++){
816 rocMean->SetValue(iChannel,mean->GetValue(iChannel));
822 //_____________________________________________________________________
823 void AliTRDCalibPadStatus::SetCalRocRMSd(AliTRDCalROC *rms, Int_t det) /*FOLD00*/
826 // Put the AliTRDCalROC in the array fCalRocArrayRMS
830 AliTRDCalROC *rocRms = GetCalRocRMSd(det,kTRUE);
832 Int_t nChannels = rocRms->GetNchannels();
834 for (Int_t iChannel=0; iChannel<nChannels; iChannel++){
836 rocRms->SetValue(iChannel,rms->GetValue(iChannel));
841 //_____________________________________________________________________________
842 Int_t AliTRDCalibPadStatus::GetLayer(Int_t d) const
845 // Reconstruct the layer number from the detector number
848 return ((Int_t) (d % 6));
852 //_____________________________________________________________________________
853 Int_t AliTRDCalibPadStatus::GetStack(Int_t d) const
856 // Reconstruct the chamber number from the detector number
859 return ((Int_t) (d % 30) / 6);
863 //_____________________________________________________________________________
864 Int_t AliTRDCalibPadStatus::GetSector(Int_t d) const
867 // Reconstruct the sector number from the detector number
870 return ((Int_t) (d / 30));