test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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

Definition at line 7 of file GenParticleInfoExtractor.cc.

References up.

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