AliRoot Core  3dc7879 (3dc7879)
AliTPCCalibRaw.cxx
Go to the documentation of this file.
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  * *
4  * Author: The ALICE Off-line Project. *
5  * Contributors are mentioned in the code where appropriate. *
6  * *
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  **************************************************************************/
15 
16 /* $Id: $ */
17 
53 
54 //Root includes
55 #include <TROOT.h>
56 #include <TH2C.h>
57 #include <TH1F.h>
58 #include <TMap.h>
59 #include <TGraph.h>
60 #include <TObjString.h>
61 #include <TTimeStamp.h>
62 #include <TCanvas.h>
63 //AliRoot includes
64 #include "AliTPCCalROC.h"
65 #include "AliAltroRawStream.h"
66 #include "AliLog.h"
67 //class header
68 #include "AliTPCCalibRaw.h"
69 
71 ClassImp(AliTPCCalibRaw)
73 
76  fPeakDetMinus(1),
77  fPeakDetPlus(2),
78  fNFailL1Phase(0),
79  fNFailL1PhaseEvent(0),
80  fNSecTime(600), //default 10 minutes
81  fNBinsTime(60), //default 60*10 minutes = 10 hours
82  fPadProcessed(kFALSE),
83  fCurrentChannel(-1),
84  fCurrentSector(-1),
85  fLastSector(-2),
86  fCurrentRow(-1),
87  fCurrentPad(-1),
88  fLastTimeBinProc(0),
89  fPeakTimeBin(0),
90  fLastSignal(0),
91  fNOkPlus(0),
92  fNOkMinus(0),
93  fNanoSec(0),
94  fArrCurrentPhaseDist(4),
95  fArrCurrentPhase(kNRCU),
96  fArrFailEventNumber(100),
97  fArrALTROL1Phase(100000),
98  fArrALTROL1PhaseEvent(kNRCU),
99  fArrALTROL1PhaseFailEvent(kNRCU),
100  fHnDrift(0x0),
101  fVOccupancyEvent(100000),
102  fVSignalSumEvent(100000),
103  fVOccupancySenEvent(100000),
104  fVSignalSumSenEvent(100000),
105  fVNfiredPadsSenEvent(100000),
106  fVTimeStampEvent(100000)
107 {
108  //
109  // Default ctor
110  //
111  SetNameTitle("AliTPCCalibRaw","AliTPCCalibRaw");
112  CreateDVhist();
113  for (Int_t ircu=0;ircu<kNRCU;++ircu) fArrCurrentPhase.GetMatrixArray()[ircu]=-1;
114  fFirstTimeBin=850;
115  fLastTimeBin=1020;
116 }
117 //_____________________________________________________________________
118 AliTPCCalibRaw::AliTPCCalibRaw(const TMap *config) :
120 fPeakDetMinus(1),
121 fPeakDetPlus(2),
122 fNFailL1Phase(0),
123 fNFailL1PhaseEvent(0),
124 fNSecTime(600), //default 10 minutes
125 fNBinsTime(60), //default 60*10 minutes = 10 hours
126 fPadProcessed(kFALSE),
127 fCurrentChannel(-1),
128 fCurrentSector(-1),
129 fLastSector(-2),
130 fCurrentRow(-1),
131 fCurrentPad(-1),
132 fLastTimeBinProc(0),
133 fPeakTimeBin(0),
134 fLastSignal(0),
135 fNOkPlus(0),
136 fNOkMinus(0),
137 fNanoSec(0),
138 fArrCurrentPhaseDist(4),
139 fArrCurrentPhase(kNRCU),
140 fArrFailEventNumber(100),
141 fArrALTROL1Phase(100000),
142 fArrALTROL1PhaseEvent(kNRCU),
143 fArrALTROL1PhaseFailEvent(kNRCU),
144 fHnDrift(0x0),
145 fVOccupancyEvent(100000),
146 fVSignalSumEvent(100000),
147 fVOccupancySenEvent(100000),
148 fVSignalSumSenEvent(100000),
149 fVNfiredPadsSenEvent(100000),
150 fVTimeStampEvent(100000)
151 {
153 
154  SetNameTitle("AliTPCCalibRaw","AliTPCCalibRaw");
155  CreateDVhist();
156  for (Int_t ircu=0;ircu<kNRCU;++ircu) fArrCurrentPhase.GetMatrixArray()[ircu]=-1;
157  fFirstTimeBin=850;
158  fLastTimeBin=1020;
159  if (config->GetValue("FirstTimeBin")) fFirstTimeBin = ((TObjString*)config->GetValue("FirstTimeBin"))->GetString().Atoi();
160  if (config->GetValue("LastTimeBin")) fLastTimeBin = ((TObjString*)config->GetValue("LastTimeBin"))->GetString().Atoi();
161  if (config->GetValue("DebugLevel")) fDebugLevel = ((TObjString*)config->GetValue("DebugLevel"))->GetString().Atoi();
162 }
163 
164 //_____________________________________________________________________
166 {
168 
169  delete fHnDrift;
170 }
171 //_____________________________________________________________________
172 // AliTPCCalibRaw& AliTPCCalibRaw::operator = (const AliTPCCalibRaw &source)
173 // {
174 // //
175 // // assignment operator
176 // //
177 // if (&source == this) return *this;
178 // new (this) AliTPCCalibRaw(source);
179 //
180 // return *this;
181 // }
182 
183 //_____________________________________________________________________
184 Int_t AliTPCCalibRaw::Update(const Int_t isector, const Int_t iRow, const Int_t iPad,
185  const Int_t iTimeBin, const Float_t signal)
186 {
188 
189  if (iRow<0) return 0;
190  if (iPad<0) return 0;
191  if (iTimeBin<0) return 0;
192  //
193  Int_t iChannel = fROC->GetRowIndexes(isector)[iRow]+iPad; // global pad position in sector
194  //occupancy
195  fVOccupancyEvent.GetMatrixArray()[GetNevents()]++;
196  fVSignalSumEvent.GetMatrixArray()[GetNevents()]+=signal;
197  //occupancy in sensitive regions
198  Int_t npads=(Int_t)fROC->GetNPads(isector,iRow);
199  Int_t cpad=iPad-npads/2;
200  if (isector<(Int_t)fROC->GetNInnerSector()){
201  //IROC case (spot)
202  if ( iRow>19 && iRow<46 ){
203  if ( TMath::Abs(cpad)<7 ){
204  fVOccupancySenEvent.GetMatrixArray()[GetNevents()]++;
205  fVSignalSumSenEvent.GetMatrixArray()[GetNevents()]+=signal;
206  if (iChannel!=fCurrentChannel) fVNfiredPadsSenEvent.GetMatrixArray()[GetNevents()]++;
207  }
208  }
209  } else if ( iRow>75 ){
210  //OROC case (outer corners and last three rows are sensitive)
211  Int_t padEdge=(Int_t)TMath::Min(iPad,npads-iPad);
212  Int_t nrows=(Int_t)fROC->GetNRows(isector);
213  if ((nrows-iRow-1)<3 || padEdge<((((Int_t)iRow-76)/4+1))*2){
214  fVOccupancySenEvent.GetMatrixArray()[GetNevents()]++;
215  fVSignalSumSenEvent.GetMatrixArray()[GetNevents()]+=signal;
216  if (iChannel!=fCurrentChannel) fVNfiredPadsSenEvent.GetMatrixArray()[GetNevents()]++;
217  }
218  }
219  //
220  if ( (iTimeBin>fLastTimeBin) || (iTimeBin<fFirstTimeBin) ) return 0;
221  //don't process edge pads
222  if (IsEdgePad(isector,iRow,iPad)) return 0;
223 // Double_t x[kHnBinsDV]={1,isector,0};
224 // fHnDrift->Fill(x);
225  if (fCurrentChannel==iChannel){
226  if (fPadProcessed) return 0;
227  } else {
228  fPadProcessed=kFALSE;
229  fNOkPlus=0;
230  fNOkMinus=0;
231  fPeakTimeBin=0;
232  fLastSignal=0;
233  }
234 // Double_t x2[kHnBinsDV]={2,isector,0};
235 // fHnDrift->Fill(x2);
236 
237 
238  if (signal>fLastSignal) ++fNOkPlus;
239  else if(signal<fLastSignal && fNOkPlus>=fPeakDetPlus){
240  ++fNOkMinus;
242  if ( fNOkMinus>=fPeakDetMinus ) {
243  Double_t x[kHnBinsDV]={static_cast<Double_t>(fPeakTimeBin),static_cast<Double_t>(isector),static_cast<Double_t>((fTimeStamp-fFirstTimeStamp)/fNSecTime)};
244  fHnDrift->Fill(x);
245  }
246  } else {
247  fNOkPlus=0;
248  fNOkMinus=0;
249  fPeakTimeBin=0;
250  fLastSignal=0;
251  }
252 
253  fLastTimeBinProc=iTimeBin;
254  fLastSignal=TMath::Nint(signal);
255  fCurrentChannel = iChannel;
256  return 0;
257 }
258 //_____________________________________________________________________
261 
262  //set nanoseconds
263  if (!fNanoSec) {
264  TTimeStamp s;
265  fNanoSec=s.GetNanoSec();
266  }
267  // current phase
268  Int_t phase=(Int_t)(GetL1PhaseTB()*4.);
269  //Fill pahse information of current rcu and event
270  fArrCurrentPhase.GetMatrixArray()[fCurrDDLNum]=phase;
271  //increase phase counter
272  ++((fArrCurrentPhaseDist.GetMatrixArray())[phase]);
273 
274 }
275 //_____________________________________________________________________
277 {
279 
280  fCurrentChannel=-1;
281  fCurrentRow=-1;
282  fCurrentPad=-1;
283  fArrCurrentPhaseDist.Zero();
284 }
285 //_____________________________________________________________________
287 {
289 
290 
291  //find phase of the current event
292  Int_t phaseMaxEntries=-1;
293  Int_t maxEntries=0;
294  for (Int_t i=0;i<fArrCurrentPhaseDist.GetNrows();++i){
295  Int_t entries=(Int_t)fArrCurrentPhaseDist[i];
296  if (maxEntries<entries) {
297  maxEntries=entries;
298  phaseMaxEntries=i;
299  }
300  }
301  // store phase of current event
302  if (fArrALTROL1Phase.GetNrows()-1<=GetNevents())
303  fArrALTROL1Phase.ResizeTo(GetNevents()+10000);
304  (fArrALTROL1Phase.GetMatrixArray())[GetNevents()]=phaseMaxEntries;
305 
306  //loop over RCUs and test failures
307  UInt_t fail=0;
308  for (Int_t ircu=0;ircu<kNRCU;++ircu){
309  Int_t phase=(Int_t)fArrCurrentPhase[ircu];
310  if (phase<0) continue;
311  if (phase!=phaseMaxEntries){
312  TVectorF *arr=MakeArrL1PhaseRCU(fCurrDDLNum,kTRUE);
313  if (arr->GetNrows()-1<=(Int_t)fNFailL1PhaseEvent) arr->ResizeTo(arr->GetNrows()+100);
314  (arr->GetMatrixArray())[fNFailL1PhaseEvent]=phase;
315  ++fNFailL1Phase;
316  fail=1;
317  }
318  //reset current phase information
319  fArrCurrentPhase[ircu]=-1;
320  }
321  if (fail){
322  if (fArrFailEventNumber.GetNrows()-1<=(Int_t)fNFailL1PhaseEvent) fArrFailEventNumber.ResizeTo(fArrFailEventNumber.GetNrows()+100);
324  }
325  fNFailL1PhaseEvent+=fail;
326  //time stamps
328  fNanoSec=0;
329  //occupance related
330  if (fVOccupancyEvent.GetNrows()-1<=GetNevents()){
331  fVOccupancyEvent.ResizeTo(GetNevents()+10000);
332  fVSignalSumEvent.ResizeTo(GetNevents()+10000);
333  fVOccupancySenEvent.ResizeTo(GetNevents()+10000);
334  fVSignalSumSenEvent.ResizeTo(GetNevents()+10000);
335  fVTimeStampEvent.ResizeTo(GetNevents()+10000);
336  fVNfiredPadsSenEvent.ResizeTo(GetNevents()+10000);
337  }
339 }
340 //_____________________________________________________________________
342 {
347 
348  //number of relavant events, depending on version
349  Int_t nevents=GetNevents();
350  //check version
351  Bool_t newVersion=kFALSE;
352  for (Int_t ircu=0; ircu<kNRCU; ++ircu){
353  const TVectorF *v=GetALTROL1PhaseEventsRCU(ircu);
354  if (!v) continue;
355  if ((UInt_t)(v->GetNrows())==fNFailL1PhaseEvent){
356  newVersion=kTRUE;
357  nevents=fNFailL1PhaseEvent;
358  }
359  break;
360  }
361  TH2C *h2 = new TH2C("hL1FailRCUEvents","L1 Failures;RCU;Event",kNRCU,0,kNRCU,nevents,0,nevents);
362  Int_t add=0;
363  for (Int_t ircu=0;ircu<kNRCU;++ircu) {
364  const TVectorF *v=GetALTROL1PhaseEventsRCU(ircu);
365  if (type==0){
366  add=1;
367  h2->SetMinimum(0);
368  h2->SetMaximum(2);
369  } else if (type==1) {
370  add=0;
371  h2->SetMinimum(0);
372  h2->SetMaximum(4);
373  }
374  if (!v) continue;
375  for (Int_t iev=0;iev<nevents;++iev) {
376  Float_t val=(*v)(iev);
377  Float_t phase=fArrALTROL1Phase.GetMatrixArray()[iev];
378  if (newVersion) {
379  Int_t event=(Int_t)fArrFailEventNumber.GetMatrixArray()[iev];
380  phase=fArrALTROL1Phase.GetMatrixArray()[event];
381  }
382  if (type==0) val=(val!=phase);
383  h2->SetBinContent(ircu+1,iev+1,val+add);
384  }
385  }
386  return h2;
387 }
388 //_____________________________________________________________________
390 {
392 
393  TH1F *h=new TH1F("L1phaseDist","Normalized L1 phase distribution;phase;fraction of events",4,0,4);
394  h->Sumw2();
395  for (Int_t iev=0;iev<GetNevents();++iev) h->Fill(fArrALTROL1Phase.GetMatrixArray()[iev]);
396  if (GetNevents()>0) h->Scale(1./GetNevents());
397  h->SetMinimum(0);
398  h->SetMaximum(1);
399  return h;
400 }
401 //_____________________________________________________________________
403 {
405 
406  TVectorF *v=new TVectorF(4);
407  for (Int_t iev=0;iev<GetNevents();++iev) {
408  Int_t phase=(Int_t)fArrALTROL1Phase.GetMatrixArray()[iev];
409  ((v->GetMatrixArray())[phase])+=1./GetNevents();
410  }
411  return v;
412 }
413 //_____________________________________________________________________
415 {
418 
419  TH2C *h2 = new TH2C("hL1FailRCUEventsIROC","L1 Failures IROCs;RCU;Event",72,0,36,GetNevents(),0,GetNevents());
420  for (Int_t ircu=0;ircu<72;++ircu) {
421  const TVectorF *v=0;
422  if (type==0) v=GetALTROL1PhaseFailEventsRCU(ircu);
423  else if (type==1) v=GetALTROL1PhaseEventsRCU(ircu);
424  if (!v) continue;
425  for (Int_t iev=0;iev<GetNevents();++iev) {
426  h2->SetBinContent(ircu+1,iev+1,(*v)(iev));
427  }
428  }
429  return h2;
430 }
431 //_____________________________________________________________________
433 {
436 
437  TH2C *h2 = new TH2C("hL1FailRCUEventsOROC","L1 Failures OROCs;RCU;Event",144,0,36,GetNevents(),0,GetNevents());
438  for (Int_t ircu=72;ircu<kNRCU;++ircu) {
439  const TVectorF *v=0;
440  if (type==0) v=GetALTROL1PhaseFailEventsRCU(ircu);
441  else if (type==1) v=GetALTROL1PhaseEventsRCU(ircu);
442  if (!v) continue;
443  for (Int_t iev=0;iev<GetNevents();++iev) {
444  h2->SetBinContent(ircu-72+1,iev+1,(*v)(iev));
445  }
446  }
447  return h2;
448 }
449 //_____________________________________________________________________
451 {
453 
454  if (fHnDrift) return;
455  //HnSparse bins
456  //time bin, roc, time
457  Int_t bins[kHnBinsDV] = {static_cast<Int_t>(fLastTimeBin-fFirstTimeBin), 72, static_cast<Int_t>(fNBinsTime)};
458  Double_t xmin[kHnBinsDV] = {static_cast<Double_t>(fFirstTimeBin),0,0};
459  Double_t xmax[kHnBinsDV] = {static_cast<Double_t>(fLastTimeBin),72,static_cast<Double_t>(fNBinsTime)};
460  fHnDrift=new THnSparseI("fHnDrift",Form("Drift velocity using last time bin;time bin[#times 100ns];ROC;Time bin [#times %us]",fNSecTime),kHnBinsDV, bins, xmin, xmax);
461 
462 }
463 //_____________________________________________________________________
465 {
467 
468  //resize arrays
469  fArrALTROL1Phase.ResizeTo(GetNevents());
470  for (Int_t ircu=0;ircu<kNRCU;++ircu){
471  TVectorF *arr=MakeArrL1PhaseRCU(ircu);//MakeArrL1PhaseRCU(ircu);
472  if (!arr) continue;
473  arr->ResizeTo(fNFailL1PhaseEvent);
475 // TVectorF *arrF=MakeArrL1PhaseFailRCU(ircu);
476 // arrF->ResizeTo(1);
477  }
478  //resize occupancy arrays only save event occupancy in sensitive regions by default
479  //save the rest in debub mode
480  fVOccupancySenEvent.ResizeTo(GetNevents());
481  if (fDebugLevel>0){
482  fVOccupancyEvent.ResizeTo(GetNevents());
483  fVSignalSumEvent.ResizeTo(GetNevents());
484  fVSignalSumSenEvent.ResizeTo(GetNevents());
485  fVNfiredPadsSenEvent.ResizeTo(GetNevents());
486  fVTimeStampEvent.ResizeTo(GetNevents());
487  } else {
488  fVOccupancyEvent.ResizeTo(0);
489  fVSignalSumEvent.ResizeTo(0);
490  fVSignalSumSenEvent.ResizeTo(0);
491  fVNfiredPadsSenEvent.ResizeTo(0);
492  fVTimeStampEvent.ResizeTo(0);
493  }
494  //Analyse drift velocity TODO
495 
496 }
497 //_____________________________________________________________________
498 TGraph* AliTPCCalibRaw::MakeGraphOccupancy(const Int_t type, const Int_t xType)
499 {
520 
521  TString title("Event occupancy");
522  TString xTitle("Time");
523  TString yTitle("number of samples");
524  TGraph *gr=new TGraph(GetNevents());
525  if (fVSignalSumEvent.GetNrows()==0&&!(type==10||type==14)) return 0;
526  TVectorF *vOcc=&fVOccupancyEvent;
527  TVectorF *vSum=&fVSignalSumEvent;
528  TVectorF *vPads=&fVNfiredPadsSenEvent;
529  Double_t norm=557568.;
530  if (type!=14&&fVOccupancyEvent.GetNrows()==0){
531  AliWarning("In non debug mode only occupancy in sensitive regions vs. event awailable!!!");
532  return 0;
533  }
534  if (type>=10){
535  vOcc=&fVOccupancySenEvent;
536  vSum=&fVSignalSumSenEvent;
537  vPads=&fVNfiredPadsSenEvent;
538  norm=33012.;
539  }
540  for (Int_t i=0;i<GetNevents(); ++i){
541  Double_t nAboveThreshold=vOcc->GetMatrixArray()[i];
542 
543  Double_t nSumADC =1;
544  Double_t timestamp =1;
545  Double_t nPads =1;
546 
547  if (fVOccupancyEvent.GetNrows()>0){
548  nSumADC =vSum->GetMatrixArray()[i];
549  timestamp =fVTimeStampEvent.GetMatrixArray()[i]+fFirstTimeStamp;
550  nPads =vPads->GetMatrixArray()[i];
551  }
552  Double_t x=timestamp;
553  Double_t y=0;
554  //
555  if (xType==1) x=i;
556  //
557  if (type%10==0) y=nAboveThreshold;
558  if (type%10==1&&nAboveThreshold>0) y=nSumADC/nAboveThreshold;
559  if (type%10==2) y=nSumADC;
560  if (type%10==3&&nSumADC>0) y=nAboveThreshold/nSumADC;
561  if (type%10==4) y=nAboveThreshold/(norm*(fLastTimeBin-fFirstTimeBin));
562  if (type==5) y=fVOccupancySenEvent.GetMatrixArray()[i]/fVOccupancyEvent.GetMatrixArray()[i];
563  if (type==16&&nPads>0) y=nAboveThreshold/nPads;
564  if (type==17) y=nPads/norm;
565  //
566  gr->SetPoint(i,x,y);
567  }
568  if (xType==1) xTitle="Event";
569  if (type%10==1) yTitle="Mean ADC counts/sample";
570  else if (type%10==2) yTitle="Data volume [ADC counts]";
571  else if (type%10==3) yTitle="samples per ADC count";
572  else if (type%10==4) yTitle="sample occupancy";
573  if (type==5) yTitle="N samples (sensitive) / N samples";
574  if (type%10==6) yTitle="N samples / N pads";
575  if (type==17) yTitle="Pad Occupancy";
576  if (type>=10) yTitle+=" (sensitive)";
577  title=yTitle+":"+xTitle;
578  title+=";"+xTitle+";"+yTitle;
579  gr->SetTitle(title.Data());
580  gr->SetEditable(kFALSE);
581  return gr;
582 }
583 //_____________________________________________________________________
584 // TGraph* AliTPCCalibRaw::MakeGraphNoiseEvents()
585 // {
586  //
587  // Not implemented for the moment
588  //
589 // return 0;
590 // }
591 //_____________________________________________________________________
592 TCanvas* AliTPCCalibRaw::MakeCanvasOccupancy(const Int_t xType, Bool_t sen)
593 {
599 
600  TString name("RawOccupancy_");
601  TString title("Raw Occupancy vs. ");
602  if (xType==0){
603  name+="Time";
604  title+="time";
605  } else if (xType==1){
606  name+="Event";
607  title+="event";
608  }
609  if (sen){
610  name+="Sen";
611  title+=" (sensitive)";
612  }
613  TCanvas *c=(TCanvas*)gROOT->GetListOfCanvases()->FindObject(name.Data());
614  if (!c) c=new TCanvas(name.Data(),title.Data());
615  c->Clear();
616  c->Divide(2,2);
617  for (Int_t i=0;i<4;++i){
618  c->cd(i+1);
619  TGraph *gr=MakeGraphOccupancy(i+10*(Int_t)sen,xType);
620  gr->Draw("alp");
621  }
622  return c;
623 }
624 
625 //_____________________________________________________________________
627 {
629 
630  if (!sig) return;
631  MergeBase(sig);
632  //Add last time bin distribution histogram
633  fHnDrift->Add(sig->fHnDrift);
634 
635  //Add occupancy data
636 
637 }
638 
639 //_____________________________________________________________________
640 Long64_t AliTPCCalibRaw::Merge(TCollection * const list)
641 {
643 
644  Long64_t nmerged=1;
645 
646  TIter next(list);
647  AliTPCCalibRaw *ce=0;
648  TObject *o=0;
649 
650  while ( (o=next()) ){
651  ce=dynamic_cast<AliTPCCalibRaw*>(o);
652  if (ce){
653  Merge(ce);
654  ++nmerged;
655  }
656  }
657 
658  return nmerged;
659 }
660 
TH2C * MakeHistL1RCUEvents(Int_t type=0)
UInt_t fNFailL1Phase
Number of failures in L1 phase.
Double_t GetL1PhaseTB() const
TVectorF fArrCurrentPhaseDist
! Phase distribution of the current event
Int_t fPeakTimeBin
! time bin with local maximum
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Definition: AliTPCROC.h:30
Int_t fCurrentPad
! current pad processed
Bool_t IsEdgePad(Int_t sector, Int_t row, Int_t pad) const
UInt_t fFirstTimeStamp
First event time stamp.
Int_t fPeakDetPlus
Consecutive timebins on falling edge to be regarded as a signal.
const TVectorF * GetALTROL1PhaseFailEventsRCU(Int_t rcu) const
virtual void ResetEvent()
const int kNRCU
Definition: EMCLEDda.cxx:33
UInt_t GetNRows(UInt_t sector) const
Definition: AliTPCROC.h:28
void MergeBase(const AliTPCCalibRawBase *calib)
void Merge(AliTPCCalibRaw *const sig)
TVectorF fArrCurrentPhase
! Current phase of all RCUs
TROOT * gROOT
TGraph * MakeGraphOccupancy(const Int_t type=0, const Int_t xType=0)
Int_t fLastTimeBinProc
! last time bin processed
virtual void EndEvent()
TVectorF fVSignalSumEvent
occupancy per event (sum of all adc values)
Int_t fCurrentRow
! current row processed
Int_t fLastTimeBin
Last Time bin used for analysis.
Base class for the calibration algorithms using raw data as input.
#define AliWarning(message)
Definition: AliLog.h:541
Int_t fLastSignal
! last signal processed
Int_t fNanoSec
! current nano seconds stamp
TH2C * MakeHistL1RCUEventsIROC(Int_t type=0)
const TVectorF * GetALTROL1PhaseEventsRCU(Int_t rcu) const
UInt_t fNSecTime
Number of seconds per bin in time.
UInt_t GetNInnerSector() const
Definition: AliTPCROC.h:47
AliTPCROC * fROC
! ROC information
Int_t fFirstTimeBin
First Time bin used for analysis.
virtual void Analyse()
UInt_t GetTimeStamp() const
TGraph * gr
Definition: CalibTime.C:25
const UInt_t * GetRowIndexes(UInt_t sector) const
Definition: AliTPCROC.h:33
TH1F * MakeHistL1PhaseDist()
UInt_t fNBinsTime
Number of bin in time.
UInt_t fNFailL1PhaseEvent
Number of events with L1 phase failures.
Int_t fCurrDDLNum
! Current DDL number
virtual void UpdateDDL()
UInt_t fTimeStamp
! time stamp from event header
Int_t GetNevents() const
Int_t fNOkPlus
! number of processed time bins fullfilling peak criteria
TVectorF * MakeArrL1PhaseRCU(Int_t rcu, Bool_t force=kFALSE)
TVectorF fVSignalSumSenEvent
occupancy per event (sum of all adc values) in sensitive regions
Int_t fCurrentChannel
! current channel processed
TVectorF * MakeVectL1PhaseDist()
THnSparseI * fHnDrift
Histogram last time bin vs. ROC, Time.
virtual ~AliTPCCalibRaw()
TVectorF fVTimeStampEvent
timestamp for all events
TH2C * MakeHistL1RCUEventsOROC(Int_t type=0)
Bool_t fPadProcessed
! if last pead has already been filled for the current pad
TVectorF fArrFailEventNumber
event numbers of failed events;
Int_t fPeakDetMinus
Consecutive timebins on rising edge to be regarded as a signal.
TVectorF fVNfiredPadsSenEvent
number of pads with a signal above threshold in sensitive regions
Int_t fNOkMinus
! number of processed time bins fullfilling peak criteria
virtual Int_t Update(const Int_t isector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, const Float_t signal)
TVectorF fVOccupancyEvent
occupancy per event (number of samples above threshold)
TCanvas * MakeCanvasOccupancy(const Int_t xType=1, Bool_t sen=kFALSE)
Int_t fDebugLevel
! debug level
TVectorF fArrALTROL1Phase
Array of L1 phases on an event bases;.
Implementation of the TPC Raw drift velocity and Altro L1 Phase calibration.
TVectorF fVOccupancySenEvent
occupancy per event (number of samples abouve threshold) in sensitive regions