AliRoot Core  a565103 (a565103)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliTPCdataQA.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 
94 
95 //Root includes
96 #include <TH1F.h>
97 #include <TString.h>
98 #include <TMath.h>
99 #include <TDirectory.h>
100 #include <TFile.h>
101 #include <TError.h>
102 #include <TMap.h>
103 #include <TProfile.h>
104 #include <TObjArray.h>
105 //AliRoot includes
106 #include "AliRawReader.h"
107 #include "AliRawReaderRoot.h"
108 #include "AliRawReaderDate.h"
109 #include "AliTPCRawStreamV3.h"
110 #include "AliTPCCalROC.h"
111 #include "AliTPCROC.h"
112 #include "AliMathBase.h"
113 #include "TTreeStream.h"
114 
115 //date
116 #include "event.h"
117 #include "AliTPCCalPad.h"
119 
120 //header file
121 #include "AliTPCdataQA.h"
122 #include "AliLog.h"
123 
124 
128 
129 AliTPCdataQA::AliTPCdataQA() : /*FOLD00*/
130  fFirstTimeBin(60),
131  fLastTimeBin(1000),
132  fAdcMin(3),
133  fAdcMax(1000),
134  fMinQMax(5.f),
135  fRequireNeighbouringPad(kTRUE),
136  fMapping(NULL),
137  fPedestal(0),
138  fNoise(0),
139  fNLocalMaxima(0),
140  fMaxCharge(0),
141  fMeanCharge(0),
142  fNoThreshold(0),
143  fNTimeBins(0),
144  fNPads(0),
145  fTimePosition(0),
146  fOverThreshold10(0),
147  fOverThreshold20(0),
148  fOverThreshold30(0),
149  fHistQVsTimeSideA(0),
150  fHistQVsTimeSideC(0),
151  fHistQMaxVsTimeSideA(0),
152  fHistQMaxVsTimeSideC(0),
153  fHistOccupancyVsEvent(0),
154  fHistNclustersVsEvent(0),
155  fEventCounter(0),
156  fIsAnalysed(kFALSE),
157  fMaxEvents(500000), // Max events for event histograms
158  fEventsPerBin(1000), // Events per bin for event histograms
159  fSignalCounter(0), // Signal counter
160  fClusterCounter(0), // Cluster counter
161  fActiveChambers(72),
162  fAllBins(0),
163  fAllSigBins(0),
164  fAllNSigBins(0),
165  fRowsMax(0),
166  fPadsMax(0),
167  fTimeBinsMax(0),
168  fIsDQM(kFALSE),
169  fHistOccVsSector(0x0),
170  fHistOcc2dVsSector(0x0),
171  fHistQVsSector(0x0),
172  fHistQmaxVsSector(0x0),
173  fOccVec(0x0),
174  fOccMaxVec(0x0),
175  fOccVecFine(0x0),
176  fOccMaxVecFine(0x0)
177 {
178  //
179  // default constructor
180  //
181 
182  for (Int_t i=0; i<72; ++i) {fActiveChambers.SetBitNumber(i,kTRUE);}
183 }
184 
185 //_____________________________________________________________________
186 AliTPCdataQA::AliTPCdataQA(const AliTPCdataQA &ped) : /*FOLD00*/
187  TH1F(ped),
188  fFirstTimeBin(ped.GetFirstTimeBin()),
189  fLastTimeBin(ped.GetLastTimeBin()),
190  fAdcMin(ped.GetAdcMin()),
191  fAdcMax(ped.GetAdcMax()),
192  fMinQMax(ped.GetMinQMax()),
193  fRequireNeighbouringPad(ped.GetRequireNeighbouringPad()),
194  fMapping(NULL),
195  fPedestal(0),
196  fNoise(0),
197  fNLocalMaxima(0),
198  fMaxCharge(0),
199  fMeanCharge(0),
200  fNoThreshold(0),
201  fNTimeBins(0),
202  fNPads(0),
203  fTimePosition(0),
204  fOverThreshold10(0),
205  fOverThreshold20(0),
206  fOverThreshold30(0),
207  fHistQVsTimeSideA(0),
208  fHistQVsTimeSideC(0),
209  fHistQMaxVsTimeSideA(0),
210  fHistQMaxVsTimeSideC(0),
211  fHistOccupancyVsEvent(0),
212  fHistNclustersVsEvent(0),
213  fEventCounter(ped.GetEventCounter()),
214  fIsAnalysed(ped.GetIsAnalysed()),
215  fMaxEvents(ped.GetMaxEvents()),
216  fEventsPerBin(ped.GetEventsPerBin()),
217  fSignalCounter(ped.GetSignalCounter()),
218  fClusterCounter(ped.GetClusterCounter()),
219  fActiveChambers(ped.fActiveChambers),
220  fAllBins(0),
221  fAllSigBins(0),
222  fAllNSigBins(0),
223  fRowsMax(0),
224  fPadsMax(0),
225  fTimeBinsMax(0),
226  fIsDQM(ped.GetIsDQM()),
227  fHistOccVsSector(0x0),
228  fHistOcc2dVsSector(0x0),
229  fHistQVsSector(0x0),
230  fHistQmaxVsSector(0x0),
231  fOccVec(0x0),
232  fOccMaxVec(0x0),
233  fOccVecFine(0x0),
234  fOccMaxVecFine(0x0)
235 {
237 
238  if(ped.GetNLocalMaxima())
240  if(ped.GetMaxCharge())
241  fMaxCharge = new AliTPCCalPad(*ped.GetMaxCharge());
242  if(ped.GetMeanCharge())
243  fMeanCharge = new AliTPCCalPad(*ped.GetMeanCharge());
244  if(ped.GetNoThreshold())
246  if(ped.GetNTimeBins())
247  fNTimeBins = new AliTPCCalPad(*ped.GetNTimeBins());
248  if(ped.GetNPads())
249  fNPads = new AliTPCCalPad(*ped.GetNPads());
250  if(ped.GetTimePosition())
252  if(ped.GetOverThreshold10())
254  if(ped.GetOverThreshold20())
256  if(ped.GetOverThreshold30())
258  if(ped.GetHistQVsTimeSideA()) {
259  fHistQVsTimeSideA = new TProfile(*ped.GetHistQVsTimeSideA());
260  fHistQVsTimeSideA->SetDirectory(0);
261  }
262  if(ped.GetHistQVsTimeSideC()) {
263  fHistQVsTimeSideC = new TProfile(*ped.GetHistQVsTimeSideC());
264  fHistQVsTimeSideC->SetDirectory(0);
265  }
266  if(ped.GetHistQMaxVsTimeSideA()) {
267  fHistQMaxVsTimeSideA = new TProfile(*ped.GetHistQMaxVsTimeSideA());
268  fHistQMaxVsTimeSideA->SetDirectory(0);
269  }
270  if(ped.GetHistQMaxVsTimeSideC()) {
271  fHistQMaxVsTimeSideC = new TProfile(*ped.GetHistQMaxVsTimeSideC());
272  fHistQMaxVsTimeSideC->SetDirectory(0);
273  }
274  if(ped.GetHistOccupancyVsEventConst()) {
276  fHistOccupancyVsEvent->SetDirectory(0);
277  }
278  if(ped.GetHistNclustersVsEventConst()) {
280  fHistNclustersVsEvent->SetDirectory(0);
281  }
282 }
283 
284 //_____________________________________________________________________
285 AliTPCdataQA::AliTPCdataQA(const TMap *config) : /*FOLD00*/
286  TH1F("TPCRAW","TPCRAW",100,0,100),
287  fFirstTimeBin(60),
288  fLastTimeBin(1000),
289  fAdcMin(3),
290  fAdcMax(1000),
291  fMinQMax(5.f),
292  fRequireNeighbouringPad(kTRUE),
293  fMapping(NULL),
294  fPedestal(0),
295  fNoise(0),
296  fNLocalMaxima(0),
297  fMaxCharge(0),
298  fMeanCharge(0),
299  fNoThreshold(0),
300  fNTimeBins(0),
301  fNPads(0),
302  fTimePosition(0),
303  fOverThreshold10(0),
304  fOverThreshold20(0),
305  fOverThreshold30(0),
306  fHistQVsTimeSideA(0),
307  fHistQVsTimeSideC(0),
308  fHistQMaxVsTimeSideA(0),
309  fHistQMaxVsTimeSideC(0),
310  fHistOccupancyVsEvent(0),
311  fHistNclustersVsEvent(0),
312  fEventCounter(0),
313  fIsAnalysed(kFALSE),
314  fMaxEvents(500000),
315  fEventsPerBin(1000),
316  fSignalCounter(0),
317  fClusterCounter(0),
318  fActiveChambers(72),
319  fAllBins(0),
320  fAllSigBins(0),
321  fAllNSigBins(0),
322  fRowsMax(0),
323  fPadsMax(0),
324  fTimeBinsMax(0),
325  fIsDQM(kFALSE),
326  fHistOccVsSector(0x0),
327  fHistOcc2dVsSector(0x0),
328  fHistQVsSector(0x0),
329  fHistQmaxVsSector(0x0),
330  fOccVec(0x0),
331  fOccMaxVec(0x0),
332  fOccVecFine(0x0),
333  fOccMaxVecFine(0x0)
334 {
336 
337  if (config->GetValue("FirstTimeBin")) fFirstTimeBin = ((TObjString*)config->GetValue("FirstTimeBin"))->GetString().Atoi();
338  if (config->GetValue("LastTimeBin")) fLastTimeBin = ((TObjString*)config->GetValue("LastTimeBin"))->GetString().Atoi();
339  if (config->GetValue("AdcMin")) fAdcMin = ((TObjString*)config->GetValue("AdcMin"))->GetString().Atoi();
340  if (config->GetValue("AdcMax")) fAdcMax = ((TObjString*)config->GetValue("AdcMax"))->GetString().Atoi();
341  if (config->GetValue("MinQMax")) fMinQMax = ((TObjString*)config->GetValue("MinQMax"))->GetString().Atof();
342  if (config->GetValue("MaxEvents")) fMaxEvents = ((TObjString*)config->GetValue("MaxEvents"))->GetString().Atoi();
343  if (config->GetValue("EventsPerBin")) fEventsPerBin = ((TObjString*)config->GetValue("EventsPerBin"))->GetString().Atoi();
344  if (config->GetValue("RequireNeighbouringPad")) fRequireNeighbouringPad = ((TObjString*)config->GetValue("RequireNeighbouringPad"))->GetString().Atoi();
345  for (Int_t i=0; i<72; ++i) {fActiveChambers.SetBitNumber(i,kTRUE);}
346 }
347 
348 //_____________________________________________________________________
350 {
352 
353  if (&source == this) return *this;
354  new (this) AliTPCdataQA(source);
355 
356  return *this;
357 }
358 
359 
360 //_____________________________________________________________________
362 {
364 
365  // do not delete fMapping, because we do not own it.
366  // do not delete fMapping, because we do not own it.
367  // do not delete fNoise and fPedestal, because we do not own them.
368 
369  delete fNLocalMaxima;
370  delete fMaxCharge;
371  delete fMeanCharge;
372  delete fNoThreshold;
373  delete fNTimeBins;
374  delete fNPads;
375  delete fTimePosition;
376  delete fOverThreshold10;
377  delete fOverThreshold20;
378  delete fOverThreshold30;
379  delete fHistQVsTimeSideA;
380  delete fHistQVsTimeSideC;
381  delete fHistQMaxVsTimeSideA;
382  delete fHistQMaxVsTimeSideC;
383  delete fHistOccupancyVsEvent;
384  delete fHistNclustersVsEvent;
385 
386  // DQM
387  delete fHistOccVsSector;
388  delete fHistOcc2dVsSector;
389  delete fHistQVsSector;
390  delete fHistQmaxVsSector;
391  delete fOccVec;
392  delete fOccMaxVec;
393  delete fOccVecFine;
394  delete fOccMaxVecFine;
395 
396  for (Int_t iRow = 0; iRow < fRowsMax; iRow++) {
397  delete [] fAllBins[iRow];
398  delete [] fAllSigBins[iRow];
399  }
400  delete [] fAllBins;
401  delete [] fAllSigBins;
402  delete [] fAllNSigBins;
403 }
404 
405 //_____________________________________________________________________
407 {
412 
413  if(!fHistOccupancyVsEvent) {
414 
415  Int_t nBins = fMaxEvents/fEventsPerBin;
416  fHistOccupancyVsEvent = new TH1F("hOccupancyVsEvent", "Occupancy vs event number (~time); Event number; Occupancy", nBins, 0, nBins*fEventsPerBin);
417  fHistOccupancyVsEvent->SetDirectory(0);
418  }
419 
420  return fHistOccupancyVsEvent;
421 }
422 
423 //_____________________________________________________________________
425 {
430 
431  if(!fHistNclustersVsEvent) {
432 
433  Int_t nBins = fMaxEvents/fEventsPerBin;
434  fHistNclustersVsEvent = new TH1F("hNclustersVsEvent", "Nclusters vs event number (~time); Event number; Nclusters per event", nBins, 0, nBins*fEventsPerBin);
435  fHistNclustersVsEvent->SetDirectory(0);
436  }
437 
438  return fHistNclustersVsEvent;
439 }
440 
441 //_____________________________________________________________________
443 {
447 
452 
453  if(fEventCounter > fMaxEvents) {
454 
455  // we have to expand the histogram to handle the larger number of
456  // events. The way it is done now is to double the range and the
457  // number of events per bin (so the number of histogram bins stays
458  // constant)
459  fEventsPerBin *= 2;
460  fMaxEvents *= 2;
461 
462  // Change histogram limits
463  const Int_t nBins = fHistOccupancyVsEvent->GetXaxis()->GetNbins();
464  fHistOccupancyVsEvent->GetXaxis()->Set(nBins, fHistOccupancyVsEvent->GetXaxis()->GetNbins(), fMaxEvents);
465  fHistNclustersVsEvent->GetXaxis()->Set(nBins, fHistNclustersVsEvent->GetXaxis()->GetNbins(), fMaxEvents);
466 
467  // Rebin the histogram
468  for(Int_t bin = 1; bin <= nBins; bin+=2) {
469 
470  Int_t newBin = TMath::Nint(Float_t(bin+1)/2.0);
471  Float_t newContent = (fHistOccupancyVsEvent->GetBinContent(bin)+
472  fHistOccupancyVsEvent->GetBinContent(bin+1))/2.0;
473  fHistOccupancyVsEvent->SetBinContent(newBin, newContent);
474 
475  newContent = (fHistNclustersVsEvent->GetBinContent(bin)+
476  fHistNclustersVsEvent->GetBinContent(bin+1))/2.0;
477  fHistNclustersVsEvent->SetBinContent(newBin, newContent);
478  }
479 
480  // Set the remaining bins to 0
481  Int_t lastHalf = nBins/2 +1;
482  for(Int_t bin = lastHalf; bin <= nBins; bin++) {
483 
484  fHistOccupancyVsEvent->SetBinContent(bin, 0);
485  fHistNclustersVsEvent->SetBinContent(bin, 0);
486  }
487 
488  // In this case we should nut update but wait untill the new
489  // number of events per bin is reached!
490  return;
491  }
492 
493  const Int_t bin = TMath::Nint(Float_t(fEventCounter)/fEventsPerBin);
494 
495  Float_t averageOccupancy =
497  / 570132.0; // 570,132 is number of pads
498  fHistOccupancyVsEvent->SetBinContent(bin, averageOccupancy);
499  fSignalCounter = 0;
500 
501  Float_t averageNclusters =
503  fHistNclustersVsEvent->SetBinContent(bin, averageNclusters);
504  fClusterCounter = 0;
505 }
506 
507 //_____________________________________________________________________
509 {
511 
512  Bool_t withInput = kFALSE;
513  Int_t nSignals = 0;
514  Int_t lastSector = -1;
515 
516  Init();
517 
518  while ( rawStreamV3->NextDDL() ){
519 
520  while ( rawStreamV3->NextChannel() ){
521 
522  Int_t iSector = rawStreamV3->GetSector(); // current sector
523  Int_t iRow = rawStreamV3->GetRow(); // current row
524  Int_t iPad = rawStreamV3->GetPad(); // current pad
525  Int_t iPatch = rawStreamV3->GetPatchIndex(); // current patch
526  Int_t iBranch = rawStreamV3->GetBranch(); // current branch
527  if (iRow<0 || iPad<0) continue;
528  // Call local maxima finder if the data is in a new sector
529  if(iSector != lastSector) {
530 
531  if(nSignals>0)
532  FindLocalMaxima(lastSector);
533 
534  CleanArrays();
535  lastSector = iSector;
536  nSignals = 0;
537  }
538 
539  while ( rawStreamV3->NextBunch() ){
540 
541  Int_t startTbin = (Int_t)rawStreamV3->GetStartTimeBin();
542  Int_t bunchlength = (Int_t)rawStreamV3->GetBunchLength();
543  const UShort_t *sig = rawStreamV3->GetSignals();
544 
545  for (Int_t iTimeBin = 0; iTimeBin<bunchlength; iTimeBin++){
546  Float_t signal=(Float_t)sig[iTimeBin];
547  nSignals += Update(iSector,iRow,iPad,startTbin--,signal, iPatch, iBranch);
548  withInput = kTRUE;
549  }
550  }
551  }
552  }
553 
554  if (lastSector>=0&&nSignals>0)
555  FindLocalMaxima(lastSector);
556 
557  CleanArrays();
558 
559  return withInput;
560 }
561 
562 //_____________________________________________________________________
563 Bool_t AliTPCdataQA::ProcessEvent(AliRawReader *const rawReader)
564 {
566 
567  AliTPCRawStreamV3 rawStreamV3(rawReader,(AliAltroMapping**)fMapping);
568  Bool_t res=ProcessEvent(&rawStreamV3);
569  if(res) {
570  fEventCounter++; // only increment event counter if there is TPC data
571 
574  }
575  return res;
576 }
577 
578 //_____________________________________________________________________
579 Bool_t AliTPCdataQA::ProcessEvent(eventHeaderStruct *const event)
580 {
582 
583  AliRawReaderDate rawReader((void*)event);
584  Bool_t result=ProcessEvent(&rawReader);
585  return result;
586 }
587 
588 
589 
590 //_____________________________________________________________________
591 void AliTPCdataQA::DumpToFile(const Char_t *filename, const Char_t *dir, Bool_t append) /*FOLD00*/
592 {
594 
595  TString sDir(dir);
596  TString option;
597 
598  if ( append )
599  option = "update";
600  else
601  option = "recreate";
602 
603  TDirectory *backup = gDirectory;
604  TFile f(filename,option.Data());
605  f.cd();
606  if ( !sDir.IsNull() ){
607  f.mkdir(sDir.Data());
608  f.cd(sDir);
609  }
610  this->Write();
611  f.Close();
612 
613  if ( backup ) backup->cd();
614 }
615 
616 
617 //_____________________________________________________________________
618 Int_t AliTPCdataQA::Update(const Int_t iSector, /*FOLD00*/
619  const Int_t iRow,
620  const Int_t iPad,
621  const Int_t iTimeBin,
622  Float_t signal,
623  const Int_t iPatch,
624  const Int_t iBranch)
625 {
627 
628  if (!fActiveChambers[iSector]) return 0;
629  //
630  // TimeBin cut
631  //
632  if (iTimeBin<fFirstTimeBin) return 0;
633  if (iTimeBin>fLastTimeBin) return 0;
634 
635  // if pedestal calibrations are loaded subtract pedestals
636  if(fPedestal) {
637 
638  Float_t ped = fPedestal->GetCalROC(iSector)->GetValue(iRow, iPad);
639  // Don't use data from pads where pedestals are abnormally small or large
640  if(ped<10 || ped>90)
641  return 0;
642  signal -= ped;
643  }
644 
645  if(fIsDQM) {
646 
647  fOccVec->GetArray()[iSector] += 1.0;
648  // To change before committing
649  if(iPatch>=0 && iBranch>=0 && iPatch<=5 && iBranch <= 1)
650  fOccVecFine->GetArray()[(iSector%36)*12+iPatch*2+iBranch] += 1.0;
651  } else {
652  // In fNoThreshold we fill all data to estimate the ZS volume
653  Float_t count = fNoThreshold->GetCalROC(iSector)->GetValue(iRow, iPad);
654  fNoThreshold->GetCalROC(iSector)->SetValue(iRow, iPad,count+1);
655  }
656 
657  // Require at least 3 ADC channels
658  if (signal < fAdcMin)
659  return 0;
660 
661  // if noise calibrations are loaded require at least 3*sigmaNoise
662  if(fNoise) {
663 
664  Float_t noise = fNoise->GetCalROC(iSector)->GetValue(iRow, iPad);
665 
666  if(signal < noise*3.0)
667  return 0;
668  }
669 
670  //
671  // This signal is ok and we store it in the cluster map
672  //
673 
674  SetExpandDigit(iRow, iPad, iTimeBin, signal);
675 
676  fSignalCounter++;
677 
678  return 1; // signal was accepted
679 }
680 
681 //_____________________________________________________________________
682 void AliTPCdataQA::FindLocalMaxima(const Int_t iSector)
683 {
688 
689  if (!fActiveChambers[iSector]) return;
690  if (!fAllBins) return; // nothing has been expanded to the array
691 
692  Int_t nLocalMaxima = 0;
693  const Int_t maxTimeBin = fTimeBinsMax+4; // Used to step between neighboring pads
694  // Because we have tha pad-time data in a
695  // 1d array
696 
697  for (Int_t iRow = 0; iRow < fRowsMax; iRow++) {
698 
699  Float_t* allBins = fAllBins[iRow];
700  Int_t* sigBins = fAllSigBins[iRow];
701  const Int_t nSigBins = fAllNSigBins[iRow];
702 
703  for (Int_t iSig = 0; iSig < nSigBins; iSig++) {
704 
705  Int_t bin = sigBins[iSig];
706  Float_t *b = &allBins[bin];
707 
708  //
709  // Now we check if this is a local maximum
710  //
711 
712  Float_t qMax = b[0];
713 
714  // First check that the charge is bigger than the threshold
715  if (qMax<fMinQMax)
716  continue;
717 
718  // Require at least one neighboring pad with signal
719  if (fRequireNeighbouringPad && (b[-maxTimeBin]+b[maxTimeBin]<=0) ) continue;
720 
721  // Require at least one neighboring time bin with signal
722  if (b[-1]+b[1]<=0) continue;
723 
724  //
725  // Check that this is a local maximum
726  // Note that the checking is done so that if 2 charges has the same
727  // qMax then only 1 cluster is generated
728  // (that is why there is BOTH > and >=)
729  //
730  if (b[-maxTimeBin] >= qMax) continue;
731  if (b[-1 ] >= qMax) continue;
732  if (b[+maxTimeBin] > qMax) continue;
733  if (b[+1 ] > qMax) continue;
734  if (b[-maxTimeBin-1] >= qMax) continue;
735  if (b[+maxTimeBin-1] >= qMax) continue;
736  if (b[+maxTimeBin+1] > qMax) continue;
737  if (b[-maxTimeBin+1] >= qMax) continue;
738 
739  //
740  // Now we accept the local maximum and fill the calibration/data objects
741  //
742  ++nLocalMaxima;
743 
744  Int_t iPad, iTimeBin;
745  GetPadAndTimeBin(bin, iPad, iTimeBin);
746 
747  if(!fIsDQM) {
748  Float_t count = fNLocalMaxima->GetCalROC(iSector)->GetValue(iRow, iPad);
749  fNLocalMaxima->GetCalROC(iSector)->SetValue(iRow, iPad, count+1);
750 
751  count = fTimePosition->GetCalROC(iSector)->GetValue(iRow, iPad);
752  fTimePosition->GetCalROC(iSector)->SetValue(iRow, iPad, count+iTimeBin);
753 
754  Float_t charge = fMaxCharge->GetCalROC(iSector)->GetValue(iRow, iPad);
755  fMaxCharge->GetCalROC(iSector)->SetValue(iRow, iPad, charge + qMax);
756 
757  if(qMax>=10) {
758  count = fOverThreshold10->GetCalROC(iSector)->GetValue(iRow, iPad);
759  fOverThreshold10->GetCalROC(iSector)->SetValue(iRow, iPad, count+1);
760  }
761  if(qMax>=20) {
762  count = fOverThreshold20->GetCalROC(iSector)->GetValue(iRow, iPad);
763  fOverThreshold20->GetCalROC(iSector)->SetValue(iRow, iPad, count+1);
764  }
765  if(qMax>=30) {
766  count = fOverThreshold30->GetCalROC(iSector)->GetValue(iRow, iPad);
767  fOverThreshold30->GetCalROC(iSector)->SetValue(iRow, iPad, count+1);
768  }
769  }
770 
771  //
772  // Calculate the total charge as the sum over the region:
773  //
774  // o o o o o
775  // o i i i o
776  // o i C i o
777  // o i i i o
778  // o o o o o
779  //
780  // with qmax at the center C.
781  //
782  // The inner charge (i) we always add, but we only add the outer
783  // charge (o) if the neighboring inner bin (i) has a signal.
784  //
785  Int_t minP = 0, maxP = 0, minT = 0, maxT = 0;
786  Float_t qTot = qMax;
787  for(Int_t i = -1; i<=1; i++) {
788  for(Int_t j = -1; j<=1; j++) {
789 
790  if(i==0 && j==0)
791  continue;
792 
793  Float_t charge1 = GetQ(b, i, j, maxTimeBin, minT, maxT, minP, maxP);
794  qTot += charge1;
795  if(charge1>0) {
796  // see if the next neighbor is also above threshold
797  if(i*j==0) {
798  qTot += GetQ(b, 2*i, 2*j, maxTimeBin, minT, maxT, minP, maxP);
799  } else {
800  // we are in a diagonal corner
801  qTot += GetQ(b, i, 2*j, maxTimeBin, minT, maxT, minP, maxP);
802  qTot += GetQ(b, 2*i, j, maxTimeBin, minT, maxT, minP, maxP);
803  qTot += GetQ(b, 2*i, 2*j, maxTimeBin, minT, maxT, minP, maxP);
804  }
805  }
806  }
807  }
808 
809  if(fIsDQM) {
810  fHistQVsSector->Fill(iSector, qTot);
811  fHistQmaxVsSector->Fill(iSector, qMax);
812  } else {
813  Float_t charge = fMeanCharge->GetCalROC(iSector)->GetValue(iRow, iPad);
814  fMeanCharge->GetCalROC(iSector)->SetValue(iRow, iPad, charge + qTot);
815 
816  Float_t count = fNTimeBins->GetCalROC(iSector)->GetValue(iRow, iPad);
817  fNTimeBins->GetCalROC(iSector)->SetValue(iRow, iPad, count + maxT-minT+1);
818 
819  count = fNPads->GetCalROC(iSector)->GetValue(iRow, iPad);
820  fNPads->GetCalROC(iSector)->SetValue(iRow, iPad, count + maxP-minP+1);
821 
822  if((iSector%36)<18) { // A side
823  fHistQVsTimeSideA->Fill(iTimeBin, qTot);
824  fHistQMaxVsTimeSideA->Fill(iTimeBin, qMax);
825  } else {
826  fHistQVsTimeSideC->Fill(iTimeBin, qTot);
827  fHistQMaxVsTimeSideC->Fill(iTimeBin, qMax);
828  }
829  }
830  } // end loop over signals
831  } // end loop over rows
832 
833  fClusterCounter += nLocalMaxima;
834 }
835 
836 //_____________________________________________________________________
838 {
840 
841  AliInfo("Analyse called");
842 
843  if(fIsDQM == kTRUE) {
844 
845  AliInfo("DQM flas is set -> No 2d information to analyze");
846  return;
847  }
848 
849  if(fIsAnalysed == kTRUE) {
850 
851  AliInfo("No new data since Analyse was called last time");
852  return;
853  }
854 
855  if(fEventCounter==0) {
856 
857  AliInfo("EventCounter == 0, Cannot analyse");
858  return;
859  }
860 
861  Int_t nTimeBins = fLastTimeBin - fFirstTimeBin +1;
862  AliInfo(Form("EventCounter: %d , TimeBins: %d", fEventCounter, nTimeBins));
863 
864  Float_t normalization = 1.0 / Float_t(fEventCounter * nTimeBins);
865  fNoThreshold->Multiply(normalization);
866 
872 
873  fIsAnalysed = kTRUE;
874 }
875 
876 
877 //_____________________________________________________________________
878 void AliTPCdataQA::MakeTree(const char *fname) const {
881 
882  AliTPCPreprocessorOnline preprocesor;
883 
884  if (fNLocalMaxima) preprocesor.AddComponent(fNLocalMaxima);
885  if (fMaxCharge) preprocesor.AddComponent(fMaxCharge);
886  if (fMeanCharge) preprocesor.AddComponent(fMeanCharge);
887  if (fNoThreshold) preprocesor.AddComponent(fNoThreshold);
888  if (fNTimeBins) preprocesor.AddComponent(fNTimeBins);
889  if (fNPads) preprocesor.AddComponent(fNPads);
890  if (fTimePosition) preprocesor.AddComponent(fTimePosition);
894 
895  preprocesor.DumpToFile(fname);
896 }
897 
898 
899 //_____________________________________________________________________
903 
904  AliTPCROC * roc = AliTPCROC::Instance();
905  //
906  // To make the array big enough for all sectors we take
907  // the dimensions from the outer row of an OROC (the last sector)
908  //
909  fRowsMax = roc->GetNRows(roc->GetNSector()-1);
910  fPadsMax = roc->GetNPads(roc->GetNSector()-1,fRowsMax-1);
912 
913  //
914  // Since we have added 2 pads (TimeBins) before and after the real pads (TimeBins)
915  // to make sure that we can always query the exanded table even when the
916  // max is on the edge
917  //
918 
919 
920  fAllBins = new Float_t*[fRowsMax];
921  fAllSigBins = new Int_t*[fRowsMax];
922  fAllNSigBins = new Int_t[fRowsMax];
923 
924  for (Int_t iRow = 0; iRow < fRowsMax; iRow++) {
925  //
926  Int_t maxBin = (fTimeBinsMax+4)*(fPadsMax+4);
927  fAllBins[iRow] = new Float_t[maxBin];
928  memset(fAllBins[iRow],0,sizeof(Float_t)*maxBin); // set all values to 0
929  fAllSigBins[iRow] = new Int_t[maxBin];
930  fAllNSigBins[iRow] = 0;
931  }
932 }
933 
934 
935 //_____________________________________________________________________
938 
939  if (!fAllBins) return;
940 
941  for (Int_t iRow = 0; iRow < fRowsMax; iRow++) {
942 
943  // To speed up the performance by a factor 2 on cosmic data (and
944  // presumably pp data as well) where the ocupancy is low, the
945  // memset is only called if there is more than 1000 signals for a
946  // row (of the order 1% occupancy)
947  if(fAllNSigBins[iRow]<1000) {
948 
949  Float_t* allBins = fAllBins[iRow];
950  Int_t* sigBins = fAllSigBins[iRow];
951  const Int_t nSignals = fAllNSigBins[iRow];
952  for(Int_t i = 0; i < nSignals; i++)
953  allBins[sigBins[i]]=0;
954  } else {
955 
956  Int_t maxBin = (fTimeBinsMax+4)*(fPadsMax+4);
957  memset(fAllBins[iRow],0,sizeof(Float_t)*maxBin);
958  }
959 
960  fAllNSigBins[iRow]=0;
961  }
962 }
963 
964 //_____________________________________________________________________
965 void AliTPCdataQA::GetPadAndTimeBin(Int_t bin, Int_t& iPad, Int_t& iTimeBin){
967 
968  // Int_t bin = iPad*(fTimeBinsMax+4)+iTimeBin;
969  iTimeBin = bin%(fTimeBinsMax+4);
970  iPad = (bin-iTimeBin)/(fTimeBinsMax+4);
971 
972  iPad -= 2;
973  iTimeBin -= 2;
974  iTimeBin += fFirstTimeBin;
975 
976  R__ASSERT(iPad>=0 && iPad<=fPadsMax);
977  R__ASSERT(iTimeBin>=fFirstTimeBin && iTimeBin<=fLastTimeBin);
978 }
979 
980 //_____________________________________________________________________
981 void AliTPCdataQA::SetExpandDigit(const Int_t iRow, Int_t iPad,
982  Int_t iTimeBin, const Float_t signal)
983 {
985 
986  // Make the arrays for expanding the data
987  if (!fAllBins)
988  MakeArrays();
989 
990  R__ASSERT(iRow>=0 && iRow<fRowsMax);
991  R__ASSERT(iPad>=0 && iPad<=fPadsMax);
992  R__ASSERT(iTimeBin>=fFirstTimeBin && iTimeBin<=fLastTimeBin);
993 
994  iTimeBin -= fFirstTimeBin;
995  iPad += 2;
996  iTimeBin += 2;
997 
998  Int_t bin = iPad*(fTimeBinsMax+4)+iTimeBin;
999  fAllBins[iRow][bin] = signal;
1000  fAllSigBins[iRow][fAllNSigBins[iRow]] = bin;
1001  fAllNSigBins[iRow]++;
1002 }
1003 
1004 //______________________________________________________________________________
1005 Float_t AliTPCdataQA::GetQ(const Float_t* adcArray, const Int_t time,
1006  const Int_t pad, const Int_t maxTimeBins,
1007  Int_t& timeMin, Int_t& timeMax,
1008  Int_t& padMin, Int_t& padMax) const
1009 {
1013 
1014  Float_t charge = adcArray[time + pad*maxTimeBins];
1015  if(charge > 0) {
1016  timeMin = TMath::Min(time, timeMin); timeMax = TMath::Max(time, timeMax);
1017  padMin = TMath::Min(pad, padMin); padMax = TMath::Max(pad, padMax);
1018  }
1019  return charge;
1020 }
1021 
1022 //______________________________________________________________________________
1023 void AliTPCdataQA::Streamer(TBuffer &xRuub)
1024 {
1028 
1029  UInt_t xRuus, xRuuc;
1030  if (xRuub.IsReading()) {
1031  Version_t xRuuv = xRuub.ReadVersion(&xRuus, &xRuuc);
1032  //we use the automatic algorithm for class version > 3
1033  if (xRuuv > 3) {
1034  AliTPCdataQA::Class()->ReadBuffer(xRuub, this, xRuuv, xRuus,
1035  xRuuc);
1036  return;
1037  }
1038  TH1F::Streamer(xRuub);
1039  xRuub >> fFirstTimeBin;
1040  xRuub >> fLastTimeBin;
1041  xRuub >> fAdcMin;
1042  xRuub >> fAdcMax;
1043  xRuub >> fNLocalMaxima;
1044  xRuub >> fMaxCharge;
1045  xRuub >> fMeanCharge;
1046  xRuub >> fNoThreshold;
1047  xRuub >> fNTimeBins;
1048  xRuub >> fNPads;
1049  xRuub >> fTimePosition;
1050  xRuub >> fEventCounter;
1051  xRuub >> fIsAnalysed;
1052  xRuub.CheckByteCount(xRuus, xRuuc, AliTPCdataQA::IsA());
1053  } else {
1054  AliTPCdataQA::Class()->WriteBuffer(xRuub,this);
1055  }
1056 }
1057 
1058 //____________________________________________________________________________________________
1060 {
1062 
1063  if(!fIsDQM)
1064  AliInfo("Method only meaningful for DQM");
1065 
1066  for(Int_t i = 0; i < 72; i++) {
1067 
1068  fOccVec->GetArray()[i] /= fOccMaxVec->GetArray()[i];
1069  fHistOccVsSector->Fill(i, fOccVec->GetArray()[i]);
1070  }
1071 
1072  const Int_t nBranches = 36*12;
1073  for(Int_t i = 0; i < nBranches; i++) {
1074 
1075  fOccVecFine->GetArray()[i] /= fOccMaxVecFine->GetArray()[i];
1076 
1077  const Int_t fullSector = Int_t(i/12);
1078 
1079  Int_t branch = i - fullSector*12;
1080  const Int_t patch = Int_t(branch/2);
1081 
1082  branch -= patch*2;
1083 
1084  fHistOcc2dVsSector->Fill(fullSector+0.5*branch+0.1, patch+0.5, fOccVecFine->GetArray()[i]);
1085  }
1086 }
1087 
1088 //____________________________________________________________________________________________
1090 {
1091  if(!fIsDQM)
1092  AliInfo("Method only meaningful for DQM");
1093 
1094  if(fHistQVsSector)
1095  fHistQVsSector->Reset();
1096  if(fHistQmaxVsSector)
1097  fHistQmaxVsSector->Reset();
1098  if(fHistOccVsSector)
1099  fHistOccVsSector->Reset();
1100  if(fHistOcc2dVsSector)
1101  fHistOcc2dVsSector->Reset();
1102 
1103  if(fOccVec)
1104  for(Int_t i = 0; i < 72; i++)
1105  fOccVec->GetArray()[i] = 0.0;
1106  if(fOccVecFine)
1107  for(Int_t i = 0; i < 36*12; i++)
1108  fOccVecFine->GetArray()[i] = 0.0;
1109 }
1110 
1111 //____________________________________________________________________________________________
1113 {
1117 
1120 
1121  if(!fIsDQM) {
1122 
1123  if (!fNLocalMaxima){
1124  TObjArray configArr(72);
1125  fNLocalMaxima = new AliTPCCalPad(ConfigArrRocs(&configArr,"NLocalMaxima"));
1126  fMaxCharge = new AliTPCCalPad(ConfigArrRocs(&configArr,"MaxCharge"));
1127  fMeanCharge = new AliTPCCalPad(ConfigArrRocs(&configArr,"MeanCharge"));
1128  fNoThreshold = new AliTPCCalPad(ConfigArrRocs(&configArr,"NoThreshold"));
1129  fNTimeBins = new AliTPCCalPad(ConfigArrRocs(&configArr,"NTimeBins"));
1130  fNPads = new AliTPCCalPad(ConfigArrRocs(&configArr,"NPads"));
1131  fTimePosition = new AliTPCCalPad(ConfigArrRocs(&configArr,"TimePosition"));
1132  fOverThreshold10 = new AliTPCCalPad(ConfigArrRocs(&configArr,"OverThreshold10"));
1133  fOverThreshold20 = new AliTPCCalPad(ConfigArrRocs(&configArr,"OverThreshold20"));
1134  fOverThreshold30 = new AliTPCCalPad(ConfigArrRocs(&configArr,"OverThreshold30"));
1135 
1136  fHistQVsTimeSideA = new TProfile("hQVsTimeSideA", "Q vs time (side A); Time [Timebin]; Q [ADC ch]", 100, 0, 1000);
1137  fHistQVsTimeSideA->SetDirectory(0);
1138  fHistQVsTimeSideC = new TProfile("hQVsTimeSideC", "Q vs time (side C); Time [Timebin]; Q [ADC ch]", 100, 0, 1000);
1139  fHistQVsTimeSideC->SetDirectory(0);
1140  fHistQMaxVsTimeSideA = new TProfile("hQMaxVsTimeSideA", "Q_{MAX} vs time (side A); Time [Timebin]; Q_{MAX} [ADC ch]", 100, 0, 1000);
1141  fHistQMaxVsTimeSideA->SetDirectory(0);
1142  fHistQMaxVsTimeSideC = new TProfile("hQMaxVsTimeSideC", "Q_{MAX} vs time (side C); Time [Timebin]; Q_{MAX} [ADC ch]", 100, 0, 1000);
1143  fHistQMaxVsTimeSideC->SetDirectory(0);
1144  }
1145  } else { // DQM histograms and array
1146 
1147  if (!fHistOccVsSector) {
1148  fHistOccVsSector = new TProfile("hOccVsSector", "Occupancy vs sector; Sector; Occupancy", 72, 0, 72);
1149  fHistOccVsSector->SetDirectory(0);
1150 
1151  fHistOcc2dVsSector = new TProfile2D("hOcc2dVsSector", "Occupancy vs sector and patch; Sector; Patch", 72, 0, 36, 6, 0, 6);
1152  fHistOcc2dVsSector->SetDirectory(0);
1153 
1154  fHistQVsSector = new TProfile("hQVsSector", "Q vs sector; Sector; Q [ADC ch]", 72, 0, 72);
1155  fHistQVsSector->SetDirectory(0);
1156 
1157  fHistQmaxVsSector = new TProfile("hQmaxVsSector", "Qmax vs sector; Sector; Qmax [ADC ch]", 72, 0, 72);
1158  fHistQmaxVsSector->SetDirectory(0);
1159 
1160  fOccVec = new TArrayD(72);
1161  for(Int_t i = 0; i < 72; i++)
1162  fOccVec->GetArray()[i] = 0;
1163 
1164  fOccMaxVec = new TArrayD(72);
1165  const Double_t nTimeBins = fLastTimeBin - fFirstTimeBin +1;
1166  for(Int_t i = 0; i < 72; i++)
1167 
1168  if(i<36) // IROCs (5504 pads)
1169  fOccMaxVec->GetArray()[i] = nTimeBins*5504;
1170  else // OROCs (9984 pads)
1171  fOccMaxVec->GetArray()[i] = nTimeBins*9984;
1172 
1173  // 12 branches for each full sector
1174  const Int_t nBranches = 36*12;
1175  fOccVecFine = new TArrayD(nBranches);
1176  for(Int_t i = 0; i < nBranches; i++)
1177  fOccVecFine->GetArray()[i] = 0;
1178 
1179  // Pads per patch same for all sectors
1180  Int_t nPads0[6] = {1152, 1536, 1152, 1280, 1280, 1280};
1181  Int_t nPads1[6] = {1152, 1664, 1152, 1280, 1280, 1280};
1182 
1183  fOccMaxVecFine = new TArrayD(nBranches);
1184  for(Int_t i = 0; i < nBranches; i++) {
1185 
1186  const Int_t fullSector = Int_t(i/12);
1187  Int_t branch = i - fullSector*12;
1188  R__ASSERT(branch>=0 && branch<12);
1189 
1190  const Int_t patch = Int_t(branch/2);
1191  branch -= patch*2;
1192 
1193  R__ASSERT(branch>=0 && branch<2);
1194  if(branch == 0)
1195  fOccMaxVecFine->GetArray()[i] = nTimeBins*nPads0[patch];
1196  else // OROCs (9984 pads)
1197  fOccMaxVecFine->GetArray()[i] = nTimeBins*nPads1[patch];
1198  }
1199  }
1200  }
1201 
1202  //
1203  // If Analyse has been previously called we need now to denormalize the data
1204  // as more data is coming
1205  //
1206  if(fIsAnalysed == kTRUE && !fIsDQM) {
1207 
1208  const Int_t nTimeBins = fLastTimeBin - fFirstTimeBin +1;
1209  const Float_t denormalization = Float_t(fEventCounter * nTimeBins);
1210  fNoThreshold->Multiply(denormalization);
1211 
1212  fMeanCharge->Multiply(fNLocalMaxima);
1213  fMaxCharge->Multiply(fNLocalMaxima);
1214  fNTimeBins->Multiply(fNLocalMaxima);
1215  fNPads->Multiply(fNLocalMaxima);
1216  fTimePosition->Multiply(fNLocalMaxima);
1217  fIsAnalysed = kFALSE;
1218  }
1219 }
1220 
1221 //____________________________________________________________________________________________
1223 {
1225 
1226  if(!fIsDQM) {
1227 
1228  if (fNLocalMaxima){
1229  fNoThreshold->Reset();
1230  fNLocalMaxima->Reset();
1231  fMeanCharge->Reset();
1232  fMaxCharge->Reset();
1233  fNTimeBins->Reset();
1234  fNPads->Reset();
1235  fTimePosition->Reset();
1239 
1240  fHistQVsTimeSideA->Reset();
1241  fHistQVsTimeSideC->Reset();
1242  fHistQMaxVsTimeSideA->Reset();
1243  fHistQMaxVsTimeSideC->Reset();
1244 
1245  fIsAnalysed = kFALSE;
1246 
1247  }
1248  }
1249 
1250  fEventCounter=0;
1251  fClusterCounter=0;
1252 }
1253 
1255 {
1257 
1258  arr->Clear();
1259  arr->SetName(name);
1260  for (Int_t i=0; i<72; ++i){
1261  if (fActiveChambers[i]) arr->AddAt(new AliTPCCalROC(i),i);
1262  }
1263  return arr;
1264 }
Int_t GetSector() const
Int_t fPadsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:187
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Definition: AliTPCROC.h:30
AliTPCCalROC * GetCalROC(Int_t sector) const
Definition: AliTPCCalPad.h:39
Int_t GetRow() const
Int_t fClusterCounter
Cluster counter.
Definition: AliTPCdataQA.h:176
TProfile * fHistQmaxVsSector
! QMax vs sector (for DQM only)
Definition: AliTPCdataQA.h:195
void FillOccupancyProfile()
AliTPCCalPad * GetMaxCharge() const
Definition: AliTPCdataQA.h:60
TArrayD * fOccVecFine
! "2D" occupancy help counter for DQM
Definition: AliTPCdataQA.h:198
Int_t ** fAllSigBins
! array of pointers to the indexes over threshold
Definition: AliTPCdataQA.h:184
#define TObjArray
TProfile * fHistQMaxVsTimeSideA
QMax vs time (side A)
Definition: AliTPCdataQA.h:164
virtual Bool_t NextChannel()
Int_t fEventCounter
event Counter
Definition: AliTPCdataQA.h:170
TProfile * fHistQVsSector
! Q vs sector (for DQM only)
Definition: AliTPCdataQA.h:194
void SetExpandDigit(const Int_t iRow, Int_t iPad, Int_t iTimeBin, const Float_t signal)
Int_t fAdcMin
min adc channel of pedestal value
Definition: AliTPCdataQA.h:140
TH1F * GetHistOccupancyVsEventConst() const
Definition: AliTPCdataQA.h:73
Int_t GetPatchIndex() const
UInt_t GetNRows(UInt_t sector) const
Definition: AliTPCROC.h:28
Int_t fFirstTimeBin
First Time bin needed for analysis.
Definition: AliTPCdataQA.h:138
TFile f("CalibObjects.root")
Float_t GetValue(UInt_t row, UInt_t pad) const
Definition: AliTPCCalROC.h:38
UInt_t GetNSector() const
Definition: AliTPCROC.h:49
void Divide(const AliTPCCalPad *pad)
Float_t ** fAllBins
! array for digit using random access
Definition: AliTPCdataQA.h:183
AliTPCCalPad * fNoThreshold
number of digits
Definition: AliTPCdataQA.h:154
TBits fActiveChambers
configured ROCs
Definition: AliTPCdataQA.h:178
AliTPCCalPad * GetNTimeBins() const
Definition: AliTPCdataQA.h:66
AliTPCCalPad * fTimePosition
Time position of local maximum.
Definition: AliTPCdataQA.h:157
void DumpToFile(const Char_t *filename, const Char_t *dir="", Bool_t append=kFALSE)
AliTPCCalPad * fOverThreshold20
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:159
AliTPCCalPad * fOverThreshold30
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:160
AliTPCCalPad * GetTimePosition() const
Definition: AliTPCdataQA.h:68
Int_t Update(const Int_t iSector, const Int_t iRow, const Int_t iPad, const Int_t iTimeBin, Float_t signal, const Int_t iPatch=-1, const Int_t iBranch=-1)
Int_t fSignalCounter
Signal counter.
Definition: AliTPCdataQA.h:175
TProfile * GetHistQMaxVsTimeSideA() const
Definition: AliTPCdataQA.h:71
AliTPCCalPad * GetOverThreshold30() const
Definition: AliTPCdataQA.h:65
void CleanArrays()
Int_t fAdcMax
max adc channel of pedestal value
Definition: AliTPCdataQA.h:141
TArrayD * fOccMaxVec
! Occupancy help normlization for DQM
Definition: AliTPCdataQA.h:197
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
virtual ~AliTPCdataQA()
Int_t fTimeBinsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:188
void FindLocalMaxima(const Int_t iSector)
This class provides access to TPC digits in raw data.
AliTPCCalPad * fNLocalMaxima
local maximas found
Definition: AliTPCdataQA.h:151
TProfile * GetHistQVsTimeSideA() const
Definition: AliTPCdataQA.h:69
TArrayD * fOccMaxVecFine
! "2D" occupancy help normlization for DQM
Definition: AliTPCdataQA.h:199
TH1F * GetHistNclustersVsEventConst() const
Definition: AliTPCdataQA.h:74
TArrayD * fOccVec
! Occupancy help counter for DQM
Definition: AliTPCdataQA.h:196
Int_t fEventsPerBin
Events per bin for event histograms.
Definition: AliTPCdataQA.h:174
TObjArray * ConfigArrRocs(TObjArray *arr, const Text_t *name)
TProfile * fHistQVsTimeSideC
Q vs time (side C)
Definition: AliTPCdataQA.h:163
Int_t fLastTimeBin
Last Time bin needed for analysis.
Definition: AliTPCdataQA.h:139
Int_t GetPad() const
AliTPCCalPad * fNPads
pads with of cluster
Definition: AliTPCdataQA.h:156
virtual Bool_t NextDDL()
Bool_t fRequireNeighbouringPad
If clusterer should require a neighbouring pad to accept it.
Definition: AliTPCdataQA.h:143
Geometry class for a single ROC.
Definition: AliTPCROC.h:14
void SetValue(UInt_t row, UInt_t pad, Float_t vd)
Definition: AliTPCCalROC.h:40
void ResetProfiles()
TProfile * fHistQVsTimeSideA
Q vs time (side A)
Definition: AliTPCdataQA.h:162
TPC calibration base class for one ROC.
Definition: AliTPCCalROC.h:20
AliTPCCalPad * GetNPads() const
Definition: AliTPCdataQA.h:67
AliTPCAltroMapping ** fMapping
! Altro Mapping object
Definition: AliTPCdataQA.h:146
TProfile2D * fHistOcc2dVsSector
! Occ vs sector 2D (for DQM only)
Definition: AliTPCdataQA.h:193
AliTPCCalPad * fNoise
! option to set noise cal object
Definition: AliTPCdataQA.h:150
TProfile * fHistOccVsSector
! Occ vs sector (for DQM only)
Definition: AliTPCdataQA.h:192
Int_t fMaxEvents
Max events for event histograms.
Definition: AliTPCdataQA.h:173
AliTPCCalPad * GetMeanCharge() const
Definition: AliTPCdataQA.h:61
AliTPCCalPad * fMeanCharge
mean charge
Definition: AliTPCdataQA.h:153
Bool_t fIsAnalysed
Set to true after Analyse has been called.
Definition: AliTPCdataQA.h:171
TProfile * fHistQMaxVsTimeSideC
QMax vs time (side C)
Definition: AliTPCdataQA.h:165
AliTPCCalPad * fMaxCharge
max charge
Definition: AliTPCdataQA.h:152
TH1F * GetHistOccupancyVsEvent()
void DumpToFile(const char *fileName)
AliTPCCalPad * fNTimeBins
timebins width of cluster
Definition: AliTPCdataQA.h:155
Float_t GetQ(const Float_t *adcArray, const Int_t time, const Int_t pad, const Int_t maxTimeBins, Int_t &timeMin, Int_t &timeMax, Int_t &padMin, Int_t &padMax) const
Preprocessor class for HLT and DAQ.
TProfile * GetHistQMaxVsTimeSideC() const
Definition: AliTPCdataQA.h:72
TH1F * fHistNclustersVsEvent
Nclusters vs event number (~time)
Definition: AliTPCdataQA.h:168
AliTPCCalPad * GetNLocalMaxima() const
Definition: AliTPCdataQA.h:62
void UpdateEventHistograms()
TH1F * GetHistNclustersVsEvent()
AliTPCCalPad * fOverThreshold10
! local maxima with qMax over threshold
Definition: AliTPCdataQA.h:158
void GetPadAndTimeBin(Int_t bin, Int_t &iPad, Int_t &iTimeBin)
Bool_t ProcessEvent(AliTPCRawStreamV3 *const rawStreamV3)
static AliTPCROC * Instance()
Definition: AliTPCROC.cxx:34
Int_t * fAllNSigBins
!
Definition: AliTPCdataQA.h:185
AliTPCCalPad * GetNoThreshold() const
Definition: AliTPCdataQA.h:59
AliTPCCalPad * GetOverThreshold20() const
Definition: AliTPCdataQA.h:64
Bool_t fIsDQM
! Is DQM -> Simple output (no 2D!)
Definition: AliTPCdataQA.h:191
TH1F * fHistOccupancyVsEvent
Occupancy vs event number (~time)
Definition: AliTPCdataQA.h:167
void MakeTree(const char *fname="QApad.root") const
AliTPCCalPad * GetOverThreshold10() const
Definition: AliTPCdataQA.h:63
char * fname
void Multiply(Float_t c1)
Int_t fRowsMax
! Maximum number of time bins
Definition: AliTPCdataQA.h:186
Float_t fMinQMax
Minimun charge for Maximum ADC in cluster.
Definition: AliTPCdataQA.h:142
TProfile * GetHistQVsTimeSideC() const
Definition: AliTPCdataQA.h:70
AliTPCdataQA & operator=(const AliTPCdataQA &source)
AliTPCCalPad * fPedestal
! option to set pedestal cal object
Definition: AliTPCdataQA.h:149