CbmRoot
CbmTrdHitDensityQa.cxx
Go to the documentation of this file.
1 #include "CbmTrdHitDensityQa.h"
2 
3 #include "CbmDigiManager.h"
4 #include "CbmTrdCluster.h"
5 #include "CbmTrdDigi.h"
6 #include "CbmTrdGeoHandler.h"
7 #include "CbmTrdHit.h"
8 #include "CbmTrdParModDigi.h"
9 #include "CbmTrdParModGeo.h"
10 #include "CbmTrdParSetAsic.h"
11 #include "CbmTrdParSetDigi.h"
12 #include "CbmTrdParSetGeo.h"
13 #include "CbmTrdPoint.h"
14 #include "CbmTrdUtils.h"
15 
16 #include "FairLogger.h"
17 #include "FairRootManager.h"
18 #include "FairRunAna.h"
19 #include "FairRuntimeDb.h"
20 
21 #include "TArray.h"
22 #include "TClonesArray.h"
23 #include "TColor.h"
24 #include "TDatime.h"
25 #include "TDirectory.h"
26 #include "TF1.h"
27 #include "TGeoManager.h"
28 #include "TH2D.h"
29 #include "TH2F.h"
30 #include "TH2I.h"
31 #include "TMath.h"
32 
33 #include "TCanvas.h"
34 #include "TImage.h"
35 #include "TLegend.h"
36 #include "TLine.h"
37 #include "TProfile.h"
38 #include "TStopwatch.h"
39 #include <TFile.h>
40 
41 //#include <map>
42 #include <cmath>
43 #include <iomanip>
44 #include <iostream>
45 
46 // #include "CbmTrdDigitizer.h"
47 // #include "CbmTrdClusterFinder.h"
48 // #include "CbmTrdHitProducer.h"
49 
50 using std::cout;
51 using std::endl;
52 using std::ios;
53 using std::setfill;
54 using std::setiosflags;
55 using std::setprecision;
56 using std::setw;
57 
58 // ---- Default constructor -------------------------------------------
60  : CbmTrdHitDensityQa(1e-6, 1e7, 1.0 /*used only for minBias events*/
61  /*(1./4.)used only for central events*/) {}
62 
63 CbmTrdHitDensityQa::CbmTrdHitDensityQa(Double_t TriggerThreshold,
64  Double_t EventRate,
65  Double_t ScaleCentral2mBias)
66  : FairTask("CbmTrdHitDensityQa", 1)
67  , myfile()
68  , fmin(1E3)
69  , fmax(2.5E5)
70  , flogScale(false)
71  , fBitPerHit(1.)
72  , h1DataModule(NULL)
73  , h1OptLinksModule(NULL)
74  , fNeighbourTrigger(true)
75  , fPlotResults(false)
76  , fRatioTwoFiles(false)
77  , fClusters(NULL)
78  , fAsicPar(NULL)
79  , fDigiPar(NULL)
80  , fGeoPar(NULL)
81  , fGeoHandler(new CbmTrdGeoHandler())
82  , fStation(-1)
83  , fLayer(-1)
84  , fModuleID(-1)
85  , fEventCounter(NULL)
86  , fTriggerThreshold(TriggerThreshold)
87  , fEventRate(EventRate)
88  , fScaleCentral2mBias(ScaleCentral2mBias)
89  , fUsedDigiMap()
90  , fModuleHitMap()
91  , fModuleHitMapIt()
92  , fModuleHitASICMap()
93  , fModuleHitASICMapIt() {}
94 
95 // ---- Destructor ----------------------------------------------------
97  if (fClusters) {
98  fClusters->Delete();
99  delete fClusters;
100  }
101  // if(fAsicPar) delete fDigiPar;
102  // if(fDigiPar) delete fDigiPar;
103  // if(fGeoPar) delete fDigiPar;
104 }
105 
106 // ---- Initialisation ----------------------------------------------
108  // Get Base Container
109  FairRunAna* ana = FairRunAna::Instance();
110  FairRuntimeDb* rtdb = ana->GetRuntimeDb();
111  cout << " * CbmTrdHitDensityQa * :: SetParContainers()" << endl;
112  fAsicPar = (CbmTrdParSetAsic*) (rtdb->getContainer("CbmTrdParSetAsic"));
113  fDigiPar = (CbmTrdParSetDigi*) (rtdb->getContainer("CbmTrdParSetDigi"));
114  fGeoPar = (CbmTrdParSetGeo*) (rtdb->getContainer("CbmTrdParSetGeo"));
115 }
116 // ---- ReInit -------------------------------------------------------
118  cout << " * CbmTrdHitDensityQa * :: ReInit()" << endl;
119  //FairRunAna* ana = FairRunAna::Instance();
120  //FairRuntimeDb* rtdb=ana->GetRuntimeDb();
121 
122  //fDigiPar = (CbmTrdDigiPar*)(rtdb->getContainer("CbmTrdDigiPar"));
123 
124  return kSUCCESS;
125 }
126 // ---- Init ----------------------------------------------------------
128  cout << " * CbmTrdHitDensityQa * :: Init()" << endl;
129  FairRootManager* ioman = FairRootManager::Instance();
130 
132  if (!CbmDigiManager::Instance()->IsPresent(ECbmModuleId::kTrd)) LOG(fatal);
133 
134 
135  fClusters = (TClonesArray*) ioman->GetObject("TrdCluster");
136  if (!fClusters) {
137  cout << "-W CbmTrdHitDensityQa::Init: No TrdCluster array!" << endl;
138  cout << " Task will be inactive" << endl;
139  //return kERROR;
140  }
141  /*
142  TString origpath = gDirectory->GetPath();
143  printf ("\n%s\n",origpath.Data());
144  TString newpath = origpath;
145  TFile *results = NULL;
146  results->Open("data/result.root","read");
147  *//*
148  if (gSystem->AccessPathName("/data/result.root")){//results->IsOpen()){
149  //gDirectory = results.CurrentDirectory();
150  //gDirectory->pwd();
151  fPlotResults = true;
152  //results.Close();
153  } else {
154  fPlotResults = false;
155  }
156  */
157  //gDirectory->Cd(origpath);
158  //gDirectory->pwd();
159  // Extract information about the number of TRD stations and
160  // the number of layers per TRD station from the geomanager.
161  // Store the information about the number of layers at the entrance
162  // of subsequent stations in a vector.
163  // This allows to calculate the layer number starting with 1 for the
164  // first layer of the first station at a later stage by only adding
165  // the layer number in the station to the number of layers in
166  // previous stations
167 
168  fGeoHandler->Init();
169 
170  printf("\nCbmTrdHitDensityQa::Init: NeighbourTrigger %i\n\n",
172 
173  fEventCounter = new TH1I("fEventCounter", "fEventCounter", 1, -0.5, 0.5);
174 
175  return kSUCCESS;
176 }
178  fScaleCentral2mBias = scaling;
179 }
180 void CbmTrdHitDensityQa::SetPlotResults(Bool_t plotResults) {
181  fPlotResults = plotResults;
182 }
184  fNeighbourTrigger = trigger;
185 }
188 void CbmTrdHitDensityQa::SetLogScale(Bool_t logScale) { flogScale = logScale; }
189 
190 void CbmTrdHitDensityQa::SetRatioTwoFiles(Bool_t ratioPlot) {
191  fRatioTwoFiles = ratioPlot;
192  fPlotResults = true;
193 }
194 
195 void CbmTrdHitDensityQa::Exec(Option_t*) {
196 
197 
198  printf("=================CbmTrdHitDensityQa====================\n");
199  TString title;
200  TStopwatch timer;
201  timer.Start();
202 
203 
204  fBitPerHit =
205  112
206  * 1.5; // (112 + 4*16) * 10 / 8.; // 6 time samples, 8b/10b encoding, CBMnet header
207  // fBitPerHit = 220; // (112 + 4*16) * 10 / 8.; // 6 time samples, 8b/10b encoding, CBMnet header
208  // fBitPerHit = 112; // 6 time samples 3 + (9 * 6 + 3) / 15 = 7 words = 7 * 16 bit = 112 bits
209 
210 
211  fEventCounter->Fill(0);
212  printf("\n Event: %i\n\n", (Int_t) fEventCounter->GetEntries());
213  //fNeighbourTrigger = CbmTrdClusterFinderFast::GetTriggerThreshold();
214  const CbmTrdDigi* digi = NULL;
215  CbmTrdCluster* cluster = NULL;
216  if (NULL != fClusters && fNeighbourTrigger == true) {
217  Int_t nCluster = fClusters->GetEntries();
218  for (Int_t iCluster = 0; iCluster < nCluster; iCluster++) {
219  //cout << iCluster << endl;
220  cluster = (CbmTrdCluster*) fClusters->At(
221  iCluster); //pointer to the acvit cluster
222  Int_t nDigisInCluster = cluster->GetNofDigis();
223  for (Int_t iDigi = 0; iDigi < nDigisInCluster; iDigi++) {
224  digi =
225  CbmDigiManager::Instance()->Get<CbmTrdDigi>(cluster->GetDigi(iDigi));
226  //digi = (CbmTrdDigi*)fDigis->At(cluster->GetDigi(iDigi));
227  Int_t digiAddress = digi->GetAddress();
228  Int_t moduleAddress = CbmTrdAddress::GetModuleAddress(digiAddress);
229  // Int_t moduleId = CbmTrdAddress::GetModuleId(moduleAddress);// TODO
230  fLayer = CbmTrdAddress::GetLayerId(moduleAddress);
231  CbmTrdParSetAsic* fModuleAsic =
232  (CbmTrdParSetAsic*) fAsicPar->GetModuleSet(moduleAddress);
233  CbmTrdParModDigi* fModuleDigi =
234  (CbmTrdParModDigi*) fDigiPar->GetModulePar(moduleAddress);
235  if (fModuleHitMap.find(moduleAddress) == fModuleHitMap.end()) {
236  title.Form("hd_Module_%i", moduleAddress);
237  Int_t nRows = fModuleDigi->GetNofRows();
238  Int_t nCols = fModuleDigi->GetNofColumns();
239  fModuleHitMap[moduleAddress] = new TH2I(
240  title, title, nCols, -0.5, nCols - 0.5, nRows, -0.5, nRows - 0.5);
241  fModuleHitMap[moduleAddress]->SetContour(99);
242  fModuleHitMap[moduleAddress]->SetXTitle("Column Id");
243  fModuleHitMap[moduleAddress]->SetYTitle("Row Id");
244  fModuleHitMap[moduleAddress]->SetZTitle("Trigger counter");
245  }
246  if (fModuleHitASICMap.find(moduleAddress) == fModuleHitASICMap.end()) {
247  title.Form("hd_Module_%i_ASIC", moduleAddress);
248  fModuleHitASICMap[moduleAddress] =
249  new TH1D(title,
250  title,
251  fModuleAsic->GetNofAsics(),
252  -0.5,
253  fModuleAsic->GetNofAsics() - 0.5);
254  fModuleHitASICMap[moduleAddress]->SetXTitle("ASIC Address");
255  fModuleHitASICMap[moduleAddress]->SetYTitle("Trigger counter");
256  }
257  if (!fPlotResults) {
258  Int_t iCol(CbmTrdAddress::GetColumnId(digiAddress)),
259  local_Row(CbmTrdAddress::GetRowId(digiAddress)),
260  iSec(CbmTrdAddress::GetSectorId(digiAddress));
261  Int_t iRow = fModuleDigi->GetModuleRow(iSec, local_Row);
262  if (
263  fUsedDigiMap.find(digiAddress)
264  == fUsedDigiMap
265  .end()) { // Cluster include already neighbour trigger read-out. Two clusters can share associated neighbour digis, therefore test if digi is already used
266  fModuleHitMap[moduleAddress]->Fill(iCol, iRow);
267  fUsedDigiMap[digiAddress] = iDigi;
268  }
269  }
270  }
271  }
272  } else {
274  for (Int_t iDigi = 0; iDigi < nDigis; iDigi++) {
275  digi = CbmDigiManager::Instance()->Get<CbmTrdDigi>(iDigi);
276  //digi = (CbmTrdDigi*) fDigis->At(iDigi);
277  Int_t digiAddress = digi->GetAddress();
278  Int_t moduleAddress = CbmTrdAddress::GetModuleAddress(digiAddress);
279  // Int_t moduleId = CbmTrdAddress::GetModuleId(moduleAddress);// TODO
280  fLayer = CbmTrdAddress::GetLayerId(moduleAddress);
281  CbmTrdParModDigi* fModuleDigi =
282  (CbmTrdParModDigi*) fDigiPar->GetModulePar(moduleAddress);
283  CbmTrdParSetAsic* fModuleAsic =
284  (CbmTrdParSetAsic*) fAsicPar->GetModuleSet(moduleAddress);
285  if (digi->GetCharge() > fTriggerThreshold) {
286  if (fModuleHitMap.find(moduleAddress) == fModuleHitMap.end()) {
287  title.Form("hd_Module_%i", moduleAddress);
288  Int_t nRows = fModuleDigi->GetNofRows();
289  Int_t nCols = fModuleDigi->GetNofColumns();
290  fModuleHitMap[moduleAddress] = new TH2I(
291  title, title, nCols, -0.5, nCols - 0.5, nRows, -0.5, nRows - 0.5);
292  fModuleHitMap[moduleAddress]->SetContour(99);
293  fModuleHitMap[moduleAddress]->SetXTitle("Column Id");
294  fModuleHitMap[moduleAddress]->SetYTitle("Row Id");
295  fModuleHitMap[moduleAddress]->SetZTitle("Trigger counter");
296  }
297  if (fModuleHitASICMap.find(moduleAddress) == fModuleHitASICMap.end()) {
298  title.Form("hd_Module_%i_ASIC", moduleAddress);
299  fModuleHitASICMap[moduleAddress] =
300  new TH1D(title,
301  title,
302  fModuleAsic->GetNofAsics(),
303  -0.5,
304  fModuleAsic->GetNofAsics() - 0.5);
305  fModuleHitASICMap[moduleAddress]->SetXTitle("ASIC Address");
306  fModuleHitASICMap[moduleAddress]->SetYTitle("Trigger counter");
307  }
308  if (!fPlotResults) {
309  Int_t iCol(CbmTrdAddress::GetColumnId(digiAddress)),
310  local_Row(CbmTrdAddress::GetRowId(digiAddress)),
311  iSec(CbmTrdAddress::GetSectorId(digiAddress));
312  Int_t iRow = fModuleDigi->GetModuleRow(iSec, local_Row);
313  if (fUsedDigiMap.find(digiAddress) == fUsedDigiMap.end()) {
314  fModuleHitMap[moduleAddress]->Fill(iCol, iRow);
315  fUsedDigiMap[digiAddress] = iDigi;
316  }
317  }
318  /*
319  Int_t neighbourAddress = 0;
320  if (iRow > 0){
321  if (local_Row > 0)
322  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec, local_Row-1, iCol);
323  else if (iSec > 0)
324  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec-1, fModuleDigi->GetNofRowsInSector(iSec-1)-1, iCol);
325  if (fUsedDigiMap.find(neighbourAddress) == fUsedDigiMap.end()){
326  fModuleHitMap[moduleAddress]->Fill(iCol, iRow-1);
327  fUsedDigiMap[neighbourAddress] = iDigi;
328  }
329  }
330  if (iRow < fModuleDigi->GetNofRows()-1){ // Only cross like neighbour trigger
331  if (local_Row+1 > fModuleDigi->GetNofRowsInSector(iSec)-1)
332  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec+1, 0, iCol);
333  else
334  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec, local_Row+1, iCol);
335  if (fUsedDigiMap.find(neighbourAddress) == fUsedDigiMap.end()){
336  fModuleHitMap[moduleAddress]->Fill(iCol, iRow+1);
337  fUsedDigiMap[neighbourAddress] = iDigi;
338  }
339  }
340  if (iCol > 0){
341  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec, local_Row, iCol-1);
342  if (fUsedDigiMap.find(neighbourAddress) == fUsedDigiMap.end()){
343  fModuleHitMap[moduleAddress]->Fill(iCol-1, iRow);
344  fUsedDigiMap[neighbourAddress] = iDigi;
345  }
346  }
347  if (iCol < fModuleDigi->GetNofColumns()-1){
348  neighbourAddress = CbmTrdAddress::GetAddress(fLayer, CbmTrdAddress::GetModuleId(moduleAddress), iSec, local_Row, iCol+1);
349  if (fUsedDigiMap.find(neighbourAddress) == fUsedDigiMap.end()){
350  fModuleHitMap[moduleAddress]->Fill(iCol+1, iRow);
351  fUsedDigiMap[neighbourAddress] = iDigi;
352  }
353  }
354  */
355  }
356  }
357  }
358 }
359 // ---- Register ------------------------------------------------------
361  cout << " * CbmTrdHitDensityQa * :: Register()" << endl;
362 }
363 // --------------------------------------------------------------------
364 
365 
366 // ---- Finish --------------------------------------------------------
368  std::map<Int_t, std::pair<Int_t, TH2D*>> AsicTriggerMap;
369  std::map<Int_t, std::pair<Int_t, TH2D*>>::iterator AsicTriggerMapIt;
370  CbmTrdUtils* util = new CbmTrdUtils();
371 
372  //Bool_t logScale = false;
373  Int_t nTotalAsics = 0;
374  Int_t nTotalOptLinks = 0;
375  Double_t trdTotalDataRate = 0.;
376  Double_t ratePerModule = 0;
377  TDatime time;
378  TString outfile;
379  outfile.Form("hits_per_asic.%i:%i:%i_%i.%i.%i.txt",
380  time.GetHour(),
381  time.GetMinute(),
382  time.GetSecond(),
383  time.GetDay(),
384  time.GetMonth(),
385  time.GetYear());
386  if (fPlotResults) myfile.open(outfile, std::fstream::out);
387  //myfile << "#" << endl;
388  //myfile << "## TRD data per ASIC" << endl;
389  //myfile << "#" << endl;
390  //myfile << "#" << endl;
391  //myfile << "#--------------------------" << endl;
392 
393  //Double_t min(1E3), max(max = 6E5); // Is not scaled from central to minbias
394  //if (fPlotResults) {min = 1E3; max = 2.5E5;} // scaling parameter is applied
395  std::vector<Int_t> fColors;
396  std::vector<Double_t> fZLevel;
397  for (Int_t i = 0; i < TColor::GetNumberOfColors(); i++) {
398  fColors.push_back(TColor::GetColorPalette(i));
399  if (flogScale)
400  fZLevel.push_back(fmin
401  + TMath::Power(10,
402  TMath::Log10(fmax - fmin)
403  / Double_t(TColor::GetNumberOfColors())
404  * i));
405  else
406  fZLevel.push_back(
407  fmin + ((fmax - fmin) / Double_t(TColor::GetNumberOfColors()) * i));
408  }
409  TString title, name;
410  std::map<Int_t, TCanvas*> LayerMap;
411  std::map<Int_t, TCanvas*>::iterator LayerMapIt;
412  TString origpath = gDirectory->GetPath();
413  printf("\n%s\n", origpath.Data());
414  TString newpath = origpath;
415  printf("fPlotResults: %i\n", (Int_t) fPlotResults);
416  if (fPlotResults) {
417  newpath = "data/result.root";
418  } else {
419  newpath.ReplaceAll("eds", "hd_qa");
420  newpath.ReplaceAll(":/", "");
421  }
422  printf("\n%s\n", newpath.Data());
423  TFile* tempFile = NULL;
424  TFile* tempFileNumerator = NULL;
425  TFile* tempFileDenominator = NULL;
426  if (fPlotResults) {
427  tempFile = new TFile(newpath, "update");
428  if (fRatioTwoFiles) {
429  tempFileNumerator = new TFile("data/result_Numerator.root", "read");
430  if (NULL == tempFileNumerator)
431  LOG(error)
432  << "CbmTrdHitRateFastQa:: data/result_Numerator.root not found";
433  tempFileDenominator = new TFile("data/result_Denominator.root", "read");
434  if (NULL == tempFileDenominator)
435  LOG(error)
436  << "CbmTrdHitRateFastQa:: data/result_Denominator.root not found";
437  }
438  } else
439  tempFile = new TFile(newpath, "recreate");
440  gDirectory = tempFile->CurrentDirectory();
441  gDirectory->pwd();
442 
443  if (fPlotResults)
444  fEventCounter = (TH1I*) tempFile->Get("fEventCounter");
445  else
446  fEventCounter->Write("", TObject::kOverwrite);
447  if (!gDirectory->Cd("TrdHitDensityQa")) gDirectory->mkdir("TrdHitDensityQa");
448  gDirectory->Cd("TrdHitDensityQa");
449  if (!gDirectory->Cd("Module")) gDirectory->mkdir("Module");
450  gDirectory->Cd("Module");
451 
452 
453  Int_t moduleAddress = -1;
454  for (fModuleHitMapIt = fModuleHitMap.begin();
456  ++fModuleHitMapIt) {
457  TString histName = fModuleHitMapIt->second->GetName();
458  //cout << histName << endl;
459  if (fPlotResults) {
460  if (fRatioTwoFiles) {
461  fModuleHitMapIt->second =
462  (TH2I*) tempFileNumerator->Get("TrdHitDensityQa/Module/" + histName)
463  ->Clone(histName + "_numerator");
464  // if (NULL == fModuleHitMapIt->second)
465  // LOG(error) << "CbmTrdHitRateFastQa:: data/result_Numerator.root " << histName.Data() << " not found";
466  fModuleHitMapIt->second->Scale(100);
467  // // fModuleHitMapIt->second->Scale(2);
468  fModuleHitMapIt->second->Divide(
469  (TH2I*) tempFileDenominator->Get("TrdHitDensityQa/Module/" + histName)
470  ->Clone(histName + "_denominator"));
471 
472  // fModuleHitMapIt->second->Divide(
473  // (TH2I*)tempFileNumerator->Get("TrdHitDensityQa/Module/" + histName)->Clone(histName+"_numerator"),
474  // (TH2I*)tempFileDenominator->Get("TrdHitDensityQa/Module/" + histName)->Clone(histName+"_denominator"),
475  // 1.,1.); // need to be in the kHz range, therefore 100 * 1000
476  // 1000.,1.); // need to be in the kHz range, therefore 100 * 1000
477 
478  cout << histName << " "
479  << fModuleHitMapIt->second->GetBinContent(
480  fModuleHitMapIt->second->GetMaximumBin())
481  << endl;
482 
483  // if (NULL == fModuleHitMapIt->second)
484  // LOG(error) << "CbmTrdHitRateFastQa:: data/result_Denominator.root " << histName.Data() << " not found";
485  } else
486  fModuleHitMapIt->second =
487  (TH2I*) tempFile->Get("TrdHitDensityQa/Module/" + histName);
488  } else
489  fModuleHitMapIt->second->Write("", TObject::kOverwrite);
490  moduleAddress = fModuleHitMapIt->first;
491  //printf("# ModuleAddress: %8i",moduleAddress);
492  //myfile << "# ModuleAddress: " << moduleAddress << endl;
493  //if (fPlotResults){
494  //util = new CbmTrdUtils();
495  //myfile << CbmTrdAddress::GetModuleId(moduleAddress) << " " << util->GetModuleType(moduleAddress,fModuleDigi,fDigiPar) << " ";
496  // }
497  ratePerModule = 0.;
498  Int_t LayerId = CbmTrdAddress::GetLayerId(moduleAddress);
499  if (LayerMap.find(LayerId) == LayerMap.end()) {
500  fStation = LayerId / 4 + 1; // OK for SIS100 and SIS300
501  fLayer = LayerId % 4 + 1; //
502  name.Form("hd_S%d_L%d", fStation, fLayer);
503  title.Form("hd Station %d, Layer %d", fStation, fLayer);
504  LayerMap[LayerId] = new TCanvas(name, title, 1000, 900);
505  name.Form("hdH_S%d_L%d", fStation, fLayer);
506  title.Form("hdH Station %d, Layer %d", fStation, fLayer);
507  TH2I* Layer = new TH2I(name, title, 1, -4000, 4000, 1, -3500, 3500);
508  Layer->SetContour(99);
509  Layer->SetXTitle("x-Coordinate [mm]");
510  Layer->SetYTitle("y-Coordinate [mm]");
511  Layer->SetZTitle("Trigger/Channel [kHz]");
512  if (fRatioTwoFiles) Layer->SetZTitle("Trigger ratio [%]");
513  Layer->SetStats(kFALSE);
514  Layer->GetXaxis()->SetLabelSize(0.02);
515  Layer->GetYaxis()->SetLabelSize(0.02);
516  Layer->GetZaxis()->SetLabelSize(0.02);
517  Layer->GetXaxis()->SetTitleSize(0.02);
518  Layer->GetXaxis()->SetTitleOffset(1.5);
519  Layer->GetYaxis()->SetTitleSize(0.02);
520  Layer->GetYaxis()->SetTitleOffset(2);
521  Layer->GetZaxis()->SetTitleSize(0.02);
522  Layer->GetZaxis()->SetTitleOffset(-2);
523  Layer->GetZaxis()->SetRangeUser(fmin / 1000, fmax / 1000);
524  if (fRatioTwoFiles) Layer->GetZaxis()->SetRangeUser(fmin, fmax);
525  LayerMap[LayerId]->cd()->SetLogz(flogScale);
526  Layer->Fill(0., 0., 0);
527  Layer->Draw("colz");
528  }
529  const Int_t nModules = fDigiPar->GetNrOfModules();
530  CbmTrdParModDigi* fModuleDigi =
532  CbmTrdParModGeo* fModuleGeo =
534  gGeoManager->FindNode(
535  fModuleGeo->GetX(), fModuleGeo->GetY(), fModuleGeo->GetZ());
536  CbmTrdParSetAsic* fModuleAsic =
538  std::vector<Int_t> AsicAddresses;
539  fModuleAsic->GetAsicAddresses(&AsicAddresses);
540  Int_t nofAsics = fModuleAsic->GetNofAsics();
541  if (fPlotResults) {
542  if (AsicTriggerMap.find(nofAsics) == AsicTriggerMap.end()) {
543  name.Form("hd_ASICs%03i", nofAsics);
544  title.Form("hd_ASICs%03d_%4.1fcmx%4.1fcm_%03dx%03dpads",
545  nofAsics,
546  2 * fModuleDigi->GetSizeX(),
547  2 * fModuleDigi->GetSizeY(),
548  fModuleDigi->GetNofRows(),
549  fModuleDigi->GetNofColumns());
550  AsicTriggerMap[nofAsics] = std::make_pair(1,
551  new TH2D(name,
552  title,
553  nofAsics,
554  -0.5,
555  nofAsics - 0.5,
556  nModules,
557  -0.5,
558  nModules - 0.5));
559  AsicTriggerMap[nofAsics].second->SetContour(99);
560  AsicTriggerMap[nofAsics].second->SetXTitle("ASIC Id");
561  AsicTriggerMap[nofAsics].second->SetYTitle("module count");
562  AsicTriggerMap[nofAsics].second->SetZTitle("trigger per ASIC");
563  } else {
564  AsicTriggerMap[nofAsics].first += 1;
565  }
566  }
567  //printf(" NofAsics: %3i\n",nofAsics);
568  //myfile << "# NofAsics : " << nofAsics << endl;
569  //myfile << "# moduleAddress / Asic ID / hits per 32ch Asic per second" << endl;
570  nTotalAsics += nofAsics;
571  std::map<Int_t, Double_t> ratePerAsicMap;
572  for (Int_t iAsic = 0; iAsic < nofAsics; iAsic++) {
573  ratePerAsicMap[AsicAddresses[iAsic]] = 0.;
574  }
575  const Int_t nSec = fModuleDigi->GetNofSectors();
576  Int_t global_Row = 0;
577  TVector3 padPos;
578  TVector3 padSize;
579  TBox* pad = NULL;
580  TBox* module = NULL;
581  //printf("Module: %6i Maximum Trigger Rate: %EHz/Channel\n",fModuleHitMapIt->first,fModuleHitMapIt->second->GetBinContent(fModuleHitMapIt->second->GetMaximumBin()) / Double_t(fEventCounter->GetEntries()) * fEventRate);
582  for (Int_t s = 0; s < nSec; s++) {
583  const Int_t nRow = fModuleDigi->GetNofRowsInSector(s);
584  const Int_t nCol = fModuleDigi->GetNofColumnsInSector(s);
585  for (Int_t r = 0; r < nRow; r++) {
586  for (Int_t c = 0; c < nCol; c++) {
587  fModuleDigi->GetPosition(/*fModuleHitMapIt->first, */ s,
588  c,
589  r,
590  padPos,
591  padSize); // padPos local or global???
592  Int_t channelAddress =
594  CbmTrdAddress::GetModuleId(moduleAddress),
595  s,
596  r,
597  c);
598  Double_t local_min[3] = {padPos[0] - 0.5 * padSize[0],
599  padPos[1] - 0.5 * padSize[1],
600  padPos[2]};
601  Double_t local_max[3] = {padPos[0] + 0.5 * padSize[0],
602  padPos[1] + 0.5 * padSize[1],
603  padPos[2]};
604  if (
605  fModuleDigi->GetOrientation() == 1
606  || fModuleDigi->GetOrientation()
607  == 3) { // Pad size is in local coordinate system where position is in global coordinate system
608  local_min[0] = padPos[0] - 0.5 * padSize[1];
609  local_min[1] = padPos[1] - 0.5 * padSize[0];
610  local_max[0] = padPos[0] + 0.5 * padSize[1];
611  local_max[1] = padPos[1] + 0.5 * padSize[0];
612  }
613  for (Int_t i = 0; i < 3; i++) {
614  //global_min[i] *= 10.;
615  //global_max[i] *= 10.;
616  local_min[i] *= 10.;
617  local_max[i] *= 10.;
618  }
619  //Double_t rate = Double_t(fModuleHitMapIt->second->GetBinContent(c+1,global_Row+1)) / Double_t(fEventCounter->GetEntries()) * fEventRate;// *
620  Double_t rate = TriggerCount2TriggerRate(Double_t(
621  fModuleHitMapIt->second->GetBinContent(c + 1, global_Row + 1)));
622  ratePerModule += rate;
623  Int_t AsicAddress = fModuleAsic->GetAsicAddress(channelAddress);
624  ratePerAsicMap[AsicAddress] += rate;
625  if (AsicAddress < 0)
626  LOG(error)
627  << "CbmTrdHitRateFastQa::ScanModulePlane: Channel address:"
628  << channelAddress << " is not initialized in module "
629  << moduleAddress << "(s:" << s << ", r:" << r << ", c:" << c
630  << ")";
631 
632  pad =
633  new TBox(local_min[0], local_min[1], local_max[0], local_max[1]);
634  //printf(" %i %i %i (%f, %f) (%f, %f) %f\n",s,r,c,local_min[0],local_min[1],global_min[0],global_min[1],rate);
635  pad->SetLineColor(0);
636  pad->SetLineWidth(0);
637  // Int_t color(0), j(0);
638  Int_t j(0);
639  rate *= fScaleCentral2mBias;
640  //if (rate > min && rate <= max){
641  while ((rate > fZLevel[j]) && (j < (Int_t) fZLevel.size())) {
642  //printf (" %i<%i %i %E <= %E\n",j,(Int_t)fZLevel.size(),fColors[j], rate, fZLevel[j]);
643  j++;
644  }
645  //printf ("%i<%i %i %E <= %E\n\n",j,(Int_t)fZLevel.size(),fColors[j], rate, fZLevel[j]);
646  pad->SetFillColor(fColors[j]);
647  if (j == (Int_t) fZLevel.size()) pad->SetFillColor(12);
648  if (rate < fmin) pad->SetFillColor(17);
649 
650  LayerMap[LayerId]->cd();
651  pad->Draw("same");
652  }
653  global_Row++;
654  }
655  }
656 
657  module = new TBox(fModuleGeo->GetX() * 10 - fModuleDigi->GetSizeX() * 10,
658  fModuleGeo->GetY() * 10 - fModuleDigi->GetSizeY() * 10,
659  fModuleGeo->GetX() * 10 + fModuleDigi->GetSizeX() * 10,
660  fModuleGeo->GetY() * 10 + fModuleDigi->GetSizeY() * 10);
661  module->SetFillStyle(0);
662  LayerMap[LayerId]->cd();
663  module->Draw("same");
664  delete fModuleHitMapIt->second;
665  for (Int_t iAsic = 0; iAsic < nofAsics; iAsic++) {
666  //fModuleHitASICMap[moduleAddress]->Fill(iAsic, ratePerAsicMap[AsicAddresses[iAsic]] * Double_t(fEventCounter->GetEntries()) / fEventRate);
667  fModuleHitASICMap[moduleAddress]->Fill(
668  iAsic, TriggerRate2TriggerCount(ratePerAsicMap[AsicAddresses[iAsic]]));
669  if (fPlotResults) {
670  if (ratePerAsicMap[AsicAddresses[0]]
671  > ratePerAsicMap[AsicAddresses[nofAsics - 1]])
672  AsicTriggerMap[nofAsics].second->SetBinContent(
673  iAsic + 1,
674  AsicTriggerMap[nofAsics].first,
675  ratePerAsicMap[AsicAddresses[iAsic]] * fScaleCentral2mBias);
676  else
677  AsicTriggerMap[nofAsics].second->SetBinContent(
678  nofAsics - iAsic,
679  AsicTriggerMap[nofAsics].first,
680  ratePerAsicMap[AsicAddresses[iAsic]] * fScaleCentral2mBias);
681  }
682  if (fPlotResults) {
683  util = new CbmTrdUtils();
684  myfile << setfill(' ') << setw(5) << moduleAddress << " "
685  << setfill(' ') << setw(2)
686  << CbmTrdAddress::GetModuleId(moduleAddress) << " "
687  << util->GetModuleType(moduleAddress, fModuleDigi, fDigiPar)
688  << " " << setfill('0') << setw(2) << iAsic << " "
689  << setiosflags(ios::fixed) << setprecision(0) << setfill(' ')
690  << setw(8) << ratePerAsicMap[AsicAddresses[iAsic]] << endl;
691  }
692  //Double_t dataPerAsic = ratePerAsicMap[AsicAddresses[iAsic]] * 1e-6 * fBitPerHit; // Mbit, incl. neighbor
693  //TriggerRate2DataRate(ratePerAsicMap[AsicAddresses[iAsic]]) * 1e-6; // Mbit, incl. neighbor // to be used in a later patch
694  //Double_t dataPerAsic = TriggerRate2DataRate(ratePerAsicMap[AsicAddresses[iAsic]]) * 1e-6; // Mbit, incl. neighbor
695  //HitAsic->Fill(dataPerAsic);
696  }
697  //if (fPlotResults)
698  //AsicTriggerMap[nofAsics].first +=1;
699  if (!fPlotResults)
700  fModuleHitASICMap[moduleAddress]->Write("", TObject::kOverwrite);
701  delete fModuleHitASICMap[moduleAddress];
702  }
703  //Double_t dataPerModule = ratePerModule * 1e-6 * fBitPerHit * fScaleCentral2mBias; // Mbit, incl. neighbor
704  Double_t dataPerModule = TriggerRate2DataRate(ratePerModule) * 1e-6
705  * fScaleCentral2mBias; // Mbit, incl. neighbor
706  Int_t nOptLinks = (Int_t)(
707  1
708  + dataPerModule
709  / 4000.); // 5000.; // 1 link plus 1 for each 4 Gbps (fill links to 80% max)
710  //h1DataModule->Fill(dataPerModule);
711  //h1OptLinksModule->Fill(nOptLinks);
712 
713  // global statistics
714  nTotalOptLinks += nOptLinks;
715  trdTotalDataRate += dataPerModule;
716 
717  printf(" --------------------------\n");
718  printf(" total number of ASICs : %d\n", nTotalAsics);
719  printf(" total number of optical links: %d\n", nTotalOptLinks);
720  printf(" total TRD data rate : %.2f (Gbit/s)\n",
721  trdTotalDataRate * 1e-3);
722  printf(" --------------------------\n");
723  printf(" --------------------------\n");
724  /*
725  myfile << "# total number of ASICs: " << nTotalAsics << endl;
726  myfile << "#--------------------------" << endl;
727  myfile << "#--------------------------" << endl;
728  */
729  if (fPlotResults) myfile.close();
730  fModuleHitASICMap.clear();
731  fModuleHitMap.clear();
732  gDirectory->Cd("..");
733  if (!gDirectory->Cd("ASIC")) gDirectory->mkdir("ASIC");
734  gDirectory->Cd("ASIC");
735  if (fPlotResults) {
736  for (AsicTriggerMapIt = AsicTriggerMap.begin();
737  AsicTriggerMapIt != AsicTriggerMap.end();
738  ++AsicTriggerMapIt) {
739  AsicTriggerMapIt->second.second->GetYaxis()->SetRangeUser(
740  -0.5, AsicTriggerMapIt->second.first - 1.5);
741  AsicTriggerMapIt->second.second->GetZaxis()->SetRangeUser(0, 8.0E6);
742  AsicTriggerMapIt->second.second->Write("", TObject::kOverwrite);
743  }
744  }
745  gDirectory->Cd("..");
746  for (LayerMapIt = LayerMap.begin(); LayerMapIt != LayerMap.end();
747  ++LayerMapIt) {
748  LayerMapIt->second->Write("", TObject::kOverwrite);
749  fStation = LayerMapIt->first / 4 + 1; // OK for SIS100 and SIS300
750  fLayer = LayerMapIt->first % 4 + 1; //
751  if (fPlotResults) {
752  name.Form("pics/CbmTrdHitDensityQaFinal_S%i_L%i.png", fStation, fLayer);
753  if (fRatioTwoFiles)
754  name.Form("pics/CbmTrdHitDensityQaRatio_S%i_L%i.png", fStation, fLayer);
755  } else
756  name.Form("pics/CbmTrdHitDensityQa_S%i_L%i.png", fStation, fLayer);
757  LayerMapIt->second->SaveAs(name);
758  name.ReplaceAll("png", "pdf");
759  LayerMapIt->second->SaveAs(name);
760  }
761 
762  gDirectory->Cd("..");
763  tempFile->Close();
764  gDirectory->Cd(origpath);
765  gDirectory->pwd();
766  delete util;
767 }
768 
769 // ----- Public method EndOfEvent --------------------------------------
771  if (fClusters) {
772  fClusters->Clear("C");
773  fClusters->Delete();
774  }
775  fUsedDigiMap.clear();
776 }
777 // -------------------------------------------------------------------------
778 
779 void CbmTrdHitDensityQa::SetTriggerThreshold(Double_t triggerthreshold) {
780  fTriggerThreshold = triggerthreshold;
781 }
782 
783 Double_t CbmTrdHitDensityQa::TriggerRate2DataRate(Double_t triggerrate) {
784  return triggerrate * fBitPerHit;
785 }
786 Double_t CbmTrdHitDensityQa::DataRate2TriggerRate(Double_t datarate) {
787  return datarate / fBitPerHit;
788 }
790  // if (fRatioTwoFiles)
791  // return count / Double_t(fEventCounter->GetEntries());
792  return count / Double_t(fEventCounter->GetEntries()) * fEventRate;
793 }
795  return rate * Double_t(fEventCounter->GetEntries()) / fEventRate;
796 }
CbmTrdHitDensityQa::fBitPerHit
Double_t fBitPerHit
Definition: CbmTrdHitDensityQa.h:76
CbmTrdParSetAsic::GetModuleSet
virtual const CbmTrdParSet * GetModuleSet(Int_t detId) const
Definition: CbmTrdParSetAsic.cxx:238
CbmTrdAddress::GetModuleAddress
static UInt_t GetModuleAddress(UInt_t address)
Return unique module ID from address.
Definition: CbmTrdAddress.h:117
CbmTrdHitDensityQa::flogScale
Bool_t flogScale
Definition: CbmTrdHitDensityQa.h:75
CbmTrdDigi::GetAddress
Int_t GetAddress() const
Address getter for module in the format defined by CbmTrdDigi (format of CbmTrdAddress can be accesse...
Definition: CbmTrdDigi.h:92
CbmTrdHitDensityQa::~CbmTrdHitDensityQa
virtual ~CbmTrdHitDensityQa()
Definition: CbmTrdHitDensityQa.cxx:96
CbmTrdHitDensityQa::SetTriggerMinScale
void SetTriggerMinScale(Double_t min)
Definition: CbmTrdHitDensityQa.cxx:187
CbmTrdHitDensityQa::Finish
virtual void Finish()
Definition: CbmTrdHitDensityQa.cxx:367
CbmTrdHitDensityQa::SetTriggerMaxScale
void SetTriggerMaxScale(Double_t max)
Definition: CbmTrdHitDensityQa.cxx:186
CbmTrdAddress::GetAddress
static UInt_t GetAddress(Int_t layerId, Int_t moduleId, Int_t sectorId, Int_t rowId, Int_t columnId)
Return address from system ID, layer, module, sector, column and row IDs.
Definition: CbmTrdAddress.h:38
CbmTrdHitDensityQa::SetPlotResults
void SetPlotResults(Bool_t plotResults)
Definition: CbmTrdHitDensityQa.cxx:180
CbmTrdUtils.h
CbmTrdHitDensityQa::DataRate2TriggerRate
Double_t DataRate2TriggerRate(Double_t datarate)
Definition: CbmTrdHitDensityQa.cxx:786
CbmTrdParSetAsic::GetNofAsics
virtual Int_t GetNofAsics() const
Definition: CbmTrdParSetAsic.h:48
CbmTrdHitDensityQa::TriggerRate2DataRate
Double_t TriggerRate2DataRate(Double_t triggerrate)
Definition: CbmTrdHitDensityQa.cxx:783
CbmTrdUtils
Definition: CbmTrdUtils.h:19
CbmTrdHitDensityQa::fmax
Double_t fmax
Definition: CbmTrdHitDensityQa.h:74
CbmTrdParModDigi::GetNofRowsInSector
Int_t GetNofRowsInSector(Int_t i) const
Definition: CbmTrdParModDigi.cxx:366
CbmTrdParSetGeo.h
CbmTrdHitDensityQa::TriggerCount2TriggerRate
Double_t TriggerCount2TriggerRate(Double_t count)
Definition: CbmTrdHitDensityQa.cxx:789
CbmTrdHitDensityQa::CbmTrdHitDensityQa
CbmTrdHitDensityQa()
Definition: CbmTrdHitDensityQa.cxx:59
CbmTrdParModDigi::GetNofRows
Int_t GetNofRows() const
Definition: CbmTrdParModDigi.cxx:340
CbmDigiManager::Init
InitStatus Init()
Initialisation.
Definition: CbmDigiManager.cxx:71
CbmTrdParModDigi::GetNofColumnsInSector
Int_t GetNofColumnsInSector(Int_t i) const
Definition: CbmTrdParModDigi.cxx:359
CbmTrdAddress::GetSectorId
static UInt_t GetSectorId(UInt_t address)
Return sector ID from address.
Definition: CbmTrdAddress.h:88
i
int i
Definition: L1/vectors/P4_F32vec4.h:25
CbmTrdHitDensityQa::TriggerRate2TriggerCount
Double_t TriggerRate2TriggerCount(Double_t rate)
Definition: CbmTrdHitDensityQa.cxx:794
CbmTrdParSetAsic
Describe TRD module ASIC settings (electronic gain, delays, etc)
Definition: CbmTrdParSetAsic.h:18
CbmTrdHitDensityQa::SetScaleCentral2mBias
void SetScaleCentral2mBias(Double_t scaling)
Definition: CbmTrdHitDensityQa.cxx:177
CbmTrdParSetAsic::GetAsicAddress
virtual Int_t GetAsicAddress(Int_t chAddress) const
Look for the ASIC which operates on a specific channel.
Definition: CbmTrdParSetAsic.cxx:209
CbmTrdHitDensityQa::FinishEvent
virtual void FinishEvent()
Definition: CbmTrdHitDensityQa.cxx:770
CbmTrdHitDensityQa::SetRatioTwoFiles
void SetRatioTwoFiles(Bool_t ratioPlot)
Definition: CbmTrdHitDensityQa.cxx:190
CbmTrdHitDensityQa::fLayer
Int_t fLayer
Definition: CbmTrdHitDensityQa.h:92
CbmTrdHitDensityQa::fGeoHandler
CbmTrdGeoHandler * fGeoHandler
Definition: CbmTrdHitDensityQa.h:89
CbmTrdAddress::GetLayerId
static UInt_t GetLayerId(UInt_t address)
Return layer ID from address.
Definition: CbmTrdAddress.h:69
CbmTrdAddress::GetModuleId
static UInt_t GetModuleId(UInt_t address)
Return module ID from address.
Definition: CbmTrdAddress.h:78
CbmTrdHitDensityQa::fStation
Int_t fStation
Definition: CbmTrdHitDensityQa.h:91
CbmDigiManager::GetNofDigis
static Int_t GetNofDigis(ECbmModuleId systemId)
Definition: CbmDigiManager.cxx:62
CbmTrdHitDensityQa::SetLogScale
void SetLogScale(Bool_t logScale)
Definition: CbmTrdHitDensityQa.cxx:188
CbmTrdParModDigi::GetSizeX
Double_t GetSizeX() const
Definition: CbmTrdParModDigi.h:109
CbmTrdParModGeo.h
CbmTrdParSetAsic.h
CbmTrdHitDensityQa::fScaleCentral2mBias
Double_t fScaleCentral2mBias
Definition: CbmTrdHitDensityQa.h:99
CbmTrdGeoHandler
Definition: CbmTrdGeoHandler.h:29
CbmDigiManager::Instance
static CbmDigiManager * Instance()
Static instance.
Definition: CbmDigiManager.h:93
CbmCluster::GetNofDigis
Int_t GetNofDigis() const
Number of digis in cluster.
Definition: CbmCluster.h:69
CbmTrdHitDensityQa::SetNeighbourTrigger
void SetNeighbourTrigger(Bool_t trigger)
Definition: CbmTrdHitDensityQa.cxx:183
min
friend F32vec4 min(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:33
CbmTrdCluster
Data Container for TRD clusters.
Definition: CbmTrdCluster.h:23
CbmTrdParSet::GetNrOfModules
virtual Int_t GetNrOfModules() const
Definition: CbmTrdParSet.h:34
CbmTrdHitDensityQa::SetTriggerThreshold
void SetTriggerThreshold(Double_t triggerthreshold)
Definition: CbmTrdHitDensityQa.cxx:779
CbmTrdHitDensityQa.h
CbmTrdDigi.h
CbmTrdHitDensityQa::fModuleHitMapIt
std::map< Int_t, TH2I * >::iterator fModuleHitMapIt
Definition: CbmTrdHitDensityQa.h:103
CbmTrdParModGeo
Definition of geometry for one TRD module.
Definition: CbmTrdParModGeo.h:12
CbmTrdParModDigi::GetNofSectors
Int_t GetNofSectors() const
Definition: CbmTrdParModDigi.h:49
CbmTrdGeoHandler.h
Helper class to extract information from the GeoManager.
CbmDigiManager::Get
const Digi * Get(Int_t index) const
Get a digi object.
Definition: CbmDigiManager.h:52
CbmTrdParModDigi::GetOrientation
Int_t GetOrientation() const
Definition: CbmTrdParModDigi.h:35
CbmTrdParModDigi
Definition of chamber gain conversion for one TRD module.
Definition: CbmTrdParModDigi.h:14
CbmTrdGeoHandler::Init
void Init(Bool_t isSimulation=kFALSE)
Definition: CbmTrdGeoHandler.cxx:45
CbmTrdHitDensityQa
Definition: CbmTrdHitDensityQa.h:30
CbmTrdHitDensityQa::fRatioTwoFiles
Bool_t fRatioTwoFiles
Definition: CbmTrdHitDensityQa.h:82
CbmTrdHitDensityQa::fEventCounter
TH1I * fEventCounter
Definition: CbmTrdHitDensityQa.h:95
CbmTrdParModDigi.h
CbmTrdHitDensityQa::fModuleHitMap
std::map< Int_t, TH2I * > fModuleHitMap
Definition: CbmTrdHitDensityQa.h:102
CbmTrdParSet::GetModulePar
virtual const CbmTrdParMod * GetModulePar(Int_t detId) const
Definition: CbmTrdParSet.cxx:45
CbmTrdHitDensityQa::ReInit
virtual InitStatus ReInit()
Definition: CbmTrdHitDensityQa.cxx:117
CbmTrdHit.h
Class for hits in TRD detector.
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmTrdHitDensityQa::Register
void Register()
Definition: CbmTrdHitDensityQa.cxx:360
CbmTrdHitDensityQa::fTriggerThreshold
Double_t fTriggerThreshold
Definition: CbmTrdHitDensityQa.h:97
first
bool first
Definition: LKFMinuit.cxx:143
CbmTrdParSetGeo
Definition: CbmTrdParSetGeo.h:9
CbmTrdHitDensityQa::fmin
Double_t fmin
Definition: CbmTrdHitDensityQa.h:74
CbmTrdHitDensityQa::fAsicPar
CbmTrdParSetAsic * fAsicPar
Definition: CbmTrdHitDensityQa.h:86
CbmTrdParSetDigi.h
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmTrdParModDigi::GetPosition
void GetPosition(Int_t sectorId, Int_t columnId, Int_t rowId, TVector3 &padPos, TVector3 &padSize) const
Definition: CbmTrdParModDigi.cxx:806
CbmTrdHitDensityQa::fUsedDigiMap
std::map< Int_t, Int_t > fUsedDigiMap
Definition: CbmTrdHitDensityQa.h:101
CbmDigiManager.h
CbmTrdParModDigi::GetSizeY
Double_t GetSizeY() const
Definition: CbmTrdParModDigi.h:110
CbmTrdHitDensityQa::fEventRate
Double_t fEventRate
Definition: CbmTrdHitDensityQa.h:98
CbmTrdHitDensityQa::fNeighbourTrigger
Bool_t fNeighbourTrigger
Definition: CbmTrdHitDensityQa.h:80
CbmTrdPoint.h
CbmTrdParModGeo::GetZ
virtual Double_t GetZ() const
Definition: CbmTrdParModGeo.h:32
CbmTrdDigi
Definition: CbmTrdDigi.h:14
CbmTrdParSetDigi
Definition: CbmTrdParSetDigi.h:15
CbmTrdHitDensityQa::fGeoPar
CbmTrdParSetGeo * fGeoPar
Definition: CbmTrdHitDensityQa.h:88
CbmTrdHitDensityQa::fPlotResults
Bool_t fPlotResults
Definition: CbmTrdHitDensityQa.h:81
CbmTrdCluster.h
Data Container for TRD clusters.
CbmTrdParModGeo::GetX
virtual Double_t GetX() const
Definition: CbmTrdParModGeo.h:22
CbmTrdParSetAsic::GetAsicAddresses
virtual void GetAsicAddresses(std::vector< Int_t > *a) const
Definition: CbmTrdParSetAsic.cxx:224
CbmTrdParModGeo::GetY
virtual Double_t GetY() const
Definition: CbmTrdParModGeo.h:27
CbmTrdParModDigi::GetModuleRow
Int_t GetModuleRow(Int_t &sectorId, Int_t &rowId) const
Definition: CbmTrdParModDigi.cxx:373
max
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Definition: L1/vectors/P4_F32vec4.h:36
CbmTrdHitDensityQa::fModuleHitASICMap
std::map< Int_t, TH1D * > fModuleHitASICMap
Definition: CbmTrdHitDensityQa.h:104
CbmTrdDigi::GetCharge
Double_t GetCharge() const
Charge getter for SPADIC.
Definition: CbmTrdDigi.cxx:133
CbmTrdHitDensityQa::fClusters
TClonesArray * fClusters
Definition: CbmTrdHitDensityQa.h:84
CbmCluster::GetDigi
Int_t GetDigi(Int_t index) const
Get digi at position index.
Definition: CbmCluster.h:76
CbmTrdHitDensityQa::fDigiPar
CbmTrdParSetDigi * fDigiPar
Definition: CbmTrdHitDensityQa.h:87
CbmTrdHitDensityQa::Exec
virtual void Exec(Option_t *option)
Definition: CbmTrdHitDensityQa.cxx:195
CbmTrdHitDensityQa::myfile
std::ofstream myfile
Definition: CbmTrdHitDensityQa.h:72
CbmTrdHitDensityQa::Init
virtual InitStatus Init()
Definition: CbmTrdHitDensityQa.cxx:127
CbmTrdHitDensityQa::SetParContainers
virtual void SetParContainers()
Definition: CbmTrdHitDensityQa.cxx:107
CbmTrdParModDigi::GetNofColumns
Int_t GetNofColumns() const
Definition: CbmTrdParModDigi.cxx:321
CbmTrdAddress::GetRowId
static UInt_t GetRowId(UInt_t address)
Return row ID from address.
Definition: CbmTrdAddress.h:98
CbmTrdUtils::GetModuleType
Int_t GetModuleType(Int_t moduleAddress, CbmTrdParModDigi *fModuleInfo, CbmTrdParSetDigi *fDigiPar)
Definition: CbmTrdUtils.cxx:300
CbmTrdAddress::GetColumnId
static UInt_t GetColumnId(UInt_t address)
Return column ID from address.
Definition: CbmTrdAddress.h:107