CMS 3D CMS Logo

InteractionModel.h
Go to the documentation of this file.
1 #ifndef FASTSIM_INTERACTIONMODEL
2 #define FASTSIM_INTERACTIONMODEL
3 
4 #include <string>
5 #include <vector>
6 #include <memory>
7 
8 
10 // Author: L. Vanelderen, S. Kurz
11 // Date: 29 May 2017
13 
14 
15 namespace edm
16 {
17  class Event;
18  class ProducerBase;
19 }
20 
22 
23 namespace fastsim
24 {
25  class SimplifiedGeometry;
26  class Particle;
27 
29 
33  {
34  public:
36 
40  : name_(name){}
41 
43  virtual ~InteractionModel(){;}
44 
46 
52  virtual void interact(Particle & particle, const SimplifiedGeometry & layer, std::vector<std::unique_ptr<Particle> > & secondaries, const RandomEngineAndDistribution & random) = 0;
53 
55  virtual void registerProducts(edm::ProducerBase & producer) const{;}
56 
58  virtual void storeProducts(edm::Event & iEvent) {;}
59 
61  const std::string getName() {return name_;}
62 
64  friend std::ostream& operator << (std::ostream& o, const InteractionModel & model);
65 
66  private:
68  };
69  std::ostream& operator << (std::ostream& os, const InteractionModel & interactionModel);
70 
71 }
72 
73 #endif
virtual void storeProducts(edm::Event &iEvent)
In case interaction produces and stores content in the event (e.g. TrackerSimHits).
Implementation of a generic detector layer (base class for forward/barrel layers).
virtual ~InteractionModel()
Default destructor.
TRandom random
Definition: MVATrainer.cc:138
Base class for any interaction model between a particle and a tracker layer.
int iEvent
Definition: GenABIO.cc:230
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.
HLT enums.
virtual void registerProducts(edm::ProducerBase &producer) const
In case interaction produces and stores content in the event (e.g. TrackerSimHits).
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.