ATLAS Offline Software
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
LArG4GenShowerLib Class Reference

Class for shower library generation algorithm. More...

#include <LArG4GenShowerLib.h>

Inheritance diagram for LArG4GenShowerLib:
Collaboration diagram for LArG4GenShowerLib:

Public Member Functions

 LArG4GenShowerLib (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode finalize ()
 
StatusCode execute ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

typedef std::map< std::string, ShowerLib::IShowerLib * > libMap
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

void clusterize (ShowerLib::StepInfoList *stepinfo)
 
const ShowerLib::StepInfoCollectiongetStepInfo ()
 
ShowerLib::StepInfoListcopyStepInfo (const ShowerLib::StepInfoCollection *stepinfo)
 
ShowerLib::StepInfoListcopyStepInfoZeroCleanup (const ShowerLib::StepInfoCollection *stepinfo)
 
void truncate (ShowerLib::StepInfoList *stepinfo)
 
HepMC::ConstGenParticlePtr getParticleFromMC ()
 return first MC truth particle for event More...
 
void calculateMoments (const ShowerLib::StepInfoCollection &eventSteps, double &weights, double &xavfra, double &yavfra, double &ravfra)
 calculate moments from StepInfoCollection More...
 
void addingTagsToLibrary ()
 adding tag information (release, detector description, ...) to library comment More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

DoubleProperty m_maxDistance
 property, see LArG4GenShowerLib::LArG4GenShowerLib More...
 
DoubleProperty m_maxRadius
 property, see LArG4GenShowerLib::LArG4GenShowerLib More...
 
DoubleProperty m_minEnergy
 property, see LArG4GenShowerLib::LArG4GenShowerLib More...
 
DoubleProperty m_containmentEnergy
 property, see LArG4GenShowerLib::LArG4GenShowerLib More...
 
DoubleProperty m_energyFraction
 property, see LArG4GenShowerLib::LArG4GenShowerLib More...
 
StringArrayProperty m_lib_struct_files
 
libMap m_libraries
 pointer to shower library More...
 
libMap m_libraries_by_filename
 
int m_stat_numshowers
 
int m_stat_valid
 
int m_stat_invalid
 
int m_stat_nolib
 
std::map< ShowerLib::IShowerLib *, int > m_stat_lib_saved
 
std::map< ShowerLib::IShowerLib *, int > m_stat_lib_notsaved
 
std::string m_physicslist_name
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Class for shower library generation algorithm.

Create shower library using geant hits

Author
Wolfgang Ehrenfeld, University of Hamburg, Germany
Sasha Glazov, DESY Hamburg, Germany
Version
Id
LArG4GenShowerLib.h 711210 2015-11-27 15:56:00Z jchapman

Definition at line 40 of file LArG4GenShowerLib.h.

Member Typedef Documentation

◆ libMap

typedef std::map<std::string, ShowerLib::IShowerLib*> LArG4GenShowerLib::libMap
private

Definition at line 80 of file LArG4GenShowerLib.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ LArG4GenShowerLib()

LArG4GenShowerLib::LArG4GenShowerLib ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 84 of file LArG4GenShowerLib.cxx.

86 {
87  declareProperty("MaxDistance", m_maxDistance = 50000.,
88  "max distance squared after which the hits will be truncated");
89  declareProperty("MinEnergy", m_minEnergy = .99,
90  "energy border, that truncation won't cross");
91  declareProperty("MaxRadius", m_maxRadius = 25.,
92  "maximal radius squared until two hits will be combined");
93  declareProperty("ContainmentEnergy", m_containmentEnergy = 0.95,
94  "energy fraction that will be inside containment borders");
95  declareProperty("LibStructFiles", m_lib_struct_files,
96  "List of files to read library structures from");
97  declareProperty("EnergyFraction", m_energyFraction = .02,
98  "the allowed amount of energy that can be deposited outside calorimeter region ");
99  declareProperty("PhysicsList", m_physicslist_name = "FTFP_BERT", "Geant4 PhysicsList used in the simulation");
100 }

Member Function Documentation

◆ addingTagsToLibrary()

void LArG4GenShowerLib::addingTagsToLibrary ( )
private

adding tag information (release, detector description, ...) to library comment

Definition at line 427 of file LArG4GenShowerLib.cxx.

428 {
429  char* atlasProject = getenv("AtlasProject");
430  char* atlasVersion = getenv("AtlasVersion");
431  std::string atlasReleaseTag = (atlasProject? std::string(atlasProject)+std::string("-") : std::string("Unknown-"));
432  if(atlasVersion) {
433  atlasReleaseTag += std::string(atlasVersion);
434  }
435  else {
436  atlasReleaseTag += std::string("Unknown");
437  }
438 
439  libMap::iterator itr;
440  for (itr = m_libraries.begin();itr != m_libraries.end();++itr){
441  // release
442  (*itr).second->release(atlasReleaseTag);
443 
444  // get geometry version
445  ServiceHandle<IGeoModelSvc> geoModelSvc("GeoModelSvc", this->name());
446  (*itr).second->geometry(geoModelSvc->atlasVersion());
447 
448  // get Physics list
449  (*itr).second->physicsList(m_physicslist_name);
450 
451  // get geant4 version and strip off CVS Name tag
452  std::string g4Version = G4Version;
453  size_t pos = g4Version.find("$Name: ");
454  if (pos != std::string::npos) {
455  g4Version.erase(pos, 7);
456  }
457  pos = g4Version.find(" $");
458  if (pos != std::string::npos) {
459  g4Version.erase(pos, 2);
460  }
461  (*itr).second->geantVersion(g4Version);
462  }
463 }

◆ calculateMoments()

void LArG4GenShowerLib::calculateMoments ( const ShowerLib::StepInfoCollection eventSteps,
double &  weights,
double &  xavfra,
double &  yavfra,
double &  ravfra 
)
private

calculate moments from StepInfoCollection

Definition at line 505 of file LArG4GenShowerLib.cxx.

507 {
508  double escal(0.);
509  double xav(0.), yav(0.), xav2(0.), yav2(0.);
510 
511  for (ShowerLib::StepInfoCollection::const_iterator i=eventSteps.begin();i<eventSteps.end(); ++i) {
512  escal += (*i)->dep();
513  xav += (*i)->x()*(*i)->dep();
514  yav += (*i)->y()*(*i)->dep();
515  xav2 += (*i)->x()*(*i)->x()*(*i)->dep();
516  yav2 += (*i)->y()*(*i)->y()*(*i)->dep();
517  // std::cout << "TRUNC EXYZ"<<(*i)->x()<<" "<<(*i)->y()<<" "<<(*i)->z()
518  // <<" "<<(*i)->dep()<<" "<<(*i)->code<<std::endl;
519  }
520 
521  // Center of gravity:
522  const double inv_escal = 1. / escal;
523  xavfra = xav*inv_escal;
524  yavfra = yav*inv_escal;
525  // Second momentum:
526  ravfra = std::sqrt(std::abs((xav2*inv_escal-xavfra*xavfra) +
527  (yav2*inv_escal-yavfra*yavfra)));
528  // energy is used as weights
529  weights = escal;
530 
531  return;
532 }

◆ clusterize()

void LArG4GenShowerLib::clusterize ( ShowerLib::StepInfoList stepinfo)
private

Definition at line 342 of file LArG4GenShowerLib.cxx.

343 {
344  typedef std::multimap<double,Dist> distMap;
345 
346  distMap distances;
347 
348  //fill the map
349  for (ShowerLib::StepInfoList::iterator i_h1(stepinfo->begin()); i_h1 != stepinfo->end(); ++i_h1) {
350  //iterate only the upper triangle of N*N matrix, since we do not want to create every distance twice
351  for (ShowerLib::StepInfoList::reverse_iterator i_h2(stepinfo->rbegin()); (*i_h2) != (*i_h1); ++i_h2) {
352  distances.insert(distMap::value_type((*i_h1)->diff2(**i_h2),Dist(*i_h1, *i_h2)));
353  }
354  }
355 
356  const double rmin = m_maxRadius;
357 
358  int cursize = stepinfo->size();
359 
360 
361  while (cursize > 1) {
362  distMap::iterator iter = distances.begin();
363  while ( !( (*iter).second.h1->valid() && (*iter).second.h2->valid() ) ) {
364  distances.erase(iter++); //find the first (i.e. closest) valid pair of hits, removing invalid
365  }
366 
367  if ((*iter).first > rmin ) break; //if the closest already far enough - stop
368 
369  ShowerLib::StepInfo* mergedHit = (*iter).second.merge(); //merge two closest hits
370 
371  for (ShowerLib::StepInfoList::iterator i_h1(stepinfo->begin()); i_h1 != stepinfo->end(); ++i_h1) {
372  if ((*i_h1)->valid()){ //only for valid hits
373  distances.insert(distMap::value_type((*i_h1)->diff2(*mergedHit),Dist(*i_h1, mergedHit))); //calculate and store distances
374  }
375  }
376 
377  stepinfo->push_back(mergedHit); //store the merged hit
378  cursize--; //merging == -1 valid hit
379  }
380 
381  // remove invalid
382  for (ShowerLib::StepInfoList::iterator i = stepinfo->begin(); i != stepinfo->end();) {
383  if ((*i)->valid()) {
384  ++i;
385  } else {
386  delete (*i);
387  i = stepinfo->erase(i);
388  }
389  }
390 
391 }

◆ copyStepInfo()

ShowerLib::StepInfoList * LArG4GenShowerLib::copyStepInfo ( const ShowerLib::StepInfoCollection stepinfo)
private

Definition at line 300 of file LArG4GenShowerLib.cxx.

301 {
303  ShowerLib::StepInfo *copy = nullptr;
304 
305  for (ShowerLib::StepInfoCollection::const_iterator iter = stepinfo->begin(); iter!=stepinfo->end(); ++iter) {
306  copy = new ShowerLib::StepInfo(*(*iter));
307  rez->push_back(copy);
308  }
309 
310  return rez;
311 }

◆ copyStepInfoZeroCleanup()

ShowerLib::StepInfoList * LArG4GenShowerLib::copyStepInfoZeroCleanup ( const ShowerLib::StepInfoCollection stepinfo)
private

Definition at line 313 of file LArG4GenShowerLib.cxx.

314 {
316 
317  const double dsame = 1.; // 1mm^2
318  ShowerLib::StepInfo *i1 = nullptr;
319  ShowerLib::StepInfo *i2 = nullptr;
320 
321  for (ShowerLib::StepInfoCollection::const_iterator i = stepinfo->begin(); i!=stepinfo->end(); ++i) {
322  if(i1 == nullptr) {
323  i1 = new ShowerLib::StepInfo(*(*i));
324  rez->push_back(i1);
325  }
326  else {
327  i2 = new ShowerLib::StepInfo(*(*i));
328  // if distance below cut off, combined and erase
329  if ( (i1)->diff2(*i2) < dsame) {
330  *i1 += *i2;
331  delete i2;
332  } else {
333  rez->push_back(i2);
334  i1 = i2;
335  }
336  }
337  }
338 
339  return rez;
340 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode LArG4GenShowerLib::execute ( )

Definition at line 144 of file LArG4GenShowerLib.cxx.

145 {
146  const ShowerLib::StepInfoCollection* eventStepsES = getStepInfo();
147 
148  auto theParticle = getParticleFromMC();
149  if (!theParticle) {
150  ATH_MSG_ERROR ( "Couldn't get truth particle" );
151  return StatusCode::FAILURE;
152  }
153 
154  m_stat_numshowers += 1;
155 
156  double fraction = eventStepsES->invalid_energy/theParticle->momentum().e();
157  if (fraction > m_energyFraction) {
158  ATH_MSG_WARNING ( "Shower deposited too much energy outside the calorimeter region (" << (int)(fraction*100) << "%), ignoring" );
159  m_stat_invalid += 1;
160  return StatusCode::SUCCESS;
161  }
162  //otherwise shower is valid. even if it ultimately wont go to any library
163  m_stat_valid += 1;
164 
165  ShowerLib::StepInfoList* eventSteps;
166 
167  if (eventStepsES->size()>500) {
168  eventSteps = copyStepInfoZeroCleanup(eventStepsES);
169  } else {
170  eventSteps = copyStepInfo(eventStepsES);
171  }
172 
173  double etot = 0.;
174  for (ShowerLib::StepInfoList::const_iterator iter = eventSteps->begin();iter != eventSteps->end();++iter) {
175  etot += (*iter)->dep();
176  }
177 
178  std::stringstream location;
179 
180  location << eventStepsES->detector << "/" << theParticle->pdg_id();
181 
182  if (m_libraries.find(location.str()) == m_libraries.end()) {
183  ATH_MSG_WARNING ( "No library structure for " << location.str() );
184 
185  for (ShowerLib::StepInfoList::iterator i(eventSteps->begin());i != eventSteps->end(); ++i) {
186  delete (*i);
187  }
188  delete eventSteps;
189  m_stat_nolib += 1;
190  return StatusCode::SUCCESS; //not really an error, just lost time
191  }
192 
193  Hep3Vector origin(theParticle->production_vertex()->position().x(),
194  theParticle->production_vertex()->position().y(),
195  theParticle->production_vertex()->position().z());
196 
197  // Also save direction vector. By default shower lib is created in
198  // the direction of the input particle.
199  Hep3Vector DirectionShower(theParticle->momentum().px(),
200  theParticle->momentum().py(),
201  theParticle->momentum().pz());
202  DirectionShower /= DirectionShower.mag();
203  Hep3Vector OrthoShower = DirectionShower.orthogonal();
204  OrthoShower /= OrthoShower.mag();
205  Hep3Vector CrossShower = DirectionShower.cross(OrthoShower);
206  CrossShower /= CrossShower.mag();
207 
208  // Rotate the hit such that Z direction is along the shower direction
209  for (ShowerLib::StepInfoList::iterator i(eventSteps->begin()); i != eventSteps->end(); ++i) {
210  Hep3Vector HitDir = (*i)->position() - origin;
211 
212  (*i)->setX(HitDir*OrthoShower);
213  (*i)->setY(HitDir*CrossShower);
214  (*i)->setZ(HitDir*DirectionShower);
215  }
216 
217  ATH_MSG_VERBOSE ( "Size of input shower: " << eventSteps->size() );
218 
219  clusterize(eventSteps);
220 
221  ATH_MSG_VERBOSE ( "Size after clusterization: " << eventSteps->size() );
222 
223  if (eventSteps->size() > 10) {
224  truncate(eventSteps);
225  ATH_MSG_VERBOSE ( "Size after truncation: " << eventSteps->size() );
226  }
227 
228  double maxZ = 0, maxR = 0;
229  double edep = 0.;
230 
231  double containmentEnergy = m_containmentEnergy * etot;
232 
233  // sort the hits by R, make the border where 95% is deposited
234  eventSteps->sort(stepInfoDistCompare(stepInfoDistCompare::R));
235  ShowerLib::StepInfoList::const_iterator iter = eventSteps->begin();
236  for (;(iter != eventSteps->end()) && (edep < containmentEnergy);++iter) {
237  edep += (*iter)->dep();
238  maxR = (*iter)->position().r();
239  }
240 
241  edep = 0.;
242  // sort the hits by Z, make the border where 95% is deposited
243  eventSteps->sort(stepInfoDistCompare(stepInfoDistCompare::Z));
244  iter = eventSteps->begin();
245  for (;(iter != eventSteps->end()) && (edep < containmentEnergy);++iter) {
246  edep += (*iter)->dep();
247  maxZ = (*iter)->position().z();
248  }
249 
250  ShowerLib::Shower* shower = new ShowerLib::Shower();
251  shower->setZSize(maxZ);
252  shower->setRSize(maxR);
253 
254  for (ShowerLib::StepInfoList::iterator i(eventSteps->begin());i != eventSteps->end(); ++i) {
255 
256  shower->push_back(new ShowerLib::ShowerEnergySpot(G4ThreeVector((*i)->x(), (*i)->y(), (*i)->z()),(*i)->dep(),(*i)->time()));
257 
258  delete (*i);
259  }
260 
261  delete eventSteps;
262 
263  if ((*m_libraries.find(location.str())).second->storeShower(theParticle, shower)) {
264  m_stat_lib_saved[(*m_libraries.find(location.str())).second] += 1;
265  } else {
266  ATH_MSG_WARNING ( "Wasn't able to store shower (" << location.str() << ")" );
267  m_stat_lib_notsaved[(*m_libraries.find(location.str())).second] += 1;
268  }
269 
270  ATH_MSG_VERBOSE ( "Successfully finished" );
271 
272  return StatusCode::SUCCESS;
273 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode LArG4GenShowerLib::finalize ( )

Definition at line 466 of file LArG4GenShowerLib.cxx.

467 {
468 
469  // add condition tags
471 
472  libMap::iterator itr;
473  for (itr = m_libraries_by_filename.begin();itr != m_libraries_by_filename.end();++itr){
474  ATH_MSG_DEBUG ( "Writing shower library to file " << (*itr).first );
475 
476  TFile libr((*itr).first.c_str(),"RECREATE");
477 
478  if (!(*itr).second->writeToROOT(&libr)) {
479  ATH_MSG_ERROR ( "Wasn't able to write " << (*itr).first << ". Probably empty lib." );
480  }
481 
482  libr.Close();
483  }
484  if (m_stat_numshowers> 0) {
485  ATH_MSG_INFO ( "********Statistics for GenShowerLib********" );
486  ATH_MSG_INFO ( "Total number of showers: " << m_stat_numshowers
487  << ", valid: "<< m_stat_valid << " (" << (m_stat_valid*100)/m_stat_numshowers << "%)"
488  << ", invalid: " << m_stat_invalid << " (" << (m_stat_invalid*100)/m_stat_numshowers << "%)" );
489  for (itr = m_libraries.begin();itr != m_libraries.end();++itr){
490  ATH_MSG_INFO ( "*******************************************" );
491  std::stringstream ss((*itr).second->statistics());
492  for(std::string line; std::getline(ss,line);)
493  ATH_MSG_INFO ( line );
494  ATH_MSG_INFO ( "Saved: " << m_stat_lib_saved[(*itr).second] << " Rejected: " << m_stat_lib_notsaved[(*itr).second] );
495  }
496  ATH_MSG_INFO ( "*******************************************" );
497  ATH_MSG_INFO ( "Showers with no corresponding library: " << m_stat_nolib << " (" << (m_stat_nolib*100)/m_stat_numshowers << "%)" );
498  }
499  ATH_MSG_INFO ( "Finalized." );
500 
501  return StatusCode::SUCCESS;
502 }

◆ getParticleFromMC()

HepMC::ConstGenParticlePtr LArG4GenShowerLib::getParticleFromMC ( )
private

return first MC truth particle for event

Definition at line 275 of file LArG4GenShowerLib.cxx.

276 {
277  const McEventCollection* mcEvent;
278  if (evtStore()->retrieve(mcEvent,"GEN_EVENT").isFailure()) return nullptr;
279 
280  // Return the last particle of the event.
281  if (mcEvent)
282 #ifdef HEPMC3
283  return !mcEvent->at(0)->particles().empty() ? mcEvent->at(0)->particles().back() : nullptr;
284 #else
285  return ( * (* mcEvent->begin())->particles_end());
286 #endif
287 
288  return nullptr;
289 }

◆ getStepInfo()

const ShowerLib::StepInfoCollection * LArG4GenShowerLib::getStepInfo ( )
private

Definition at line 291 of file LArG4GenShowerLib.cxx.

292 {
293  const ShowerLib::StepInfoCollection* eventStepsES;
294  if (evtStore()->retrieve(eventStepsES, "EventSteps").isFailure()) return nullptr;
295 
296  return eventStepsES;
297 
298 }

◆ initialize()

StatusCode LArG4GenShowerLib::initialize ( )

Definition at line 103 of file LArG4GenShowerLib.cxx.

104 {
105  ATH_MSG_INFO ( "Initializing" );
106 
107  ShowerLib::IShowerLib* library = nullptr;
108 
109  std::vector< std::string >::const_iterator nameiter;
110 
111  ATH_MSG_DEBUG ( "Starting struct files iteration" );
112  for (nameiter = m_lib_struct_files.value().begin(); nameiter != m_lib_struct_files.value().end(); ++nameiter ) {
113 
114  ATH_MSG_DEBUG ( "Struct file: " << (*nameiter) );
115 
116  library = ShowerLib::iterateStruct(*nameiter);
117 
118  if (library == nullptr) {
119  ATH_MSG_WARNING ( "Library structure file " << (*nameiter) << " doesn't describe a valid library" );
120  continue;
121  }
122 
123  std::stringstream location;
124  location << library->detector() << "/" << library->particle_id();
125  m_libraries[location.str()] = library;
126  m_libraries_by_filename[(*nameiter)+".root"] = library;
127  m_stat_lib_saved[library]=0;
128  m_stat_lib_notsaved[library]=0;
129 
130  ATH_MSG_VERBOSE ( "Library named " << (*nameiter)+".root" << "is stored at the location " << location.str() );
131 
132  }
133 
134  if (m_libraries.empty()) {
135  ATH_MSG_ERROR ( "No valid library structure files found. Further execution is pointless." );
136  return StatusCode::FAILURE;
137  }
138 
139  ATH_MSG_INFO ( "LArG4GenShowerLib " << this->name() << " initialized" );
140 
141  return StatusCode::SUCCESS;
142 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ truncate()

void LArG4GenShowerLib::truncate ( ShowerLib::StepInfoList stepinfo)
private

Definition at line 393 of file LArG4GenShowerLib.cxx.

394 {
395  double etot = 0;
397 
398  for (ShowerLib::StepInfoList::const_iterator i(stepinfo->begin()); i != stepinfo->end(); ++i) {
399  etot += (*i)->dep();
400  }
401 
402  double minEnergy = m_minEnergy * etot;
403  double rsum = 0.;
405  //we're continuing our cycle if (we're not at the end yet) && ( (the current hit is still inside maxDistance radius) || (the total energy still less then the threshold) )
406  for (iterCut = stepinfo->begin(); (iterCut != stepinfo->end()) && (((*iterCut)->position().mag2() < m_maxDistance) || (rsum < minEnergy));++iterCut) {
407  rsum += (*iterCut)->dep();
408  }
409 
410  if (iterCut == stepinfo->end()) {
411  return;
412  }
413 
414  stepinfo->erase(iterCut,stepinfo->end());
415 
416  if (rsum == 0) { //WTF?
417  return;
418  }
419 
420  const double inv_rsum = 1. / rsum;
421  for (iterCut = stepinfo->begin(); iterCut != stepinfo->end(); ++iterCut){
422  (*iterCut)->setE((*iterCut)->dep() * etot*inv_rsum);
423  }
424 
425 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_containmentEnergy

DoubleProperty LArG4GenShowerLib::m_containmentEnergy
private

property, see LArG4GenShowerLib::LArG4GenShowerLib

Definition at line 75 of file LArG4GenShowerLib.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_energyFraction

DoubleProperty LArG4GenShowerLib::m_energyFraction
private

property, see LArG4GenShowerLib::LArG4GenShowerLib

Definition at line 76 of file LArG4GenShowerLib.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_lib_struct_files

StringArrayProperty LArG4GenShowerLib::m_lib_struct_files
private

Definition at line 78 of file LArG4GenShowerLib.h.

◆ m_libraries

libMap LArG4GenShowerLib::m_libraries
private

pointer to shower library

Definition at line 81 of file LArG4GenShowerLib.h.

◆ m_libraries_by_filename

libMap LArG4GenShowerLib::m_libraries_by_filename
private

Definition at line 82 of file LArG4GenShowerLib.h.

◆ m_maxDistance

DoubleProperty LArG4GenShowerLib::m_maxDistance
private

property, see LArG4GenShowerLib::LArG4GenShowerLib

Definition at line 72 of file LArG4GenShowerLib.h.

◆ m_maxRadius

DoubleProperty LArG4GenShowerLib::m_maxRadius
private

property, see LArG4GenShowerLib::LArG4GenShowerLib

Definition at line 73 of file LArG4GenShowerLib.h.

◆ m_minEnergy

DoubleProperty LArG4GenShowerLib::m_minEnergy
private

property, see LArG4GenShowerLib::LArG4GenShowerLib

Definition at line 74 of file LArG4GenShowerLib.h.

◆ m_physicslist_name

std::string LArG4GenShowerLib::m_physicslist_name
private

Definition at line 92 of file LArG4GenShowerLib.h.

◆ m_stat_invalid

int LArG4GenShowerLib::m_stat_invalid
private

Definition at line 86 of file LArG4GenShowerLib.h.

◆ m_stat_lib_notsaved

std::map<ShowerLib::IShowerLib*, int> LArG4GenShowerLib::m_stat_lib_notsaved
private

Definition at line 90 of file LArG4GenShowerLib.h.

◆ m_stat_lib_saved

std::map<ShowerLib::IShowerLib*, int> LArG4GenShowerLib::m_stat_lib_saved
private

Definition at line 89 of file LArG4GenShowerLib.h.

◆ m_stat_nolib

int LArG4GenShowerLib::m_stat_nolib
private

Definition at line 87 of file LArG4GenShowerLib.h.

◆ m_stat_numshowers

int LArG4GenShowerLib::m_stat_numshowers
private

Definition at line 84 of file LArG4GenShowerLib.h.

◆ m_stat_valid

int LArG4GenShowerLib::m_stat_valid
private

Definition at line 85 of file LArG4GenShowerLib.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
ShowerLib::Shower::setZSize
void setZSize(const float zsize)
Definition: Shower.h:64
LArG4GenShowerLib::truncate
void truncate(ShowerLib::StepInfoList *stepinfo)
Definition: LArG4GenShowerLib.cxx:393
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
checkFileSG.line
line
Definition: checkFileSG.py:75
Dist
Definition: LArG4GenShowerLib.cxx:45
LArG4GenShowerLib::m_energyFraction
DoubleProperty m_energyFraction
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition: LArG4GenShowerLib.h:76
ShowerLib::StepInfoCollection::detector
char detector[10]
Definition: StepInfoCollection.h:38
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
ShowerLib::Shower
Class for shower library shower.
Definition: Shower.h:36
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
LArG4GenShowerLib::m_stat_lib_notsaved
std::map< ShowerLib::IShowerLib *, int > m_stat_lib_notsaved
Definition: LArG4GenShowerLib.h:90
ShowerLib::IShowerLib::detector
virtual const std::string detector() const
get detector tag
Definition: IShowerLib.h:121
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
ShowerLib::StepInfoList
std::list< StepInfo * > StepInfoList
Definition: LArG4GenShowerLib.h:22
ShowerLib::ShowerEnergySpot
Definition: ShowerEnergySpot.h:13
LArG4GenShowerLib::getStepInfo
const ShowerLib::StepInfoCollection * getStepInfo()
Definition: LArG4GenShowerLib.cxx:291
LArG4GenShowerLib::m_libraries
libMap m_libraries
pointer to shower library
Definition: LArG4GenShowerLib.h:81
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
LArG4GenShowerLib::m_maxRadius
DoubleProperty m_maxRadius
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition: LArG4GenShowerLib.h:73
ShowerLib::StepInfoCollection
Class for collection of StepInfo class (G4 hits)
Definition: StepInfoCollection.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
LArG4GenShowerLib::copyStepInfo
ShowerLib::StepInfoList * copyStepInfo(const ShowerLib::StepInfoCollection *stepinfo)
Definition: LArG4GenShowerLib.cxx:300
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
LArG4GenShowerLib::copyStepInfoZeroCleanup
ShowerLib::StepInfoList * copyStepInfoZeroCleanup(const ShowerLib::StepInfoCollection *stepinfo)
Definition: LArG4GenShowerLib.cxx:313
LArG4GenShowerLib::m_maxDistance
DoubleProperty m_maxDistance
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition: LArG4GenShowerLib.h:72
ShowerLib::IShowerLib::particle_id
virtual int particle_id() const
get particle tag
Definition: IShowerLib.h:124
LArG4GenShowerLib::m_lib_struct_files
StringArrayProperty m_lib_struct_files
Definition: LArG4GenShowerLib.h:78
LArG4GenShowerLib::m_stat_invalid
int m_stat_invalid
Definition: LArG4GenShowerLib.h:86
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArG4GenShowerLib::m_stat_numshowers
int m_stat_numshowers
Definition: LArG4GenShowerLib.h:84
LArG4GenShowerLib::m_physicslist_name
std::string m_physicslist_name
Definition: LArG4GenShowerLib.h:92
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
ShowerLib::iterateStruct
IShowerLib * iterateStruct(const std::string &fname)
Definition: ShowerLibList.cxx:67
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
stepInfoDistCompare::Z
@ Z
Definition: LArG4GenShowerLib.cxx:61
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArG4GenShowerLib::m_stat_valid
int m_stat_valid
Definition: LArG4GenShowerLib.h:85
LArG4GenShowerLib::addingTagsToLibrary
void addingTagsToLibrary()
adding tag information (release, detector description, ...) to library comment
Definition: LArG4GenShowerLib.cxx:427
LArG4GenShowerLib::m_stat_nolib
int m_stat_nolib
Definition: LArG4GenShowerLib.h:87
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
python.sizes.location
string location
Definition: sizes.py:11
ShowerLib::IShowerLib
Class for shower library shower lib interface.
Definition: IShowerLib.h:40
LArG4GenShowerLib::clusterize
void clusterize(ShowerLib::StepInfoList *stepinfo)
Definition: LArG4GenShowerLib.cxx:342
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
ShowerLib::StepInfoCollection::invalid_energy
float invalid_energy
Definition: StepInfoCollection.h:39
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
LArG4GenShowerLib::m_minEnergy
DoubleProperty m_minEnergy
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition: LArG4GenShowerLib.h:74
stepInfoDistCompare::R
@ R
Definition: LArG4GenShowerLib.cxx:61
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArG4GenShowerLib::m_libraries_by_filename
libMap m_libraries_by_filename
Definition: LArG4GenShowerLib.h:82
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
LArG4GenShowerLib::getParticleFromMC
HepMC::ConstGenParticlePtr getParticleFromMC()
return first MC truth particle for event
Definition: LArG4GenShowerLib.cxx:275
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
stepInfoDistCompare
Definition: LArG4GenShowerLib.cxx:59
LArG4GenShowerLib::m_containmentEnergy
DoubleProperty m_containmentEnergy
property, see LArG4GenShowerLib::LArG4GenShowerLib
Definition: LArG4GenShowerLib.h:75
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
a
TList * a
Definition: liststreamerinfos.cxx:10
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ShowerLib::Shower::setRSize
void setRSize(const float rsize)
Definition: Shower.h:65
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
calibdata.copy
bool copy
Definition: calibdata.py:27
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
stepInfoDistCompare::RHO
@ RHO
Definition: LArG4GenShowerLib.cxx:61
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LArG4GenShowerLib::m_stat_lib_saved
std::map< ShowerLib::IShowerLib *, int > m_stat_lib_saved
Definition: LArG4GenShowerLib.h:89
ShowerLib::StepInfo
Class to collect information about G4 steps.
Definition: StepInfo.h:35
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
fitman.k
k
Definition: fitman.py:528
ServiceHandle< IGeoModelSvc >