ATLAS Offline Software
Public Types | Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
ISF::DNNCaloSimSvc Class Referencefinal

#include <DNNCaloSimSvc.h>

Inheritance diagram for ISF::DNNCaloSimSvc:
Collaboration diagram for ISF::DNNCaloSimSvc:

Public Types

typedef std::map< std::string, std::map< std::string, double > > NetworkInputs
 
typedef std::map< std::string, double > NetworkOutputs
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Public Member Functions

 DNNCaloSimSvc (const std::string &name, ISvcLocator *pSvcLocator)
 Constructor with parameters. More...
 
virtual ~DNNCaloSimSvc () final
 Destructor. More...
 
virtual StatusCode initialize () override final
 Athena algorithm's interface methods. More...
 
virtual StatusCode finalize () override final
 framework methods More...
 
StatusCode initializeNetwork ()
 helper for initialize More...
 
virtual StatusCode simulate (ISFParticle &isp, McEventCollection *) override final
 Simulation Call. More...
 
StatusCode fillNetworkInputs (const ISF::ISFParticle &isfp, NetworkInputs &inputs, double &trueEnergy)
 
StatusCode fillWindowCells (const double etaExtrap, const double phiExtrap, const CaloDetDescrElement *&impactCellDDE)
 
virtual StatusCode setupEvent () override final
 Setup Event chain - in case of a begin-of event action is needed. More...
 
virtual StatusCode releaseEvent () override final
 Release Event chain - in case of an end-of event action is needed. More...
 
virtual StatusCode sysInitialize () override
 Gaudi sysInitialize() methods. More...
 
std::string & simSvcDescriptor () override
 Return the simulation service descriptor. More...
 
virtual StatusCode setParticleBroker (IParticleBroker *broker) override
 Inform the SimulationSvc about the ParticleBroker svc. More...
 
virtual StatusCode simulateVector (const ISFParticleVector &particles, McEventCollection *mcEventCollection, McEventCollection *) override
 Simulation call for vectors of particles. More...
 
const ChronoEntity * chronoStart (const IChronoSvc::ChronoTag &tag)
 wrapper call to start chrono with given tag More...
 
const ChronoEntity * chronoStop (const IChronoSvc::ChronoTag &tag)
 wrapper call to stop chrono with given tag More...
 
const StoreGateSvc_tevtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
StoreGateSvc_tevtStore ()
 
const StoreGateSvc_tdetStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
StoreGateSvc_tdetStore ()
 
template<class T >
StatusCode retrieveTool (ToolHandle< T > &thandle)
 templated Tool retrieval - gives unique handling & look and feel More...
 
template<class T >
StatusCode retrieveTools (ToolHandleArray< T > &thandleArray)
 templated Tool retrieval - gives unique handling & look and feel More...
 
template<class T >
StatusCode recordCollection (T *&coll, const std::string &collName) const
 templated record collection method, will create a new one if not existing More...
 
template<class T >
StatusCode retrieveCollection (T *&coll, const std::string &collName, bool forceBreak=true) const
 templated retrieve collection method, boolean steers that force break More...
 

Public Attributes

std::string m_paramsFilename
 
std::string m_paramsInputArchitecture
 
std::unique_ptr< lwt::LightweightGraph > m_graph
 
ToolHandleArray< ICaloCellMakerToolm_caloCellMakerToolsSetup
 
ToolHandleArray< ICaloCellMakerToolm_caloCellMakerToolsRelease
 
ToolHandle< IFastCaloSimCaloExtrapolationm_FastCaloSimCaloExtrapolation
 
ToolHandle< Trk::ITimedExtrapolatorm_extrapolator
 
CaloCellContainerm_theContainer
 
ServiceHandle< IAtRndmGenSvcm_rndGenSvc
 
CLHEP::HepRandomEngine * m_randomEngine
 
std::string m_randomEngineName
 
const CaloDetDescrManagerm_caloDetDescrManager
 
std::unique_ptr< CaloGeometryFromCaloDDMm_caloGeo
 
const LArEM_IDm_emID = nullptr
 
std::vector< CaloCell * > m_windowCells
 
int m_GANLatentSize = 0
 
double m_logTrueEnergyMean = 0.
 
double m_logTrueEnergyScale = 0.
 
double m_riImpactEtaMean = 0.
 
double m_riImpactEtaScale = 0.
 
double m_riImpactPhiMean = 0.
 
double m_riImpactPhiScale = 0.
 
const int m_numberOfCellsForDNN = 266
 
const double m_middleCellWidthEta = 0.025
 
const double m_middleCellWidthPhi = CLHEP::pi / std::pow(2,7)
 
const double m_etaRawMiddleCut = m_middleCellWidthEta * 3.5
 
const double m_etaRawBackCut = m_middleCellWidthEta * 4.
 
const double m_phiRawMiddleCut = m_middleCellWidthPhi * 3.5
 
const double m_phiRawStripCut = m_middleCellWidthPhi * 6.0
 
std::string m_caloCellsOutputName
 

Protected Attributes

std::string m_simDescr {""}
 The simulator service descriptor. More...
 
std::string m_screenOutputPrefix {"isf >> "}
 Screen output refinement - can be changed by declareProperty() More...
 
std::string m_chronoSvcName {"ChronoStatSvc"}
 Name of the timing service - can be set by declareProperty() More...
 
IChronoStatSvc * m_chrono {}
 The timing service for general usage. More...
 
IParticleBrokerm_particleBroker {}
 The particle service used to push particles into the simulation. More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 

Detailed Description

Author
Aishik.Ghosh -at- cern.ch, David Rousseau -at- cern.ch,

Definition at line 56 of file DNNCaloSimSvc.h.

Member Typedef Documentation

◆ NetworkInputs

typedef std::map<std::string, std::map<std::string, double> > ISF::DNNCaloSimSvc::NetworkInputs

Definition at line 75 of file DNNCaloSimSvc.h.

◆ NetworkOutputs

typedef std::map<std::string, double> ISF::DNNCaloSimSvc::NetworkOutputs

Definition at line 76 of file DNNCaloSimSvc.h.

◆ StoreGateSvc_t

Definition at line 135 of file BaseSimulationSvc.h.

Constructor & Destructor Documentation

◆ DNNCaloSimSvc()

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

Constructor with parameters.

Constructor.

Definition at line 55 of file DNNCaloSimSvc.cxx.

55  :
57  m_graph(nullptr),
58  m_theContainer(nullptr),
59  m_rndGenSvc("AtRndmGenSvc", name),
60  m_randomEngine(nullptr),
61  m_caloDetDescrManager(nullptr),
62  m_caloGeo(nullptr)
63 {
64  declareProperty("ParamsInputFilename" , m_paramsFilename="DNNCaloSim/DNNCaloSim_GAN_nn_v0.json"," lwtnn json output describing the trained network");
65  declareProperty("ParamsInputArchitecture" , m_paramsInputArchitecture="GANv0","tag describing additional parameters necessary for the network");
66  declareProperty("CaloCellsOutputName" , m_caloCellsOutputName) ;
67  declareProperty("CaloCellMakerTools_setup" , m_caloCellMakerToolsSetup) ;
68  declareProperty("CaloCellMakerTools_release" , m_caloCellMakerToolsRelease) ;
69  declareProperty("RandomSvc" , m_rndGenSvc );
70  declareProperty("RandomStream" , m_randomEngineName );
71  declareProperty("FastCaloSimCaloExtrapolation" , m_FastCaloSimCaloExtrapolation );
72 
73 }

◆ ~DNNCaloSimSvc()

ISF::DNNCaloSimSvc::~DNNCaloSimSvc ( )
finalvirtualdefault

Destructor.

Member Function Documentation

◆ chronoStart()

const ChronoEntity* ISF::BaseSimulationSvc::chronoStart ( const IChronoSvc::ChronoTag &  tag)
inlineinherited

wrapper call to start chrono with given tag

Definition at line 124 of file BaseSimulationSvc.h.

124  {
125  if (m_chrono) return m_chrono->chronoStart( tag);
126  return nullptr;
127  }

◆ chronoStop()

const ChronoEntity* ISF::BaseSimulationSvc::chronoStop ( const IChronoSvc::ChronoTag &  tag)
inlineinherited

wrapper call to stop chrono with given tag

Definition at line 130 of file BaseSimulationSvc.h.

130  {
131  if (m_chrono) return m_chrono->chronoStop( tag);
132  return nullptr;
133  }

◆ detStore() [1/2]

StoreGateSvc_t& ISF::BaseSimulationSvc::detStore ( )
inlineinherited

Definition at line 147 of file BaseSimulationSvc.h.

147 {return m_detStore;};

◆ detStore() [2/2]

const StoreGateSvc_t& ISF::BaseSimulationSvc::detStore ( ) const
inlineinherited

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

Definition at line 146 of file BaseSimulationSvc.h.

146 {return m_detStore;};

◆ evtStore() [1/2]

StoreGateSvc_t& ISF::BaseSimulationSvc::evtStore ( )
inlineinherited

Definition at line 141 of file BaseSimulationSvc.h.

141 {return m_evtStore;};

◆ evtStore() [2/2]

const StoreGateSvc_t& ISF::BaseSimulationSvc::evtStore ( ) const
inlineinherited

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

Definition at line 140 of file BaseSimulationSvc.h.

140 {return m_evtStore;};

◆ fillNetworkInputs()

StatusCode ISF::DNNCaloSimSvc::fillNetworkInputs ( const ISF::ISFParticle isfp,
NetworkInputs inputs,
double &  trueEnergy 
)

Definition at line 381 of file DNNCaloSimSvc.cxx.

382 {
383  Amg::Vector3D particle_position = isfp.position();
384  Amg::Vector3D particle_direction(isfp.momentum().x(),isfp.momentum().y(),isfp.momentum().z());
385 
386 
387  TFCSTruthState truth(isfp.momentum().x(),isfp.momentum().y(),isfp.momentum().z(),sqrt(isfp.momentum().mag2()+pow(isfp.mass(),2)),isfp.pdgCode());
388  truth.set_vertex(particle_position[Amg::x], particle_position[Amg::y], particle_position[Amg::z]);
389 
390  trueEnergy = isfp.ekin();
391 
392 
394  //FIXME this is extrapolating to many layers, when we only need middle layer middle surface
395  //FIXME could have dedicated extrapolation to save time
396  m_FastCaloSimCaloExtrapolation->extrapolate(extrapol,&truth);
397  // extrapol.Print();
398 
399 
400  if (false)
401  {
402  for (int isam=0; isam< CaloCell_ID_FCS::MaxSample ; isam++){
403  //enum SUBPOS { SUBPOS_MID = 0, SUBPOS_ENT = 1, SUBPOS_EXT = 2}; //MID=middle, ENT=entrance, EXT=exit of cal layer
404 
405  for (int isubpos=0; isubpos< 3 ; isubpos++){
406 
407  ATH_MSG_VERBOSE("EXTRAPO isam=" << isam <<
408  " isubpos=" << isubpos <<
409  " OK=" << extrapol.OK(isam,isubpos) <<
410  " eta=" << extrapol.eta(isam,isubpos) <<
411  " phi=" << extrapol.phi(isam,isubpos) <<
412  " r=" << extrapol.r(isam,isubpos) );
413 
414  }
415  }
416  }
417 
418  //FIXME deal with endcap as well
419  int isam=CaloCell_ID_FCS::EMB2;
420  int isubpos=SUBPOS_ENT;
421  double etaExtrap=-999.;
422  double phiExtrap=-999.;
423  if (extrapol.eta(isam,isubpos)) {
424  etaExtrap=extrapol.eta(isam,isubpos);
425  phiExtrap=extrapol.phi(isam,isubpos);
426  }
427 
428  ATH_MSG_VERBOSE("Will use isam=" << isam <<
429  " isubpos=" << isubpos <<
430  " eta=" << etaExtrap <<
431  " phi=" << phiExtrap );
432 
433 
434 
435  // fill vector of cells, and DDE of middle cell
436  const CaloDetDescrElement * impactCellDDE;
437  if (fillWindowCells(etaExtrap,phiExtrap,impactCellDDE).isFailure()){
438  ATH_MSG_WARNING("Could not build window cells vector ");
439  return StatusCode::FAILURE;
440  }
441 
442 
443  // start neural network part
444  // fill a map of input nodes
445  // this is for GAN
446  // most likely it should be specialised as a function of m_ParamsInputArchitecture
447 
448  double randGaussz = 0.;
449 
450 
451  int impactEtaIndex = m_emID->eta(impactCellDDE->identify());
452  int impactPhiIndex = m_emID->phi(impactCellDDE->identify());
453  double etaRawImpactCell=impactCellDDE->eta_raw();
454  double phiRawImpactCell=impactCellDDE->phi_raw();
455 
456  ATH_MSG_VERBOSE("impact eta_index " << impactEtaIndex
457  << " phi_index " << impactPhiIndex
458  << " sampling " << m_emID->sampling(impactCellDDE->identify()));
459 
460  int pconf = impactPhiIndex % 4 ;
461  int econf = (impactEtaIndex + 1) % 2 ; // ofset corresponds to difference in index calculated for neural net preprocessing
462 
463  double riImpactEta = (etaExtrap - etaRawImpactCell);
464  // mirror for left half
465  if (etaExtrap < 0){
466  riImpactEta *= -1.;
467 
468  }
469  // scale & centre
470  riImpactEta = (riImpactEta - m_riImpactEtaMean)/m_riImpactEtaScale;
471  double riImpactPhi = (CaloPhiRange::diff(phiExtrap, phiRawImpactCell) - m_riImpactPhiMean)/m_riImpactPhiScale;
472 
473 
474  // fill randomize latent space
476 
477  //FIXME generate in one go
478  for (int i = 0; i< m_GANLatentSize; i ++)
479  {
480  randGaussz = CLHEP::RandGaussZiggurat::shoot(simulstate.randomEngine(), 0., 1.);
481  inputs["Z"].insert ( std::pair<std::string,double>(std::to_string(i), randGaussz) );
482 
483  }
484 
485  // fill preprocessed true energy
486  inputs["E_true"].insert ( std::pair<std::string,double>("0", (std::log(trueEnergy) - m_logTrueEnergyMean)/m_logTrueEnergyScale) );
487  // fill p,e configurations multi-hot vector
488  for (int i = 0; i< 4; i ++)
489  {
490  if (i == pconf){
491  inputs["pconfig"].insert ( std::pair<std::string,double>(std::to_string(i),1.) );
492  }
493  else{
494  inputs["pconfig"].insert ( std::pair<std::string,double>(std::to_string(i),0.) );
495  }
496  }
497  for (int i = 0; i< 2; i ++){
498  if (i == econf){
499  inputs["econfig"].insert ( std::pair<std::string,double>(std::to_string(i),1.) );
500  }
501  else{
502  inputs["econfig"].insert ( std::pair<std::string,double>(std::to_string(i),0.) );
503  }
504  }
505  // fill position of extrap particle in impact cell
506  inputs["ripos"].insert ( std::pair<std::string,double>("0", riImpactEta) );
507  inputs["ripos"].insert ( std::pair<std::string,double>("1", riImpactPhi ) );
508 
509  return StatusCode::SUCCESS;
510 }

◆ fillWindowCells()

StatusCode ISF::DNNCaloSimSvc::fillWindowCells ( const double  etaExtrap,
const double  phiExtrap,
const CaloDetDescrElement *&  impactCellDDE 
)

Definition at line 513 of file DNNCaloSimSvc.cxx.

513  {
514 
515  //now find the cell it corresponds to
516  //FIXME this is barrel should also look in endcap
517  // (note that is really looking up eta, phi, not raw eta phi
518  impactCellDDE=m_caloDetDescrManager->get_element(CaloCell_ID::EMB2,etaExtrap,phiExtrap);
519  if (impactCellDDE==nullptr){
520  ATH_MSG_WARNING("No cell found for this eta " << etaExtrap << " phi " << phiExtrap);
521  return StatusCode::FAILURE;
522  }
523 
524 
525 
526 
527  const int caloHashImpactCell=impactCellDDE->calo_hash();
528  const double etaImpactCell=impactCellDDE->eta();
529  const double phiImpactCell=impactCellDDE->phi();
530  const double etaRawImpactCell=impactCellDDE->eta_raw();
531  const double phiRawImpactCell=impactCellDDE->phi_raw();
532 
533 
534  ATH_MSG_VERBOSE("impact cell calohash=" << caloHashImpactCell <<
535  " eta=" << etaImpactCell <<
536  " phi=" << phiImpactCell <<
537  " eta raw=" << etaRawImpactCell <<
538  " phi raw=" << phiRawImpactCell );
539 
540 
541  int nSqCuts = 0;
542 
543 
544  // select the cells DNN will simulate
545  // note that m_theCellContainer has all the calorimeter cells
546  // this will hold the list of cells to simulate
547  //FIXME this can be sped up certainly
548  m_windowCells.clear();
549  CaloCell_ID::CaloSample sampling;
550  float eta_raw;
551  float phi_raw;
552  for(CaloCell* theCell : * m_theContainer) {
553  sampling = theCell->caloDDE()->getSampling();
554  eta_raw = theCell->caloDDE()->eta_raw();
555  phi_raw = theCell->caloDDE()->phi_raw();
556  if (( eta_raw < etaRawImpactCell + m_etaRawBackCut) && (eta_raw > etaRawImpactCell - m_etaRawBackCut)) {
557  if ((CaloPhiRange::diff(phi_raw, phiRawImpactCell) < m_phiRawStripCut ) && (CaloPhiRange::diff(phi_raw, phiRawImpactCell) > - m_phiRawStripCut) ) {
558 
559  }
560  else{
561  continue;
562  }
563  }
564  else{
565  continue;
566  }
567 
568  if ((sampling == 0) || (sampling == 1) ){
569  if ((eta_raw < etaRawImpactCell + m_etaRawMiddleCut) && (eta_raw > etaRawImpactCell - m_etaRawMiddleCut)) {
570  nSqCuts ++;
571  // add to vector
572  m_windowCells.push_back(theCell);
573 
574  }
575  }
576  else if(sampling == 2) {
577  if ((CaloPhiRange::diff(phi_raw , phiRawImpactCell) < m_phiRawMiddleCut) && (CaloPhiRange::diff(phi_raw, phiRawImpactCell) > - m_phiRawMiddleCut)) {
578  if ((eta_raw < etaRawImpactCell + m_etaRawMiddleCut) && (eta_raw > etaRawImpactCell - m_etaRawMiddleCut)) {
579  nSqCuts ++;
580  m_windowCells.push_back(theCell);
581  }
582  }
583  }
584 
585  else if(sampling == 3){
586  if ((CaloPhiRange::diff(phi_raw, phiRawImpactCell) < m_phiRawMiddleCut) && (CaloPhiRange::diff(phi_raw , phiRawImpactCell) > - m_phiRawMiddleCut )) {
587  nSqCuts ++;
588  m_windowCells.push_back(theCell);
589  }
590 
591  }
592  }
593 
594  if (nSqCuts != m_numberOfCellsForDNN){
595  ATH_MSG_WARNING("Total cells passing DNN selection is " << nSqCuts << " but should be " << m_numberOfCellsForDNN );
596  // bail out, but do not stop the job
597  return StatusCode::FAILURE;
598 
599  }
600 
601  //sort cells within the cluster like they are fed to DNN
602  if (etaRawImpactCell < 0){
604  }
605  else{
607  }
608 
609  return StatusCode::SUCCESS;
610 
611 }

◆ finalize()

StatusCode ISF::DNNCaloSimSvc::finalize ( )
finaloverridevirtual

framework methods

Definition at line 185 of file DNNCaloSimSvc.cxx.

186 {
187  ATH_MSG_INFO(m_screenOutputPrefix << "Finalizing ...");
188  return StatusCode::SUCCESS;
189 }

◆ initialize()

StatusCode ISF::DNNCaloSimSvc::initialize ( )
finaloverridevirtual

Athena algorithm's interface methods.

framework methods

Definition at line 79 of file DNNCaloSimSvc.cxx.

80 {
81 
82  ATH_MSG_INFO(m_screenOutputPrefix << "Initializing ...");
83 
84  ATH_CHECK(m_rndGenSvc.retrieve());
86  if(!m_randomEngine)
87  {
88  ATH_MSG_ERROR("Could not get random number engine from RandomNumberService. Abort.");
89  return StatusCode::FAILURE;
90  }
91 
92  m_caloDetDescrManager = detStore()->tryConstRetrieve<CaloDetDescrManager>(caloMgrStaticKey);
94  std::unique_ptr<CaloDetDescrManager> caloMgrPtr = buildCaloDetDescrNoAlign(serviceLocator()
96  ATH_CHECK(detStore()->record(std::move(caloMgrPtr), caloMgrStaticKey));
97  ATH_CHECK(detStore()->retrieve(m_caloDetDescrManager, caloMgrStaticKey));
98  }
99 
100  const FCALDetectorManager * fcalManager=nullptr;
101  ATH_CHECK(detStore()->retrieve(fcalManager));
102 
103  // cppcheck-suppress nullPointerRedundantCheck; false positive
104  const CaloIdManager* caloId_mgr = m_caloDetDescrManager->getCalo_Mgr();
105  m_emID = caloId_mgr->getEM_ID();
106 
107  m_caloGeo = std::make_unique<CaloGeometryFromCaloDDM>();
108  m_caloGeo->LoadGeometryFromCaloDDM(m_caloDetDescrManager);
109  if(!m_caloGeo->LoadFCalChannelMapFromFCalDDM(fcalManager) )ATH_MSG_FATAL("Found inconsistency between FCal_Channel map and GEO file. Please, check if they are configured properly.");
110 
111 
112  // initialize DNN
113  if (initializeNetwork().isFailure())
114  {
115  ATH_MSG_ERROR("Could not initialize network ");
116  return StatusCode::FAILURE;
117 
118  }
119 
120 
121  // Get FastCaloSimCaloExtrapolation
122  if(m_FastCaloSimCaloExtrapolation.retrieve().isFailure())
123  {
124  ATH_MSG_ERROR("FastCaloSimCaloExtrapolation not found ");
125  return StatusCode::FAILURE;
126  }
127 
129 
130 
131 
132  return StatusCode::SUCCESS;
133 }

◆ initializeNetwork()

StatusCode ISF::DNNCaloSimSvc::initializeNetwork ( )

helper for initialize

Definition at line 136 of file DNNCaloSimSvc.cxx.

137 {
138 
139 
140 
141  // get neural net JSON file as an std::istream object
143  if (inputFile.empty()){
144  ATH_MSG_ERROR("Could not find json file " << m_paramsFilename );
145  return StatusCode::FAILURE;
146  }
147 
148 
149 
150  ATH_MSG_INFO("Using json file " << inputFile );
151  std::ifstream input(inputFile);
152  // build the graph
153  m_graph=std::make_unique<lwt::LightweightGraph>(lwt::parse_json_graph(input) );
154  if (m_graph==nullptr){
155  ATH_MSG_ERROR("Could not create LightWeightGraph from " << m_paramsFilename );
156  return StatusCode::FAILURE;
157  }
158 
159 
160 
161  // initialize all necessary constants
162  // FIXME eventually all these could be stored in the .json file
163 
164  ATH_MSG_INFO("Using ParamsInputArchitecture: " << m_paramsInputArchitecture );
165  if (m_paramsInputArchitecture=="GANv0") // GAN then VAE etc...
166  {
167  m_GANLatentSize = 300;
168  m_logTrueEnergyMean = 9.70406053;
169  m_logTrueEnergyScale = 1.76099569;
170  m_riImpactEtaMean = 3.47603256e-05;
171  m_riImpactEtaScale = 0.00722316;
172  m_riImpactPhiMean = -5.42153684e-05;
173  m_riImpactPhiScale = 0.00708241;
174  }
175 
176  if (m_GANLatentSize==0){
177  ATH_MSG_ERROR("m_GANLatentSize uninitialized!.ParamsInputArchitecture= " << m_paramsInputArchitecture );
178  return StatusCode::FAILURE;
179  }
180 
181  return StatusCode::SUCCESS;
182 }

◆ recordCollection()

template<class T >
StatusCode ISF::BaseSimulationSvc::recordCollection ( T *&  coll,
const std::string &  collName 
) const
inlineinherited

templated record collection method, will create a new one if not existing

Definition at line 172 of file BaseSimulationSvc.h.

172  {
173  // create if necessary
174  coll = coll ? coll : new T;
175  // record
176  if (evtStore()->record( coll, collName).isFailure()){
177  ATH_MSG_FATAL( m_screenOutputPrefix << "Cannot record collection " << collName << ". Abort." );
178  return StatusCode::FAILURE;
179  } else
180  ATH_MSG_DEBUG(m_screenOutputPrefix << "Successfully recorded collection " << collName);
181  return StatusCode::SUCCESS;
182  }

◆ releaseEvent()

StatusCode ISF::DNNCaloSimSvc::releaseEvent ( )
finaloverridevirtual

Release Event chain - in case of an end-of event action is needed.

Reimplemented from ISF::BaseSimulationSvc.

Definition at line 256 of file DNNCaloSimSvc.cxx.

257 {
258  const EventContext& ctx = Gaudi::Hive::currentContext();
259  ATH_MSG_VERBOSE(m_screenOutputPrefix << "release Event");
260 
261  CHECK( m_caloCellMakerToolsRelease.retrieve() );
262 
263  //run release tools in a loop
266  for (; itrTool != endTool; ++itrTool)
267  {
268  ATH_MSG_VERBOSE( m_screenOutputPrefix << "Calling tool " << itrTool->name() );
269 
270  StatusCode sc = (*itrTool)->process(m_theContainer, ctx);
271 
272  if (sc.isFailure())
273  {
274  ATH_MSG_ERROR( m_screenOutputPrefix << "Error executing tool " << itrTool->name() );
275  }
276  }
277 
278  return StatusCode::SUCCESS;
279 
280 }

◆ retrieveCollection()

template<class T >
StatusCode ISF::BaseSimulationSvc::retrieveCollection ( T *&  coll,
const std::string &  collName,
bool  forceBreak = true 
) const
inlineinherited

templated retrieve collection method, boolean steers that force break

Definition at line 186 of file BaseSimulationSvc.h.

186  {
187  // check for existence in the soft case
188  if (!forceBreak && !evtStore()->contains<T>(collName)) {
189  coll = 0;
190  ATH_MSG_DEBUG(m_screenOutputPrefix << "Collection does not exists (not required). Ignore.");
191  return StatusCode::SUCCESS;
192  }
193  if ( evtStore()->retrieve(coll, collName).isFailure()){
194  ATH_MSG_FATAL( m_screenOutputPrefix << "Cannot retireve collection " << collName << ". Abort." );
195  return StatusCode::FAILURE;
196  } else
197  ATH_MSG_DEBUG(m_screenOutputPrefix << "Successfully retrieved collection " << collName);
198  return StatusCode::SUCCESS;
199  }

◆ retrieveTool()

template<class T >
StatusCode ISF::BaseSimulationSvc::retrieveTool ( ToolHandle< T > &  thandle)
inlineinherited

templated Tool retrieval - gives unique handling & look and feel

Definition at line 150 of file BaseSimulationSvc.h.

150  {
151  if (!thandle.empty() && thandle.retrieve().isFailure()){
152  ATH_MSG_FATAL( m_screenOutputPrefix << "Cannot retrieve " << thandle << ". Abort.");
153  return StatusCode::FAILURE;
154  } else
155  ATH_MSG_DEBUG(m_screenOutputPrefix << "Successfully retrieved " << thandle);
156  return StatusCode::SUCCESS;
157  }

◆ retrieveTools()

template<class T >
StatusCode ISF::BaseSimulationSvc::retrieveTools ( ToolHandleArray< T > &  thandleArray)
inlineinherited

templated Tool retrieval - gives unique handling & look and feel

Definition at line 161 of file BaseSimulationSvc.h.

161  {
162  if (!thandleArray.empty() && thandleArray.retrieve().isFailure()){
163  ATH_MSG_FATAL( m_screenOutputPrefix << "Cannot retrieve " << thandleArray << ". Abort.");
164  return StatusCode::FAILURE;
165  } else
166  ATH_MSG_DEBUG(m_screenOutputPrefix << "Successfully retrieved " << thandleArray);
167  return StatusCode::SUCCESS;
168  }

◆ setParticleBroker()

virtual StatusCode ISF::BaseSimulationSvc::setParticleBroker ( IParticleBroker broker)
inlineoverridevirtualinherited

Inform the SimulationSvc about the ParticleBroker svc.

Definition at line 97 of file BaseSimulationSvc.h.

97  {
98  m_particleBroker = broker;
99  return StatusCode::SUCCESS;
100  }

◆ setupEvent()

StatusCode ISF::DNNCaloSimSvc::setupEvent ( )
finaloverridevirtual

Setup Event chain - in case of a begin-of event action is needed.

Reimplemented from ISF::BaseSimulationSvc.

Definition at line 191 of file DNNCaloSimSvc.cxx.

192 {
193  const EventContext& ctx = Gaudi::Hive::currentContext();
194  ATH_MSG_INFO(m_screenOutputPrefix << "setupEvent NEW EVENT! ");
195 
197 
199  if (sc.isFailure())
200  {
201  ATH_MSG_FATAL( m_screenOutputPrefix << "cannot record CaloCellContainer " << m_caloCellsOutputName );
202  return StatusCode::FAILURE;
203  }
204 
205  //FIXME why retrieve every event ?
206  CHECK( m_caloCellMakerToolsSetup.retrieve() );
207  ATH_MSG_DEBUG( "Successfully retrieve CaloCellMakerTools: " << m_caloCellMakerToolsSetup );
210  for (; itrTool != endTool; ++itrTool)
211  {
212  std::string chronoName=this->name()+"_"+ itrTool->name();
213  if (m_chrono) m_chrono->chronoStart(chronoName);
214  StatusCode sc = (*itrTool)->process(m_theContainer, ctx);
215  if (m_chrono) {
216  m_chrono->chronoStop(chronoName);
217  ATH_MSG_DEBUG( m_screenOutputPrefix << "Chrono stop : delta " << m_chrono->chronoDelta (chronoName,IChronoStatSvc::USER) * CLHEP::microsecond / CLHEP::second << " second " );
218  }
219 
220  if (sc.isFailure())
221  {
222  ATH_MSG_ERROR( m_screenOutputPrefix << "Error executing tool " << itrTool->name() );
223  return StatusCode::FAILURE;
224  }
225  }
226 
227 
228  // FIXME just for debugging
229  // exercise window building
230  // should be false by default
231  // careful:if enabled change the random number sequence !
232  if (false){
233  TFCSSimulationState testsimulstate(m_randomEngine);
234  const CaloDetDescrElement * testImpactCellDDE;
235  const int ntrial=100;
236  ATH_MSG_INFO ("Trial window building on " << ntrial << " dummy eta phi " );
237  for (int i=0 ; i< ntrial ; i++){
238  const double eta = CLHEP::RandFlat::shoot(testsimulstate.randomEngine(), 0.2, 0.25);
239  const double phi = CLHEP::RandFlat::shoot(testsimulstate.randomEngine(), -CLHEP::pi , CLHEP::pi);
240 
241  //randomise eta, phi
242  if (fillWindowCells(eta,phi,testImpactCellDDE).isFailure()){
243  ATH_MSG_WARNING("Could not build trial window cells vector with eta " << eta << " phi " << phi);
244  }
245  }
246  ATH_MSG_INFO ("End of trial window building on " << ntrial << " dummy eta phi " );
247 
248  }
249 
250 
251 
252 
253  return StatusCode::SUCCESS;
254 }

◆ simSvcDescriptor()

std::string& ISF::BaseSimulationSvc::simSvcDescriptor ( )
inlineoverrideinherited

Return the simulation service descriptor.

Definition at line 86 of file BaseSimulationSvc.h.

86 { return m_simDescr; }

◆ simulate()

StatusCode ISF::DNNCaloSimSvc::simulate ( ISF::ISFParticle isfp,
McEventCollection  
)
finaloverridevirtual

Simulation Call.

Reimplemented from ISF::BaseSimulationSvc.

Definition at line 330 of file DNNCaloSimSvc.cxx.

331 {
332 
333  ATH_MSG_VERBOSE("NEW PARTICLE! DNNCaloSimSvc called with ISFParticle: " << isfp);
334 
335 
336  //Don't simulate particles with total energy below 10 MeV
337  if(isfp.ekin() < 10) {
338  ATH_MSG_VERBOSE("Skipping particle with Ekin: " << isfp.ekin() <<" MeV. Below the 10 MeV threshold.");
339  return StatusCode::SUCCESS;
340  }
341 
342 
343  //Compute all inputs to the network
345  double trueEnergy;
346  if (fillNetworkInputs(isfp,inputs,trueEnergy).isFailure()) {
347  ATH_MSG_WARNING("Could not initialize network ");
348  // bail out but do not stop the job
349  return StatusCode::SUCCESS;
350  }
351 
352 
353  // compute the network output values
354  ATH_MSG_VERBOSE("neural network input = "<<inputs);
355  NetworkOutputs outputs = m_graph->compute(inputs);
356  ATH_MSG_VERBOSE("neural network output = "<<outputs);
357 
358 
359  // add network output energy in the right place in the calorimeter
360  int itr = 0;
361  for ( auto & windowCell : m_windowCells) {
362  windowCell->addEnergy(trueEnergy * outputs[std::to_string(itr)]);
363  itr++;
364 
365  ATH_MSG_VERBOSE(" cell eta_raw " << windowCell->caloDDE()->eta_raw()
366  << " phi_raw " << windowCell->caloDDE()->phi_raw()
367  << " sampling " << windowCell->caloDDE()->getSampling()
368  << " energy " << windowCell->energy());
369  }
370 
371 
372 
373 
374 
375  return StatusCode::SUCCESS;
376 }

◆ simulateVector()

virtual StatusCode ISF::BaseSimulationSvc::simulateVector ( const ISFParticleVector particles,
McEventCollection mcEventCollection,
McEventCollection  
)
inlineoverridevirtualinherited

Simulation call for vectors of particles.

Reimplemented in iGeant4::Geant4SimSvc.

Definition at line 103 of file BaseSimulationSvc.h.

103  {
104  // this implementation is a wrapper in case the simulator does
105  // implement particle-vector input
106  bool success = true;
107  // simulate each particle individually
108  for (ISF::ISFParticle* part : particles) {
109  ATH_MSG_VERBOSE( m_screenOutputPrefix << "Starting simulation of particle: " << part );
110  if ( this->simulate(*part, mcEventCollection).isFailure()) {
111  ATH_MSG_WARNING("Simulation of particle failed!" << endmsg <<
112  " -> simulator: " << this->simSvcDescriptor() <<
113  " -> particle : " << *part );
114  success = false;
115  }
116  }
117  return ( success ) ? StatusCode::SUCCESS : StatusCode::FAILURE;
118  }

◆ sysInitialize()

virtual StatusCode ISF::BaseSimulationSvc::sysInitialize ( )
inlineoverridevirtualinherited

Gaudi sysInitialize() methods.

Definition at line 71 of file BaseSimulationSvc.h.

72  {
73  if ( AthService::sysInitialize().isFailure() ) {
74  ATH_MSG_FATAL( m_screenOutputPrefix << " Cannot initialize AthService! Abort.");
75  return StatusCode::FAILURE;
76  }
77  if ( serviceLocator()->service(m_chronoSvcName, m_chrono ).isFailure()){
78  ATH_MSG_FATAL( m_screenOutputPrefix << " Cannot retrieve ChronoStatSvc! Abort.");
79  return StatusCode::FAILURE;
80  }
81 
82  return StatusCode::SUCCESS;
83  }

Member Data Documentation

◆ m_caloCellMakerToolsRelease

ToolHandleArray<ICaloCellMakerTool> ISF::DNNCaloSimSvc::m_caloCellMakerToolsRelease

Definition at line 92 of file DNNCaloSimSvc.h.

◆ m_caloCellMakerToolsSetup

ToolHandleArray<ICaloCellMakerTool> ISF::DNNCaloSimSvc::m_caloCellMakerToolsSetup

Definition at line 91 of file DNNCaloSimSvc.h.

◆ m_caloCellsOutputName

std::string ISF::DNNCaloSimSvc::m_caloCellsOutputName

Definition at line 129 of file DNNCaloSimSvc.h.

◆ m_caloDetDescrManager

const CaloDetDescrManager* ISF::DNNCaloSimSvc::m_caloDetDescrManager

Definition at line 104 of file DNNCaloSimSvc.h.

◆ m_caloGeo

std::unique_ptr<CaloGeometryFromCaloDDM> ISF::DNNCaloSimSvc::m_caloGeo

Definition at line 105 of file DNNCaloSimSvc.h.

◆ m_chrono

IChronoStatSvc* ISF::BaseSimulationSvc::m_chrono {}
protectedinherited

The timing service for general usage.

Definition at line 223 of file BaseSimulationSvc.h.

◆ m_chronoSvcName

std::string ISF::BaseSimulationSvc::m_chronoSvcName {"ChronoStatSvc"}
protectedinherited

Name of the timing service - can be set by declareProperty()

Definition at line 220 of file BaseSimulationSvc.h.

◆ m_detStore

StoreGateSvc_t ISF::BaseSimulationSvc::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 209 of file BaseSimulationSvc.h.

◆ m_emID

const LArEM_ID* ISF::DNNCaloSimSvc::m_emID = nullptr

Definition at line 106 of file DNNCaloSimSvc.h.

◆ m_etaRawBackCut

const double ISF::DNNCaloSimSvc::m_etaRawBackCut = m_middleCellWidthEta * 4.

Definition at line 124 of file DNNCaloSimSvc.h.

◆ m_etaRawMiddleCut

const double ISF::DNNCaloSimSvc::m_etaRawMiddleCut = m_middleCellWidthEta * 3.5

Definition at line 123 of file DNNCaloSimSvc.h.

◆ m_evtStore

StoreGateSvc_t ISF::BaseSimulationSvc::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 206 of file BaseSimulationSvc.h.

◆ m_extrapolator

ToolHandle<Trk::ITimedExtrapolator> ISF::DNNCaloSimSvc::m_extrapolator

Definition at line 95 of file DNNCaloSimSvc.h.

◆ m_FastCaloSimCaloExtrapolation

ToolHandle<IFastCaloSimCaloExtrapolation> ISF::DNNCaloSimSvc::m_FastCaloSimCaloExtrapolation

Definition at line 94 of file DNNCaloSimSvc.h.

◆ m_GANLatentSize

int ISF::DNNCaloSimSvc::m_GANLatentSize = 0

Definition at line 111 of file DNNCaloSimSvc.h.

◆ m_graph

std::unique_ptr<lwt::LightweightGraph> ISF::DNNCaloSimSvc::m_graph

Definition at line 89 of file DNNCaloSimSvc.h.

◆ m_logTrueEnergyMean

double ISF::DNNCaloSimSvc::m_logTrueEnergyMean = 0.

Definition at line 112 of file DNNCaloSimSvc.h.

◆ m_logTrueEnergyScale

double ISF::DNNCaloSimSvc::m_logTrueEnergyScale = 0.

Definition at line 113 of file DNNCaloSimSvc.h.

◆ m_middleCellWidthEta

const double ISF::DNNCaloSimSvc::m_middleCellWidthEta = 0.025

Definition at line 121 of file DNNCaloSimSvc.h.

◆ m_middleCellWidthPhi

const double ISF::DNNCaloSimSvc::m_middleCellWidthPhi = CLHEP::pi / std::pow(2,7)

Definition at line 122 of file DNNCaloSimSvc.h.

◆ m_numberOfCellsForDNN

const int ISF::DNNCaloSimSvc::m_numberOfCellsForDNN = 266

Definition at line 120 of file DNNCaloSimSvc.h.

◆ m_paramsFilename

std::string ISF::DNNCaloSimSvc::m_paramsFilename

Definition at line 86 of file DNNCaloSimSvc.h.

◆ m_paramsInputArchitecture

std::string ISF::DNNCaloSimSvc::m_paramsInputArchitecture

Definition at line 87 of file DNNCaloSimSvc.h.

◆ m_particleBroker

IParticleBroker* ISF::BaseSimulationSvc::m_particleBroker {}
protectedinherited

The particle service used to push particles into the simulation.

Definition at line 226 of file BaseSimulationSvc.h.

◆ m_phiRawMiddleCut

const double ISF::DNNCaloSimSvc::m_phiRawMiddleCut = m_middleCellWidthPhi * 3.5

Definition at line 125 of file DNNCaloSimSvc.h.

◆ m_phiRawStripCut

const double ISF::DNNCaloSimSvc::m_phiRawStripCut = m_middleCellWidthPhi * 6.0

Definition at line 126 of file DNNCaloSimSvc.h.

◆ m_randomEngine

CLHEP::HepRandomEngine* ISF::DNNCaloSimSvc::m_randomEngine

Definition at line 100 of file DNNCaloSimSvc.h.

◆ m_randomEngineName

std::string ISF::DNNCaloSimSvc::m_randomEngineName

Definition at line 101 of file DNNCaloSimSvc.h.

◆ m_riImpactEtaMean

double ISF::DNNCaloSimSvc::m_riImpactEtaMean = 0.

Definition at line 114 of file DNNCaloSimSvc.h.

◆ m_riImpactEtaScale

double ISF::DNNCaloSimSvc::m_riImpactEtaScale = 0.

Definition at line 115 of file DNNCaloSimSvc.h.

◆ m_riImpactPhiMean

double ISF::DNNCaloSimSvc::m_riImpactPhiMean = 0.

Definition at line 116 of file DNNCaloSimSvc.h.

◆ m_riImpactPhiScale

double ISF::DNNCaloSimSvc::m_riImpactPhiScale = 0.

Definition at line 117 of file DNNCaloSimSvc.h.

◆ m_rndGenSvc

ServiceHandle<IAtRndmGenSvc> ISF::DNNCaloSimSvc::m_rndGenSvc

Definition at line 99 of file DNNCaloSimSvc.h.

◆ m_screenOutputPrefix

std::string ISF::BaseSimulationSvc::m_screenOutputPrefix {"isf >> "}
protectedinherited

Screen output refinement - can be changed by declareProperty()

Definition at line 217 of file BaseSimulationSvc.h.

◆ m_simDescr

std::string ISF::BaseSimulationSvc::m_simDescr {""}
protectedinherited

The simulator service descriptor.

Definition at line 214 of file BaseSimulationSvc.h.

◆ m_theContainer

CaloCellContainer* ISF::DNNCaloSimSvc::m_theContainer

Definition at line 97 of file DNNCaloSimSvc.h.

◆ m_windowCells

std::vector<CaloCell*> ISF::DNNCaloSimSvc::m_windowCells

Definition at line 107 of file DNNCaloSimSvc.h.


The documentation for this class was generated from the following files:
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
ISF::ISFParticle::ekin
double ekin() const
Kinetic energy.
ISF::DNNCaloSimSvc::NetworkOutputs
std::map< std::string, double > NetworkOutputs
Definition: DNNCaloSimSvc.h:76
python.SystemOfUnits.second
int second
Definition: SystemOfUnits.py:120
LArEM_Base_ID::phi
int phi(const Identifier id) const
return phi according to :
ISF::DNNCaloSimSvc::m_GANLatentSize
int m_GANLatentSize
Definition: DNNCaloSimSvc.h:111
ISF::DNNCaloSimSvc::m_paramsInputArchitecture
std::string m_paramsInputArchitecture
Definition: DNNCaloSimSvc.h:87
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
FCALDetectorManager
A manager class providing access to readout geometry information for the forward calorimeter.
Definition: FCALDetectorManager.h:29
ISF::BaseSimulationSvc::simSvcDescriptor
std::string & simSvcDescriptor() override
Return the simulation service descriptor.
Definition: BaseSimulationSvc.h:86
ISF::BaseSimulationSvc::evtStore
const StoreGateSvc_t & evtStore() const
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: BaseSimulationSvc.h:140
ISF::DNNCaloSimSvc::m_etaRawBackCut
const double m_etaRawBackCut
Definition: DNNCaloSimSvc.h:124
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ISF::DNNCaloSimSvc::m_riImpactEtaScale
double m_riImpactEtaScale
Definition: DNNCaloSimSvc.h:115
ISF::BaseSimulationSvc::BaseSimulationSvc
BaseSimulationSvc()
Default constructor.
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
ISF::DNNCaloSimSvc::m_numberOfCellsForDNN
const int m_numberOfCellsForDNN
Definition: DNNCaloSimSvc.h:120
ISF::DNNCaloSimSvc::m_caloGeo
std::unique_ptr< CaloGeometryFromCaloDDM > m_caloGeo
Definition: DNNCaloSimSvc.h:105
ISF::DNNCaloSimSvc::m_etaRawMiddleCut
const double m_etaRawMiddleCut
Definition: DNNCaloSimSvc.h:123
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloIdManager::getEM_ID
const LArEM_ID * getEM_ID(void) const
Definition: CaloIdManager.cxx:80
conifer::pow
constexpr int pow(int x)
Definition: conifer.h:20
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
Amg::y
@ y
Definition: GeoPrimitives.h:35
compCellsForDNNSortMirror
bool compCellsForDNNSortMirror(const CaloCell *a, const CaloCell *b)
Definition: DNNCaloSimSvc.cxx:281
ISF::ISFParticle
Definition: ISFParticle.h:42
python.SystemOfUnits.microsecond
int microsecond
Definition: SystemOfUnits.py:122
ISF::ISFParticle::pdgCode
int pdgCode() const
PDG value.
ISF::DNNCaloSimSvc::m_phiRawStripCut
const double m_phiRawStripCut
Definition: DNNCaloSimSvc.h:126
LArEM_Base_ID::sampling
int sampling(const Identifier id) const
return sampling according to :
TFCSExtrapolationState
Definition: TFCSExtrapolationState.h:13
ISF::DNNCaloSimSvc::m_randomEngine
CLHEP::HepRandomEngine * m_randomEngine
Definition: DNNCaloSimSvc.h:100
RunActsMaterialValidation.extrapol
extrapol
Definition: RunActsMaterialValidation.py:90
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
ISF::BaseSimulationSvc::detStore
const StoreGateSvc_t & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: BaseSimulationSvc.h:146
postInclude.inputs
inputs
Definition: postInclude.SortInput.py:15
ISF::BaseSimulationSvc::simulate
virtual StatusCode simulate(ISFParticle &isp, McEventCollection *mcEventCollection) override
Simulation call for individual particles.
Definition: BaseSimulationSvc.h:232
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
LArEM_Base_ID::eta
int eta(const Identifier id) const
return eta according to :
pi
#define pi
Definition: TileMuonFitter.cxx:65
ISF::DNNCaloSimSvc::fillWindowCells
StatusCode fillWindowCells(const double etaExtrap, const double phiExtrap, const CaloDetDescrElement *&impactCellDDE)
Definition: DNNCaloSimSvc.cxx:513
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloDetDescrElement::eta_raw
float eta_raw() const
cell eta_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:350
ISF::DNNCaloSimSvc::m_theContainer
CaloCellContainer * m_theContainer
Definition: DNNCaloSimSvc.h:97
RunTileCalibRec.CaloCellContainer
CaloCellContainer
Definition: RunTileCalibRec.py:403
ISF::DNNCaloSimSvc::m_caloCellMakerToolsSetup
ToolHandleArray< ICaloCellMakerTool > m_caloCellMakerToolsSetup
Definition: DNNCaloSimSvc.h:91
ISF::ISFParticle::position
const Amg::Vector3D & position() const
The current position of the ISFParticle.
ISF::DNNCaloSimSvc::m_riImpactEtaMean
double m_riImpactEtaMean
Definition: DNNCaloSimSvc.h:114
CaloCell_ID_FCS::EMB2
@ EMB2
Definition: FastCaloSim_CaloCell_ID.h:21
CaloDetDescrElement::identify
Identifier identify() const override final
cell identifier
Definition: CaloDetDescrElement.cxx:64
Amg::z
@ z
Definition: GeoPrimitives.h:36
CaloCell_ID_FCS::MaxSample
@ MaxSample
Definition: FastCaloSim_CaloCell_ID.h:47
ISF::DNNCaloSimSvc::NetworkInputs
std::map< std::string, std::map< std::string, double > > NetworkInputs
Definition: DNNCaloSimSvc.h:75
ISF::DNNCaloSimSvc::m_emID
const LArEM_ID * m_emID
Definition: DNNCaloSimSvc.h:106
CaloDetDescrElement::calo_hash
IdentifierHash calo_hash() const
cell calo hash
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:412
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloIdManager
This class initializes the Calo (LAr and Tile) offline identifiers.
Definition: CaloIdManager.h:45
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
CaloCondBlobAlgs_fillNoiseFromASCII.inputFile
string inputFile
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:17
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
ISF::DNNCaloSimSvc::m_FastCaloSimCaloExtrapolation
ToolHandle< IFastCaloSimCaloExtrapolation > m_FastCaloSimCaloExtrapolation
Definition: DNNCaloSimSvc.h:94
ISF::BaseSimulationSvc::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: BaseSimulationSvc.h:206
ISF::DNNCaloSimSvc::m_paramsFilename
std::string m_paramsFilename
Definition: DNNCaloSimSvc.h:86
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
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
Amg::x
@ x
Definition: GeoPrimitives.h:34
ISF::DNNCaloSimSvc::m_caloCellsOutputName
std::string m_caloCellsOutputName
Definition: DNNCaloSimSvc.h:129
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
ISF::BaseSimulationSvc::m_simDescr
std::string m_simDescr
The simulator service descriptor.
Definition: BaseSimulationSvc.h:214
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
ISF::BaseSimulationSvc::m_screenOutputPrefix
std::string m_screenOutputPrefix
Screen output refinement - can be changed by declareProperty()
Definition: BaseSimulationSvc.h:217
SUBPOS_ENT
@ SUBPOS_ENT
Definition: FastCaloSim_CaloCell_ID.h:12
CaloDetDescrManager_Base::getCalo_Mgr
const CaloIdManager * getCalo_Mgr() const
get calo ID manager
Definition: CaloDetDescrManager.cxx:99
ISF::DNNCaloSimSvc::m_phiRawMiddleCut
const double m_phiRawMiddleCut
Definition: DNNCaloSimSvc.h:125
python.CreateTierZeroArgdict.outputs
outputs
Definition: CreateTierZeroArgdict.py:189
ISF::DNNCaloSimSvc::m_caloDetDescrManager
const CaloDetDescrManager * m_caloDetDescrManager
Definition: DNNCaloSimSvc.h:104
ISF::DNNCaloSimSvc::fillNetworkInputs
StatusCode fillNetworkInputs(const ISF::ISFParticle &isfp, NetworkInputs &inputs, double &trueEnergy)
Definition: DNNCaloSimSvc.cxx:381
ISF::BaseSimulationSvc::m_chronoSvcName
std::string m_chronoSvcName
Name of the timing service - can be set by declareProperty()
Definition: BaseSimulationSvc.h:220
compCellsForDNNSort
bool compCellsForDNNSort(const CaloCell *a, const CaloCell *b)
Definition: DNNCaloSimSvc.cxx:305
ISF::DNNCaloSimSvc::m_rndGenSvc
ServiceHandle< IAtRndmGenSvc > m_rndGenSvc
Definition: DNNCaloSimSvc.h:99
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
ISF::ISFParticle::momentum
const Amg::Vector3D & momentum() const
The current momentum vector of the ISFParticle.
ISF::DNNCaloSimSvc::m_caloCellMakerToolsRelease
ToolHandleArray< ICaloCellMakerTool > m_caloCellMakerToolsRelease
Definition: DNNCaloSimSvc.h:92
ISF::DNNCaloSimSvc::initializeNetwork
StatusCode initializeNetwork()
helper for initialize
Definition: DNNCaloSimSvc.cxx:136
ISF::DNNCaloSimSvc::m_logTrueEnergyScale
double m_logTrueEnergyScale
Definition: DNNCaloSimSvc.h:113
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
ISF::DNNCaloSimSvc::m_randomEngineName
std::string m_randomEngineName
Definition: DNNCaloSimSvc.h:101
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
lwtDev::parse_json_graph
GraphConfig parse_json_graph(std::istream &json)
Definition: parse_json.cxx:71
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ISF::BaseSimulationSvc::m_chrono
IChronoStatSvc * m_chrono
The timing service for general usage.
Definition: BaseSimulationSvc.h:223
ISF::DNNCaloSimSvc::m_windowCells
std::vector< CaloCell * > m_windowCells
Definition: DNNCaloSimSvc.h:107
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
LArG4FSStartPointFilter.particles
list particles
Definition: LArG4FSStartPointFilter.py:84
ISF::BaseSimulationSvc::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: BaseSimulationSvc.h:209
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
ISF::BaseSimulationSvc::m_particleBroker
IParticleBroker * m_particleBroker
The particle service used to push particles into the simulation.
Definition: BaseSimulationSvc.h:226
ISF::DNNCaloSimSvc::m_riImpactPhiMean
double m_riImpactPhiMean
Definition: DNNCaloSimSvc.h:116
TFCSTruthState
Definition: TFCSTruthState.h:13
ISF::DNNCaloSimSvc::m_graph
std::unique_ptr< lwt::LightweightGraph > m_graph
Definition: DNNCaloSimSvc.h:89
TFCSSimulationState
Definition: TFCSSimulationState.h:32
ISF::DNNCaloSimSvc::m_logTrueEnergyMean
double m_logTrueEnergyMean
Definition: DNNCaloSimSvc.h:112
buildCaloDetDescrNoAlign
std::unique_ptr< CaloDetDescrManager > buildCaloDetDescrNoAlign(ISvcLocator *svcLocator, IMessageSvc *msgSvc)
Definition: CaloDetDescrBuilder.cxx:791
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
ISF::DNNCaloSimSvc::m_riImpactPhiScale
double m_riImpactPhiScale
Definition: DNNCaloSimSvc.h:117
CaloDetDescrElement::phi_raw
float phi_raw() const
cell phi_raw
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:352
CaloPhiRange::diff
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
Definition: CaloPhiRange.cxx:22
ISF::ISFParticle::mass
double mass() const
mass of the particle