Main Page
Namespaces
Classes
Package Documentation
SimG4Core
Notification
src
GenParticleInfoExtractor.cc
Go to the documentation of this file.
1
#include "
SimG4Core/Notification/interface/GenParticleInfoExtractor.h
"
2
#include "
SimG4Core/Notification/interface/SimG4Exception.h
"
3
4
#include "G4PrimaryParticle.hh"
5
6
const
GenParticleInfo
&
GenParticleInfoExtractor::operator()
(
const
G4PrimaryParticle *
p
)
const
{
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
}
up
Definition:
BitonicSort.h:8
AlCaHLTBitMon_ParallelJobs.p
p
Definition:
AlCaHLTBitMon_ParallelJobs.py:153
GenParticleInfoExtractor.h
SimG4Exception
Definition:
SimG4Exception.h:13
SimG4Exception.h
GenParticleInfoExtractor::operator()
const GenParticleInfo & operator()(const G4PrimaryParticle *p) const
Definition:
GenParticleInfoExtractor.cc:6
GenParticleInfo
Definition:
GenParticleInfo.h:6
Generated for CMSSW Reference Manual by
1.8.11