HerdSoftware  0.3.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Herd::Readers::GGSSiliconDetectorHitsReader Class Reference

SiliconDetectorHits reader class. More...

#include <dataproviders/readers/event/GGSSiliconDetectorHitsReader.h>

Public Types

enum  DetectorType { DetectorType::STK, DetectorType::SCD }
 

Public Member Functions

 GGSSiliconDetectorHitsReader (std::shared_ptr< GGSTRootReader > ggsReader, DetectorType type)
 
bool IsSiliconDetectorHitsCollAvailable ()
 Checks if SiliconDetector hits are available in the simulation file. More...
 
RetrievalResult GetSiliconDetectorHitsColl (ObjectWrapper &wrapper)
 Get the SiliconDetector Hits. More...
 
bool IsSiliconDetectorWaferParticleHitsCollAvailable ()
 Checks if SiliconDetector particle hits are available in the simulation file. More...
 
RetrievalResult GetSiliconDetectorWaferParticleHitsColl (ObjectWrapper &wrapper)
 Get the SiliconDetector Particle Hits. More...
 
std::vector< std::string > FreeObjects (const std::vector< std::string > &objs, Memory::Status memStatus)
 Free the memory of unneeded objects. More...
 
void SetSiliconDetectorGeoParamsColl (observer_ptr< SiliconDetectorGeoParamsColl > sdGeoParamsColl)
 Set the reference for the SD geometric parameters. More...
 
void SetSideDetectorFirstWaferID (std::array< int, 4 > sideSDFirstWaferID)
 Set the GGS volID of the first wafer for each side SD detector. More...
 

Private Member Functions

bool SetupSDReadout ()
 

Private Attributes

std::shared_ptr< GGSTRootReader > m_ggsReader
 Set the GGS volID of the first strip for each side SD detector. More...
 
GGSTHitsReader * m_hitReader = nullptr
 
long long int m_lastHitsReadEvent = std::numeric_limits<long long int>::max()
 
long long int m_lastPartHitsReadEvent = std::numeric_limits<long long int>::max()
 
DetectorType m_type
 
observer_ptr< SiliconDetectorGeoParamsCollm_sdGeoParamsColl = nullptr
 
int m_topSDDetIndex = std::numeric_limits<int>::lowest()
 
int m_sideSDHDetIndex = std::numeric_limits<int>::lowest()
 
int m_sideSDVDetIndex = std::numeric_limits<int>::lowest()
 
std::array< int, 4 > m_sideSDFirstWaferID {}
 
SiliconDetectorHitsColl m_sdHitsColl
 
SiliconDetectorParticleHitsColl m_sdWaferParticleHitsColl
 
bool firstRun = true
 

Detailed Description

SiliconDetectorHits reader class.

Class for reading the SiliconDetectorHits object from a GGS simulation file.

Member Enumeration Documentation

◆ DetectorType

Enumerator
STK 
SCD 

Constructor & Destructor Documentation

◆ GGSSiliconDetectorHitsReader()

Herd::Readers::GGSSiliconDetectorHitsReader::GGSSiliconDetectorHitsReader ( std::shared_ptr< GGSTRootReader >  ggsReader,
DetectorType  type 
)
inline

Member Function Documentation

◆ FreeObjects()

std::vector< std::string > Herd::Readers::GGSSiliconDetectorHitsReader::FreeObjects ( const std::vector< std::string > &  objs,
Memory::Status  memStatus 
)

Free the memory of unneeded objects.

Currently this method frees the memory of the provided objects if memStatus is EXHAUSTED. This reader frees the following objects:

  • stkWaferHitsCollGGS
  • stkWaferParticleHitsCollGGS
  • scdWaferHitsCollGGS
  • scdWaferParticleHitsCollGGS
Parameters
objsThe list of objects to be freed.
memStatusThe current memory occupation status.
Returns
a list of freed objects.

◆ GetSiliconDetectorHitsColl()

RetrievalResult Herd::Readers::GGSSiliconDetectorHitsReader::GetSiliconDetectorHitsColl ( ObjectWrapper &  wrapper)

Get the SiliconDetector Hits.

Parameters
wrapperA wrapper to the SiliconDetectorHitsColl object
segmThe segmentation type of the detector (WAFER or STRIP)
Returns
RetrievalResult The result of the operation (SUCCESS or ERROR)

◆ GetSiliconDetectorWaferParticleHitsColl()

RetrievalResult Herd::Readers::GGSSiliconDetectorHitsReader::GetSiliconDetectorWaferParticleHitsColl ( ObjectWrapper &  wrapper)

Get the SiliconDetector Particle Hits.

Parameters
wrapperA wrapper to the SiliconDetectorParticleHitsColl object
Returns
RetrievalResult The result of the operation (SUCCESS or ERROR)

◆ IsSiliconDetectorHitsCollAvailable()

bool Herd::Readers::GGSSiliconDetectorHitsReader::IsSiliconDetectorHitsCollAvailable ( )

Checks if SiliconDetector hits are available in the simulation file.

Check the GGS reader for the presence of SiliconDetector hits

Returns
true
false

◆ IsSiliconDetectorWaferParticleHitsCollAvailable()

bool Herd::Readers::GGSSiliconDetectorHitsReader::IsSiliconDetectorWaferParticleHitsCollAvailable ( )
inline

Checks if SiliconDetector particle hits are available in the simulation file.

Check the GGS reader for the presence of SiliconDetector particle hits N.B: we assume that if we simulated wafers we always have particle hits

Returns
true
false

◆ SetSideDetectorFirstWaferID()

void Herd::Readers::GGSSiliconDetectorHitsReader::SetSideDetectorFirstWaferID ( std::array< int, 4 >  sideSDFirstWaferID)
inline

Set the GGS volID of the first wafer for each side SD detector.

Parameters
sideSDFirstWaferIDan array containing the first GGS volumeID for side SD layers.

◆ SetSiliconDetectorGeoParamsColl()

void Herd::Readers::GGSSiliconDetectorHitsReader::SetSiliconDetectorGeoParamsColl ( observer_ptr< SiliconDetectorGeoParamsColl sdGeoParamsColl)

Set the reference for the SD geometric parameters.

Sets the SD geometric parameters to be used for GGSID -> VolumeID conversion.

Parameters
sdGeoParamsCollan observer_ptr to the geoparams collection.

◆ SetupSDReadout()

bool Herd::Readers::GGSSiliconDetectorHitsReader::SetupSDReadout ( )
private

Member Data Documentation

◆ firstRun

bool Herd::Readers::GGSSiliconDetectorHitsReader::firstRun = true
private

◆ m_ggsReader

std::shared_ptr<GGSTRootReader> Herd::Readers::GGSSiliconDetectorHitsReader::m_ggsReader
private

Set the GGS volID of the first strip for each side SD detector.

Parameters
sideSDFirstStripIDan array containing the first GGS volumeID for side SD layers.

◆ m_hitReader

GGSTHitsReader* Herd::Readers::GGSSiliconDetectorHitsReader::m_hitReader = nullptr
private

◆ m_lastHitsReadEvent

long long int Herd::Readers::GGSSiliconDetectorHitsReader::m_lastHitsReadEvent = std::numeric_limits<long long int>::max()
private

◆ m_lastPartHitsReadEvent

long long int Herd::Readers::GGSSiliconDetectorHitsReader::m_lastPartHitsReadEvent = std::numeric_limits<long long int>::max()
private

◆ m_sdGeoParamsColl

observer_ptr<SiliconDetectorGeoParamsColl> Herd::Readers::GGSSiliconDetectorHitsReader::m_sdGeoParamsColl = nullptr
private

◆ m_sdHitsColl

SiliconDetectorHitsColl Herd::Readers::GGSSiliconDetectorHitsReader::m_sdHitsColl
private

◆ m_sdWaferParticleHitsColl

SiliconDetectorParticleHitsColl Herd::Readers::GGSSiliconDetectorHitsReader::m_sdWaferParticleHitsColl
private

◆ m_sideSDFirstWaferID

std::array<int, 4> Herd::Readers::GGSSiliconDetectorHitsReader::m_sideSDFirstWaferID {}
private

◆ m_sideSDHDetIndex

int Herd::Readers::GGSSiliconDetectorHitsReader::m_sideSDHDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_sideSDVDetIndex

int Herd::Readers::GGSSiliconDetectorHitsReader::m_sideSDVDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_topSDDetIndex

int Herd::Readers::GGSSiliconDetectorHitsReader::m_topSDDetIndex = std::numeric_limits<int>::lowest()
private

◆ m_type

DetectorType Herd::Readers::GGSSiliconDetectorHitsReader::m_type
private

The documentation for this class was generated from the following files: