ATLAS Offline Software
Loading...
Searching...
No Matches
CosmicGenerator Class Reference

Cosmic generator. More...

#include <CosmicGenerator.h>

Inheritance diagram for CosmicGenerator:
Collaboration diagram for CosmicGenerator:

Public Member Functions

 CosmicGenerator (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~CosmicGenerator ()=default
virtual StatusCode genInitialize ()
 For initializing the generator, if required.
virtual StatusCode callGenerator ()
 For calling the generator on each iteration of the event loop.
virtual StatusCode genFinalize ()
 For finalising the generator, if required.
virtual StatusCode fillEvt (HepMC::GenEvent *evt)
 For filling the HepMC event object.
CLHEP::HepLorentzVector generateVertex (void)
CLHEP::HepLorentzVector generateVertexReweighted (void)
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Event loop algorithm methods: not to be overloaded
StatusCode initialize ()
StatusCode execute (const EventContext &ctx)
 Execute method.
StatusCode finalize ()
Gen-specific event loop methods: to be overloaded
virtual StatusCode genuserInitialize ()
 For initialization of user code, if required. Called after genInitialize.
Event collection accessors (const and non-const)
HepMC::GenEvent *event ATLAS_NOT_CONST_THREAD_SAFE ()
 Access the current signal event (first in the McEventCollection).
McEventCollection *events ATLAS_NOT_CONST_THREAD_SAFE ()
 Access the current event's McEventCollection.
const HepMC::GenEventevent_const (const EventContext &ctx) const
 Access the current signal event (const).
const McEventCollectionevents_const (const EventContext &ctx) const
 Access the current event's McEventCollection (const).

Static Public Attributes

static CLHEP::HepRandomEngine * COSMIC_RANDOM_ENGINE {}
 Static pointer to random number generator for use by.

Protected Member Functions

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
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.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool exzCut (const CLHEP::Hep3Vector &pos, const CLHEP::HepLorentzVector &p)
double pathLengthInRock (double xgen, double ygen, double zgen, double theta, double phi)
bool pointsAtPixels (double xgen, double ygen, double zgen, double theta, double phi)
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

int m_events {0}
int m_rejected {0}
int m_accepted {0}
std::vector< int > m_pdgCode
IntegerProperty m_dsid {this, "Dsid", 999999, "Dataset ID number"}
FloatProperty m_emin {this, "emin", 10.*m_GeV}
FloatProperty m_emax {this, "emax", 100.*m_GeV}
FloatProperty m_ctcut {this, "ctcut", 0.35}
FloatProperty m_xlow {this, "xvert_low", 0.*m_mm}
FloatProperty m_xhig {this, "xvert_hig", 10.*m_mm}
FloatProperty m_zlow {this, "zvert_low", 0.*m_mm}
FloatProperty m_zhig {this, "zvert_hig", 10.*m_mm}
FloatProperty m_yval {this, "yvert_val", 81.*m_mm}
FloatProperty m_IPx {this, "IPx", 0.f}
FloatProperty m_IPy {this, "IPy", 0.f}
FloatProperty m_IPz {this, "IPz", 0.f}
FloatProperty m_radius {this, "Radius", 0.f}
FloatProperty m_zpos {this, "Zposition", 14500.f}
FloatProperty m_tmin {this, "tmin", 0.f}
FloatProperty m_tmax {this, "tmax", 0.f}
BooleanProperty m_cavOpt {this, "OptimizeForCavern", false}
IntegerProperty m_srOneOpt {this, "OptimizeForSR1", 0}
BooleanProperty m_srOnePixECOpt {this, "OptimizeForSR1PixelEndCap", false}
BooleanProperty m_swapYZAxis {this, "SwapYZAxis", false}
BooleanProperty m_muonECOpt {this, "OptimizeForMuonEndCap", false}
IntegerProperty m_printEvent {this, "PrintEvent", 10}
IntegerProperty m_printMod {this, "PrintMod", 100}
FloatProperty m_thetamin {this, "ThetaMin", 0.f}
FloatProperty m_thetamax {this, "ThetaMax", 1.f}
FloatProperty m_phimin {this, "PhiMin", -1.*M_PI}
FloatProperty m_phimax {this, "PhiMax", M_PI}
bool m_readfile {false}
StringProperty m_infile {this, "eventfile", "NONE"}
std::ifstream m_ffile
std::vector< CLHEP::HepLorentzVector > m_fourPos
std::vector< CLHEP::HepLorentzVector > m_fourMom
CLHEP::Hep3Vector m_center
std::vector< HepMC::Polarizationm_polarization
BooleanProperty m_exzCut {this, "ExzCut", false}
FloatProperty m_rmax {this, "RMax", 10000000.f}
BooleanProperty m_doPathlengthCut {this, "doPathLengthCut", false}
BooleanProperty m_doAimedAtPixelsCut {this, "doAimedAtPixelsCut", false}
BooleanProperty m_doReweighting {this, "doReweighting", false}
DoubleProperty m_energyCutThreshold {this, "energyCutThreshold", 1.0}
DoubleProperty m_ysurface {this, "ysurface", 81.*m_mm}
DoubleProperty m_rvertmax {this, "rvert_max", 300.*m_mm}
DoubleProperty m_pixelplanemaxx {this, "pixelplane_maxx", 1150.}
DoubleProperty m_pixelplanemaxz {this, "pixelplane_maxz", 1650.}
std::shared_ptr< GenDatam_gendata {nullptr}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Static Private Attributes

static constexpr float m_GeV = 1000.f
static constexpr float m_mm = 10.f

Features for derived classes to use internally

ServiceHandle< IAthRNGSvcm_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
 Data members.
ServiceHandle< IIncidentSvc > m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
 Handle on the incident service.
IntegerProperty m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
 Seed for random number engine.
BooleanProperty m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"}
 Flag for normal vs. afterburner generators.
std::shared_ptr< HepMC3::GenRunInfo > m_runinfo {}
 The run info for HepMC3.
CLHEP::HepRandomEngine * getRandomEngine (const std::string &streamName, const EventContext &ctx) const
CLHEP::HepRandomEngine * getRandomEngine (const std::string &streamName, unsigned long int randomSeedOffset, const EventContext &ctx) const
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize (const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const

Properties

SG::ReadHandleKey< McEventCollectionm_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
 Const handle to the MC event collection.
std::string m_mcEventKey {}
 StoreGate key for the MC event collection (defaults to GEN_EVENT).
BooleanProperty m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
 Flag to determine if a new MC event collection should be made if it doesn't exist.

Detailed Description

Cosmic generator.

The output will be stored in the transient event store so it can be passed to the simulation.

Author
W. Seligman: Initial Code 08-Nov-2002, based on work by M. Shapiro and I. Hinchliffe

Modification for increasing efficiency of muon hitting the detector: H. Ma. March 17, 2006 Property: ExzCut:
if true, the method exzCut(...) will be called to apply a energy dependent position cut on the surface. This rejects low energy muons at large distance. Property: RMax Used by exzCut to reject non-projective muons, which are too far out on the surface

Modifications to accomodate Pixel EndCap C Cosmic Test needs Marian Zdrazil June 7, 2006 mzdra.nosp@m.zil@.nosp@m.lbl.g.nosp@m.ov

Modifications to accomodate replacement of Pixel EndCap C by a Pixel EndCap A Marian Zdrazil November 24, 2006 mzdra.nosp@m.zil@.nosp@m.lbl.g.nosp@m.ov

It is easier and actually more useful to leave the EndCap A in the vertical position (the way it is positioned in the ATLAS detector) instead of rotating it clockwise by 90deg which corresponds to the placement during the Pixel EndCap A cosmic test in SR1 in November 2006. This is why we will generate cosmic muons coming from the positive Z-axis direction better than rotating the whole setup in PixelGeoModel.

Modifications July 3rd 2007, Rob McPherson

  • Fix mu+/mu- bug (always present in Athena versions)
  • Fix sign of Py (since tag CosmicGenerator-00-00-21, muons only upward-going)

Optimize selection of events passed to Geant4 for full simulation:

Definition at line 77 of file CosmicGenerator.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ CosmicGenerator()

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

Definition at line 80 of file CosmicGenerator.cxx.

82 : GenModule(name,pSvcLocator)
83//--------------------------------------------------------------------------
84{
85}
GenModule(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition GenModule.cxx:14

◆ ~CosmicGenerator()

virtual CosmicGenerator::~CosmicGenerator ( )
virtualdefault

Member Function Documentation

◆ ATLAS_NOT_CONST_THREAD_SAFE() [1/2]

McEventCollection *events GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inherited

Access the current event's McEventCollection.

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

◆ ATLAS_NOT_CONST_THREAD_SAFE() [2/2]

HepMC::GenEvent *event GenBase::ATLAS_NOT_CONST_THREAD_SAFE ( )
inlineinherited

Access the current signal event (first in the McEventCollection).

Note
This function will make a new McEventCollection if there is not already a valid one and MakeMcEvent=True.

Definition at line 72 of file GenBase.h.

72 {
73 if (events()->empty())
74 ATH_MSG_ERROR("McEventCollection is empty during first event access");
75 return *(events()->begin());
76 }
#define ATH_MSG_ERROR(x)
static const Attributes_t empty

◆ callGenerator()

StatusCode CosmicGenerator::callGenerator ( )
virtual

For calling the generator on each iteration of the event loop.

Reimplemented from GenModule.

Definition at line 216 of file CosmicGenerator.cxx.

216 {
217//---------------------------------------------------------------------------
218
219 ++m_events;
220 ATH_MSG_DEBUG( "Event #" << m_events);
221
222 assert(COSMIC_RANDOM_ENGINE != 0);
223 //Re-seed the random number stream
224 long seeds[7];
225 const EventContext& ctx = Gaudi::Hive::currentContext();
226 ATHRNG::calculateSeedsMC21(seeds, "COSMICS", ctx.eventID().event_number(), m_dsid, m_randomSeed);
227 COSMIC_RANDOM_ENGINE->setSeeds(seeds, 0); // NOT THREAD-SAFE
228 CLHEP::HepRandomEngine* engine = COSMIC_RANDOM_ENGINE;
229
230 // clear up the vectors
231 m_fourPos.clear();
232 m_fourMom.clear();
233 m_polarization.clear();
234 m_pdgCode.clear();
235
236
237 if(m_readfile)
238 {
239 if(!m_ffile.eof())
240 {
241 CosmicEventParser evt;
242 m_ffile >> evt;
243
244 ATH_MSG_VERBOSE( evt );
245
246 HepMC::Polarization thePolarization(0.0,0.0);
247 m_polarization.push_back(thePolarization);
248
249 //
250 // units are already converted to MeV's and mm.
251 //
252 m_fourPos.push_back(evt.Vertex());
253 m_fourMom.push_back(evt.Momentum());
254 m_pdgCode.push_back(evt.pdgID());
255
256 }
257 else
258 {
259 ATH_MSG_FATAL( "End of file reached - stop " );
260 exit(1);
261 return StatusCode::FAILURE;
262 }
263 }
264 else
265 {
266
267 bool accepted=false;
268 CLHEP::HepLorentzVector pp;
269 CosmicGun* gun = CosmicGun::GetCosmicGun();
270 CLHEP::HepLorentzVector vert;
271 CLHEP::Hep3Vector vert3;
272 double theta1;
273 double phi1;
274 double mag1;
275
276 while(!accepted){
277
278 if (m_doReweighting && m_cavOpt) {
279 // The code here doesn't make sense without the sphere cut in the
280 // cavern optimization that is selected by OptimizeForCavern=True
282 vert3 = CLHEP::Hep3Vector(vert.x(),vert.y(),vert.z());
283
284 double vert_radius=sqrt(vert3.x()*vert3.x() + vert3.z()*vert3.z());
285
286 pp = gun->GenerateEvent();
287
288 theta1=pp.theta();
289 phi1=pp.phi();
290 mag1=pp.rho();
291
292 if (vert_radius>m_radius) {
293 phi1=atan2(vert.z(),vert.x())+M_PI;
294 float delta_phi=std::asin(m_radius/vert_radius);
295 phi1=phi1+CLHEP::RandFlat::shoot(engine, -delta_phi, delta_phi);
296 }
297 pp.setX(mag1*sin(theta1)*std::cos(phi1));
298 pp.setY(mag1*sin(theta1)*std::sin(phi1));
299
300 } else {
301 vert = generateVertex();
302 vert3 = CLHEP::Hep3Vector(vert.x(),vert.y(),vert.z());
303
304 pp = gun->GenerateEvent();
305
306 theta1=pp.theta();
307 phi1=pp.phi();
308 mag1=pp.rho();
309 }
310
311 CLHEP::Hep3Vector pp_corr(mag1*sin(theta1)*std::cos(phi1),
312 -mag1*std::cos(theta1),
313 mag1*std::sin(theta1)*std::sin(phi1));
314 CLHEP::Hep3Vector direction(pp_corr.x(),pp_corr.y(), pp_corr.z());
315
316 // if optimization activated, check for the direction of the generated muon
317 if(m_cavOpt) {
318
319 CLHEP::Hep3Vector center_dir=m_center-vert3;
320 double beta=direction.angle(center_dir);
321 double alpha=std::asin(m_radius/center_dir.r());
322
323 if(std::abs(beta)<alpha) {
324
325 if(m_exzCut) {
326 // Old optimization code - is it still useful?
327 CLHEP::HepLorentzVector pp2(pp_corr.x(),pp_corr.y(), pp_corr.z(), pp.e());
328 if( exzCut(vert3,pp2) ) {
329 accepted=true;
330 }
331 } else {
332
333 accepted = true;
334
335 ATH_MSG_DEBUG( "x0 = " << vert3.x()
336 << ", y0 = " << vert3.y()
337 << ", z0 = " << vert3.z()
338 << ", theta = " << pp.theta()
339 << ", phi = " << pp.phi()
340 << ", energy = " << pp.e()*m_GeV );
341
342 if (m_doPathlengthCut) {
343 double path = pathLengthInRock(vert3.x(),vert3.y(),vert3.z(),pp.theta(),pp.phi());
344 double energyLoss = 2.33e-3 * 244. * path; //FIXME Hardcoded values!
345 ATH_MSG_DEBUG( "Energy loss is " << energyLoss
346 << " --> " << (energyLoss>pp.e()*m_GeV ? "REJECTED" : "ACCEPTED") << " by pathlength cut");
347 if (energyLoss-m_energyCutThreshold > pp.e()*m_GeV) accepted = false;
348 }
349
351 bool aimedAtPixels = pointsAtPixels(vert3.x(),vert3.y(),vert3.z(),pp.theta(),pp.phi());
352 ATH_MSG_DEBUG( (aimedAtPixels ? "AIMED AT PIXELS" : "NOT AIMED AT PIXELS") );
353 if (!aimedAtPixels) accepted = false;
354 }
355
356 // FOR DEBUGGING ONLY
357 if (accepted) {
358 ATH_MSG_VERBOSE("The following event has been accepted for simulation:");
359 ATH_MSG_VERBOSE( "x0 = " << vert3.x() << ", y0 = " << vert3.y() << ", z0 = " << vert3.z()
360 << ", theta = " << pp.theta() << ", phi = " << pp.phi() << ", energy = " << pp.e()*m_GeV );
361
362 if (m_doPathlengthCut) {
363 double path = pathLengthInRock(vert3.x(),vert3.y(),vert3.z(),pp.theta(),pp.phi());
364 double energyLoss = 2.33e-3 * 244. * path;
365 ATH_MSG_VERBOSE( "Energy loss is " << energyLoss
366 << " --> " << (energyLoss>pp.e()*m_GeV ? "REJECTED" : "ACCEPTED") << " by pathlength cut" );
367 }
368
370 bool aimedAtPixels = pointsAtPixels(vert3.x(),vert3.y(),vert3.z(),pp.theta(),pp.phi());
371 ATH_MSG_VERBOSE( (aimedAtPixels ? "AIMED AT PIXELS" : "NOT AIMED AT PIXELS") );
372 }
373
374 }
375
376 }
377 }
378
379 if(accepted) {
380 m_accepted++;
381 } else {
382 ATH_MSG_VERBOSE("Rejected muon due to cavern optimization request!");
383 m_rejected++;
384 }
385 }
386 else if(m_srOneOpt == 1) {
387 CLHEP::Hep3Vector srOneVec(direction.x(), direction.y(), direction.z());
388 if(mag1 < 0) // Check if momentum vector is flipped.
389 srOneVec *= -1;
390
391 if( (srOneVec.phi() >= -2.25) && (srOneVec.phi() <= -1.7) &&
392 (srOneVec.theta() >= 0.85) && (srOneVec.theta() <= 2.25) ) { //FIXME Hardcoded values!
393 accepted = true;
394 m_accepted++;
395 ATH_MSG_DEBUG("Muon accepted by SR1 SCT/TRT optimization!");
396 } else {
397 ATH_MSG_DEBUG("Rejected muon due to SR1 SCT/TRT optimization request!");
398 m_rejected++;
399 }
400 }
401 else if(m_srOneOpt == 2) {
402 CLHEP::Hep3Vector srOneVec(direction.x(), direction.y(), direction.z());
403 if(mag1 < 0) // Check if momentum vector is flipped.
404 srOneVec *= -1;
405
406 if( (srOneVec.phi() >= -1.68) && (srOneVec.phi() <= -1.08) &&
407 (srOneVec.theta() >= 0.29) && (srOneVec.theta() <= 0.72) ) { //FIXME Hardcoded values!
408 accepted = true;
409 m_accepted++;
410 ATH_MSG_DEBUG("Muon accepted by SR1 SCT/TRT EndCapC optimization!");
411 } else {
412 ATH_MSG_DEBUG("Rejected muon due to SR1 SCT/TRT EndcapC optimization request!");
413 m_rejected++;
414 }
415 }
416
417 else if(m_srOnePixECOpt) {
418 CLHEP::Hep3Vector srOneVec(direction.x(), direction.y(), direction.z());
419 if(mag1 < 0) // Check if momentum vector is flipped.
420 srOneVec *= -1;
421
422 if( (srOneVec.phi() >= m_phimin) && (srOneVec.phi() <= m_phimax) &&
423 (srOneVec.theta() >= m_thetamin) && (srOneVec.theta() <= m_thetamax) ) {
424 accepted = true;
425 m_accepted++;
426 ATH_MSG_DEBUG("Muon accepted by SR1 Pixel EndCap optimization!");
427 } else {
428 ATH_MSG_DEBUG("Rejected muon due to SR1 Pixel EndCap optimization request!");
429 m_rejected++;
430 }
431 }
432
433 else if (m_muonECOpt) {
434 double coor_x, coor_y, coor_z;
435 coor_z = m_zpos; // defined in jobOpt.
436 coor_x = direction.x()*(coor_z - vert.z())/direction.z() +vert.x();
437 coor_y = direction.y()*(coor_z - vert.z())/direction.z() +vert.y();
438 if( ((coor_x)*(coor_x) + (coor_y)*(coor_y)) <= m_radius*m_radius ) {
439 accepted = true;
440 m_accepted++;
441 } else {
442 coor_z = -m_zpos;
443 coor_x = direction.x()*(coor_z - vert.z())/direction.z() +vert.x();
444 coor_y = direction.y()*(coor_z - vert.z())/direction.z() +vert.y();
445 if( ((coor_x)*(coor_x) + (coor_y)*(coor_y)) <= m_radius*m_radius ) {
446 accepted = true;
447 m_accepted++;
448 } else {
449 ATH_MSG_DEBUG("Rejected muon due to Muon EndCap optimization request!");
450 m_rejected++;
451 }
452 }
453 }
454
455 else accepted=true; // if no opt required accept the first muon
456 }
457
458 pp.setX(pp.x()*m_GeV);
459 pp.setY(pp.y()*m_GeV);
460 pp.setZ(pp.z()*m_GeV);
461 pp.setT(pp.t()*m_GeV);
462
463 // Get the mass of the particle to be generated
464 int charge = gun->GetMuonCharge();
465 // m_pdgCode.push_back(charge*13);
466 m_pdgCode.push_back(charge*-13);
467
468 const auto pmass = m_gendata->particleMass(std::abs(m_pdgCode.back()));
469 if (!pmass){
470 ATH_MSG_FATAL( "Particle with PDG ID=" << std::abs(m_pdgCode.back()) << " returned a nullptr" );
471 return StatusCode::FAILURE;
472 }
473
474 double mass = *pmass;
475
476 // Compute the kinematic values. First, the vertex 4-vector:
477 double x = vert.x();
478 double y = vert.y();
479 double z = vert.z();
480 double t = vert.t();
481
482 // Do we need to swap Y- and Z-axis for the PixelEndCap A Cosmic test ?
483 // if not...do nothing...if so, invert position of y- and z- coordinate
484 //
485 // but not only that...change also the direction of the incoming cosmic muon(s),
486 // they must go towards the pixel endcap A, i.e. y -> -y
487 //
488 if(!m_swapYZAxis)
489 m_fourPos.push_back(CLHEP::HepLorentzVector(x,y,z,t));
490 else
491 m_fourPos.push_back(CLHEP::HepLorentzVector(x,z,y,t));
492
493 // Set the polarization. Realistically, this is going to be zero
494 // for most studies.
495 HepMC::Polarization thePolarization(0.0);
496 m_polarization.push_back(thePolarization);
497
498
499 // The method of calculating e, theta, and phi depends on the user's
500 // commands. Let the KinematicManager handle it.
501 double e = pp.e();
502 double theta = pp.theta();
503 double phi = pp.phi();
504
505 // At this point, we have e, theta, and phi. Put them together to
506 // get the four-momentum.
507
508 double p2 = e*e - mass*mass;
509 if ( p2 < 0 )
510 {
511 ATH_MSG_ERROR( "Event #" << m_events
512 << " E=" << e << ", mass=" << mass
513 << " -- you have generated a tachyon! Increase energy or change particle ID." );
514 return StatusCode::FAILURE;
515 }
516
517 double p = std::sqrt(p2);
518 double px = p*std::sin(theta)*std::cos(phi);
519 double pz = p*std::sin(theta)*std::sin(phi);
520 double py = -p*std::cos(theta);
521
522 // Do we need to swap Y- and Z-axis for the PixelEndCap C Cosmic test ?
523 // if not...do nothing...if so, invert position of y- and z- coordinate
524 //
525 // well and don't forget about the direction of the incoming cosmic muon(s) either
526 // that means: y -> -y
527 //
528 if(!m_swapYZAxis) {
529 // Line below corrupted py sign and forces muons to be upwards, not downwards.
530 // m_fourMom.push_back(CLHEP::HepLorentzVector(px,-py,pz,pp.e()));
531 m_fourMom.push_back(CLHEP::HepLorentzVector(px,py,pz,pp.e()));
532 }
533 else
534 m_fourMom.push_back(CLHEP::HepLorentzVector(px,pz,-py,pp.e()));
535
537 " (x,y,z,t) = ("
538 << m_fourPos.back().x() << ","
539 << m_fourPos.back().y() << ","
540 << m_fourPos.back().z() << ","
541 << m_fourPos.back().t() << "), (Px,Py,Pz,E) = ("
542 << m_fourMom.back().px() << ","
543 << m_fourMom.back().py() << ","
544 << m_fourMom.back().pz() << ","
545 << m_fourMom.back().e() << ")" );
547 " (theta,phi) = (" << theta << "," << phi << "), "
548 << "polarization(theta,phi) = ("<< m_polarization.back().theta() << ","<< m_polarization.back().phi() << ")" );
549 }
550 return StatusCode::SUCCESS;
551
552}
#define M_PI
Scalar phi() const
phi method
Scalar theta() const
theta method
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
#define y
#define x
#define z
BooleanProperty m_doAimedAtPixelsCut
FloatProperty m_thetamax
std::vector< CLHEP::HepLorentzVector > m_fourPos
BooleanProperty m_doPathlengthCut
BooleanProperty m_cavOpt
BooleanProperty m_doReweighting
FloatProperty m_phimin
CLHEP::HepLorentzVector generateVertexReweighted(void)
FloatProperty m_phimax
bool exzCut(const CLHEP::Hep3Vector &pos, const CLHEP::HepLorentzVector &p)
std::ifstream m_ffile
FloatProperty m_zpos
IntegerProperty m_srOneOpt
bool pointsAtPixels(double xgen, double ygen, double zgen, double theta, double phi)
std::shared_ptr< GenData > m_gendata
BooleanProperty m_srOnePixECOpt
DoubleProperty m_energyCutThreshold
static CLHEP::HepRandomEngine * COSMIC_RANDOM_ENGINE
Static pointer to random number generator for use by.
CLHEP::HepLorentzVector generateVertex(void)
BooleanProperty m_exzCut
std::vector< HepMC::Polarization > m_polarization
std::vector< CLHEP::HepLorentzVector > m_fourMom
CLHEP::Hep3Vector m_center
FloatProperty m_thetamin
FloatProperty m_radius
BooleanProperty m_muonECOpt
static constexpr float m_GeV
BooleanProperty m_swapYZAxis
std::vector< int > m_pdgCode
double pathLengthInRock(double xgen, double ygen, double zgen, double theta, double phi)
IntegerProperty m_dsid
int GetMuonCharge(void)
CLHEP::HepLorentzVector GenerateEvent(void)
static CosmicGun * GetCosmicGun(void)
Definition CosmicGun.cxx:53
IntegerProperty m_randomSeed
Seed for random number engine.
Definition GenModule.h:84
void calculateSeedsMC21(long *seeds, const std::string &algName, uint64_t ev, uint64_t run, uint64_t offset=0)
Set the random seed using a string (e.g.
const Amg::Vector3D & direction() const
Method to retrieve the direction at the Intersection.
path
python interpreter configuration --------------------------------------—
Definition athena.py:130
delta_phi(phi1, phi2)
Definition eFEXNTuple.py:14

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ event_const()

const HepMC::GenEvent * GenBase::event_const ( const EventContext & ctx) const
inlineinherited

Access the current signal event (const).

Definition at line 79 of file GenBase.h.

79 {
80 const McEventCollection* coll = events_const(ctx);
81 if (coll->empty())
82 ATH_MSG_ERROR("Const McEventCollection is empty during first event access");
83 return *(coll->begin());
84 }
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
bool empty() const noexcept
Returns true if the collection is empty.
const McEventCollection * events_const(const EventContext &ctx) const
Access the current event's McEventCollection (const).
Definition GenBase.h:93

◆ events_const()

const McEventCollection * GenBase::events_const ( const EventContext & ctx) const
inlineinherited

Access the current event's McEventCollection (const).

Definition at line 93 of file GenBase.h.

93 {
94 SG::ReadHandle<McEventCollection> ret = SG::makeHandle(m_mcevents_const, ctx);
95 if (!ret.isValid())
96 ATH_MSG_ERROR("No McEventCollection found in StoreGate with key " << m_mcevents_const.key());
97 return ret.cptr();
98 }
SG::ReadHandleKey< McEventCollection > m_mcevents_const
Const handle to the MC event collection.
Definition GenBase.h:117
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode GenModule::execute ( const EventContext & ctx)
virtualinherited

Execute method.

Todo
Remove hard-coded alg name checking (already incomplete)

Reimplemented from GenBase.

Definition at line 70 of file GenModule.cxx.

70 {
71 // Examples of how to retrieve the random number engine for a given
72 // stream.
73 // NB getRandomEngine should only be called once per event for a
74 // given stream, as it causes the stream to be re-seeded each time
75 // it is called.
76
77 // Example 1 - seeded based on the current event number (+ slot, run, streamName)
78 //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", ctx);
79
80 // Example 2 - seeded based on the m_randomSeed property (+ slot, run, streamName)
81 //CLHEP::HepRandomEngine* rndmEngine = this->getRandomEngine("MyStream", m_randomSeed.value(), ctx);
82
83 // Call the code that generates an event
84 CHECK(this->callGenerator());
85
86 // Create the MC event and send the GeneratorEvent stored in it to fillEvt
88 CHECK(this->fillEvt(evt));
90
91 // Add the event to the MC event collection
92 if (events()) {
93 // If this is an "afterburner" generator, replace the last event rather than add a new one
95 if (m_isAfterburner.value() || name() == "Tauola" || name() == "Photos") {
96 events()->pop_back();
97 }
98 // Add the event to the end of the collection
99 events()->push_back(evt);
100 ATH_MSG_DEBUG("MC event added to McEventCollection");
101
102 // remove the empty event in case of ParticleDecayer
103 if (name() == "ParticleDecayer") {
104 events()->pop_back();
105 }
106 }
107
108 // Call the incident service to notify that an event has been made
109 m_incidentSvc->fireIncident( Incident(name(), "McEventGenerated") );
110 return StatusCode::SUCCESS;
111}
#define CHECK(...)
Evaluate an expression and check for errors.
ServiceHandle< IIncidentSvc > m_incidentSvc
Handle on the incident service.
Definition GenModule.h:99
virtual StatusCode callGenerator()
For calling the generator on each iteration of the event loop.
Definition GenModule.h:66
virtual StatusCode fillEvt(HepMC::GenEvent *evt)=0
For filling the HepMC event object.
BooleanProperty m_isAfterburner
Flag for normal vs. afterburner generators.
Definition GenModule.h:87
void fillBarcodesAttribute(GenEvent *e)
Definition GenEvent.h:393
GenEvent * newGenEvent(const int signal_process_id, const int event_number)
Definition GenEvent.h:360
HepMC3::GenEvent GenEvent
Definition GenEvent.h:39

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & AthCommonAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ exzCut()

bool CosmicGenerator::exzCut ( const CLHEP::Hep3Vector & pos,
const CLHEP::HepLorentzVector & p )
private

Definition at line 664 of file CosmicGenerator.cxx.

665{
666// p is in GeV...
667
668 double r =0;
669 bool cut = false;
670 if(pos.z()<0){
671 r = std::sqrt((std::pow(pos.x(),2)+std::pow(pos.z()+28000,2))) ; //FIXME Hardcoded values!
672 double e = 0.45238*r+5000 ; //FIXME Hardcoded values!
673 cut = p.e()*m_GeV>e;
674 }
675 else
676 {
677 r = std::sqrt((std::pow(pos.x(),2)+std::pow(pos.z()-20000,2))) ; //FIXME Hardcoded values!
678 if(r<15000) { //FIXME Hardcoded values!
679 cut = true;
680 } else
681 {
682 double e = 0.461538*(r-15000)+10000 ; //FIXME Hardcoded values!
683 cut = p.e()*m_GeV>e;
684 ATH_MSG_VERBOSE("z>0 r , e, p.e = "<<r <<" " <<e <<" " <<p.e()*m_GeV);
685 }
686 }
687
688 cut = cut && r < m_rmax ;
689
690 return cut;
691}
FloatProperty m_rmax
int r
Definition globals.cxx:22

◆ fillEvt()

StatusCode CosmicGenerator::fillEvt ( HepMC::GenEvent * evt)
virtual

For filling the HepMC event object.

Implements GenModule.

Definition at line 624 of file CosmicGenerator.cxx.

624 {
625//---------------------------------------------------------------------------
626
627
628 // loop over generated vertices
629 if(m_fourMom.size()==m_fourPos.size()&&m_fourMom.size()==m_polarization.size()){
630
631 for(std::size_t v=0;v<m_fourMom.size();++v){
632
633 // Note: The vertex and particle are owned by the event, so the
634 // event is responsible for those pointers.
635
636 // Create the particle, and specify its polarization.
637
640
641 // Create the vertex, and add the particle to the vertex.
643 vertex->add_particle_out( std::move(particle) );
644
645 // Add the vertex to the event.
646 event->add_vertex( std::move(vertex) );
647
648 }
649
650 event->set_event_number(m_events); // Set the event number
651 if (event->weights().empty()){
652 event->weights().push_back(1.0);
653 }
654 return StatusCode::SUCCESS;
655 } else {
656 ATH_MSG_ERROR("Wrong different number of vertexes/momenta/polaritazions!");
657 return StatusCode::FAILURE;
658 }
659
660}
void set_polarization(T &a, const Polarization &b)
HepMC3::FourVector FourVector
GenParticlePtr newGenParticlePtr(const HepMC3::FourVector &mom=HepMC3::FourVector::ZERO_VECTOR(), int pid=0, int status=0)
Definition GenParticle.h:21
HepMC3::GenParticlePtr GenParticlePtr
Definition GenParticle.h:19
GenVertexPtr newGenVertexPtr(const HepMC3::FourVector &pos=HepMC3::FourVector::ZERO_VECTOR(), const int i=0)
Definition GenVertex.h:25
HepMC3::GenVertexPtr GenVertexPtr
Definition GenVertex.h:23
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses

◆ filterPassed()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode GenModule::finalize ( )
inlineinherited

Definition at line 55 of file GenModule.h.

55{ return genFinalize(); }
virtual StatusCode genFinalize()
For finalising the generator, if required.
Definition GenModule.h:70

◆ generateVertex()

CLHEP::HepLorentzVector CosmicGenerator::generateVertex ( void )

Definition at line 134 of file CosmicGenerator.cxx.

134 {
135
136 // Get the pointer to the engine of the stream named SINGLE. If the
137 // stream does not exist is created automaticaly
138 CLHEP::HepRandomEngine* engine = COSMIC_RANDOM_ENGINE;
139
140 // Generate a random number according to the distribution.
141
142 float x_val = CLHEP::RandFlat::shoot(engine, m_xlow, m_xhig);
143 float z_val = CLHEP::RandFlat::shoot(engine, m_zlow, m_zhig);
144
145 // Generate a random number for time offset
146 float t_val = m_tmin; // Assign defined value
147 if(m_tmin < m_tmax){
148 t_val = CLHEP::RandFlat::shoot(engine, m_tmin, m_tmax);
149 }
150 else if(m_tmin.value() == m_tmax.value()){
151 t_val = m_tmin;
152 }
153 else ATH_MSG_FATAL("You specified m_tmin = " << m_tmin << " and m_tmax " << m_tmax);
154 CLHEP::HepLorentzVector p(x_val,m_yval,z_val, t_val*CLHEP::c_light);
155
156 return p;
157
158}
FloatProperty m_zhig
FloatProperty m_xhig
FloatProperty m_tmin
FloatProperty m_tmax
FloatProperty m_zlow
FloatProperty m_yval
FloatProperty m_xlow

◆ generateVertexReweighted()

CLHEP::HepLorentzVector CosmicGenerator::generateVertexReweighted ( void )

Definition at line 160 of file CosmicGenerator.cxx.

160 {
161
162 // Get the pointer to the engine of the stream named SINGLE. If the
163 // stream does not exist is created automaticaly
164 CLHEP::HepRandomEngine* engine = COSMIC_RANDOM_ENGINE;
165
166 // Generate non-uniform distribution of vertices to reflect azimuthal
167 // angle subtended by the sphere of radiusm m_radius
168 // Inside m_radius, the density of vertices is proportional to 2 pi r dr
169 // Outside m_radius, the density is proportional to 2r arcsin (m_radius/r)
170 // We approximate the latter by its maximum: m_radius * pi
171 // We generate vertices out to m_rvertmax.
172 // Integrating the approximated distribution gives
173 // pi r**2 for r < m_radius and pi m_radius r for r> m_radius
174 // So with ran in (0,1) we take r=max_r * ran for ran>m_radius/max_r
175 // and r= sqrt(m_radius*max_r*ran) for ran<m_radius/max_r
176 // for r>m_radius we use acceptance/rejection by comparing
177 // m_radius * pi * new_ran with 2r arcsin (m_radius/r)
178 int accept=0;
179 float max_r = m_rvertmax;
180 float r_val = 0.;
181 while(accept==0){
182 float ran_one = CLHEP::RandFlat::shoot(engine,0.,1.);
183 if(ran_one>(m_radius/max_r)){
184 r_val = ran_one*max_r;
185 float ran_two = CLHEP::RandFlat::shoot(engine,0.,1.);
186 if(m_radius*M_PI*ran_two<2*r_val*asin(m_radius/r_val)){
187 accept=1;
188 }
189 }
190 else
191 {
192 r_val = std::sqrt(m_radius*max_r*ran_one);
193 accept=1;
194 }
195 }
196 float ran_three= CLHEP::RandFlat::shoot(engine, 0.,2*M_PI);
197 float x_val = r_val*cos(ran_three);
198 float z_val = r_val*sin(ran_three);
199
200 // Generate a random number for time offset
201 float t_val = m_tmin; // Assign defined value
202 if(m_tmin < m_tmax){
203 t_val = CLHEP::RandFlat::shoot(engine, m_tmin, m_tmax);
204 }
205 else if(m_tmin.value() == m_tmax.value()){
206 t_val = m_tmin;
207 }
208 else ATH_MSG_FATAL( " You specified m_tmin = " << m_tmin << " and m_tmax " << m_tmax );
209 CLHEP::HepLorentzVector p(x_val,m_yval,z_val, t_val*CLHEP::c_light);
210
211 return p;
212}
DoubleProperty m_rvertmax
StatusCode accept(const xAOD::Muon *mu)

◆ genFinalize()

StatusCode CosmicGenerator::genFinalize ( )
virtual

For finalising the generator, if required.

Reimplemented from GenModule.

Definition at line 556 of file CosmicGenerator.cxx.

556 {
557//---------------------------------------------------------------------------
558 // Get the KinematicManager.
559
560 if(m_cavOpt){
561
562 ATH_MSG_INFO("********************************************");
563 ATH_MSG_INFO("** you have run CosmicGenerator with some ");
564 ATH_MSG_INFO("** optimizations for cavern simulation");
565 ATH_MSG_INFO("** "<<m_accepted<<" muons were accepted");
566 ATH_MSG_INFO("** "<<m_rejected<<" muons were rejected");
567 ATH_MSG_INFO("********************************************");
568
569 }
570 if(m_srOneOpt == 1){
571
572 ATH_MSG_INFO("**********************************************");
573 ATH_MSG_INFO("** you have run CosmicGenerator with some ");
574 ATH_MSG_INFO("** optimizations for SR1 SCT/TRT simulation");
575 ATH_MSG_INFO("** "<<m_accepted<<" muons were accepted");
576 ATH_MSG_INFO("** "<<m_rejected<<" muons were rejected");
577 ATH_MSG_INFO("**********************************************");
578
579 }
580 if(m_srOneOpt == 2){
581
582 ATH_MSG_INFO("**********************************************");
583 ATH_MSG_INFO("** you have run CosmicGenerator with some ");
584 ATH_MSG_INFO("** optimizations for SR1 SCT/TRT EndcapC simulation");
585 ATH_MSG_INFO("** "<<m_accepted<<" muons were accepted");
586 ATH_MSG_INFO("** "<<m_rejected<<" muons were rejected");
587 ATH_MSG_INFO("**********************************************");
588
589 }
590
591 if(m_srOnePixECOpt){
592
593 ATH_MSG_INFO("***************************************************");
594 ATH_MSG_INFO("** you have run CosmicGenerator with some ");
595 ATH_MSG_INFO("** optimizations for SR1 Pixel EndCap simulation");
596 ATH_MSG_INFO("** "<<m_accepted<<" muons were accepted");
597 ATH_MSG_INFO("** "<<m_rejected<<" muons were rejected");
598 ATH_MSG_INFO("***************************************************");
599
600 if(m_swapYZAxis){
601 ATH_MSG_INFO("***************************************************");
602 ATH_MSG_INFO(" You have swapped Y- and Z-axis, i.e. muons are ");
603 ATH_MSG_INFO(" not coming from the top any more !!! ");
604 ATH_MSG_INFO("***************************************************");
605 }
606
607 }
608
609 if(m_muonECOpt) {
610
611 ATH_MSG_INFO("***************************************************");
612 ATH_MSG_INFO("** you have run CosmicGenerator with some " );
613 ATH_MSG_INFO("** filters for cosmic muon simulation" );
614 ATH_MSG_INFO("** "<<m_accepted<<" muons were accepted" );
615 ATH_MSG_INFO("** "<<m_rejected<<" muons were rejected" );
616 ATH_MSG_INFO("***************************************************");
617 }
618
619 return StatusCode::SUCCESS;
620}
#define ATH_MSG_INFO(x)

◆ genInitialize()

StatusCode CosmicGenerator::genInitialize ( )
virtual

For initializing the generator, if required.

Reimplemented from GenModule.

Definition at line 88 of file CosmicGenerator.cxx.

88 {
89//---------------------------------------------------------------------------
90
91 // Initialize event count.
92
93 m_events = 0;
94
95 m_accepted=0;
96 m_rejected=0;
97
98 if(m_infile.value()=="NONE") {
100 CosmicGun* gun = CosmicGun::GetCosmicGun();
101
103 gun->SetCosCut(m_ctcut);
105 float flux_withCT = gun->InitializeGenerator();
106
107 ATH_MSG_INFO( "Initialisation cosmic gun done." );
108 ATH_MSG_INFO( "Accepted diff flux after E and cos(theta) cuts = " << flux_withCT << " /cm^2/s" );
109 if (! m_doReweighting) {
110 // The following is only correct w/o reweighting
111 ATH_MSG_INFO( "Accepted total flux after E and cos(theta) cuts = " <<
112 flux_withCT*(m_xhig-m_xlow)/m_mm*(m_zhig-m_zlow)/m_mm << " /s" );
113 }
114
115 }
116 else {
117 ATH_MSG_INFO( "Cosmics are read from file " << m_infile );
118 m_ffile.open(m_infile.value().c_str());
119 if(!m_ffile) {
120 ATH_MSG_FATAL( "Could not open input file - stop! " );
121 return StatusCode::FAILURE;
122 }
123 m_readfile = true;
124 }
125
126 m_center=CLHEP::Hep3Vector(m_IPx, m_IPy, m_IPz);
127
128 m_gendata = std::make_shared<GenData>();
129
130 return StatusCode::SUCCESS;
131
132}
FloatProperty m_IPz
FloatProperty m_ctcut
IntegerProperty m_printMod
FloatProperty m_IPy
FloatProperty m_emin
static constexpr float m_mm
IntegerProperty m_printEvent
StringProperty m_infile
FloatProperty m_IPx
FloatProperty m_emax
void PrintLevel(int printevt, int printmod)
Definition CosmicGun.cxx:94
void SetEnergyRange(float emin, float emax)
float InitializeGenerator()
Definition CosmicGun.cxx:85
void SetCosCut(float ctcut)
CLHEP::HepRandomEngine * getRandomEngineDuringInitialize(const std::string &streamName, unsigned long int randomSeedOffset, unsigned int conditionsRun=1, unsigned int lbn=1) const
Definition GenModule.cxx:53

◆ genuserInitialize()

virtual StatusCode GenModule::genuserInitialize ( )
inlinevirtualinherited

For initialization of user code, if required. Called after genInitialize.

Reimplemented in Pythia8B_i.

Definition at line 64 of file GenModule.h.

64{ return StatusCode::SUCCESS; }

◆ getRandomEngine() [1/2]

CLHEP::HepRandomEngine * GenModule::getRandomEngine ( const std::string & streamName,
const EventContext & ctx ) const
protectedinherited

Definition at line 34 of file GenModule.cxx.

36{
37 ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
38 std::string rngName = name()+streamName;
39 rngWrapper->setSeed( rngName, ctx );
40 return rngWrapper->getEngine(ctx);
41}
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
ServiceHandle< IAthRNGSvc > m_rndmSvc
Data members.
Definition GenModule.h:97

◆ getRandomEngine() [2/2]

CLHEP::HepRandomEngine * GenModule::getRandomEngine ( const std::string & streamName,
unsigned long int randomSeedOffset,
const EventContext & ctx ) const
protectedinherited

Definition at line 44 of file GenModule.cxx.

46{
47 ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, streamName);
48 rngWrapper->setSeed( streamName, ctx.slot(), randomSeedOffset, ctx.eventID().run_number() );
49 return rngWrapper->getEngine(ctx);
50}

◆ getRandomEngineDuringInitialize()

CLHEP::HepRandomEngine * GenModule::getRandomEngineDuringInitialize ( const std::string & streamName,
unsigned long int randomSeedOffset,
unsigned int conditionsRun = 1,
unsigned int lbn = 1 ) const
protectedinherited

Definition at line 53 of file GenModule.cxx.

54{
55 const size_t slot=0;
56 EventContext ctx;
57 ctx.setSlot( slot );
58 ctx.setEventID (EventIDBase (conditionsRun,
59 EventIDBase::UNDEFEVT, // event
60 EventIDBase::UNDEFNUM, // timestamp
61 EventIDBase::UNDEFNUM, // timestamp ns
62 lbn));
64 Atlas::ExtendedEventContext( evtStore()->hiveProxyDict(),
65 conditionsRun) );
66 return getRandomEngine(streamName, randomSeedOffset, ctx);
67}
ServiceHandle< StoreGateSvc > & evtStore()
CLHEP::HepRandomEngine * getRandomEngine(const std::string &streamName, const EventContext &ctx) const
Definition GenModule.cxx:34
void setExtendedEventContext(EventContext &ctx, ExtendedEventContext &&ectx)
Move an extended context into a context object.

◆ initialize()

StatusCode GenModule::initialize ( )
virtualinherited

Reimplemented from GenBase.

Definition at line 21 of file GenModule.cxx.

21 {
22 // Base class initializations
24 // Get the random number service
25 CHECK(m_rndmSvc.retrieve());
26 // Get the incident service
27 CHECK(m_incidentSvc.retrieve());
30 return StatusCode::SUCCESS;
31}
virtual StatusCode initialize() override
Definition GenBase.cxx:17
virtual StatusCode genuserInitialize()
For initialization of user code, if required. Called after genInitialize.
Definition GenModule.h:64
virtual StatusCode genInitialize()
For initializing the generator, if required.
Definition GenModule.h:62

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::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< Gaudi::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.

◆ pathLengthInRock()

double CosmicGenerator::pathLengthInRock ( double xgen,
double ygen,
double zgen,
double theta,
double phi )
private

Definition at line 696 of file CosmicGenerator.cxx.

696 {
697 // y is vertical direction, z along beam, major shaft has z>0
698
699 // Definition of shafts and cavern
700 double p14_x = 1700; //FIXME Hardcoded values!
701 double p14_z = 13500; //FIXME Hardcoded values!
702 double p14_radius = 9000.; //FIXME Hardcoded values!
703 double p16_x = 1700; //FIXME Hardcoded values!
704 double p16_z = -20000; //FIXME Hardcoded values!
705 double p16_radius = 6300.; //FIXME Hardcoded values!
706 double y1 = 26400; // ! mm cavern height above IP //FIXME Hardcoded values!
707
708 // direction of trajectory
709 // x=x0 - t sinth cosphi; y=y0 + t costh; z=z0 - t sinth sinphi
710 double cosphi = std::cos(phi);
711 double sinphi = std::sin(phi);
712 double costh = std::cos(theta);
713 double sinth = std::sin(theta);
714
715 double y0 = m_ysurface;
716 double t = (ygen-y0)/costh;
717 double x0 = xgen + t*sinth*cosphi; // x position at y=0
718 double z0 = zgen + t*sinth*sinphi; // z position at y=0
719
720 // full path length ignoring shaft
721 double full_distance = (y0-y1)/costh;
722
723 // does trajectory intersect p14 cylinder?
724 double z_mid14 = (x0-p14_x)*sinphi-(z0-p14_z)*cosphi;
725 double min_dist14 = std::abs(z_mid14); //minimum distance of line from center
726 double shaft_distance14 = 0.;
727 if (min_dist14<p14_radius) {
728
729 // z values at intersections
730 double z_plus14 = -cosphi*z_mid14+sinphi*std::sqrt(std::pow(p14_radius,2.)-std::pow(z_mid14,2.)) + p14_z;
731 double z_minus14 = -cosphi*z_mid14-sinphi*std::sqrt(std::pow(p14_radius,2.)-std::pow(z_mid14,2.)) + p14_z;
732
733 // y values at intersections
734 double y_plus14 = y0-costh*(z_plus14-z0)/sinth/sinphi;
735 double y_minus14 = y0-costh*(z_minus14-z0)/sinth/sinphi;
736 double y_great14 = y_plus14>y_minus14 ? y_plus14 : y_minus14;
737 double y_less14 = y_plus14>y_minus14 ? y_minus14 : y_plus14;
738
739 // top intersection must occur above bottom of shaft
740 if ( (y_great14>y1) && (y_less14<y0) ) {
741 double y_top14 = y_great14<y0 ? y_great14 : y0;
742 double y_bottom14 = y_less14>y1 ? y_less14 : y1;
743 shaft_distance14 = (y_top14-y_bottom14)/costh;
744 }
745 }
746
747 // does trajectory intersect p16 cylinder?
748 double z_mid16 = (x0-p16_x)*sinphi-(z0-p16_z)*cosphi;
749 double min_dist16 = std::abs(z_mid16);
750 double shaft_distance16 = 0.;
751 if (min_dist16<p16_radius) {
752
753 // z values at intersections
754 double z_plus16 = -cosphi*z_mid16+sinphi*std::sqrt(std::pow(p16_radius,2.)-std::pow(z_mid16,2.)) + p16_z;
755 double z_minus16 = -cosphi*z_mid16-sinphi*std::sqrt(std::pow(p16_radius,2.)-std::pow(z_mid16,2.)) + p16_z;
756
757 // determine y values at intersections
758 double y_plus16 = y0-costh*(z_plus16-z0)/sinth/sinphi;
759 double y_minus16 = y0-costh*(z_minus16-z0)/sinth/sinphi;
760 double y_great16 = y_plus16>y_minus16 ? y_plus16 : y_minus16;
761 double y_less16 = y_plus16>y_minus16 ? y_minus16 : y_plus16;
762
763 // top intersection must occur above bottom of shaft
764 if ( (y_great16>y1) && (y_less16<y0) ) {
765 double y_top16 = y_great16<y0 ? y_great16 : y0;
766 double y_bottom16 = y_less16>y1 ? y_less16 : y1;
767 shaft_distance16 = (y_top16-y_bottom16)/costh;
768 }
769 }
770
771 double rock_distance = full_distance - shaft_distance14-shaft_distance16;
772 return rock_distance;
773}
DoubleProperty m_ysurface

◆ pointsAtPixels()

bool CosmicGenerator::pointsAtPixels ( double xgen,
double ygen,
double zgen,
double theta,
double phi )
private

Definition at line 777 of file CosmicGenerator.cxx.

777 {
778 // y is vertical direction, z along beam, major shaft has z<0
779 bool does = false;
780
781 // direction of trajectory
782 // x=xgen+ t sinth cosphi; y=ygen+t costh; z=zgen+t sinth sinphi
783 double cosphi = std::cos(phi);
784 double sinphi = std::sin(phi);
785 double costh = std::cos(theta);
786 double sinth = std::sin(theta);
787 double t = ygen/costh; //for parameterized trajectory
788 double x_pos = xgen + t*sinth*cosphi; //x position at y=0
789 double z_pos = zgen + t*sinth*sinphi; //z position at y=0
790
791 ATH_MSG_VERBOSE("x_pos = " << x_pos << ", z_pos = " << z_pos);
792
793 if((std::abs(x_pos)<m_pixelplanemaxx)&&(std::abs(z_pos)<m_pixelplanemaxz)){
794 does=true;
795 }
796
797 return does;
798}
DoubleProperty m_pixelplanemaxx
DoubleProperty m_pixelplanemaxz

◆ 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< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
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)

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Set filter decision:

Reimplemented in AthFilterAlgorithm.

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

StatusCode AthCommonAlgorithm< Gaudi::Algorithm >::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< Gaudi::Algorithm > >.

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

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
#define ATH_MSG_WARNING(x)
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::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) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ COSMIC_RANDOM_ENGINE

CLHEP::HepRandomEngine * CosmicGenerator::COSMIC_RANDOM_ENGINE {}
static

Static pointer to random number generator for use by.

Definition at line 73 of file CosmicGenerator.h.

◆ m_accepted

int CosmicGenerator::m_accepted {0}
private

Definition at line 105 of file CosmicGenerator.h.

105{0};

◆ m_cavOpt

BooleanProperty CosmicGenerator::m_cavOpt {this, "OptimizeForCavern", false}
private

Definition at line 124 of file CosmicGenerator.h.

124{this, "OptimizeForCavern", false};

◆ m_center

CLHEP::Hep3Vector CosmicGenerator::m_center
private

Definition at line 144 of file CosmicGenerator.h.

◆ m_ctcut

FloatProperty CosmicGenerator::m_ctcut {this, "ctcut", 0.35}
private

Definition at line 111 of file CosmicGenerator.h.

111{this, "ctcut", 0.35};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doAimedAtPixelsCut

BooleanProperty CosmicGenerator::m_doAimedAtPixelsCut {this, "doAimedAtPixelsCut", false}
private

Definition at line 162 of file CosmicGenerator.h.

162{this, "doAimedAtPixelsCut", false};

◆ m_doPathlengthCut

BooleanProperty CosmicGenerator::m_doPathlengthCut {this, "doPathLengthCut", false}
private

Definition at line 161 of file CosmicGenerator.h.

161{this, "doPathLengthCut", false};

◆ m_doReweighting

BooleanProperty CosmicGenerator::m_doReweighting {this, "doReweighting", false}
private

Definition at line 163 of file CosmicGenerator.h.

163{this, "doReweighting", false};

◆ m_dsid

IntegerProperty CosmicGenerator::m_dsid {this, "Dsid", 999999, "Dataset ID number"}
private

Definition at line 108 of file CosmicGenerator.h.

108{this, "Dsid", 999999, "Dataset ID number"};

◆ m_emax

FloatProperty CosmicGenerator::m_emax {this, "emax", 100.*m_GeV}
private

Definition at line 110 of file CosmicGenerator.h.

110{this, "emax", 100.*m_GeV};

◆ m_emin

FloatProperty CosmicGenerator::m_emin {this, "emin", 10.*m_GeV}
private

Definition at line 109 of file CosmicGenerator.h.

109{this, "emin", 10.*m_GeV};

◆ m_energyCutThreshold

DoubleProperty CosmicGenerator::m_energyCutThreshold {this, "energyCutThreshold", 1.0}
private

Definition at line 164 of file CosmicGenerator.h.

164{this, "energyCutThreshold", 1.0};

◆ m_events

int CosmicGenerator::m_events {0}
private

Definition at line 103 of file CosmicGenerator.h.

103{0};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_exzCut

BooleanProperty CosmicGenerator::m_exzCut {this, "ExzCut", false}
private

Definition at line 151 of file CosmicGenerator.h.

151{this, "ExzCut", false};

◆ m_ffile

std::ifstream CosmicGenerator::m_ffile
private

Definition at line 139 of file CosmicGenerator.h.

◆ m_fourMom

std::vector<CLHEP::HepLorentzVector> CosmicGenerator::m_fourMom
private

Definition at line 143 of file CosmicGenerator.h.

◆ m_fourPos

std::vector<CLHEP::HepLorentzVector> CosmicGenerator::m_fourPos
private

Definition at line 142 of file CosmicGenerator.h.

◆ m_gendata

std::shared_ptr<GenData> CosmicGenerator::m_gendata {nullptr}
private

Definition at line 169 of file CosmicGenerator.h.

169{nullptr};

◆ m_GeV

float CosmicGenerator::m_GeV = 1000.f
staticconstexprprivate

Definition at line 99 of file CosmicGenerator.h.

◆ m_incidentSvc

ServiceHandle<IIncidentSvc> GenModule::m_incidentSvc {this, "IncidentSvc", "IncidentSvc"}
privateinherited

Handle on the incident service.

Definition at line 99 of file GenModule.h.

99{this, "IncidentSvc", "IncidentSvc"};

◆ m_infile

StringProperty CosmicGenerator::m_infile {this, "eventfile", "NONE"}
private

Definition at line 138 of file CosmicGenerator.h.

138{this, "eventfile", "NONE"};

◆ m_IPx

FloatProperty CosmicGenerator::m_IPx {this, "IPx", 0.f}
private

Definition at line 117 of file CosmicGenerator.h.

117{this, "IPx", 0.f};

◆ m_IPy

FloatProperty CosmicGenerator::m_IPy {this, "IPy", 0.f}
private

Definition at line 118 of file CosmicGenerator.h.

118{this, "IPy", 0.f};

◆ m_IPz

FloatProperty CosmicGenerator::m_IPz {this, "IPz", 0.f}
private

Definition at line 119 of file CosmicGenerator.h.

119{this, "IPz", 0.f};

◆ m_isAfterburner

BooleanProperty GenModule::m_isAfterburner {this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"}
protectedinherited

Flag for normal vs. afterburner generators.

Definition at line 87 of file GenModule.h.

87{this, "IsAfterburner", false, "Set true if generator modifies existing events rather than creating new ones"};

◆ m_mcEventKey

std::string GenBase::m_mcEventKey {}
protectedinherited

StoreGate key for the MC event collection (defaults to GEN_EVENT).

Definition at line 108 of file GenBase.h.

108{};

◆ m_mcevents_const

SG::ReadHandleKey<McEventCollection> GenBase::m_mcevents_const { this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" }
privateinherited

Const handle to the MC event collection.

Definition at line 117 of file GenBase.h.

117{ this, "McEventKey", "GEN_EVENT", "StoreGate key of the MC event collection" };

◆ m_mkMcEvent

BooleanProperty GenBase::m_mkMcEvent {this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"}
protectedinherited

Flag to determine if a new MC event collection should be made if it doesn't exist.

Definition at line 110 of file GenBase.h.

110{this, "MakeMcEvent", false, "Create a new MC event collection if it doesn't exist"};

◆ m_mm

float CosmicGenerator::m_mm = 10.f
staticconstexprprivate

Definition at line 100 of file CosmicGenerator.h.

◆ m_muonECOpt

BooleanProperty CosmicGenerator::m_muonECOpt {this, "OptimizeForMuonEndCap", false}
private

Definition at line 128 of file CosmicGenerator.h.

128{this, "OptimizeForMuonEndCap", false};

◆ m_pdgCode

std::vector<int> CosmicGenerator::m_pdgCode
private

Definition at line 106 of file CosmicGenerator.h.

◆ m_phimax

FloatProperty CosmicGenerator::m_phimax {this, "PhiMax", M_PI}
private

Definition at line 135 of file CosmicGenerator.h.

135{this, "PhiMax", M_PI};

◆ m_phimin

FloatProperty CosmicGenerator::m_phimin {this, "PhiMin", -1.*M_PI}
private

Definition at line 134 of file CosmicGenerator.h.

134{this, "PhiMin", -1.*M_PI};

◆ m_pixelplanemaxx

DoubleProperty CosmicGenerator::m_pixelplanemaxx {this, "pixelplane_maxx", 1150.}
private

Definition at line 167 of file CosmicGenerator.h.

167{this, "pixelplane_maxx", 1150.};

◆ m_pixelplanemaxz

DoubleProperty CosmicGenerator::m_pixelplanemaxz {this, "pixelplane_maxz", 1650.}
private

Definition at line 168 of file CosmicGenerator.h.

168{this, "pixelplane_maxz", 1650.};

◆ m_polarization

std::vector<HepMC::Polarization> CosmicGenerator::m_polarization
private

Definition at line 145 of file CosmicGenerator.h.

◆ m_printEvent

IntegerProperty CosmicGenerator::m_printEvent {this, "PrintEvent", 10}
private

Definition at line 129 of file CosmicGenerator.h.

129{this, "PrintEvent", 10};

◆ m_printMod

IntegerProperty CosmicGenerator::m_printMod {this, "PrintMod", 100}
private

Definition at line 130 of file CosmicGenerator.h.

130{this, "PrintMod", 100};

◆ m_radius

FloatProperty CosmicGenerator::m_radius {this, "Radius", 0.f}
private

Definition at line 120 of file CosmicGenerator.h.

120{this, "Radius", 0.f};

◆ m_randomSeed

IntegerProperty GenModule::m_randomSeed {this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}
protectedinherited

Seed for random number engine.

Definition at line 84 of file GenModule.h.

84{this, "RandomSeed", 1234567, "Random seed for the built-in random engine"}; // FIXME make this into an unsigned long int?

◆ m_readfile

bool CosmicGenerator::m_readfile {false}
private

Definition at line 137 of file CosmicGenerator.h.

137{false};

◆ m_rejected

int CosmicGenerator::m_rejected {0}
private

Definition at line 104 of file CosmicGenerator.h.

104{0};

◆ m_rmax

FloatProperty CosmicGenerator::m_rmax {this, "RMax", 10000000.f}
private

Definition at line 153 of file CosmicGenerator.h.

153{this, "RMax", 10000000.f};

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> GenModule::m_rndmSvc {this, "RndmSvc", "AthRNGSvc"}
privateinherited

Data members.

Definition at line 97 of file GenModule.h.

97{this, "RndmSvc", "AthRNGSvc"};

◆ m_runinfo

std::shared_ptr<HepMC3::GenRunInfo> GenModule::m_runinfo {}
protectedinherited

The run info for HepMC3.

Definition at line 90 of file GenModule.h.

90{};

◆ m_rvertmax

DoubleProperty CosmicGenerator::m_rvertmax {this, "rvert_max", 300.*m_mm}
private

Definition at line 166 of file CosmicGenerator.h.

166{this, "rvert_max", 300.*m_mm}; // replaces rectangle in case of reweighting

◆ m_srOneOpt

IntegerProperty CosmicGenerator::m_srOneOpt {this, "OptimizeForSR1", 0}
private

Definition at line 125 of file CosmicGenerator.h.

125{this, "OptimizeForSR1", 0}; // Not a bool??

◆ m_srOnePixECOpt

BooleanProperty CosmicGenerator::m_srOnePixECOpt {this, "OptimizeForSR1PixelEndCap", false}
private

Definition at line 126 of file CosmicGenerator.h.

126{this, "OptimizeForSR1PixelEndCap", false};

◆ m_swapYZAxis

BooleanProperty CosmicGenerator::m_swapYZAxis {this, "SwapYZAxis", false}
private

Definition at line 127 of file CosmicGenerator.h.

127{this, "SwapYZAxis", false};

◆ m_thetamax

FloatProperty CosmicGenerator::m_thetamax {this, "ThetaMax", 1.f}
private

Definition at line 133 of file CosmicGenerator.h.

133{this, "ThetaMax", 1.f};

◆ m_thetamin

FloatProperty CosmicGenerator::m_thetamin {this, "ThetaMin", 0.f}
private

Definition at line 132 of file CosmicGenerator.h.

132{this, "ThetaMin", 0.f};

◆ m_tmax

FloatProperty CosmicGenerator::m_tmax {this, "tmax", 0.f}
private

Definition at line 123 of file CosmicGenerator.h.

123{this, "tmax", 0.f};

◆ m_tmin

FloatProperty CosmicGenerator::m_tmin {this, "tmin", 0.f}
private

Definition at line 122 of file CosmicGenerator.h.

122{this, "tmin", 0.f};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_xhig

FloatProperty CosmicGenerator::m_xhig {this, "xvert_hig", 10.*m_mm}
private

Definition at line 113 of file CosmicGenerator.h.

113{this, "xvert_hig", 10.*m_mm};

◆ m_xlow

FloatProperty CosmicGenerator::m_xlow {this, "xvert_low", 0.*m_mm}
private

Definition at line 112 of file CosmicGenerator.h.

112{this, "xvert_low", 0.*m_mm};

◆ m_ysurface

DoubleProperty CosmicGenerator::m_ysurface {this, "ysurface", 81.*m_mm}
private

Definition at line 165 of file CosmicGenerator.h.

165{this, "ysurface", 81.*m_mm};

◆ m_yval

FloatProperty CosmicGenerator::m_yval {this, "yvert_val", 81.*m_mm}
private

Definition at line 116 of file CosmicGenerator.h.

116{this, "yvert_val", 81.*m_mm};

◆ m_zhig

FloatProperty CosmicGenerator::m_zhig {this, "zvert_hig", 10.*m_mm}
private

Definition at line 115 of file CosmicGenerator.h.

115{this, "zvert_hig", 10.*m_mm};

◆ m_zlow

FloatProperty CosmicGenerator::m_zlow {this, "zvert_low", 0.*m_mm}
private

Definition at line 114 of file CosmicGenerator.h.

114{this, "zvert_low", 0.*m_mm};

◆ m_zpos

FloatProperty CosmicGenerator::m_zpos {this, "Zposition", 14500.f}
private

Definition at line 121 of file CosmicGenerator.h.

121{this, "Zposition", 14500.f};

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