Data provider for Geant4 Monte Carlo data.
More...
#include <dataproviders/GGSDataProvider.h>
|
| GGSDataProvider (const std::string &name, const std::string &source) |
| Constructor. More...
|
|
bool | Connect () override |
| Connects the given GGS files(s). More...
|
|
bool | SetCurrentEvent (unsigned int event) override |
| Sets the current event. More...
|
|
RetrievalResult | GetObject (const std::string &name, ObjectCategory category, ObjectWrapper &wrapper, std::string &actualName) override |
| Provides an object. More...
|
|
std::vector< std::string > | FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus) override |
| Free the memory of unneeded objects. More...
|
|
|
unsigned int | m_currEv |
|
unsigned int | m_currReadEv |
|
std::shared_ptr< GGSTRootReader > | m_reader |
|
std::vector< ObjDescriptor > | m_objDescriptors |
|
const std::pair< std::string, std::vector< std::string > > | m_caloHitsNames {"caloHitsGGS", {"caloHitsMC", "caloHitsGeV"}} |
|
const std::pair< std::string, std::vector< std::string > > | m_fitHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_fitParticleHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_stkStripHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_stkWaferHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_stkWaferParticleHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_scdStripHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_scdWaferHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_scdWaferParticleHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_psdHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_psdParticleHitsCollNames |
|
const std::pair< std::string, std::vector< std::string > > | m_mcTruthNames {"mcTruth", {}} |
|
std::unique_ptr< ParametricGeoReader > | m_geoReader |
|
std::unique_ptr< GGSSimReader > | m_evReader |
|
Data provider for Geant4 Monte Carlo data.
Reads the HERD MC data from GGS output files produced with ParametricGeo detector geometry. For STK it can provide integrated hits on each single strip or hits and particle hits non-segmented Si wafers, depending on whether the strips have been activated in the geometry datacard ofthe simulation or not, respectively.
Published event objects:
name | type | alias | description |
caloHitsGGS | CaloHits | caloHitsMC, caloHitsGeV | The hits in the calorimeter. |
fitHitsCollGGS | FitHitsColl | fitHitsCollMC, fitHitsCollGeV | The integrated hits in the monolithic FIT layers (1 hit per plane). |
fitParticleHitsCollGGS | FitParticleHitsColl | fitParticleHitsCollMC, fitParticleHitsCollGeV | The particle hits in the FIT. |
stkWaferHitsCollGGS | StkHitsColl | stkWaferHitsCollMC, stkWaferHitsCollGeV | The hits in the STK wafers. |
stkWaferParticleHitsCollGGS | StkParticleHitsColl | stkWaferParticleHitsCollMC, stkWaferParticleHitsCollGeV | The particle hits in the STK wafers. |
stkStripHitsCollGGS | StkHitsColl | stkHitsCollMC, stkHitsCollGeV | The hits in the STK strips (only if strips have been activated in simulation). |
scdWaferHitsCollGGS | ScdHitsColl | scdWaferHitsCollMC, scdWaferHitsCollGeV | The hits in the SCD wafers. |
scdWaferParticleHitsCollGGS | ScdParticleHitsColl | scdWaferParticleHitsCollMC, scdWaferParticleHitsCollGeV | The particle hits in the SCD wafers. |
scdStripHitsCollGGS | ScdHitsColl | scdHitsCollMC, scdHitsCollGeV | The hits in the SCD strips (only if strips have been activated in simulation). |
psdHitsCollGGS | PsdHitsColl | psdHitsCollMC, psdHitsCollGeV | The hits in the PSD. |
psdParticleHitsCollGGS | PsdParticleHitsColl | psdParticleHitsCollMC, psdParticleHitsCollGeV | The particle hits in the PSD. |
mcTruth | MCTruth | | The Monte Carlo truth of the event. |
Published global objects:
name | type | alias | store | description |
caloGeoParamsGGS | CaloGeoParams | caloGeoParams | globStore | Geometric parameters of the Calo. |
fitGeoParamsCollGGS | FitGeoParamsColl | fitGeoParamsColl | globStore | Geometric parameters of the FIT. |
stkGeoParamsCollGGS | StkGeoParamsColl | stkGeoParamsColl | globStore | Geometric parameters of the STK. |
scdGeoParamsCollGGS | ScdGeoParamsColl | scdGeoParamsColl | globStore | Geometric parameters of the SCD. |
psdGeoParamsCollGGS | PsdGeoParamsColl | psdGeoParamsColl | globStore | Geometric parameters of the PSD. |
mcGenerationInfo | const MCGenerationInfo | | globStore | Parameters of the MC primary particle generation. |
cssGeoParamsGGS | CssGeoParams | cssGeoParams | globStore | Geometric parameters of the space station. |
Parameters:
name | type | default value | description ----------—|--------—|------------—|---------------------------------------------------------------—
◆ ObjPrerequisite
◆ GGSDataProvider()
Herd::GGSDataProvider::GGSDataProvider |
( |
const std::string & |
name, |
|
|
const std::string & |
source |
|
) |
| |
Constructor.
- Parameters
-
name | The name of the provider |
source | A GGS output file (.root) or a text file (.txt) containing a list of GGS files to be concatenated. |
◆ _LoadPrerequisites()
bool Herd::GGSDataProvider::_LoadPrerequisites |
( |
ObjDescriptor & |
objDesc | ) |
|
|
private |
◆ Connect()
bool Herd::GGSDataProvider::Connect |
( |
| ) |
|
|
override |
Connects the given GGS files(s).
- Returns
- True if the file(s) has been correctly opened.
- See also
- GGSDataProvider.
◆ FreeObjects()
std::vector< std::string > Herd::GGSDataProvider::FreeObjects |
( |
const std::vector< std::string > & |
objs, |
|
|
Memory::Status |
memStatus |
|
) |
| |
|
override |
Free the memory of unneeded objects.
Currently this method frees the memory of the provided objects if memStatus
is EXHAUSTED. In current implementation only hit objects are freed:
- caloHitsGGS
- stkWaferHitsCollGGS
- stkWaferParticleHitsCollGGS
- stkStripHitsCollGGS
- scdWaferHitsCollGGS
- scdWaferParticleHitsCollGGS
- scdStripHitsCollGGS
- psdHitsCollGGS
- psdParticleHitsCollGGS
since they occupy most of the used memory.
- Parameters
-
objs | The list of objects to be freed. |
memStatus | The current memory occupation status. |
- Returns
- a list of freed objects.
◆ GetObject()
RetrievalResult Herd::GGSDataProvider::GetObject |
( |
const std::string & |
name, |
|
|
ObjectCategory |
category, |
|
|
ObjectWrapper & |
wrapper, |
|
|
std::string & |
actualName |
|
) |
| |
|
override |
Provides an object.
See the description of the class for more information about the provided objects.
- Parameters
-
name | The name or alias of the requested object. |
category | The category of the requested object. |
wrapper | Wrapper for return value. |
actualName | The name of the object in case we're asking for an alias |
- Returns
- A RetrievalResult code with the result of the retrieval operation
◆ SetCurrentEvent()
bool Herd::GGSDataProvider::SetCurrentEvent |
( |
unsigned int |
event | ) |
|
|
override |
Sets the current event.
- Parameters
-
event | The index of the event to be set as current. |
- Returns
- true if 0 <= event < total number of events in the GGS file(s), false otherwise.
◆ m_caloHitsNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_caloHitsNames {"caloHitsGGS", {"caloHitsMC", "caloHitsGeV"}} |
|
private |
◆ m_currEv
unsigned int Herd::GGSDataProvider::m_currEv |
|
private |
◆ m_currReadEv
unsigned int Herd::GGSDataProvider::m_currReadEv |
|
private |
◆ m_evReader
std::unique_ptr<GGSSimReader> Herd::GGSDataProvider::m_evReader |
|
private |
◆ m_fitHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_fitHitsCollNames |
|
private |
Initial value:{"fitHitsCollGGS",
{"fitHitsCollMC", "fitHitsCollGeV"}}
◆ m_fitParticleHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_fitParticleHitsCollNames |
|
private |
Initial value:{
"fitParticleHitsCollGGS", {"fitParticleHitsCollMC", "fitParticleHitsCollGeV"}}
◆ m_geoReader
◆ m_mcTruthNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_mcTruthNames {"mcTruth", {}} |
|
private |
◆ m_objDescriptors
std::vector<ObjDescriptor> Herd::GGSDataProvider::m_objDescriptors |
|
private |
◆ m_psdHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_psdHitsCollNames |
|
private |
Initial value:{"psdHitsCollGGS",
{"psdHitsCollMC", "psdHitsCollGeV"}}
◆ m_psdParticleHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_psdParticleHitsCollNames |
|
private |
Initial value:{
"psdParticleHitsCollGGS", {"psdParticleHitsCollMC", "psdParticleHitsCollGeV"}}
◆ m_reader
std::shared_ptr<GGSTRootReader> Herd::GGSDataProvider::m_reader |
|
private |
◆ m_scdStripHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_scdStripHitsCollNames |
|
private |
Initial value:{"scdStripHitsCollGGS",
{"scdHitsCollMC", "scdHitsCollGeV"}}
◆ m_scdWaferHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_scdWaferHitsCollNames |
|
private |
Initial value:{
"scdWaferHitsCollGGS", {"scdWaferHitsCollMC", "scdWaferHitsCollGeV"}}
◆ m_scdWaferParticleHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_scdWaferParticleHitsCollNames |
|
private |
Initial value:{
"scdWaferParticleHitsCollGGS", {"scdWaferParticleHitsCollMC", "scdWaferParticleHitsCollGeV"}}
◆ m_stkStripHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_stkStripHitsCollNames |
|
private |
Initial value:{"stkStripHitsCollGGS",
{"stkHitsCollMC", "stkHitsCollGeV"}}
◆ m_stkWaferHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_stkWaferHitsCollNames |
|
private |
Initial value:{
"stkWaferHitsCollGGS", {"stkWaferHitsCollMC", "stkWaferHitsCollGeV"}}
◆ m_stkWaferParticleHitsCollNames
const std::pair<std::string, std::vector<std::string> > Herd::GGSDataProvider::m_stkWaferParticleHitsCollNames |
|
private |
Initial value:{
"stkWaferParticleHitsCollGGS", {"stkWaferParticleHitsCollMC", "stkWaferParticleHitsCollGeV"}}
The documentation for this class was generated from the following files: