Belle II Software development
BeamBkgMixerModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9// Own header.
10#include <background/modules/BeamBkgMixer/BeamBkgMixerModule.h>
11
12// framework - DataStore
13#include <framework/datastore/DataStore.h>
14#include <framework/datastore/StoreArray.h>
15#include <framework/datastore/StoreObjPtr.h>
16
17// framework aux
18#include <framework/core/ModuleParam.templateDetails.h>
19#include <framework/logging/Logger.h>
20
21// SimHits
22#include <pxd/dataobjects/PXDSimHit.h>
23#include <svd/dataobjects/SVDSimHit.h>
24#include <cdc/dataobjects/CDCSimHit.h>
25#include <top/dataobjects/TOPSimHit.h>
26#include <arich/dataobjects/ARICHSimHit.h>
27#include <ecl/dataobjects/ECLHit.h>
28#include <klm/dataobjects/KLMSimHit.h>
29#include <simulation/dataobjects/BeamBackHit.h>
30
31// MetaData
32#include <framework/dataobjects/BackgroundInfo.h>
33
34// Root
35#include <TFile.h>
36#include <TRandom3.h>
37
38//std::find
39#include <algorithm>
40
41using namespace std;
42using namespace Belle2;
43
44//-----------------------------------------------------------------
45// Register module
46//-----------------------------------------------------------------
47
48REG_MODULE(BeamBkgMixer);
49
50//-----------------------------------------------------------------
51// Implementation
52//-----------------------------------------------------------------
53
55{
56 // set module description (e.g. insert text)
57 setDescription("Beam background mixer at SimHit level that uses beam background"
58 " simulation output directly (collision files) and not ROF files. "
59 "Each background event is shifted in time randomly within "
60 "a time window specified with minTime and maxTime.");
61
62 // Add parameters
63 addParam("backgroundFiles", m_backgroundFiles,
64 "List of background (collision) files (wildcards not allowed - "
65 "use python glob.glob() to expand to list of files)");
66 addParam("minTime", m_minTime,
67 "Time window lower edge in nano seconds", -1000.0);
68 addParam("maxTime", m_maxTime,
69 "Time window upper edge in nano seconds", 800.0);
70 addParam("overallScaleFactor", m_overallScaleFactor,
71 "Overall factor to scale rates of backgrounds", 1.0);
72 addParam("scaleFactors", m_scaleFactors,
73 "Factors to scale rates of backgrounds. "
74 "Possible tag names: " + m_bgTypes.getBGTypes(),
76 addParam("components", m_components,
77 "Detector components to be included, empty list means all components",
79 addParam("wrapAround", m_wrapAround,
80 "if true wrap around events passing time window upper edge", true);
81 addParam("minTimeECL", m_minTimeECL,
82 "Time window lower edge for ECL in nano seconds", -17600.0);
83 addParam("maxTimeECL", m_maxTimeECL,
84 "Time window upper edge for ECL in nano seconds", 8500.0);
85 addParam("minTimePXD", m_minTimePXD,
86 "Time window lower edge for PXD in nano seconds", -10000.0);
87 addParam("maxTimePXD", m_maxTimePXD,
88 "Time window upper edge for PXD in nano seconds", 10000.0);
89
90 addParam("beambackhits", m_BeamBackHits,
91 "If true also add the BeamBackHits collection for the selected "
92 "subdetectors to the output file", false);
93
94 addParam("maxEdepECL", m_maxEdepECL,
95 "maximal deposited energy of ECLHit to accept BG event for mixing"
96 "(0 means accept all events)", 1.0);
97
98 addParam("cacheSize", m_cacheSize,
99 "file cache size in Mbytes. If negative, use root default", 0);
100}
101
103{
104}
105
107{
108
109 // included components
110
111 std::vector<std::string> components = m_components;
112 m_PXD = isComponentIncluded(components, "PXD");
113 m_SVD = isComponentIncluded(components, "SVD");
114 m_CDC = isComponentIncluded(components, "CDC");
115 m_TOP = isComponentIncluded(components, "TOP");
116 m_ARICH = isComponentIncluded(components, "ARICH");
117 m_ECL = isComponentIncluded(components, "ECL");
118 m_KLM = isComponentIncluded(components, "KLM");
119
120 // ignore these ones
121
122 isComponentIncluded(components, "MagneticField2d");
123 isComponentIncluded(components, "MagneticField3d");
124 isComponentIncluded(components, "MagneticField");
125 isComponentIncluded(components, "MagneticFieldConstant4LimitedRCDC");
126 isComponentIncluded(components, "MagneticFieldConstant4LimitedRSVD");
127 isComponentIncluded(components, "BeamPipe");
128 isComponentIncluded(components, "Cryostat");
129 isComponentIncluded(components, "FarBeamLine");
130 isComponentIncluded(components, "HeavyMetalShield");
131 isComponentIncluded(components, "COIL");
132 isComponentIncluded(components, "STR");
133 isComponentIncluded(components, "VXDService");
134
135 if (!components.empty()) {
136 std::string str;
137 for (unsigned i = 0; i < components.size(); ++i) str = str + " " + components[i];
138 B2WARNING("Unknown components:" << str);
139 }
140
141 // check files and append them to sample container
142
143 for (auto file : m_backgroundFiles) {
144
145 // wildcarding is not allowed anymore
146 if (TString(file.c_str()).Contains("*")) {
147 B2ERROR(file << ": wildcards are not allowed");
148 continue;
149 }
150
151 // check the file existence
152 TFile* f = TFile::Open(file.c_str(), "READ");
153 if (!f) {
154 B2ERROR(file << ": file not found");
155 continue;
156 }
157 if (!f->IsOpen()) {
158 B2ERROR(file << ": can't open file");
159 continue;
160 }
161 f->Close();
162
163 TChain persistent("persistent");
164 int nFiles = persistent.Add(file.c_str());
165 if (nFiles == 0) {
166 B2ERROR(file << ": no such files");
167 continue;
168 }
169 if (persistent.GetEntries() == 0) {
170 B2ERROR(file << ": tree 'persistent' has no entries");
171 continue;
172 }
173
174 TObject* bkgMetaData = 0; // Note: allocation left to root
175 TBranch* branchBMD = persistent.GetBranch("BackgroundMetaData");
176 if (!branchBMD) {
177 B2ERROR(file << ": branch 'BackgroundMetaData' not found");
178 continue;
179 }
180 branchBMD->SetAddress(&bkgMetaData);
181
182 std::vector<BackgroundMetaData::BG_TAG> tags;
183 std::vector<std::string> types;
184 std::vector<BackgroundMetaData::EFileType> fileTypes;
185 double realTime = 0;
186 for (unsigned k = 0; k < persistent.GetEntries(); k++) {
187 persistent.GetEntry(k);
188 BackgroundMetaData* bgMD = static_cast<BackgroundMetaData*>(bkgMetaData);
189 tags.push_back(bgMD->getBackgroundTag());
190 types.push_back(bgMD->getBackgroundType());
191 fileTypes.push_back(bgMD->getFileType());
192 realTime += bgMD->getRealTime();
193 }
194 if (realTime <= 0) {
195 B2ERROR(file << ": invalid realTime: " << realTime);
196 continue;
197 }
198 for (unsigned i = 1; i < tags.size(); ++i) {
199 if (tags[i] != tags[0]) {
200 B2ERROR(file << ": files with mixed background types not supported");
201 continue;
202 }
203 }
204 for (unsigned i = 1; i < fileTypes.size(); ++i) {
205 if (fileTypes[i] != fileTypes[0]) {
206 B2ERROR(file << ": files with mixed file types not supported");
207 continue;
208 }
209 }
210
211 appendSample(tags[0], types[0], file, realTime, fileTypes[0]);
212
213 }
214
215
216 // set scale factors
217
218 for (auto scaleFactor : m_scaleFactors) {
219 std::string type = std::get<0>(scaleFactor);
220 if (m_bgTypes.getTag(type) == 0)
221 B2ERROR("Unknown beam background type found in 'scaleFactors': " << type << "\n"
222 "Possible are: " + m_bgTypes.getBGTypes());
223 for (auto& bkg : m_backgrounds) {
224 if (bkg.tag == m_bgTypes.getTag(type))
225 bkg.scaleFactor *= std::get<1>(scaleFactor);
226 }
227 }
228
229 // open files for reading SimHits
230
231 for (auto& bkg : m_backgrounds) {
232
233 // define TChain for reading SimHits
234 bkg.tree.reset(new TChain("tree"));
235 for (unsigned i = 0; i < bkg.fileNames.size(); ++i) {
236 bkg.numFiles += bkg.tree->Add(bkg.fileNames[i].c_str());
237 }
238
239 bkg.numEvents = bkg.tree->GetEntries();
240 bkg.rate = bkg.numEvents / bkg.realTime * bkg.scaleFactor;
241
242 if (m_cacheSize >= 0) bkg.tree->SetCacheSize(m_cacheSize * 1024 * 1024);
243
244 if (m_PXD and bkg.tree->GetBranch("PXDSimHits"))
245 bkg.tree->SetBranchAddress("PXDSimHits", &m_simHits.PXD);
246 if (m_SVD and bkg.tree->GetBranch("SVDSimHits"))
247 bkg.tree->SetBranchAddress("SVDSimHits", &m_simHits.SVD);
248 if (m_CDC and bkg.tree->GetBranch("CDCSimHits"))
249 bkg.tree->SetBranchAddress("CDCSimHits", &m_simHits.CDC);
250 if (m_TOP and bkg.tree->GetBranch("TOPSimHits"))
251 bkg.tree->SetBranchAddress("TOPSimHits", &m_simHits.TOP);
252 if (m_ARICH and bkg.tree->GetBranch("ARICHSimHits"))
253 bkg.tree->SetBranchAddress("ARICHSimHits", &m_simHits.ARICH);
254 if (m_ECL and bkg.tree->GetBranch("ECLHits"))
255 bkg.tree->SetBranchAddress("ECLHits", &m_simHits.ECL);
256 if (m_KLM and bkg.tree->GetBranch("KLMSimHits"))
257 bkg.tree->SetBranchAddress("KLMSimHits", &m_simHits.KLM);
258
259 if (m_BeamBackHits and bkg.tree->GetBranch("BeamBackHits"))
260 bkg.tree->SetBranchAddress("BeamBackHits", &m_simHits.BeamBackHits);
261
262 // print INFO
263 std::string unit(" ns");
264 double realTime = bkg.realTime;
265 if (realTime >= 1000.0) {realTime /= 1000.0; unit = " us";}
266 if (realTime >= 1000.0) {realTime /= 1000.0; unit = " ms";}
267 if (realTime >= 1000.0) {realTime /= 1000.0; unit = " s";}
268
269 B2INFO("BeamBkgMixer: " << bkg.type <<
270 " tag=" << bkg.tag <<
271 " files=" << bkg.numFiles <<
272 " events=" << bkg.numEvents <<
273 " realTime=" << realTime << unit <<
274 " scaleFactor=" << bkg.scaleFactor <<
275 " rate=" << bkg.rate * 1000 << " MHz");
276 }
277
278
279 // SimHits registration
280
281 StoreArray<PXDSimHit> pxdSimHits;
282 if (m_PXD) pxdSimHits.registerInDataStore();
283
284 StoreArray<SVDSimHit> svdSimHits;
285 if (m_SVD) svdSimHits.registerInDataStore();
286
287 StoreArray<CDCSimHit> cdcSimHits;
288 if (m_CDC) cdcSimHits.registerInDataStore();
289
290 StoreArray<TOPSimHit> topSimHits;
291 if (m_TOP) topSimHits.registerInDataStore();
292
293 StoreArray<ARICHSimHit> arichSimHits;
294 if (m_ARICH) arichSimHits.registerInDataStore();
295
296 StoreArray<ECLHit> eclHits;
297 if (m_ECL) eclHits.registerInDataStore();
298
299 StoreArray<KLMSimHit> klmSimHits;
300 if (m_KLM) klmSimHits.registerInDataStore();
301
302 StoreArray<BeamBackHit> beamBackHits;
303 if (m_BeamBackHits) beamBackHits.registerInDataStore();
304
305
306 // add BackgroundInfo to persistent tree
307
309 bkgInfo.registerInDataStore();
310 bkgInfo.create();
311 bkgInfo->setMethod(BackgroundInfo::c_Mixing);
312 bkgInfo->setComponents(m_components);
313 bkgInfo->setMinTime(m_minTime);
314 bkgInfo->setMaxTime(m_maxTime);
315 bkgInfo->setMinTimeECL(m_minTimeECL);
316 bkgInfo->setMaxTimeECL(m_maxTimeECL);
317 bkgInfo->setMinTimePXD(m_minTimePXD);
318 bkgInfo->setMaxTimePXD(m_maxTimePXD);
319 bkgInfo->setWrapAround(m_wrapAround);
320 bkgInfo->setMaxEdepECL(m_maxEdepECL);
321 for (auto& bkg : m_backgrounds) {
323 descr.tag = bkg.tag;
324 descr.type = bkg.type;
325 descr.fileType = bkg.fileType;
326 descr.fileNames = bkg.fileNames;
327 descr.realTime = bkg.realTime;
328 descr.numEvents = bkg.numEvents;
329 descr.scaleFactor = bkg.scaleFactor;
330 descr.rate = bkg.rate;
331 descr.reused = 0;
332 bkgInfo->appendBackgroundDescr(descr);
333 }
334
335}
336
338{
339}
340
342{
343 StoreArray<PXDSimHit> pxdSimHits;
344 StoreArray<SVDSimHit> svdSimHits;
345 StoreArray<CDCSimHit> cdcSimHits;
346 StoreArray<TOPSimHit> topSimHits;
347 StoreArray<ARICHSimHit> arichSimHits;
348 StoreArray<ECLHit> eclHits;
349 StoreArray<KLMSimHit> klmSimHits;
350 StoreArray<BeamBackHit> beamBackHits;
352
353 for (auto& bkg : m_backgrounds) {
354
355 if (bkg.fileType != BackgroundMetaData::c_Usual) continue;
356
357 double mean = bkg.rate * (m_maxTime - m_minTime);
358 int nev = gRandom->Poisson(mean);
359
360 for (int iev = 0; iev < nev; iev++) {
361 double timeShift = gRandom->Rndm() * (m_maxTime - m_minTime) + m_minTime;
362 bkg.tree->GetEntry(bkg.eventCount);
363
365 addSimHits(pxdSimHits, m_simHits.PXD, timeShift, m_minTime, m_maxTime);
366 addSimHits(svdSimHits, m_simHits.SVD, timeShift, m_minTime, m_maxTime);
367 addSimHits(cdcSimHits, m_simHits.CDC, timeShift, m_minTime, m_maxTime);
368 addSimHits(topSimHits, m_simHits.TOP, timeShift, m_minTime, m_maxTime);
369 addSimHits(arichSimHits, m_simHits.ARICH, timeShift, m_minTime, m_maxTime);
370 addSimHits(eclHits, m_simHits.ECL, timeShift, m_minTime, m_maxTime);
371 addSimHits(klmSimHits, m_simHits.KLM, timeShift, m_minTime, m_maxTime);
372 addBeamBackHits(beamBackHits, m_simHits.BeamBackHits, timeShift,
374 } else {
375 iev--;
376 std::string message = "BeamBkgMixer: event " + to_string(bkg.eventCount)
377 + " of " + bkg.type + " rejected due to large energy deposit in ECL";
378 m_rejected[message] += 1;
380 if (m_rejectedCount < 10) {
381 B2INFO("BeamBkgMixer: event rejected due to large energy deposit in ECL");
382 } else if (m_rejectedCount == 10) {
383 B2INFO("BeamBkgMixer: event rejected due to large energy deposit in ECL "
384 << "(message will be suppressed now)");
385 }
386 }
387
388 bkg.eventCount++;
389 if (bkg.eventCount >= bkg.numEvents) {
390 bkg.eventCount = 0;
391 std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
392 m_reused[message] += 1;
393 if (m_reused[message] == 1) B2INFO(message);
394 bkgInfo->incrementReusedCounter(bkg.index);
395 }
396 }
397 }
398
399
400 for (auto& bkg : m_backgrounds) {
401
402 if (bkg.fileType != BackgroundMetaData::c_ECL) continue;
403
404 double mean = bkg.rate * (m_maxTimeECL - m_minTimeECL);
405 int nev = gRandom->Poisson(mean);
406
407 for (int iev = 0; iev < nev; iev++) {
408 double timeShift = gRandom->Rndm() * (m_maxTimeECL - m_minTimeECL) + m_minTimeECL;
409 if (timeShift > m_minTime and timeShift < m_maxTime) continue;
410 bkg.tree->GetEntry(bkg.eventCount);
411
413 double minTime = m_minTimeECL;
414 double maxTime = m_maxTimeECL;
415 if (timeShift <= m_minTime) {
416 maxTime = m_minTime;
417 } else {
418 minTime = m_maxTime;
419 }
420 addSimHits(eclHits, m_simHits.ECL, timeShift, minTime, maxTime);
421 } else {
422 iev--;
423 std::string message = "BeamBkgMixer: event " + to_string(bkg.eventCount)
424 + " of " + bkg.type + " rejected due to large energy deposit in ECL";
425 m_rejected[message] += 1;
427 if (m_rejectedCount < 10) {
428 B2INFO("BeamBkgMixer: event rejected due to large energy deposit in ECL");
429 } else if (m_rejectedCount == 10) {
430 B2INFO("BeamBkgMixer: event rejected due to large energy deposit in ECL "
431 << "(message will be suppressed now)");
432 }
433 }
434
435 bkg.eventCount++;
436 if (bkg.eventCount >= bkg.numEvents) {
437 bkg.eventCount = 0;
438 std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
439 m_reused[message] += 1;
440 if (m_reused[message] == 1) B2INFO(message);
441 bkgInfo->incrementReusedCounter(bkg.index);
442 }
443 }
444
445 }
446
447
448 for (auto& bkg : m_backgrounds) {
449
450 if (bkg.fileType != BackgroundMetaData::c_PXD) continue;
451
452 double mean = bkg.rate * (m_maxTimePXD - m_minTimePXD);
453 int nev = gRandom->Poisson(mean);
454
455 for (int iev = 0; iev < nev; iev++) {
456 double timeShift = gRandom->Rndm() * (m_maxTimePXD - m_minTimePXD) + m_minTimePXD;
457 if (timeShift > m_minTime and timeShift < m_maxTime) continue;
458 bkg.tree->GetEntry(bkg.eventCount);
459
460 double minTime = m_minTimePXD;
461 double maxTime = m_maxTimePXD;
462 if (timeShift <= m_minTime) {
463 maxTime = m_minTime;
464 } else {
465 minTime = m_maxTime;
466 }
467 addSimHits(pxdSimHits, m_simHits.PXD, timeShift, minTime, maxTime);
468
469 bkg.eventCount++;
470 if (bkg.eventCount >= bkg.numEvents) {
471 bkg.eventCount = 0;
472 std::string message = "BeamBkgMixer: events of " + bkg.type + " will be reused";
473 m_reused[message] += 1;
474 if (m_reused[message] == 1) B2INFO(message);
475 bkgInfo->incrementReusedCounter(bkg.index);
476 }
477 }
478
479 }
480
481}
482
483
485{
486}
487
489{
490
491 B2INFO("BeamBkgMixer - reused samples:");
492 for (const auto& message : m_reused) {
493 B2INFO(message.first << "(occurred " << message.second << " times)");
494 }
495 B2INFO("BeamBkgMixer - rejected events:");
496 for (const auto& message : m_rejected) {
497 B2INFO(message.first << "(occurred " << message.second << " times)");
498 }
499
500 for (auto& bkg : m_backgrounds) {
501 bkg.tree.reset();
502 }
503
504}
505
506
507bool BeamBkgMixerModule::isComponentIncluded(std::vector<std::string>& components,
508 const std::string& component)
509{
510 if (m_components.empty()) return true;
511 auto iterator = std::find(components.begin(), components.end(), component);
512 if (iterator != components.end()) {
513 components.erase(iterator);
514 return true;
515 }
516 return false;
517}
518
519
521 const std::string& type,
522 const std::string& fileName,
523 double realTime,
525{
526 for (auto& bkg : m_backgrounds) {
527 if (tag == bkg.tag and fileType == bkg.fileType) {
528 bkg.fileNames.push_back(fileName);
529 bkg.realTime += realTime;
530 return;
531 }
532 }
533 std::string ftype = type;
534 if (fileType == BackgroundMetaData::c_ECL) ftype += "(ECL)";
535 if (fileType == BackgroundMetaData::c_PXD) ftype += "(PXD)";
536 unsigned index = m_backgrounds.size();
537 m_backgrounds.push_back(BkgFiles(tag, ftype, fileName, realTime,
538 m_overallScaleFactor, fileType, index));
539}
540
541
542bool BeamBkgMixerModule::acceptEvent(TClonesArray* cloneArrayECL)
543{
544 if (!cloneArrayECL) return true;
545 if (m_maxEdepECL == 0) return true;
546
547 int numEntries = cloneArrayECL->GetEntriesFast();
548 for (int i = 0; i < numEntries; i++) {
549 ECLHit* simHit = static_cast<ECLHit*>(cloneArrayECL->AddrAt(i));
550 if (simHit->getEnergyDep() > m_maxEdepECL) return false;
551 }
552 return true;
553}
Metadata information about the beam background file.
EFileType
Enum for BG file types.
float getRealTime() const
Returns real time that corresponds to this background sample.
EFileType getFileType() const
Returns file type.
const std::string & getBackgroundType() const
Returns the type of background.
BG_TAG
Enum for background tags.
BG_TAG getBackgroundTag() const
Returns background tag value.
std::map< std::string, int > m_reused
messages: rejused events
double m_maxEdepECL
maximal allowed deposited energy in ECL
std::vector< BkgFiles > m_backgrounds
container for background samples
virtual ~BeamBkgMixerModule()
Destructor.
double m_maxTimeECL
maximal time shift of background event for ECL
std::map< std::string, int > m_rejected
messages: rejected events
bool isComponentIncluded(std::vector< std::string > &components, const std::string &component)
Returns true if a component is found in components or the list is empty.
bool m_ECL
true if found in m_components
std::vector< std::string > m_components
detector components
void addBeamBackHits(StoreArray< HIT > &hits, TClonesArray *cloneArray, double timeShift, double minTime, double maxTime)
functions that add BeamBackHits to those in the DataStore
double m_minTimePXD
minimal time shift of background event for PXD
bool m_PXD
true if found in m_components
void addSimHits(StoreArray< SIMHIT > &simHits, TClonesArray *cloneArray, double timeShift, double minTime, double maxTime)
functions that add background SimHits to those in the DataStore
background::BeamBGTypes m_bgTypes
defined BG types
std::vector< std::string > m_backgroundFiles
names of beam background files
virtual void initialize() override
Initialize the Module.
bool m_CDC
true if found in m_components
double m_maxTime
maximal time shift of background event
virtual void event() override
Event processor.
double m_minTime
minimal time shift of background event
bool m_wrapAround
if true wrap around events in the tail after maxTime
virtual void endRun() override
End-of-run action.
double m_maxTimePXD
maximal time shift of background event for PXD
int m_rejectedCount
counter for suppressing "rejected event" messages
virtual void terminate() override
Termination action.
BkgHits m_simHits
input event buffer
int m_cacheSize
file cache size in Mbytes
bool m_BeamBackHits
if true add also background hits
virtual void beginRun() override
Called when entering a new run.
bool m_ARICH
true if found in m_components
double m_overallScaleFactor
overall scale factor
void appendSample(BackgroundMetaData::BG_TAG bkgTag, const std::string &bkgType, const std::string &fileName, double realTime, BackgroundMetaData::EFileType fileTyp)
appends background sample to m_backgrounds
bool acceptEvent(TClonesArray *cloneArrayECL)
Checks for deposited energy of ECLHits and returns true if Edep < m_maxEdepECL.
double m_minTimeECL
minimal time shift of background event for ECL
std::vector< std::tuple< std::string, double > > m_scaleFactors
scale factors
bool m_KLM
true if found in m_components
bool m_SVD
true if found in m_components
bool m_TOP
true if found in m_components
@ c_Persistent
Object is available during entire execution time.
Definition: DataStore.h:60
Class to store simulated hits which equate to average of ECLSImHit on crystals input for digitization...
Definition: ECLHit.h:25
double getEnergyDep() const
Get deposit energy.
Definition: ECLHit.h:70
Base class for Modules.
Definition: Module.h:72
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:214
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
bool create(bool replace=false)
Create a default object in the data store.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:95
std::string getBGTypes() const
Return all defined BG types as a string.
Definition: BeamBGTypes.h:111
BackgroundMetaData::BG_TAG getTag(const std::string &bgType)
Return BG tag for a given BG type.
Definition: BeamBGTypes.h:74
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:649
Abstract base class for different kinds of events.
STL namespace.
Structure for background description.
structure to hold samples of a particular background type
TClonesArray * BeamBackHits
BeamBackHits from collision file.
TClonesArray * KLM
KLM SimHits from collision file.
TClonesArray * ARICH
ARICH SimHits from collision file.
TClonesArray * CDC
CDC SimHits from collision file.
TClonesArray * PXD
PXD SimHits from collision file.
TClonesArray * ECL
ECL SimHits from collision file.
TClonesArray * SVD
SVD SimHits from collision file.
TClonesArray * TOP
TOP SimHits from collision file.