CMS 3D CMS Logo

List of all members | Public Member Functions
GenParticleInfoExtractor Class Reference

#include <GenParticleInfoExtractor.h>

Public Member Functions

const GenParticleInfooperator() (const G4PrimaryParticle *p) const
 

Detailed Description

Definition at line 8 of file GenParticleInfoExtractor.h.

Member Function Documentation

◆ operator()()

const GenParticleInfo & GenParticleInfoExtractor::operator() ( const G4PrimaryParticle *  p) const

Definition at line 6 of file GenParticleInfoExtractor.cc.

6  {
7  G4VUserPrimaryParticleInformation *up = p->GetUserInformation();
8  if (up == nullptr)
9  throw SimG4Exception("GenParticleInfoExtractor: G4PrimaryParticle has no user information");
10  GenParticleInfo *gpi = dynamic_cast<GenParticleInfo *>(up);
11  if (gpi == nullptr)
12  throw SimG4Exception("User information in G4PrimaryParticle is not of GenParticleInfo type");
13  return *gpi;
14 }

References AlCaHLTBitMon_ParallelJobs::p, and up.

SimG4Exception
Definition: SimG4Exception.h:13
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GenParticleInfo
Definition: GenParticleInfo.h:6
up
Definition: BitonicSort.h:7