File indexing completed on 2024-04-06 12:11:20
0001 #ifndef FASTSIM_INTERACTIONMODEL
0002 #define FASTSIM_INTERACTIONMODEL
0003
0004 #include "FWCore/Framework/interface/ProducesCollector.h"
0005
0006 #include <string>
0007 #include <vector>
0008 #include <memory>
0009
0010
0011
0012
0013
0014
0015 namespace edm {
0016 class Event;
0017 }
0018
0019 class RandomEngineAndDistribution;
0020
0021 namespace fastsim {
0022 class SimplifiedGeometry;
0023 class Particle;
0024
0025
0026
0027
0028
0029 class InteractionModel {
0030 public:
0031
0032
0033
0034
0035 InteractionModel(std::string name) : name_(name) {}
0036
0037
0038 virtual ~InteractionModel() { ; }
0039
0040
0041
0042
0043
0044
0045
0046
0047 virtual void interact(Particle& particle,
0048 const SimplifiedGeometry& layer,
0049 std::vector<std::unique_ptr<Particle> >& secondaries,
0050 const RandomEngineAndDistribution& random) = 0;
0051
0052
0053 virtual void registerProducts(edm::ProducesCollector) const {}
0054
0055
0056 virtual void storeProducts(edm::Event& iEvent) { ; }
0057
0058
0059 const std::string getName() { return name_; }
0060
0061
0062 friend std::ostream& operator<<(std::ostream& o, const InteractionModel& model);
0063
0064 private:
0065 const std::string name_;
0066 };
0067 std::ostream& operator<<(std::ostream& os, const InteractionModel& interactionModel);
0068
0069 }
0070
0071 #endif