GGS(GenericGEANT4Simulation)Software  2.6.3
 All Data Structures Namespaces Files Functions Variables Typedefs Macros
Data Structures | Public Member Functions | Friends
GGSHitsAction Class Reference

An action which saves hits in sensitive volumes on ROOT file. More...

#include <GGSHitsAction.h>

Inheritance diagram for GGSHitsAction:
Inheritance graph
[legend]
Collaboration diagram for GGSHitsAction:
Collaboration graph
[legend]

Public Member Functions

 GGSHitsAction ()
 Constructor.
 
 ~GGSHitsAction ()
 Destructor.
 
void BeginOfRunAction (const G4Run *run)
 Actions executed at beginning of run. More...
 
void EndOfRunAction (const G4Run *run)
 Actions executed at end of run. More...
 
void BeginOfEventAction (const G4Event *event)
 Actions executed at beginning of event. More...
 
void EndOfEventAction (const G4Event *event)
 Actions executed at end of event. More...
 
void SetOutputFileBase (const std::string &outFileBase)
 Sets the output file base name. More...
 
void SetOutputTreeName (const std::string &outTreeName)
 Sets the output tree name. More...
 
void SetOutputIntHitClass (std::string detectorName, const std::string &className)
 Sets the name of the integrated hit class to be used for output of a given detector. More...
 
void SetOutputPartHitClass (std::string detectorName, const std::string &className)
 Sets the name of the particle hit class to be used for output. More...
 
void SetOutputPosHitClass (std::string detectorName, const std::string &className)
 Sets the name of the position hit class to be used for output. More...
 
void SetHitThreshold (const std::string &detectorName, const std::string &hitType, const std::string &valueStr, const std::string &unit)
 Sets a lower energy deposit threshold for hits. More...
 
- Public Member Functions inherited from GGSUserAction
 GGSUserAction ()
 Constructor. More...
 
virtual ~GGSUserAction ()
 Destructor.
 
G4ClassificationOfNewTrack ClassifyNewTrack (const G4Track *)
 Override of the ClassifyNewTrack method. More...
 

Friends

class GGSHitsActionPrivateMessenger
 

Detailed Description

An action which saves hits in sensitive volumes on ROOT file.

This action reads the hits in sensitive volumes, as defined by GGS sensitive logical volumes naming convention. It then converts the hits in ROOT format and saves them on a ROOT file. For each sensitive logical volume, a branch will be created whose name is equal to that of logical volume. This branch is made by a TClonesArray containing all the hits in physical sensitive volumes associated to the logical. This action can handle different kind of output hit classes derived from standard GGS ones (GGSTIntHit, GGSTPartHit and GGSTPosHit).The actual classes to be used is specified by passing their names to the constructor; the hit classes must have a root dictionary.

See Also
GGSIntHit
GGSPartHit
GGSPosHit

Definition at line 63 of file GGSHitsAction.h.

Member Function Documentation

void GGSHitsAction::BeginOfEventAction ( const G4Event *  event)

Actions executed at beginning of event.

Method executed at the beginning of each event. Hits buffers are cleared.

Parameters
eventPointer to a G4Event

Definition at line 242 of file GGSHitsAction.cpp.

242  {
243 
244  // Give back arrays to the TCLonesArray services.
245  _GiveBackAllArrays();
246 
247  for (auto &handleElem : _outputHandles) {
248  OutputHandle &handle = handleElem.second;
249  if (handle.partHitArray) {
250 
251  // Clear the TObjarray persistence structures. These contains TClonesArrays which
252  // must not be deleted since they are owned and managed by the GGSTClonesArrayService...
253 
254  // ... so set the TObjArray to not own them...
255  handle.partHitArray->SetOwner(false);
256  // ... then clean to make size=0 without deleting the contained objects...
257  handle.partHitArray->Clear();
258  // ... and then restore ownership to avoid memory leak on readout of ROOT file.
259  // (see http://root.cern.ch/root/roottalk/roottalk02/0444.html)
260  handle.partHitArray->SetOwner(true);
261  }
262 
263  if (handle.posHitArray) {
264  handle.posHitArray->SetOwner(false);
265  handle.posHitArray->Clear();
266  handle.posHitArray->SetOwner(true);
267  }
268  }
269 }
void GGSHitsAction::BeginOfRunAction ( const G4Run *  run)

Actions executed at beginning of run.

Method executed at the beginning of each run. A new ROOT file is created for each run.

Parameters
runPointer to the G4Run

Definition at line 68 of file GGSHitsAction.cpp.

68  {
69  static const std::string routineName("GSHitsAction::BeginOfRunAction");
70 
71  // -----------------
72  // Open the run file
73  // -----------------
74  _outFile = GGSRootFileService::GetInstance().GetFileForThisRun(_outFileBase, run);
75  if (!_outFile || (_outFile && _outFile->IsZombie())) {
76  COUT(ERROR) << "Cannot open ROOT file " << _outFileBase << "for run" << run->GetRunID() << ENDL;
77  throw -1;
78  }
79 
80  // -----------------
81  // Create a new tree
82  // -----------------
83  if (_outTreeName == "") {
84  _outTree = GGSRootFileService::GetInstance().GetDefaultTree(_outFile);
85  _outTree->SetTitle(TString(_outTree->GetTitle()) + "Hits ");
86  }
87  else
88  _outTree = new TTree(_outTreeName, "GGS hits");
89 
90  // Loop over logical volumes...
91  G4LogicalVolumeStore *logicalVS = G4LogicalVolumeStore::GetInstance();
92  if (!logicalVS)
93  return;
94 
95  for (unsigned int i = 0; i < logicalVS->size(); i++) {
96  G4LogicalVolume *logicalV = logicalVS->at(i);
97 
98  // ...and select sensitive volumes with GGS hits SD
99  std::vector<G4VSensitiveDetector*> sDets(0);
100  G4VSensitiveDetector *sd = logicalV->GetSensitiveDetector();
101  if (sd) {
102  GGSMultiSensitiveDetector *msd = dynamic_cast<GGSMultiSensitiveDetector*>(sd);
103  if (msd) {
104  sDets = msd->GetListOfSensitiveDetectors();
105  }
106  else {
107  sDets.push_back(sd);
108  }
109  }
110 
111  for (auto &sdPtr : sDets) {
112  auto sdName = sdPtr->GetName();
113  auto ggssdNamePos = sdName.find(".GGSIntHitSD", 0);
114  if (ggssdNamePos != std::string::npos) {
115  GGSIntHitSD *intHitSD = dynamic_cast<GGSIntHitSD*>(sdPtr);
116  if (intHitSD && intHitSD->isActive()) {
117  std::string sdNameReduced = sdName;
118  sdNameReduced.erase(ggssdNamePos, 12); // Remove ".GGSIntHitSD"
119 
120  std::unordered_map<std::string, OutputHandle>::iterator handleIter = _outputHandles.find(sdName);
121  if (handleIter == _outputHandles.end()) {
122  // The handle for this detector does not exist yet, so create a standard one
123 
124  auto insertResult = _outputHandles.insert(std::pair<std::string, OutputHandle> { sdName, OutputHandle() });
125  if (insertResult.second) {
126  handleIter = insertResult.first;
127  }
128  }
129 
130  // Create arrays et al.
131  auto &newHandle = handleIter->second;
132  newHandle.intHitArray = std::unique_ptr<TClonesArray>(new TClonesArray(newHandle.intHitClassName.c_str())); // Create it here and Clear("C") it at beginning of event
133  // Create a branch to store hits in the output file
134  _outTree->Branch((sdNameReduced + "-GGSIntHits").data(), "TClonesArray", newHandle.intHitArray.get(), 64000);
135 
136  // Set output threshold
137  {
138  auto thresholdIter = std::find_if(_thresholds.begin(), _thresholds.end(),
139  [&sdNameReduced](const ThresholdStruct &threshold) {
140  return (threshold.hitType == 0) && (sdNameReduced == threshold.detectorName);
141  });
142  if (thresholdIter != _thresholds.end()) {
143  newHandle.intHitThreshold = thresholdIter->value;
144  }
145  }
146  if (intHitSD->GetPartHitsStorage()) {
147  newHandle.partHitArray = std::unique_ptr<TObjArray>(new TObjArray());
148  // Set ownership to avoid memory leaks when reading back the TObjArray.
149  // http://root.cern.ch/root/roottalk/roottalk02/0444.html
150  newHandle.partHitArray->SetOwner(true);
151  _outTree->Branch((sdNameReduced + "-GGSPartHits").data(), "TObjArray", newHandle.partHitArray.get(), 64000);
152  newHandle.partHitCAService = std::unique_ptr<GGSTClonesArrayService>(
153  new GGSTClonesArrayService(newHandle.partHitClassName.c_str()));
154  // Set output threshold
155  auto thresholdIter = std::find_if(_thresholds.begin(), _thresholds.end(),
156  [&sdNameReduced](const ThresholdStruct &threshold) {
157  return (threshold.hitType == 1) && (sdNameReduced == threshold.detectorName);
158  });
159  if (thresholdIter != _thresholds.end()) {
160  newHandle.partHitThreshold = thresholdIter->value;
161  }
162  }
163  if (intHitSD->GetPosHitsStorage()) {
164  newHandle.posHitArray = std::unique_ptr<TObjArray>(new TObjArray());
165  newHandle.posHitArray->SetOwner(true);
166  _outTree->Branch((sdNameReduced + "-GGSPosHits").data(), "TObjArray", newHandle.posHitArray.get(), 64000);
167  newHandle.posHitCAService = std::unique_ptr<GGSTClonesArrayService>(
168  new GGSTClonesArrayService(newHandle.posHitClassName.c_str()));
169  // Set output threshold
170  auto thresholdIter = std::find_if(_thresholds.begin(), _thresholds.end(),
171  [&sdNameReduced](const ThresholdStruct &threshold) {
172  return (threshold.hitType == 2) && (sdNameReduced == threshold.detectorName);
173  });
174  if (thresholdIter != _thresholds.end()) {
175  newHandle.posHitThreshold = thresholdIter->value;
176  }
177  }
178 
179  // Save the time bins as run products
180  unsigned int nBins = intHitSD->GetTimeBins().size();
181  TArrayF timeBins(nBins);
182  for (unsigned int iBin = 0; iBin < nBins; iBin++)
183  timeBins[iBin] = intHitSD->GetTimeBins()[iBin];
184  _outFile->WriteObject(&timeBins, (sdNameReduced + "-GGSIntHits-TimeBins").data());
185 
186  // Save the hit thresholds
187  std::vector<float> detThresholds { (float) (newHandle.intHitThreshold / GeV),
188  (float) (newHandle.partHitThreshold / GeV), (float) (newHandle.posHitThreshold / GeV) };
189  _outFile->WriteObject(&detThresholds, (sdNameReduced + "-GGSIntHits-Thresholds").data());
190 
191  } // Check on active volume
192 
193  } // Check on sensitive volume name
194 
195  } // End loop on sensitive detectors
196 
197  } // End loop on logical volumes
198 
199 }
TFile * GetFileForThisRun(const path &baseName, const G4Run *run)
Opens a file for a given run and returns a pointer to it.
Sensitive detector class for integrated hits.
Definition: GGSIntHitSD.h:28
A service which manages a pool of reusable TClonesArray.
const std::vector< G4VSensitiveDetector * > & GetListOfSensitiveDetectors()
Retrieves a list of sensitive detectors collected into this object.
#define ENDL
Definition: GGSSmartLog.h:104
#define COUT(level)
Smart log macro. It writes on stdout only if the specified verbosity level is lesser than the maximum...
Definition: GGSSmartLog.h:77
bool GetPosHitsStorage()
Return current status of particle hits storage (i.e. persistence).
Definition: GGSIntHitSD.h:137
A multiple sensitive detector.
const std::vector< G4double > & GetTimeBins()
Time bins getter.
Definition: GGSIntHitSD.h:83
bool GetPartHitsStorage()
Return current status of particle hits storage (i.e. persistence).
Definition: GGSIntHitSD.h:110
TTree * GetDefaultTree(TFile *file)
Gets the default tree for this file.
static GGSRootFileService & GetInstance()
Get reference to GGSRootFileService unique instance.
void GGSHitsAction::EndOfEventAction ( const G4Event *  event)

Actions executed at end of event.

Method executed at the end of each event. Hits are read, converted to ROOT format and filled into output tree.

Parameters
eventPointer to a G4Event

Definition at line 273 of file GGSHitsAction.cpp.

273  {
274 
275 //-------------------------------
276 // Set hits info
277 //-------------------------------
278 
279  // Retrieve SD manager
280  G4SDManager *SDman = G4SDManager::GetSDMpointer();
281 
282  // Retrieve event hits
283  G4HCofThisEvent *evHitColl = event->GetHCofThisEvent();
284 
285  // Loop on detectors
286  for (auto &handleElem : _outputHandles) {
287 
288  const std::string &detectorName = handleElem.first;
289  OutputHandle &handle = handleElem.second;
290  // Get hits of current detector
291  G4int hitsCollID = SDman->GetCollectionID(detectorName);
292 
293  // Convert hits to persistent data format
294  handle.intHitArray->Clear(); // Set entries to 0 but do not clear elements (will be cleared in _Convert)
295  _Convert(*((GGSIntHitsCollection*) (evHitColl->GetHC(hitsCollID))), *(handle.intHitArray), handle, detectorName);
296 
297  // Link particle and position hit collections to persistence array
298  for (int iIntHit = 0; iIntHit < handle.intHitArray->GetEntries(); ++iIntHit) {
299  GGSTIntHit *tIntHit = (GGSTIntHit*) (handle.intHitArray->At(iIntHit));
300  if (tIntHit->_partHits) {
301  handle.partHitArray->AddAtAndExpand(tIntHit->_partHits, handle.partHitArray->GetEntries());
302  if (tIntHit->_partHits->GetEntries() > 0 && ((GGSTPartHit*) (tIntHit->_partHits->At(0)))->_posHits) {
303  static TClonesArray *partHits = NULL;
304  static Int_t nPartHits = 0;
305  partHits = tIntHit->_partHits;
306  nPartHits = partHits->GetEntries();
307  for (Int_t iPartHit = 0; iPartHit < nPartHits; iPartHit++) {
308  GGSTPartHit *partHit = (GGSTPartHit*) (tIntHit->_partHits->At(iPartHit));
309  partHit->_posHitIndex = handle.posHitArray->GetEntries(); // Save reference to pos hit array
310  handle.posHitArray->AddAtAndExpand(partHit->_posHits, handle.posHitArray->GetEntries());
311  }
312  }
313  }
314 
315  }
316  }
317 
318 //-----------
319 // Fill tree
320 //-----------
321  if (_outTreeName != "") {
322  // Call fill only if not using the default tree
323  _outFile->cd();
324  _outTree->Fill();
325  }
326 
327 }
Class to store G4 particle hits.
Definition: GGSTHits.h:82
G4THitsCollection< GGSIntHit > GGSIntHitsCollection
Alias for G4 template hits collection for GGSIntHit.
Definition: GGSIntHit.h:272
Class to store G4 position hits.
Definition: GGSTHits.h:160
void GGSHitsAction::EndOfRunAction ( const G4Run *  run)

Actions executed at end of run.

Method executed at the end of each run. The ROOT tree is written to file and the file is closed.

Parameters
runPointer to a G4Run

Definition at line 203 of file GGSHitsAction.cpp.

203  {
204 
205 // -----------------
206 // close output file
207 // -----------------
208 
209  if (_outFile) {
210  _outFile->cd();
211  if (_outTreeName != "") {
212  // Write the tree if we are not using the default one
213  _outTree->Write();
214  }
215 
216  GGSRootFileService::GetInstance().CloseFileForThisRun(_outFileBase); // Will automatically save detector informations
217  _outFile = NULL;
218  _outTree = NULL; // The tree is delete by the file's destructor.
219  }
220  else {
221  throw -1; //TODO handle errors
222  }
223 
224 // -----------------
225 // delete detectors
226 // -----------------
227 
228  // Prepare for an eventual next run
229  _GiveBackAllArrays();
230  for (auto &handleElem : _outputHandles) {
231  if (handleElem.second.posHitCAService) {
232  handleElem.second.posHitCAService->DeleteAll();
233  }
234  if (handleElem.second.partHitCAService) {
235  handleElem.second.partHitCAService->DeleteAll();
236  }
237  }
238 }
void CloseFileForThisRun(const path &baseName)
Closes the ROOT output file.
static GGSRootFileService & GetInstance()
Get reference to GGSRootFileService unique instance.
void GGSHitsAction::SetHitThreshold ( const std::string &  detectorName,
const std::string &  hitType,
const std::string &  valueStr,
const std::string &  unit 
)

Sets a lower energy deposit threshold for hits.

Hits with a total energy deposit lower than the corresponding threshold will not be saved in the output file. If a finer-grained hit is above its threshold then the parent hit will be saved regardless of its value. For example, if particle hits have threshold 1 and position hits 0.1, then a particle hit with a total release of 0.2 containing a single position hit with release 0.2 will be saved (since position hits are contained inside particle hits, so the particle hit is necessary to store the above-threshold position hit). The energy deposit of parent hits will be the total one computed by the MC simulation, irrespective of the total energy deposit of above-threshold children hits. Extending the example above, if the particle hit have a release of 1.05 due to five position hits with release 0.2 and one position hit with release 0.05 then only the five position hits with release 0.2 will be saved; but the energy deposit of the particle hit will still be 1.05 although the sum of stored position hits is 1. The above consideration apply also to integrated-particle hits hierarchy. In case custom hits are used, which eventually customize the meaning of energy deposit, then the thresholds will be relative to the customized deposits.

Parameters
detectorNameThe name of the detector.
hitTypeThe type of the hit (integrated, particle or position).
valueStrThe threshold value.
unitThe unit of the threshold value.

Definition at line 539 of file GGSHitsAction.cpp.

540  {
541 
542  const std::string routineName("GGSHitsAction::SetHitThreshold");
543 
544  int hitTypeNo = -1;
545  if (hitType == "integrated") {
546  hitTypeNo = 0;
547  }
548  else if (hitType == "particle") {
549  hitTypeNo = 1;
550  }
551  else if (hitType == "position") {
552  hitTypeNo = 2;
553  }
554  else {
555  throw std::runtime_error(routineName + ": Unknown hit type " + hitType + " for detector " + detectorName);
556  }
557 
558  float value = 0.;
559  try {
560  value = std::stof(valueStr);
561  } catch (std::invalid_argument &exc) {
562  COUT(ERROR) << "Invalid threshold for " << hitType << " hits of detector " << detectorName << ENDL;
563  throw exc;
564  } catch (std::out_of_range &exc) {
565  COUT(ERROR) << "Invalid value for threshold of " << hitType << " hits of detector " << detectorName << ENDL;
566  throw exc;
567  }
568 
569  auto &unitsTable = G4UnitDefinition::GetUnitsTable();
570  auto unitCatIter = std::find_if(unitsTable.begin(), unitsTable.end(), [&unit](const G4UnitsCategory *unitCat) {
571  return (unitCat->GetName() == "Energy");
572  });
573  if (unitCatIter == unitsTable.end()) {
574  throw std::runtime_error(routineName + ": energy unit category not found");
575  }
576 
577  auto &unitsList = (*unitCatIter)->GetUnitsList();
578  auto unitIter = std::find_if(unitsList.begin(), unitsList.end(), [&unit](const G4UnitDefinition *unitDef) {
579  return unit == unitDef->GetSymbol().c_str();
580  });
581  if (unitIter == unitsList.end()) {
582  throw std::runtime_error(routineName + ": unit " + unit + " not found");
583  }
584 
585  auto thresholdIter = std::find_if(_thresholds.begin(), _thresholds.end(),
586  [&detectorName, hitTypeNo](const ThresholdStruct &threshold) {
587  return (threshold.hitType == hitTypeNo) && (threshold.detectorName == detectorName);
588  });
589  if (thresholdIter == _thresholds.end()) {
590  _thresholds.push_back(ThresholdStruct { detectorName, hitTypeNo, -1. });
591  thresholdIter = _thresholds.end() - 1;
592  }
593 
594  auto *sd = dynamic_cast<GGSIntHitSD*>(G4SDManager::GetSDMpointer()->FindSensitiveDetector(
595  detectorName + ".GGSIntHitSD"));
596  if (!sd) {
597  throw std::invalid_argument(routineName + ": detector " + detectorName + " not found");
598  }
599 
600  switch (hitTypeNo) {
601  case 0:
602  thresholdIter->value = value * (*unitIter)->GetValue();
603  sd->SetIntHitThreshold(thresholdIter->value);
604  break;
605  case 1:
606  thresholdIter->value = value * (*unitIter)->GetValue();
607  sd->SetPartHitThreshold(thresholdIter->value);
608  break;
609  case 2:
610  thresholdIter->value = value * (*unitIter)->GetValue();
611  sd->SetPosHitThreshold(thresholdIter->value);
612  break;
613  }
614 
615 }
Sensitive detector class for integrated hits.
Definition: GGSIntHitSD.h:28
#define ENDL
Definition: GGSSmartLog.h:104
#define COUT(level)
Smart log macro. It writes on stdout only if the specified verbosity level is lesser than the maximum...
Definition: GGSSmartLog.h:77
void GGSHitsAction::SetOutputFileBase ( const std::string &  outFileBase)
inline

Sets the output file base name.

The file base name can be with or without extension (.root will be automatically used as extension). For each run, the run number will be appended to the base name before the .root extension. If no value is provided the file base name will fallback to the default value set in GSRootFileservice.

Parameters
outFileBaseThe output file base name.
See Also
GGSRootFileservice

Definition at line 117 of file GGSHitsAction.h.

117  {
118  _outFileBase = outFileBase;
119  }
void GGSHitsAction::SetOutputIntHitClass ( std::string  detectorName,
const std::string &  className 
)

Sets the name of the integrated hit class to be used for output of a given detector.

Parameters
detectorNamename of the detector
classNamename of the output class for integrated hits

Definition at line 473 of file GGSHitsAction.cpp.

473  {
474  const std::string routineName("[GGSHitsAction::SetOutputIntHitClass] ");
475 
476  // Check if the given class has a dictionary
477  TClass *intHitClass = TClass::GetClass(className.c_str());
478  if (!intHitClass) {
479  throw std::runtime_error(routineName + "Dictionary for class " + className + " not found");
480  }
481 
482  // Check if the given detector already has a specified output class
483  detectorName.insert(detectorName.find_first_of('.'), ".GGSIntHitSD");
484  auto handleIter = _outputHandles.find(detectorName);
485  if (handleIter == _outputHandles.end()) {
486  handleIter = _outputHandles.insert(std::pair<std::string, OutputHandle> { detectorName, OutputHandle() }).first;
487  }
488 
489  // Set output facilities
490  handleIter->second.intHitClassName = className;
491 }
void GGSHitsAction::SetOutputPartHitClass ( std::string  detectorName,
const std::string &  className 
)

Sets the name of the particle hit class to be used for output.

Parameters
detectorNamename of the detector
classNamename of the output class for particle hits

Definition at line 495 of file GGSHitsAction.cpp.

495  {
496  const std::string routineName("[GGSHitsAction::SetOutputPartHitClass] ");
497 
498  // Check if the given class has a dictionary
499  TClass *partHitClass = TClass::GetClass(className.c_str());
500  if (!partHitClass) {
501  throw std::runtime_error(routineName + "Dictionary for class " + className + " not found");
502  }
503 
504  // Check if the given detector already has a specified output class
505  detectorName.insert(detectorName.find_first_of('.'), ".GGSIntHitSD");
506  auto handleIter = _outputHandles.find(detectorName);
507  if (handleIter == _outputHandles.end()) {
508  handleIter = _outputHandles.insert(std::pair<std::string, OutputHandle> { detectorName, OutputHandle() }).first;
509  }
510 
511  // Set output facilities
512  handleIter->second.partHitClassName = className;
513 }
void GGSHitsAction::SetOutputPosHitClass ( std::string  detectorName,
const std::string &  className 
)

Sets the name of the position hit class to be used for output.

Parameters
detectorNamename of the detector
classNamename of the output class for position hits

Definition at line 517 of file GGSHitsAction.cpp.

517  {
518  const std::string routineName("[GGSHitsAction::SetOutputPosHitClass] ");
519 
520  // Check if the given class has a dictionary
521  TClass *posHitClass = TClass::GetClass(className.c_str());
522  if (!posHitClass) {
523  throw std::runtime_error(routineName + "Dictionary for class " + className + " not found");
524  }
525 
526  // Check if the given detector already has a specified output class
527  detectorName.insert(detectorName.find_first_of('.'), ".GGSIntHitSD");
528  auto handleIter = _outputHandles.find(detectorName);
529  if (handleIter == _outputHandles.end()) {
530  handleIter = _outputHandles.insert(std::pair<std::string, OutputHandle> { detectorName, OutputHandle() }).first;
531  }
532 
533  // Set output facilities
534  handleIter->second.posHitClassName = className;
535 }
void GGSHitsAction::SetOutputTreeName ( const std::string &  outTreeName)
inline

Sets the output tree name.

This name will be used for the TTree object where th hits for each event will be stored. By default, this value is set to "Hits" in constructor.

Parameters
outTreeNameThe output tree name.

Definition at line 128 of file GGSHitsAction.h.

128  {
129  _outTreeName = outTreeName;
130  }

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