test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
&
7
GenParticleInfoExtractor::operator()
(
const
G4PrimaryParticle *
p
)
const
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
}
GenParticleInfoExtractor.h
SimG4Exception
Definition:
SimG4Exception.h:13
SimG4Exception.h
AlCaHLTBitMon_ParallelJobs.p
tuple p
Definition:
AlCaHLTBitMon_ParallelJobs.py:152
GenParticleInfoExtractor::operator()
const GenParticleInfo & operator()(const G4PrimaryParticle *p) const
Definition:
GenParticleInfoExtractor.cc:7
GenParticleInfo
Definition:
GenParticleInfo.h:6
Generated for CMSSW Reference Manual by
1.8.5