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

NEEDS DOCUMENTATION. More...

#include <LArFastShower.h>

Inheritance diagram for LArFastShower:
Collaboration diagram for LArFastShower:

Public Member Functions

 LArFastShower (const std::string &name, const FastShowerConfigStruct &config, IFastSimDedicatedSD *fastSimDedicatedSD)
 Constructor. More...
 
virtual ~LArFastShower ()
 Destructor. More...
 
G4bool IsApplicable (const G4ParticleDefinition &) override
 Determines the applicability of the fast sim model to this particle type Called once for each track picked up by Geant as it enters a region with the fast sim assigned to it. More...
 
virtual G4bool ModelTrigger (const G4FastTrack &) override
 Determines the applicability of the fast sim model to this particular track. More...
 
virtual G4bool ForcedAccept (const G4FastTrack &)
 If it returns true, the particle will be parameterized without further checks. More...
 
virtual G4bool ForcedDeny (const G4FastTrack &)
 If it returns true, the particle will be returned to G4 without further checks. More...
 
void DoIt (const G4FastTrack &, G4FastStep &) override
 Assigns the track to the appropriate method for application of the fast simulation. More...
 

Protected Member Functions

IFastSimDedicatedSDfastShowerSD ()
 
ILArG4ShowerLibSvcshowerLibSvc ()
 
void KillParticle (const G4FastTrack &, G4FastStep &)
 Method to kill a particle and deposit its energy using exponential decay function. More...
 
void UseShowerLib (const G4FastTrack &, G4FastStep &)
 Function for the application of shower library. More...
 
virtual G4bool CheckContainment (const G4FastTrack &fastTrack)
 Function to check the containment of a shower within a regular detector region. More...
 
std::unique_ptr< const HepMC::GenEvent > GetGenEvent (const G4FastTrack &fastTrack)
 
bool flagToShowerLib (const G4ParticleDefinition &particleType) const
 get switch for frozen showers More...
 
double maxEneToShowerLib (const G4ParticleDefinition &particleType) const
 get lower energy limit for frozen showers More...
 
double minEneToShowerLib (const G4ParticleDefinition &particleType) const
 get upper energy limit for frozen showers More...
 
bool generateFSStartingPoint (std::unique_ptr< const HepMC::GenEvent > &ge) const
 

Private Attributes

const FastShowerConfigStruct m_configuration
 
IFastSimDedicatedSDm_fastSimDedicatedSD
 Shower library sensitive detector for this shower. More...
 
ILArG4ShowerLibSvcm_showerLibSvc
 Pointer to the shower library service. More...
 
bool m_generate_starting_points
 
std::shared_ptr< HepMC::IO_GenEvent > m_starting_points_file
 
std::string m_detector_tag_str
 
std::map< std::string, int > m_detmap
 
int m_eventNum
 
std::map< int, bool > m_applicableMap
 

Detailed Description

NEEDS DOCUMENTATION.

Definition at line 30 of file LArFastShower.h.

Constructor & Destructor Documentation

◆ LArFastShower()

LArFastShower::LArFastShower ( const std::string &  name,
const FastShowerConfigStruct config,
IFastSimDedicatedSD fastSimDedicatedSD 
)

Constructor.

Definition at line 37 of file LArFastShower.cxx.

38  :
39  G4VFastSimulationModel(name),
41  m_fastSimDedicatedSD(fastSimDedicatedSD),
42  m_showerLibSvc(nullptr),
45  m_eventNum(0)
46 {
47  /* Starting points, i.e. vertex coordinates, are needed to create
48  * the Frozen Shower library, so they are saved in a hepmc file.
49  * Frozen showers are then simulated from these starting points
50  * in a separate job. To speed up the simulation,
51  * showers will be read from the library instead of being simulated.*/
54  std::string hepmcFileName = m_configuration.m_generated_starting_points_file;
55 
56  // In multi-thread run, multiple hepmc files are created.
57  // To distinguish between them we add thread_id in their name.
59  {
60  auto threadId = std::this_thread::get_id();
61  std::stringstream ss;
62  ss << threadId;
63  hepmcFileName += "."+ss.str();
64  }
65 #ifdef HEPMC3
66  m_starting_points_file = std::make_shared<HepMC3::WriterAscii>(hepmcFileName);
67 #else
68  m_starting_points_file = std::make_shared<HepMC::IO_GenEvent> (hepmcFileName,std::ios::out);
69 #endif
70  }
71 
72  enum DETECTOR { EMB=100000, EMEC=200000, FCAL1=300000, FCAL2=400000,
73  FCAL3=500000, HECLOC=600000, HEC=700000 };
74 
75  m_detmap["EMB"]=EMB;
76  m_detmap["EMEC"]=EMEC;
77  m_detmap["FCAL1"]=FCAL1;
78  m_detmap["FCAL2"]=FCAL2;
79  m_detmap["FCAL3"]=FCAL3;
80  m_detmap["HECLOC"]=HECLOC;
81  m_detmap["HEC"]=HEC;
82 }

◆ ~LArFastShower()

virtual LArFastShower::~LArFastShower ( )
inlinevirtual

Destructor.

Definition at line 39 of file LArFastShower.h.

39 {}

Member Function Documentation

◆ CheckContainment()

G4bool LArFastShower::CheckContainment ( const G4FastTrack &  fastTrack)
protectedvirtual

Function to check the containment of a shower within a regular detector region.

Definition at line 275 of file LArFastShower.cxx.

276 {
277 
278  G4ThreeVector showerDirection = fastTrack.GetPrimaryTrack()->GetMomentumDirection();
279  G4ThreeVector initialShowerPosition = fastTrack.GetPrimaryTrack()->GetPosition();
280  G4ThreeVector orthoShower = showerDirection.orthogonal();
281  G4ThreeVector crossShower = showerDirection.cross(orthoShower);
282 
283 #ifdef _TRACE_FSM_
284  G4cout << "LArFastShower::CheckContainment() orthoShower: " << orthoShower << G4endl;
285  G4cout << "LArFastShower::CheckContainment() crossShower: " << crossShower << G4endl;
286 #endif
287 
288  //Build 5 points at the shower max. edges and far end
289  //this picks the points where 99% of the particle energy was already deposited
290  /* Short history of containment check:
291  * First, it was magic numbers from ShowerParams class
292  G4double Zmx = myParameterisation()->GetAveZmx();
293  G4double R = myParameterisation()->GetAveR90(); // Easy - just multiply
294  G4double Z = myParameterisation()->GetAveZ90(); // More convoluted
295  * Then, after ShowerParams class was sent to code heaven, the magic numbers were saved from it
296  * and stored right here:
297  G4double Zmx = 22*mm;
298  G4double R = 1.5*4*cm;
299  G4double Z = 22*2.5*mm;
300  * Now, we take it directly from the library
301  */
304 
305  if (Z == 0.0 && R == 0.0) {
306  // no containment check
307  return true;
308  }
309 
310  // Here is OUR magic number. Looking on the hit distribution plot,
311  // it seems that that way most of hits will be inside
312  G4double Zmx = Z / 3;
313 
314  G4int cosPhi[4] = {1,0,-1,0};
315  G4int sinPhi[4] = {0,1,0,-1};
316 
317 #ifdef _TRACE_FSM_
318  G4cout << "LArFastShower::CheckContainment() R = " << R << G4endl;
319  G4cout << "LArFastShower::CheckContainment() Z = " << Z << G4endl;
320 #endif
321 
322  G4ThreeVector position;
323 
324  G4VSolid* caloSolid = fastTrack.GetEnvelopeSolid();
325  const G4AffineTransform* affineTransformation = fastTrack.GetAffineTransformation();
326 
327  //Startpoint
328  position = initialShowerPosition;
329  affineTransformation->ApplyPointTransform(position);
330  if(caloSolid->Inside(position) == kOutside)
331  return false;
332 
333  //Longitudinal Endpoint
334  position = initialShowerPosition + Z*showerDirection;
335  affineTransformation->ApplyPointTransform(position);
336  if(caloSolid->Inside(position) == kOutside)
337  return false;
338 
339  //Lateral Spread
340  for(int i=0; i<4 ;i++)
341  {
342  position = initialShowerPosition + Zmx*showerDirection +
343  R*cosPhi[i]*orthoShower + R*sinPhi[i]*crossShower;
344  affineTransformation->ApplyPointTransform(position);
345  if(caloSolid->Inside(position) == kOutside)
346  return false;
347  }
348 
349 #ifdef _TRACE_FSM_
350  G4cout << "LArFastShower::CheckContainment() Shower is contained " << G4endl;
351 #endif
352 
353  return true;
354 
355 }

◆ DoIt()

void LArFastShower::DoIt ( const G4FastTrack &  fastTrack,
G4FastStep &  fastStep 
)
override

Assigns the track to the appropriate method for application of the fast simulation.

Only called if ModelTrigger returns true.

Definition at line 184 of file LArFastShower.cxx.

185 {
186 #ifdef _TRACE_FSM_
187  G4cout << "LArFastShower::Doit()" << G4endl;
188 #endif
189 
191  if ((float)rand()/static_cast<float>(RAND_MAX) <= m_configuration.m_generated_starting_points_ratio) {
192  std::unique_ptr<const HepMC::GenEvent> ge = GetGenEvent(fastTrack);
194  }
195  KillParticle( fastTrack, fastStep );
196  return;
197  }
198  this->UseShowerLib( fastTrack, fastStep );
199 
200 #ifdef _TRACE_FSM_
201  G4cout << "LArFastShower::Doit() done" << G4endl;
202 #endif
203 
204 }

◆ fastShowerSD()

IFastSimDedicatedSD * LArFastShower::fastShowerSD ( )
protected

Definition at line 84 of file LArFastShower.cxx.

85 {
86  if ( !m_fastSimDedicatedSD ) {
87  throw std::runtime_error("LArFastShower: no pointer to IFastSimDedicatedSD!");
88  }
89  return m_fastSimDedicatedSD;
90 }

◆ flagToShowerLib()

bool LArFastShower::flagToShowerLib ( const G4ParticleDefinition &  particleType) const
protected

get switch for frozen showers

Definition at line 401 of file LArFastShower.cxx.

402 {
403  if ( &particleType == G4Electron::ElectronDefinition() ||
404  &particleType == G4Positron::PositronDefinition() ) {
406  } else if ( &particleType == G4Gamma::GammaDefinition() ) {
408  } else if ( &particleType == G4Neutron::NeutronDefinition() ) {
410  } else if ( &particleType == G4PionPlus::PionPlusDefinition() ||
411  &particleType == G4PionMinus::PionMinusDefinition() ) {
413  }
414  return false;
415 }

◆ ForcedAccept()

G4bool LArFastShower::ForcedAccept ( const G4FastTrack &  fastTrack)
virtual

If it returns true, the particle will be parameterized without further checks.

Definition at line 458 of file LArFastShower.cxx.

459 {
460  G4ThreeVector initialShowerPosition = fastTrack.GetPrimaryTrack()->GetPosition();
461 
462  // if ( !m_configuration.m_containHigh &&
463  // ( initialShowerPosition.eta()>=m_configuration.m_absHighEta ||
464  // initialShowerPosition.eta()<=-m_configuration.m_absHighEta ) ) return true;
465 
467  ( initialShowerPosition.eta()>m_configuration.m_absHighEta ||
468  initialShowerPosition.eta()<-m_configuration.m_absHighEta ) ) return true;
469 
471  ( ( initialShowerPosition.eta()>m_configuration.m_absCrackEta1 &&
472  initialShowerPosition.eta()<m_configuration.m_absCrackEta2 ) ||
473  ( initialShowerPosition.eta()<-m_configuration.m_absCrackEta1 &&
474  initialShowerPosition.eta()>-m_configuration.m_absCrackEta2 ) ) ) return true;
475 
477  ( initialShowerPosition.eta()<m_configuration.m_absLowEta ||
478  initialShowerPosition.eta()>-m_configuration.m_absLowEta ) ) return true;
479  return false;
480 }

◆ ForcedDeny()

G4bool LArFastShower::ForcedDeny ( const G4FastTrack &  )
virtual

If it returns true, the particle will be returned to G4 without further checks.

Definition at line 482 of file LArFastShower.cxx.

483 {
484  return false;
485 }

◆ generateFSStartingPoint()

bool LArFastShower::generateFSStartingPoint ( std::unique_ptr< const HepMC::GenEvent > &  ge) const
protected

Definition at line 447 of file LArFastShower.cxx.

448 {
450  return false;
451 #ifdef HEPMC3
452  m_starting_points_file->write_event(*ge);
453 #else
454  m_starting_points_file->write_event(ge.get());
455 #endif
456  return true;
457 }

◆ GetGenEvent()

std::unique_ptr< const HepMC::GenEvent > LArFastShower::GetGenEvent ( const G4FastTrack &  fastTrack)
protected

Definition at line 357 of file LArFastShower.cxx.

358 {
359  const G4ThreeVector showerPos = fastTrack.GetPrimaryTrack()->GetPosition();
360  const G4ThreeVector showerMom = fastTrack.GetPrimaryTrack()->GetMomentum();
361  const G4double energy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
362 
363  G4int pdgcode = fastTrack.GetPrimaryTrack()->GetDefinition()->GetPDGEncoding();
364  if (pdgcode < 0) pdgcode = -pdgcode; // hack for positrons. let it be electrons.
365 
366 #ifdef HEPMC3
367  HepMC3::Units::MomentumUnit momentumUnit = HepMC3::Units::MEV;
368  HepMC3::Units::LengthUnit lengthUnit = HepMC3::Units::MM;
369 #else
370  HepMC::Units::MomentumUnit momentumUnit = HepMC::Units::MEV;
371  HepMC::Units::LengthUnit lengthUnit = HepMC::Units::MM;
372 #endif
373  // new event. Signal processing = 0, event number "next"
374  std::unique_ptr<HepMC::GenEvent> ge = std::make_unique<HepMC::GenEvent>(momentumUnit,lengthUnit);
375 
376  ge->set_event_number(++m_eventNum);
377 
378  // starting point from which the shower develops, time = 0.
380  HepMC::FourVector(showerPos.x(), showerPos.y(), showerPos.z(), 0) );
381  ge->add_vertex(gv);
382 
383  // input particle (status=4) is always required by HepMC.
384  // make it a dummy geantino with 4-mom=0. pdg_id=999.
386  HepMC::FourVector(0.,0.,0.,0.),
387  999, 4 );
388  gv->add_particle_in(gpi);
389 
390  // output particle (status=1) is the FourVector of the shower.
392  HepMC::FourVector(showerMom.x(), showerMom.y(), showerMom.z(), energy),
393  pdgcode, 1 );
394  gv->add_particle_out(gpo);
395 
396  // return auto_pointer. will be deleted automatically
397  return ge;
398 }

◆ IsApplicable()

G4bool LArFastShower::IsApplicable ( const G4ParticleDefinition &  particleType)
override

Determines the applicability of the fast sim model to this particle type Called once for each track picked up by Geant as it enters a region with the fast sim assigned to it.

Currently returns false for all but photons and electrons.

Definition at line 106 of file LArFastShower.cxx.

107 {
108 #ifdef _TRACE_FSM_
109  G4cout << "LArFastShower::IsApplicable" << G4endl;
110 #endif
111 
112  /*
113  * if ( flag to parameterize is set )
114  * && ( (we want to record SPs) || (ShowerLibSvc has a library for this particle) )
115  */
116  if (m_applicableMap.find(particleType.GetPDGEncoding()) != m_applicableMap.end()) {
117  return m_applicableMap.find(particleType.GetPDGEncoding())->second;
118  }
119  bool rez = false;
122  showerLibSvc()->checkLibrary( particleType.GetPDGEncoding(),
124  rez = true;
125  m_applicableMap[particleType.GetPDGEncoding()] = rez;
126  return rez;
127 }

◆ KillParticle()

void LArFastShower::KillParticle ( const G4FastTrack &  ,
G4FastStep &  fastStep 
)
protected

Method to kill a particle and deposit its energy using exponential decay function.

Definition at line 209 of file LArFastShower.cxx.

211 {
212 
213 #ifdef _TRACE_DOIT_
214  G4cout << "Low energy particle is being killed: " << fastTrack.GetPrimaryTrack()->GetKineticEnergy() << G4endl;
215 #endif
216 
217  // Kill the particle
218  fastStep.KillPrimaryTrack();
219  fastStep.SetPrimaryTrackPathLength(0.0);
220 
221  return;
222 }

◆ maxEneToShowerLib()

double LArFastShower::maxEneToShowerLib ( const G4ParticleDefinition &  particleType) const
protected

get lower energy limit for frozen showers

Definition at line 432 of file LArFastShower.cxx.

433 {
434  if ( &particleType == G4Electron::ElectronDefinition() ||
435  &particleType == G4Positron::PositronDefinition() ) {
437  } else if ( &particleType == G4Gamma::GammaDefinition() ) {
439  } else if ( &particleType == G4Neutron::NeutronDefinition() ) {
441  } else if ( &particleType == G4PionPlus::PionPlusDefinition() ||
442  &particleType == G4PionMinus::PionMinusDefinition() ) {
444  }
445  return 0.0;
446 }

◆ minEneToShowerLib()

double LArFastShower::minEneToShowerLib ( const G4ParticleDefinition &  particleType) const
protected

get upper energy limit for frozen showers

Definition at line 416 of file LArFastShower.cxx.

417 {
418  if ( &particleType == G4Electron::ElectronDefinition() ||
419  &particleType == G4Positron::PositronDefinition() ) {
421  } else if ( &particleType == G4Gamma::GammaDefinition() ) {
423  } else if ( &particleType == G4Neutron::NeutronDefinition() ) {
425  } else if ( &particleType == G4PionPlus::PionPlusDefinition() ||
426  &particleType == G4PionMinus::PionMinusDefinition() ) {
428  }
429  return 0.0;
430 }

◆ ModelTrigger()

G4bool LArFastShower::ModelTrigger ( const G4FastTrack &  fastTrack)
overridevirtual

Determines the applicability of the fast sim model to this particular track.

Checks that geometric location, energy, and particle type are within bounds. Also checks for containment of the particle's shower within a specific detector region.

Definition at line 129 of file LArFastShower.cxx.

130 {
131  /* ==========================================================================
132  Determine if the particle is to be returned to full Geant4 simulation.
133  In the event where the particle is EITHER killed and parameterised OR
134  simply killed, this must be done in the appropriate LArFastShower DoIt method.
135  This method Checks: 1) Geometry; 2) Energy; 3) (for e+/e-) Containment
136  ========================================================================== */
137 
138 #ifdef _TRACE_FSM_
139  G4cout << "LArFastShower::commonTrigger" << G4endl;
140 #endif
141 
142  // We are in a parameterized volume
143 
144  // Check if the particle is within energy bounds
145  G4double particleEnergy = fastTrack.GetPrimaryTrack()->GetKineticEnergy();
146  const G4ParticleDefinition& particleType = *(fastTrack.GetPrimaryTrack()->GetDefinition());
147 
148  if ( flagToShowerLib(particleType) == true &&
149  particleEnergy > minEneToShowerLib(particleType) &&
150  particleEnergy < maxEneToShowerLib(particleType) ) {
151 
152 #ifdef _TRACE_FSM_
153  G4cout << "Particle has energy (" << particleEnergy << ") for shower lib and shower lib is on! Accept particle!" << G4endl;
154 #endif
155  } else {
156 
157 #ifdef _TRACE_FSM_
158  G4cout << "Particle has energy (" << particleEnergy << ") outside killing, shower lib and parametrisation "
159  << "or some features are switched off ... returning it to Geant " << G4endl;
160 #endif
161 
162  return false;
163  }
164 
165  if (ForcedAccept(fastTrack)) return true;
166  if (ForcedDeny(fastTrack)) return false;
167 
168  if (CheckContainment(fastTrack)==false) {
169 #ifdef _TRACE_FSM_
170  G4cout << "LArFastShower::ModelTrigger() particle failed CheckContainment()... will not be parameterised: " << G4endl;
171 #endif
172  return false;
173  }
174 
175 #ifdef _TRACE_FSM_
176  G4cout << "LArFastShower::ModelTrigger() direction: " << fastTrack.GetPrimaryTrackLocalDirection() << G4endl;
177  G4cout << "LArFastShower::ModelTrigger() mom dir: " << fastTrack.GetPrimaryTrack()->GetMomentumDirection() << G4endl;
178 #endif
179 
180  return true;
181 }

◆ showerLibSvc()

ILArG4ShowerLibSvc * LArFastShower::showerLibSvc ( )
protected

Definition at line 93 of file LArFastShower.cxx.

94 {
95  if (!m_showerLibSvc ) {
96  ISvcLocator* svcLocator = Gaudi::svcLocator();
98  if (sc.isFailure()) {
99  throw std::runtime_error("LArFastShower: cannot retrieve LArG4ShowerLibSvc");
100  }
101  }
102  return m_showerLibSvc;
103 }

◆ UseShowerLib()

void LArFastShower::UseShowerLib ( const G4FastTrack &  fastTrack,
G4FastStep &  fastStep 
)
protected

Function for the application of shower library.

Definition at line 224 of file LArFastShower.cxx.

225 {
226  try {
227 #ifdef _TRACE_DOIT_
228  G4cout << "LArFastShower::UseShowerLib()" << G4endl;
229 #endif
230 
231  // kill the electron to be parametrised
232  KillParticle(fastTrack, fastStep);
233 
234  // -----------------------------
235  // Get Shower from ShowerLibSvc
236  // -----------------------------
237  const std::vector<EnergySpot> shower =
239 
240 #ifdef _TRACE_DOIT_
241  G4cout << "Got shower (" << shower.size() << ") from shower lib" << G4endl;
242 #endif
243 
244  // loop over hits in shower
245  for (const auto& a_spot : shower) {
246 
247 #ifdef _TRACE_DOIT_
248  G4cout << "Make Spot: " << a_spot.GetPosition().x() << " "
249  << a_spot.GetPosition().y() << " " << a_spot.GetPosition().z()
250  << " " << a_spot.GetEnergy() << " " << a_spot.GetTime() << G4endl;
251 #endif
252  fastShowerSD()->ProcessSpot(a_spot);
253 
254 #ifdef _TRACE_DOIT_
255  G4cout << "Made Spot" << G4endl;
256 #endif
257 
258  }
259 
260 #ifdef _TRACE_FSM_
261  G4cout << "LArFastShower::UseShowerLib() Done" << G4endl;
262 #endif
263 
264  return;
265  }
266 
267  // FIXME: Catching all exceptions and suppressing them? That's awful!!
268  catch (const std::exception & e) {
269  G4cout << "FastShower::UseShowerLib ERROR Handling an exception in LArFastShower::" << e.what() << G4endl;
270  return;
271  }
272 
273 }

Member Data Documentation

◆ m_applicableMap

std::map<int,bool> LArFastShower::m_applicableMap
private

Definition at line 101 of file LArFastShower.h.

◆ m_configuration

const FastShowerConfigStruct LArFastShower::m_configuration
private

Definition at line 83 of file LArFastShower.h.

◆ m_detector_tag_str

std::string LArFastShower::m_detector_tag_str
private

Definition at line 97 of file LArFastShower.h.

◆ m_detmap

std::map<std::string,int> LArFastShower::m_detmap
private

Definition at line 98 of file LArFastShower.h.

◆ m_eventNum

int LArFastShower::m_eventNum
private

Definition at line 100 of file LArFastShower.h.

◆ m_fastSimDedicatedSD

IFastSimDedicatedSD* LArFastShower::m_fastSimDedicatedSD
private

Shower library sensitive detector for this shower.

Definition at line 86 of file LArFastShower.h.

◆ m_generate_starting_points

bool LArFastShower::m_generate_starting_points
private

Definition at line 91 of file LArFastShower.h.

◆ m_showerLibSvc

ILArG4ShowerLibSvc* LArFastShower::m_showerLibSvc
private

Pointer to the shower library service.

Definition at line 88 of file LArFastShower.h.

◆ m_starting_points_file

std::shared_ptr<HepMC::IO_GenEvent> LArFastShower::m_starting_points_file
private

Definition at line 95 of file LArFastShower.h.


The documentation for this class was generated from the following files:
HepMC::GenVertexPtr
HepMC::GenVertex * GenVertexPtr
Definition: GenVertex.h:59
FastShowerConfigStruct::m_g_MaxEneShowerLib
double m_g_MaxEneShowerLib
lower energy limit for photon frozen showers
Definition: FastShowerConfigStruct.h:18
FastShowerConfigStruct::m_absLowEta
double m_absLowEta
Definition: FastShowerConfigStruct.h:30
LArSamples::HEC
@ HEC
Definition: CaloId.h:26
LArFastShower::CheckContainment
virtual G4bool CheckContainment(const G4FastTrack &fastTrack)
Function to check the containment of a shower within a regular detector region.
Definition: LArFastShower.cxx:275
FastShowerConfigStruct::m_absCrackEta1
double m_absCrackEta1
Definition: FastShowerConfigStruct.h:34
ILArG4ShowerLibSvc::getShower
virtual std::vector< EnergySpot > getShower(const G4FastTrack &, int) const =0
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
IDTPM::R
float R(const U &p)
Definition: TrackParametersHelper.h:101
FastShowerConfigStruct::m_detector_tag
int m_detector_tag
name for the detector tag for the ShowerLibSvc
Definition: FastShowerConfigStruct.h:38
LArFastShower::showerLibSvc
ILArG4ShowerLibSvc * showerLibSvc()
Definition: LArFastShower.cxx:93
Monitored::Z
@ Z
Definition: HistogramFillerUtils.h:24
ILArG4ShowerLibSvc::getContainmentZ
virtual double getContainmentZ(const G4FastTrack &, int)=0
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
FastShowerConfigStruct::m_Pion_FlagShowerLib
bool m_Pion_FlagShowerLib
switch for pion frozen showers
Definition: FastShowerConfigStruct.h:25
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
CaloCell_ID_FCS::FCAL1
@ FCAL1
Definition: FastCaloSim_CaloCell_ID.h:41
MM
@ MM
Definition: RegSelEnums.h:38
LArFastShower::ForcedDeny
virtual G4bool ForcedDeny(const G4FastTrack &)
If it returns true, the particle will be returned to G4 without further checks.
Definition: LArFastShower.cxx:482
LArFastShower::minEneToShowerLib
double minEneToShowerLib(const G4ParticleDefinition &particleType) const
get upper energy limit for frozen showers
Definition: LArFastShower.cxx:416
LArFastShower::m_eventNum
int m_eventNum
Definition: LArFastShower.h:100
particleType
Definition: particleType.h:29
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
LArSamples::EMEC
@ EMEC
Definition: CaloId.h:25
FastShowerConfigStruct::m_Neut_MaxEneShowerLib
double m_Neut_MaxEneShowerLib
upper energy limit for neutron frozen showers
Definition: FastShowerConfigStruct.h:23
LArFastShower::GetGenEvent
std::unique_ptr< const HepMC::GenEvent > GetGenEvent(const G4FastTrack &fastTrack)
Definition: LArFastShower.cxx:357
FastShowerConfigStruct::m_Neut_MinEneShowerLib
double m_Neut_MinEneShowerLib
lower energy limit for neutron frozen showers
Definition: FastShowerConfigStruct.h:22
LArFastShower::fastShowerSD
IFastSimDedicatedSD * fastShowerSD()
Definition: LArFastShower.cxx:84
LArFastShower::generateFSStartingPoint
bool generateFSStartingPoint(std::unique_ptr< const HepMC::GenEvent > &ge) const
Definition: LArFastShower.cxx:447
LArSamples::EMB
@ EMB
Definition: CaloId.h:25
LArG4FSStartPointFilter.rand
rand
Definition: LArG4FSStartPointFilter.py:80
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
HepMC::newGenVertexPtr
GenVertexPtr newGenVertexPtr(const HepMC::FourVector &pos=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), const int i=0)
Definition: GenVertex.h:64
lumiFormat.i
int i
Definition: lumiFormat.py:92
LArFastShower::m_generate_starting_points
bool m_generate_starting_points
Definition: LArFastShower.h:91
FastShowerConfigStruct::m_absHighEta
double m_absHighEta
Definition: FastShowerConfigStruct.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
FastShowerConfigStruct::m_absCrackEta2
double m_absCrackEta2
Definition: FastShowerConfigStruct.h:35
calibdata.exception
exception
Definition: calibdata.py:496
FastShowerConfigStruct::m_showerLibSvcName
std::string m_showerLibSvcName
Definition: FastShowerConfigStruct.h:40
LArFastShower::UseShowerLib
void UseShowerLib(const G4FastTrack &, G4FastStep &)
Function for the application of shower library.
Definition: LArFastShower.cxx:224
IFastSimDedicatedSD::ProcessSpot
virtual void ProcessSpot(const EnergySpot &spot)=0
ProcessHitsMethod.
LArFastShower::flagToShowerLib
bool flagToShowerLib(const G4ParticleDefinition &particleType) const
get switch for frozen showers
Definition: LArFastShower.cxx:401
FastShowerConfigStruct::m_g_MinEneShowerLib
double m_g_MinEneShowerLib
upper energy limit for photon frozen showers
Definition: FastShowerConfigStruct.h:19
LArFastShower::m_showerLibSvc
ILArG4ShowerLibSvc * m_showerLibSvc
Pointer to the shower library service.
Definition: LArFastShower.h:88
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
LArFastShower::ForcedAccept
virtual G4bool ForcedAccept(const G4FastTrack &)
If it returns true, the particle will be parameterized without further checks.
Definition: LArFastShower.cxx:458
LArFastShower::KillParticle
void KillParticle(const G4FastTrack &, G4FastStep &)
Method to kill a particle and deposit its energy using exponential decay function.
Definition: LArFastShower.cxx:209
FastShowerConfigStruct::m_generated_starting_points_ratio
float m_generated_starting_points_ratio
switch for shower starting point record
Definition: FastShowerConfigStruct.h:37
FastShowerConfigStruct::m_Neut_FlagShowerLib
bool m_Neut_FlagShowerLib
switch for neutron frozen showers
Definition: FastShowerConfigStruct.h:21
FastShowerConfigStruct::m_Pion_MinEneShowerLib
double m_Pion_MinEneShowerLib
lower energy limit for pion frozen showers
Definition: FastShowerConfigStruct.h:26
LArFastShower::m_applicableMap
std::map< int, bool > m_applicableMap
Definition: LArFastShower.h:101
FastShowerConfigStruct::m_g_FlagShowerLib
bool m_g_FlagShowerLib
switch for photon frozen showers
Definition: FastShowerConfigStruct.h:17
LArFastShower::m_configuration
const FastShowerConfigStruct m_configuration
Definition: LArFastShower.h:83
FastShowerConfigStruct::m_generated_starting_points_file
std::string m_generated_starting_points_file
switch for shower starting point record
Definition: FastShowerConfigStruct.h:36
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
HepMC::newGenParticlePtr
GenParticlePtr newGenParticlePtr(const HepMC::FourVector &mom=HepMC::FourVector(0.0, 0.0, 0.0, 0.0), int pid=0, int status=0)
Definition: GenParticle.h:39
FastShowerConfigStruct::m_e_FlagShowerLib
bool m_e_FlagShowerLib
switch for electron frozen showers
Definition: FastShowerConfigStruct.h:13
python.BackTrackingConfig.numThreads
int numThreads
Definition: BackTrackingConfig.py:61
FastShowerConfigStruct::m_e_MaxEneShowerLib
double m_e_MaxEneShowerLib
upper energy limit for electron frozen showers
Definition: FastShowerConfigStruct.h:15
FastShowerConfigStruct::m_containLow
bool m_containLow
switch for containment check at low eta
Definition: FastShowerConfigStruct.h:29
FastShowerConfigStruct::m_containCrack
bool m_containCrack
switch for containment check in crack region
Definition: FastShowerConfigStruct.h:33
FastShowerConfigStruct::m_e_MinEneShowerLib
double m_e_MinEneShowerLib
lower energy limit for electron frozen showers
Definition: FastShowerConfigStruct.h:14
CaloCell_ID_FCS::FCAL2
@ FCAL2
Definition: FastCaloSim_CaloCell_ID.h:42
LArFastShower::m_starting_points_file
std::shared_ptr< HepMC::IO_GenEvent > m_starting_points_file
Definition: LArFastShower.h:95
LArFastShower::m_fastSimDedicatedSD
IFastSimDedicatedSD * m_fastSimDedicatedSD
Shower library sensitive detector for this shower.
Definition: LArFastShower.h:86
FastShowerConfigStruct::m_containHigh
bool m_containHigh
switch for containment check at high eta
Definition: FastShowerConfigStruct.h:31
FastShowerConfigStruct::m_Pion_MaxEneShowerLib
double m_Pion_MaxEneShowerLib
upper energy limit for pion frozen showers
Definition: FastShowerConfigStruct.h:27
LArFastShower::maxEneToShowerLib
double maxEneToShowerLib(const G4ParticleDefinition &particleType) const
get lower energy limit for frozen showers
Definition: LArFastShower.cxx:432
LArFastShower::m_detmap
std::map< std::string, int > m_detmap
Definition: LArFastShower.h:98
ILArG4ShowerLibSvc::getContainmentR
virtual double getContainmentR(const G4FastTrack &, int)=0