13 #ifndef GGSTHITSREADER_H_
14 #define GGSTHITSREADER_H_
18 #include "montecarlo/readers/GGSTChainReader.h"
23 #include "TClonesArray.h"
79 void SetDetector(
const char *detector,
bool readPartHits =
false,
bool readPosHits =
false);
92 bool DetectorExists(
const char *detector,
bool particleHits =
false,
bool positionHits =
false);
105 Int_t
GetNHits(
const char *detector);
210 Long64_t _firstEntryOfCurrentFile;
212 std::vector<TClonesArray *> _intHitArrays;
213 std::vector<TObjArray *> _partHitArrays;
214 std::vector<TObjArray *> _posHitArrays;
215 std::vector<TArrayF *> _timeBins;
216 std::vector<bool> _readPartHits;
217 std::vector<bool> _readPosHits;
218 TClonesArray *_detInfo;
219 std::vector<std::vector<float> *> _thresholds;
223 std::string logVolName;
224 int detInfoArrayIndex;
226 std::vector<Detector> _detectors;
228 int _GetDetectorIndexFromStorage(
const char *detector);
242 int _CheckBranch(
const char *branchName);
252 TClonesArray *_GetHitArray(
int iHitArray);
bool HasPartHits(const char *detector)
Check if particle hits data is available for the specified detector.
float GetIntHitThreshold(const std::string &detector)
Retrieves the thresholds used when saving the integrated hits.
Class for reading output of GGSHitsAction.
Class to store detector informations.
GGSTIntHitBase * GetHit(const char *detector, unsigned int iHit)
Get the specified hit.
float GetPartHitThreshold(const std::string &detector)
Retrieves the thresholds used when saving the particle hits.
Abstract class defining the interface for tree readers.
void ListDetectors()
Prints a list of detectors which are present in hits tree on standard output.
GGSTHitsReader()
Constructor.
std::string GetIntHitsClassName(const char *detector)
Gets the name of the class of the integrated hits for the given detector.
bool DetectorExists(const char *detector, bool particleHits=false, bool positionHits=false)
Checks the existence of a given detector within the hits tree.
Int_t GetNHits(const char *detector)
Gets the number of hits for the specified detector.
~GGSTHitsReader()
Destructor.
bool HasPosHits(const char *detector)
Check if position hits data is available for the specified detector.
float GetPosHitThreshold(const std::string &detector)
Retrieves the thresholds used when saving the position hits.
bool SetChain(TChain *hitsChain)
Sets the chain.
int GetDetectorIndex(const char *detector)
Retrieves the index of requested detector.
void GetEntry(Long64_t entry)
std::vector< TString > GetListOfDetectors()
Returns the list of detectors which are present in hits tree on standard output.
Base class for storing G4 integrated hits.
void SetDetector(const char *detector, bool readPartHits=false, bool readPosHits=false)
Enables reading hit informations of the specified detector.