CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
InteractionModel.h
Go to the documentation of this file.
1 #ifndef FASTSIM_INTERACTIONMODEL
2 #define FASTSIM_INTERACTIONMODEL
3 
5 
6 #include <string>
7 #include <vector>
8 #include <memory>
9 
11 // Author: L. Vanelderen, S. Kurz
12 // Date: 29 May 2017
14 
15 namespace edm {
16  class Event;
17 } // namespace edm
18 
20 
21 namespace fastsim {
22  class SimplifiedGeometry;
23  class Particle;
24 
26 
30  public:
32 
36 
38  virtual ~InteractionModel() { ; }
39 
41 
47  virtual void interact(Particle& particle,
49  std::vector<std::unique_ptr<Particle> >& secondaries,
50  const RandomEngineAndDistribution& random) = 0;
51 
54 
56  virtual void storeProducts(edm::Event& iEvent) { ; }
57 
59  const std::string getName() { return name_; }
60 
62  friend std::ostream& operator<<(std::ostream& o, const InteractionModel& model);
63 
64  private:
66  };
67  std::ostream& operator<<(std::ostream& os, const InteractionModel& interactionModel);
68 
69 } // namespace fastsim
70 
71 #endif
virtual void storeProducts(edm::Event &iEvent)
In case interaction produces and stores content in the event (e.g. TrackerSimHits).
virtual void interact(Particle &particle, const SimplifiedGeometry &layer, std::vector< std::unique_ptr< Particle > > &secondaries, const RandomEngineAndDistribution &random)=0
Perform the interaction.
Implementation of a generic detector layer (base class for forward/barrel layers).
virtual ~InteractionModel()
Default destructor.
constexpr std::array< uint8_t, layerIndexSize > layer
Base class for any interaction model between a particle and a tracker layer.
int iEvent
Definition: GenABIO.cc:224
friend std::ostream & operator<<(std::ostream &o, const InteractionModel &model)
Basic information output.
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:160
const std::string getName()
Return (unique) name of this interaction.
const std::string name_
A unique name for every instance of any interaction.
InteractionModel(std::string name)
Constructor.
Definition of a generic FastSim Particle which can be propagated through the detector (formerly Parti...
Definition: Particle.h:16
virtual void registerProducts(edm::ProducesCollector) const
In case interaction produces and stores content in the event (e.g. TrackerSimHits).