CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes | Friends
fastsim::InteractionModel Class Referenceabstract

Base class for any interaction model between a particle and a tracker layer. More...

#include <InteractionModel.h>

Inheritance diagram for fastsim::InteractionModel:
fastsim::Bremsstrahlung fastsim::EnergyLoss fastsim::MultipleScattering fastsim::MuonBremsstrahlung fastsim::NuclearInteraction fastsim::NuclearInteractionFTF fastsim::PairProduction fastsim::TrackerSimHitProducer

Public Member Functions

const std::string getName ()
 Return (unique) name of this interaction. More...
 
virtual void interact (Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< Particle > > &secondaries, const RandomEngineAndDistribution &random)=0
 Perform the interaction. More...
 
 InteractionModel (std::string name)
 Constructor. More...
 
virtual void registerProducts (edm::ProducerBase &producer) const
 In case interaction produces and stores content in the event (e.g. TrackerSimHits). More...
 
virtual void storeProducts (edm::Event &iEvent)
 In case interaction produces and stores content in the event (e.g. TrackerSimHits). More...
 
virtual ~InteractionModel ()
 Default destructor. More...
 

Private Attributes

const std::string name_
 A unique name for every instance of any interaction. More...
 

Friends

std::ostream & operator<< (std::ostream &o, const InteractionModel &model)
 Basic information output. More...
 

Detailed Description

Base class for any interaction model between a particle and a tracker layer.

Every instance should have a distinct std::string name.

Definition at line 32 of file InteractionModel.h.

Constructor & Destructor Documentation

fastsim::InteractionModel::InteractionModel ( std::string  name)
inline

Constructor.

Parameters
nameEnique name for every instance.

Definition at line 39 of file InteractionModel.h.

40  : name_(name){}
const std::string name_
A unique name for every instance of any interaction.
virtual fastsim::InteractionModel::~InteractionModel ( )
inlinevirtual

Default destructor.

Definition at line 43 of file InteractionModel.h.

References random.

43 {;}

Member Function Documentation

const std::string fastsim::InteractionModel::getName ( void  )
inline

Return (unique) name of this interaction.

Definition at line 61 of file InteractionModel.h.

References connectstrParser::o, and edm::operator<<().

Referenced by plotting.Plot::draw().

61 {return name_;}
const std::string name_
A unique name for every instance of any interaction.
virtual void fastsim::InteractionModel::interact ( Particle particle,
const SimplifiedGeometry layer,
std::vector< std::unique_ptr< Particle > > &  secondaries,
const RandomEngineAndDistribution random 
)
pure virtual

Perform the interaction.

Parameters
particleThe particle that interacts with the matter.
layerThe detector layer that interacts with the particle.
secondariesParticles that are produced in the interaction (if any).
randomThe Random Engine.

Implemented in fastsim::NuclearInteractionFTF, fastsim::NuclearInteraction, fastsim::TrackerSimHitProducer, fastsim::MuonBremsstrahlung, fastsim::MultipleScattering, fastsim::Bremsstrahlung, fastsim::EnergyLoss, and fastsim::PairProduction.

virtual void fastsim::InteractionModel::registerProducts ( edm::ProducerBase producer) const
inlinevirtual

In case interaction produces and stores content in the event (e.g. TrackerSimHits).

Reimplemented in fastsim::TrackerSimHitProducer.

Definition at line 55 of file InteractionModel.h.

55 {;}
virtual void fastsim::InteractionModel::storeProducts ( edm::Event iEvent)
inlinevirtual

In case interaction produces and stores content in the event (e.g. TrackerSimHits).

Reimplemented in fastsim::TrackerSimHitProducer.

Definition at line 58 of file InteractionModel.h.

58 {;}

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  o,
const InteractionModel model 
)
friend

Basic information output.

Member Data Documentation

const std::string fastsim::InteractionModel::name_
private

A unique name for every instance of any interaction.

Definition at line 67 of file InteractionModel.h.

Referenced by fastsim::operator<<().