CbmRoot
CbmDigitization.cxx
Go to the documentation of this file.
1 
6 #include "CbmDigitization.h"
7 
9 #include "CbmMuchDigitizeGem.h"
10 #include "CbmMvdDigitizer.h"
11 #include "CbmPsdSimpleDigitizer.h"
12 #include "CbmRichDigitizer.h"
13 #include "CbmRunAna.h"
14 #include "CbmSetup.h"
15 #include "CbmStsDigitize.h"
16 #include "CbmTofDigitize.h"
17 #include "CbmTrdDigitizer.h"
18 #include "FairFileSource.h"
19 #include "FairLogger.h"
20 #include "FairMCEventHeader.h"
21 #include "FairMonitor.h"
22 #include "FairParAsciiFileIo.h"
23 #include "FairParRootFileIo.h"
24 #include "FairRuntimeDb.h"
25 #include "TClonesArray.h"
26 #include "TGeoManager.h"
27 #include "TROOT.h"
28 #include <cassert>
29 
30 
31 // ----- Constructor ----------------------------------------------------
33  : TNamed("CbmDigitization", "Digitisation Run")
34  , fIsInit(kFALSE)
35  , fEventMode(kFALSE)
36  , fTimeSliceLength(-1.)
37  , fProduceNoise(kTRUE)
38  , fCreateMatches(kTRUE)
39  , fDigitizers()
40  , fDaq(new CbmDaq())
41  , fSource(new CbmDigitizationSource())
42  , fOutFile()
43  , fParRootFile()
44  , fParAsciiFiles()
45  , fMoniFile()
46  , fOverwriteOutput(kFALSE)
47  , fGenerateRunInfo(kTRUE)
48  , fRun(0) {
50 }
51 // --------------------------------------------------------------------------
52 
53 
54 // ----- Destructor -----------------------------------------------------
56  LOG(debug) << "Destructing " << fName;
57  for (auto it = fDigitizers.begin(); it != fDigitizers.end(); it++) {
58  if (it->second) delete it->second;
59  } //# CbmDigitizeInfos
60  // CbmDaq and the digitizers are destructed by FairRun.
61  if (fSource) delete fSource;
62 }
63 // --------------------------------------------------------------------------
64 
65 
66 // ----- Add an input file ----------------------------------------------
67 void CbmDigitization::AddInput(UInt_t inputId,
68  TString fileName,
69  Double_t eventRate,
70  ECbmTreeAccess mode) {
71  if (gSystem->AccessPathName(fileName))
72  LOG(fatal) << fName << ": input file " << fileName << " does not exist!";
73  TChain* chain = new TChain("cbmsim");
74  chain->Add(fileName.Data());
75  fSource->AddInput(inputId, chain, eventRate, mode);
76 }
77 // --------------------------------------------------------------------------
78 
79 
80 // ----- Add an ASCII parameter file ------------------------------------
81 Bool_t CbmDigitization::AddParameterAsciiFile(TString fileName) {
82  if (gSystem->AccessPathName(fileName.Data())) {
83  LOG(error) << fName << ": Parameter file " << fileName
84  << " does not exist!";
85  return kFALSE;
86  }
87  fParAsciiFiles.Add(new TObjString(fileName.Data()));
88  LOG(info) << fName << ": Adding parameter file " << fileName;
89  return kTRUE;
90 }
91 // --------------------------------------------------------------------------
92 
93 
94 // ----- Check input file -----------------------------------------------
96 
97  // --- Check presence of input data branch for the digitizers.
98  // --- If the branch is not found, the digitizer will not be instantiated.
99  Int_t nBranches = 0;
100  for (auto const& entry : fDigitizers) {
101  auto setIt = fSource->GetBranchList().find(entry.second->GetBranchName());
102  if (setIt != fSource->GetBranchList().end()) {
103  LOG(info) << fName << ": Found branch " << entry.second->GetBranchName()
104  << " for system "
105  << CbmModuleList::GetModuleNameCaps(entry.first);
106  entry.second->SetPresent();
107  nBranches++;
108  } //? Branch required by digitizer is present in branch list
109  }
110 
111  // Now we have to do some gymnastics to get the run ID, which is needed
112  // to determine the geometry tags, which in turn are needed to register
113  // the proper ASCII parameter files. This is rather nasty; the parameter
114  // handling is really a pain in the neck.
115  CbmMCInput* input = fSource->GetFirstInput();
116  assert(input);
117  TFile* file = input->GetChain()->GetFile();
118  assert(file);
119  TTree* tree = dynamic_cast<TTree*>(file->Get("cbmsim"));
120  assert(tree);
121  FairMCEventHeader* header = new FairMCEventHeader();
122  tree->SetBranchAddress("MCEventHeader.", &header);
123  tree->GetEntry(0);
124  fRun = header->GetRunID();
125  LOG(info) << fName << ": Run id is " << fRun;
126 
127  return nBranches;
128 }
129 // --------------------------------------------------------------------------
130 
131 
132 // ----- Create the digitisers ------------------------------------------
134  std::cout << "Create default digitisers" << std::endl;
135 
136  stringstream ss;
137 
138  ss << fName << ": Create default digitisers: ";
139  Int_t nDigis = 0;
140  for (auto it = fDigitizers.begin(); it != fDigitizers.end(); it++) {
141 
142  // --- Skip if marked inactive
143  if (!it->second->IsActive()) continue;
144 
145  // --- Skip if MC data branch is not present
146  if (!it->second->IsPresent()) continue;
147 
148  // --- Skip if a digitizer was set explicitly
149  if (it->second->GetDigitizer() != nullptr) continue;
150 
151  // --- Skip MVD for time-based mode
152  if (it->first == ECbmModuleId::kMvd && (!fEventMode)) {
153  LOG(info) << "MVD digitizer is not available "
154  << "in time-based mode. ";
155  continue;
156  }
157  LOG(info) << "system " << it->first;
158 
159  ECbmModuleId system = it->first;
160  switch (system) {
161  case ECbmModuleId::kMvd:
162  fDigitizers[system]->SetDigitizer(new CbmMvdDigitizer());
163  ss << "MVD ";
164  nDigis++;
165  break;
166  case ECbmModuleId::kSts:
167  fDigitizers[system]->SetDigitizer(new CbmStsDigitize());
168  ss << "STS ";
169  nDigis++;
170  break;
171  case ECbmModuleId::kRich:
172  fDigitizers[system]->SetDigitizer(new CbmRichDigitizer());
173  ss << "RICH ";
174  nDigis++;
175  break;
176  case ECbmModuleId::kMuch:
177  fDigitizers[system]->SetDigitizer(new CbmMuchDigitizeGem());
178  ss << "MUCH ";
179  nDigis++;
180  break;
181  case ECbmModuleId::kTrd:
182  fDigitizers[system]->SetDigitizer(new CbmTrdDigitizer());
183  ss << "TRD ";
184  nDigis++;
185  break;
186  case ECbmModuleId::kTof:
187  fDigitizers[system]->SetDigitizer(new CbmTofDigitize());
188  ss << "TOF ";
189  nDigis++;
190  break;
191  case ECbmModuleId::kPsd:
192  fDigitizers[system]->SetDigitizer(new CbmPsdSimpleDigitizer());
193  ss << "PSD ";
194  nDigis++;
195  break;
196  default: LOG(fatal) << fName << ": Unknown system " << system; break;
197  } //? system
198  } //# present systems
199  LOG(info) << ss.str();
200 
201  return nDigis;
202 }
203 // --------------------------------------------------------------------------
204 
205 
206 // ----- Deactivate a system --------------------------------------------
208  if (fDigitizers.find(system) != fDigitizers.end())
209  fDigitizers[system]->SetActive(kFALSE);
210 }
211 // --------------------------------------------------------------------------
212 
213 
214 // ----- Deactivate all systems except one ------------------------------
216  for (auto& entry : fDigitizers)
217  entry.second->SetActive(kFALSE);
218  if (fDigitizers.find(system) != fDigitizers.end())
219  fDigitizers[system]->SetActive(kTRUE);
220 }
221 // --------------------------------------------------------------------------
222 
223 
224 // ----- Embed an input file --------------------------------------------
225 void CbmDigitization::EmbedInput(UInt_t inputId,
226  TString fileName,
227  UInt_t targetInputId,
228  ECbmTreeAccess mode) {
229  if (gSystem->AccessPathName(fileName))
230  LOG(fatal) << fName << ": input file " << fileName << " does not exist!";
231  TChain* chain = new TChain("cbmsim");
232  chain->Add(fileName.Data());
233  fSource->EmbedInput(inputId, chain, targetInputId, mode);
234 }
235 // --------------------------------------------------------------------------
236 
237 
238 // ----- Get a system geometry tag --------------------------------------
239 TString CbmDigitization::GetGeoTag(ECbmModuleId system, TGeoManager* geo) {
240 
241  assert(geo);
242  TString geoTag;
243  TString sysName = CbmModuleList::GetModuleName(system);
244  Int_t sysLength = sysName.Length() + 1;
245  gGeoManager->CdTop();
246  TGeoNode* cave = gGeoManager->GetCurrentNode(); // cave
247  for (Int_t iNode = 0; iNode < cave->GetNdaughters(); iNode++) {
248  TString volName = cave->GetDaughter(iNode)->GetVolume()->GetName();
249  if (volName.Contains(sysName.Data(), TString::kIgnoreCase)) {
250  geoTag = TString(volName(sysLength, volName.Length() - sysLength));
251  break;
252  } //? node is MUCH
253  } //# top level nodes
254 
255  return geoTag;
256 }
257 // --------------------------------------------------------------------------
258 
259 
260 // ----- Get a system geometry tag --------------------------------------
262 
263  // --- Run this method only once!
264  if (fIsInit) return;
265 
266  std::cout << std::endl << std::endl;
267  LOG(info) << "===================================================";
268  LOG(info) << "========== Initialize with default values =========";
269  // --- Look for input branches
270  Int_t nBranches = CheckInput();
271  TString word = (nBranches == 1 ? "branch" : "branches");
272  LOG(info) << fName << ": " << nBranches << " input " << word << " found";
273 
274 
275  // --- Create default digitizers
276  Int_t nDigis = CreateDefaultDigitizers();
277  word = (nDigis == 1 ? " digitiser" : " digitisers");
278  LOG(info) << fName << ": " << nDigis << word << " instantiated.";
279 
280 
281  // --- Extract needed information from runtime database
282  FairRuntimeDb* rtdb = FairRuntimeDb::instance();
283  FairParRootFileIo* parIoRoot = new FairParRootFileIo();
284  parIoRoot->open(fParRootFile.Data(), "READ");
285  rtdb->setFirstInput(parIoRoot);
286 
287 
288  // --- Get geometry from runtime database
289  rtdb->getContainer("FairGeoParSet");
290  rtdb->initContainers(fRun);
291 
292  // --- Add default parameter files for TRD and TOF
293  TString tofGeo = GetGeoTag(ECbmModuleId::kTof, gGeoManager);
294  TString trdGeo = GetGeoTag(ECbmModuleId::kTrd, gGeoManager);
295  TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
296  TString parFile;
297  if (trdGeo.Length() > 0) {
298  parFile = srcDir + "/parameters/trd/trd_" + trdGeo + ".asic.par";
299  AddParameterAsciiFile(parFile);
300  parFile = srcDir + "/parameters/trd/trd_" + trdGeo + ".digi.par";
301  AddParameterAsciiFile(parFile);
302  parFile = srcDir + "/parameters/trd/trd_" + trdGeo + ".gain.par";
303  AddParameterAsciiFile(parFile);
304  parFile = srcDir + "/parameters/trd/trd_" + trdGeo + ".gas.par";
305  AddParameterAsciiFile(parFile);
306  }
307  if (tofGeo.Length() > 0) {
308  parFile = srcDir + "/parameters/tof/tof_" + tofGeo + ".digi.par";
309  AddParameterAsciiFile(parFile);
310  parFile = srcDir + "/parameters/tof/tof_" + tofGeo + ".digibdf.par";
311  AddParameterAsciiFile(parFile);
312  }
313 
314  delete rtdb;
315  delete parIoRoot;
316 
317 
318  // --- Delete TGeoManager (will be initialised again from FairRunAna)
319  if (gROOT->GetVersionInt() >= 60602) {
320  gGeoManager->GetListOfVolumes()->Delete();
321  gGeoManager->GetListOfShapes()->Delete();
322  delete gGeoManager;
323  } //? ROOT version
324 
325 
326  std::cout << std::endl << std::endl;
327  LOG(info) << "===================================================";
328 
329  fIsInit = kTRUE;
330 }
331 // --------------------------------------------------------------------------
332 
333 
334 // ----- Execute digitisation run ---------------------------------------
335 void CbmDigitization::Run(Int_t event1, Int_t event2) {
336 
337  // --- Run info
338  std::cout << std::endl << std::endl;
339  LOG(info) << "===================================================";
340 
341  DefaultInit();
342 
343  // --- Create CbmRunAna
344  std::cout << std::endl;
345  CbmRunAna* run = new CbmRunAna();
346  run->SetAsync();
347  run->SetGenerateRunInfo(fGenerateRunInfo);
348  if (fGenerateRunInfo) LOG(info) << fName << ": Run info will be generated.";
349 
350  // --- Create DAQ
351  if (fEventMode)
352  fDaq = new CbmDaq(kTRUE);
353  else
355 
356 
357  // --- Register source
359  run->SetSource(fSource);
360 
361 
362  // --- Set output file
363  run->SetOutputFile(fOutFile);
364  LOG(info) << fName << ": Output file is " << fOutFile;
365 
366 
367  // --- Set monitoring, if chosen
368  if (!fMoniFile.IsNull()) {
369  FairMonitor::GetMonitor()->EnableMonitor(kTRUE, fMoniFile);
370  LOG(info) << fName << ": Monitor is enabled; monitor file is " << fMoniFile;
371  }
372 
373 
374  // --- Register digitisers
375  for (auto it = fDigitizers.begin(); it != fDigitizers.end(); it++) {
376  CbmDigitizeBase* digitizer = it->second->GetDigitizer();
377  if (it->second->IsActive() && digitizer != nullptr) {
378  fDaq->SetDigitizer(it->first, digitizer);
379  if (fEventMode) digitizer->SetEventMode();
380  digitizer->SetProduceNoise(fProduceNoise);
381  digitizer->SetCreateMatches(fCreateMatches);
382  run->AddTask(digitizer);
383  LOG(info) << fName << ": Added task " << digitizer->GetName();
384  } //? active and digitizer instance present
385  } //# digitizers
386 
387 
388  // --- In event-by-event mode: also empty events (time-slices) are stored
390 
391 
392  // --- Register DAQ
393  run->AddTask(fDaq);
394 
395 
396  // --- Set runtime database
397  LOG(info) << fName << ": Setting runtime DB ";
398  LOG(info) << fName << ": ROOT I/O is " << fParRootFile;
399  FairRuntimeDb* rtdb = run->GetRuntimeDb();
400  FairParRootFileIo* parIoRoot = new FairParRootFileIo();
401  parIoRoot->open(fParRootFile.Data(), "UPDATE");
402  if (fParAsciiFiles.IsEmpty()) {
403  LOG(info) << fName << ": No ASCII input to parameter database";
404  rtdb->setFirstInput(parIoRoot);
405  } //? ASCII parameter file list empty
406  else {
407  FairParAsciiFileIo* parIoAscii = new FairParAsciiFileIo();
408  parIoAscii->open(&fParAsciiFiles, "in");
409  rtdb->setFirstInput(parIoAscii);
410  rtdb->setSecondInput(parIoRoot);
411  } //? ASCII parameter file list not empty
412  LOG(info) << "===================================================";
413 
414 
415  // --- Initialise run
416  std::cout << std::endl << std::endl;
417  LOG(info) << "===================================================";
418  LOG(info) << fName << ": Initialising run...";
419  run->Init();
420  rtdb->setOutput(parIoRoot);
421  rtdb->saveOutput();
422  LOG(info) << fName << ": Initialising run...finished";
423  LOG(info) << "===================================================";
424 
425 
426  // --- Run digitisation
427  std::cout << std::endl << std::endl << std::endl;
428  LOG(info) << "===================================================";
429  LOG(info) << fName << ": Starting run...";
430  if (event2 < 0) {
431  if (event1 >= 0)
432  run->Run(0, event1 - 1); // Run event1 events
433  else
434  run->Run(); // Run all events in input
435  } else {
436  if (event1 < 0) event1 = 0;
437  if (event1 <= event2)
438  run->Run(event1, event2); // Run from event1 to event2
439  else
440  run->Run(event1, event1); // Run only event1
441  }
442  std::cout << std::endl;
443  LOG(info) << fName << ": Run finished.";
444  LOG(info) << fName << ": Output file is " << fOutFile;
445  LOG(info) << fName << ": Parameter file is " << fParRootFile;
446  if (!fMoniFile.IsNull())
447  LOG(info) << fName << ": Monitor file is " << fMoniFile;
448 
449  LOG(info) << "===================================================";
450 
451 
452  // --- Resource monitoring
453  std::cout << std::endl << std::endl;
454  LOG(info) << fName << ": CPU consumption";
455  if (!fMoniFile.IsNull()) FairMonitor::GetMonitor()->Print();
456  std::cout << std::endl;
457 
458 
459  // --- Clean up
460  // TODO: I confess I do not know why the TGeoManager has to be deleted here.
461  // As far as I can see, the same code is called from ~FairRunaAna().
462  // But if I do not do it, I get an error like
463  // root.exe(11905,0x7fff7d1a1300) malloc: *** error for object 0x7f811d201860:
464  // pointer being freed was not allocated
465  if (gGeoManager) {
466  if (gROOT->GetVersionInt() >= 60602) {
467  gGeoManager->GetListOfVolumes()->Delete();
468  gGeoManager->GetListOfShapes()->Delete();
469  }
470  delete gGeoManager;
471  }
472  delete run;
473 }
474 // --------------------------------------------------------------------------
475 
476 
477 // ----- Set default info -----------------------------------------------
480  new CbmDigitizeInfo(ECbmModuleId::kMvd, "MvdPoint");
482  new CbmDigitizeInfo(ECbmModuleId::kSts, "StsPoint");
484  new CbmDigitizeInfo(ECbmModuleId::kRich, "RichPoint");
486  new CbmDigitizeInfo(ECbmModuleId::kMuch, "MuchPoint");
488  new CbmDigitizeInfo(ECbmModuleId::kTrd, "TrdPoint");
490  new CbmDigitizeInfo(ECbmModuleId::kTof, "TofPoint");
492  new CbmDigitizeInfo(ECbmModuleId::kPsd, "PsdPoint");
493 }
494 // --------------------------------------------------------------------------
495 
496 
497 // ----- Set digitizer explicitly ---------------------------------------
499  CbmDigitizeBase* digitizer,
500  TString branch,
501  Bool_t persistent) {
502 
503  // Digitizer already present: replace
504  if (fDigitizers.find(system) != fDigitizers.end()) {
505  CbmDigitizeBase* oldDigitizer = fDigitizers[system]->GetDigitizer();
506  if (oldDigitizer != nullptr) {
507  LOG(warn) << fName << ": replacing " << oldDigitizer->GetName() << " by "
508  << digitizer->GetName();
509  delete oldDigitizer;
510  }
511  if (!branch.IsNull()) fDigitizers[system]->SetBranchName(branch);
512  fDigitizers[system]->SetDigitizer(digitizer);
513  fDigitizers[system]->SetActive();
514  fDigitizers[system]->SetPersistent(persistent);
515  } //? digitizer present
516 
517  // Digitizer not yet present: add
518  else
519  fDigitizers[system] =
520  new CbmDigitizeInfo(system, branch, digitizer, kFALSE, kTRUE, persistent);
521 }
522 // --------------------------------------------------------------------------
523 
524 
525 // ----- Set the output file --------------------------------------------
526 void CbmDigitization::SetOutputFile(TString path, Bool_t overwrite) {
527 
528  // --- Protect against overwriting an existing file
529  if ((!gSystem->AccessPathName(path.Data())) && (!overwrite)) {
530  LOG(fatal) << fName << ": output file " << path << " already exists!";
531  return;
532  }
533 
534  // --- If the directory does not yet exist, create it
535  const char* directory = gSystem->DirName(path.Data());
536  if (gSystem->AccessPathName(directory)) {
537  Int_t success = gSystem->mkdir(directory, kTRUE);
538  if (success == -1)
539  LOG(fatal) << fName << ": output directory " << directory
540  << " does not exist and cannot be created!";
541  else
542  LOG(info) << fName << ": created directory " << directory;
543  }
544 
545  fOutFile = path;
546 }
547 // --------------------------------------------------------------------------
548 
549 
550 // ----- Set the ROOT parameter file -----------------------------------
552  if (gSystem->AccessPathName(fileName))
553  LOG(fatal) << fName << ": parameter file " << fileName
554  << " does not exist!";
555  fParRootFile = fileName;
556 }
557 // --------------------------------------------------------------------------
558 
559 
560 // ----- Get digitizer pointer if existing ------------------------------
562 
563  // Digitizer already present: return it
564  if (fDigitizers.find(system) != fDigitizers.end()) {
565  return fDigitizers[system]->GetDigitizer();
566  } //? digitizer present
567  // Digitizer not present: return nullptr
568  else
569  return nullptr;
570 }
571 // --------------------------------------------------------------------------
572 
573 
CbmTofDigitize.h
CbmDigitization::~CbmDigitization
virtual ~CbmDigitization()
Destructor
Definition: CbmDigitization.cxx:55
CbmDigitization::SetDigitizer
void SetDigitizer(ECbmModuleId system, CbmDigitizeBase *digitizer, TString branch="", Bool_t persistent=kTRUE)
Set a digitizer explicitly.
Definition: CbmDigitization.cxx:498
CbmRunAna
Definition: CbmRunAna.h:19
CbmDigitization::fCreateMatches
Bool_t fCreateMatches
Definition: CbmDigitization.h:240
CbmDigitization::CreateDefaultDigitizers
Int_t CreateDefaultDigitizers()
Instantiate the default digitisers for the active systems.
Definition: CbmDigitization.cxx:133
CbmDigitizationSource::GetBranchList
const std::set< TString > & GetBranchList() const
List of branch names @value Reference to set of branch names.
Definition: CbmDigitizationSource.h:121
CbmDigitization::GetGeoTag
TString GetGeoTag(ECbmModuleId system, TGeoManager *geo)
Get the geometry tag of a system from a TGeoManager.
Definition: CbmDigitization.cxx:239
CbmDigitizeBase::SetCreateMatches
void SetCreateMatches(Bool_t choice=kTRUE)
Set creation of links to MC.
Definition: CbmDigitizeBase.h:143
CbmDigitization::fEventMode
Bool_t fEventMode
Definition: CbmDigitization.h:237
CbmTrdDigitizer.h
TRD digitizer. Updated 24/04/2013 by Andrey Lebedev andrey.lebedev@gsi.de Updated 4/06/2018 by Alex B...
CbmDigitizationSource::AddInput
void AddInput(UInt_t inputId, TChain *chain, Double_t rate, ECbmTreeAccess mode=ECbmTreeAccess::kRegular)
Add a transport input.
Definition: CbmDigitizationSource.cxx:64
CbmDaq::SetDigitizer
void SetDigitizer(ECbmModuleId system, CbmDigitizeBase *digitizer)
Set the digitizer for a given system.
Definition: CbmDaq.cxx:466
CbmStsDigitize
Task class for simulating the detector response of the STS.
Definition: CbmStsDigitize.h:50
CbmDigitization::fGenerateRunInfo
Bool_t fGenerateRunInfo
Definition: CbmDigitization.h:249
CbmStsDigitize.h
CbmDigitization::fTimeSliceLength
Double_t fTimeSliceLength
Definition: CbmDigitization.h:238
ECbmModuleId::kMvd
@ kMvd
Micro-Vertex Detector.
ECbmModuleId
ECbmModuleId
Definition: CbmDefs.h:33
CbmDigitization::Run
void Run()
Process all events from input.
Definition: CbmDigitization.h:115
CbmDigitization
Definition: CbmDigitization.h:25
ECbmModuleId::kTof
@ kTof
Time-of-flight Detector.
CbmDigitization::DeactivateAllBut
void DeactivateAllBut(ECbmModuleId system)
Deactivate all systems except the specified one.
Definition: CbmDigitization.cxx:215
ClassImp
ClassImp(CbmDigitization)
CbmDigitization::fProduceNoise
Bool_t fProduceNoise
Definition: CbmDigitization.h:239
CbmDigitization::fOutFile
TString fOutFile
Output data (digis)
Definition: CbmDigitization.h:244
CbmRunAna.h
CbmDigitization::SetParameterRootFile
void SetParameterRootFile(TString fileName)
Set the parameter file name.
Definition: CbmDigitization.cxx:551
CbmPsdSimpleDigitizer
Definition: CbmPsdSimpleDigitizer.h:25
CbmMvdDigitizer.h
CbmRunAna::SetAsync
void SetAsync(Bool_t async=kTRUE)
Definition: CbmRunAna.h:35
CbmDigitizationSource::GetFirstInput
CbmMCInput * GetFirstInput()
First input from the first input set @value Pointer to first input.
Definition: CbmDigitizationSource.cxx:208
ECbmTreeAccess
ECbmTreeAccess
Mode to read entries from a ROOT TTree.
Definition: CbmDefs.h:130
CbmModuleList::GetModuleNameCaps
static TString GetModuleNameCaps(ECbmModuleId moduleId)
Definition: CbmModuleList.cxx:77
CbmDigitization::AddInput
void AddInput(UInt_t inputId, TString fileName, Double_t eventRate=-1., ECbmTreeAccess mode=ECbmTreeAccess::kRegular)
Add an input file.
Definition: CbmDigitization.cxx:67
CbmSetup.h
CbmDigitizeBase::SetEventMode
void SetEventMode(Bool_t choice=kTRUE)
Set event-by-event mode.
Definition: CbmDigitizeBase.h:149
CbmDigitizeBase::SetProduceNoise
void SetProduceNoise(Bool_t choice=kTRUE)
Set production of inter-event noise.
Definition: CbmDigitizeBase.h:155
CbmDigitization::fSource
CbmDigitizationSource * fSource
Input source.
Definition: CbmDigitization.h:243
CbmDigitization::StoreAllTimeSlices
void StoreAllTimeSlices(Bool_t choice=kTRUE)
Store all time-slices.
Definition: CbmDigitization.h:220
CbmModuleList::GetModuleName
static TString GetModuleName(ECbmModuleId moduleId)
Definition: CbmModuleList.cxx:66
CbmDigitization::CbmDigitization
CbmDigitization()
Constructor.
Definition: CbmDigitization.cxx:32
CbmDigitizationSource
Source class for the input to digitization in CBM.
Definition: CbmDigitizationSource.h:42
CbmDigitization::EmbedInput
void EmbedInput(UInt_t inputId, TString fileName, UInt_t targetInputId, ECbmTreeAccess mode=ECbmTreeAccess::kRegular)
Embed an input file into another one.
Definition: CbmDigitization.cxx:225
ECbmModuleId::kRich
@ kRich
Ring-Imaging Cherenkov Detector.
CbmDaq
CBM task class for filling digis into time slices.
Definition: CbmDaq.h:40
CbmDigitization::CheckInput
Int_t CheckInput()
Check the presence of input branches.
Definition: CbmDigitization.cxx:95
CbmMuchDigitizeGem
Definition: CbmMuchDigitizeGem.h:56
CbmDigitizationSource.h
CbmDigitization::DefaultInit
void DefaultInit()
Initialize the branches, digitizers and parameter files With default values.
Definition: CbmDigitization.cxx:261
CbmRichDigitizer.h
Class for producing RICH digis from from MCPoints.
CbmPsdSimpleDigitizer.h
CbmMCInput
An MC (transport) input to digitisation in CBM.
Definition: CbmMCInput.h:27
CbmTrdDigitizer
Definition: CbmTrdDigitizer.h:36
CbmDigitization.h
ECbmModuleId::kTrd
@ kTrd
Transition Radiation Detector.
CbmDigitization::AddParameterAsciiFile
Bool_t AddParameterAsciiFile(TString fileName)
Add an ASCII parameter file.
Definition: CbmDigitization.cxx:81
CbmRichDigitizer
Class for producing RICH digis from from MCPoints.
Definition: CbmRichDigitizer.h:36
CbmDigitization::fIsInit
Bool_t fIsInit
Definition: CbmDigitization.h:236
CbmDigitization::fMoniFile
TString fMoniFile
Resource monitoring information.
Definition: CbmDigitization.h:247
CbmMuchDigitizeGem.h
CbmDigitizationSource::SetEventMode
void SetEventMode(Bool_t choice=kTRUE)
Set event-by-event mode @value choice kTRUE if event-by-event mode.
Definition: CbmDigitizationSource.h:179
CbmDigitizationSource::EmbedInput
void EmbedInput(UInt_t inputId, TChain *chain, UInt_t targetInputId, ECbmTreeAccess mode=ECbmTreeAccess::kRegular)
Embed a transport input.
Definition: CbmDigitizationSource.cxx:161
CbmDigitization::fParAsciiFiles
TList fParAsciiFiles
ASCII parameter files.
Definition: CbmDigitization.h:246
CbmDigitization::SetOutputFile
void SetOutputFile(TString fileName, Bool_t overwrite=kFALSE)
Set the output file name.
Definition: CbmDigitization.cxx:526
CbmMvdDigitizer
Definition: CbmMvdDigitizer.h:26
ECbmModuleId::kMuch
@ kMuch
Muon detection system.
ECbmModuleId::kPsd
@ kPsd
Projectile spectator detector.
CbmDigitization::fParRootFile
TString fParRootFile
ROOT parameter file.
Definition: CbmDigitization.h:245
CbmMCInput::GetChain
TChain * GetChain() const
Pointer to chain @value Pointer to TChain object.
Definition: CbmMCInput.h:54
CbmDigitization::GetDigitizer
CbmDigitizeBase * GetDigitizer(ECbmModuleId system)
Get the pointer on a given digitizer if existing.
Definition: CbmDigitization.cxx:561
CbmDigitizeBase
Abstract base class for CBM digitisation tasks.
Definition: CbmDigitizeBase.h:26
CbmDigitization::Deactivate
void Deactivate(ECbmModuleId system)
Deactivate a system for digitisation.
Definition: CbmDigitization.cxx:207
ECbmModuleId::kSts
@ kSts
Silicon Tracking System.
CbmDigitization::fDigitizers
std::map< ECbmModuleId, CbmDigitizeInfo * > fDigitizers
Definition: CbmDigitization.h:241
CbmDigitization::fDaq
CbmDaq * fDaq
Definition: CbmDigitization.h:242
CbmDigitization::SetDefaultBranches
void SetDefaultBranches()
Default settings for digitizers.
Definition: CbmDigitization.cxx:478
CbmDigitization::fRun
Int_t fRun
Definition: CbmDigitization.h:250
CbmDigitizeInfo
Auxiliary class for CbmDigitize.
Definition: CbmDigitizeInfo.h:23
CbmTofDigitize
CBM ToF digitizer using beam data distributions as hit/cluster models.
Definition: CbmTofDigitize.h:33