// LayerSimGeneric.h #ifndef LayerSimGeneric_H #define LayerSimGeneric_H // Generic layer simulator. An input track is propagated to each active surface // in a layer and an associated hit generator is used to generate a cluster // and add it to the layer. This class takes shared ownership of the layer, // the hit generators and the propagator. The constructor requires that // the surfaces associated with the hit generators match those of the layer. // Here match means pure_equal. It is up to the hit generator to decide // whether the hit is in bounds. #include "LayerSimulator.h" #include #include #include "ptr/SharedDeletePolicy.h" #include "trfbase/PropagatorPtr.h" #include "LayerPtr.h" #include "trfbase/HitGenerator.h" namespace trf { class Layer; class Propagator; class LayerSimGeneric : public LayerSimulator { public: // typedefs // shared ownership pointers typedef Ptr HitGeneratorPtr; // List of hit generator pointers. typedef std::vector HitGeneratorList; private: // attributes // hit generators HitGeneratorList _gens; // propagator PropagatorPtr _pprop; private: // methods // output stream void ostr(std::ostream& stream) const; public: // methods // constructor for one surface // Requires that generator surface is same as layer surface. LayerSimGeneric(LayerPtr plyr, HitGeneratorPtr pgen, PropagatorPtr pprop); // constructor for multiple surface // Requires that generator surfaces are the same as the layer surface. LayerSimGeneric(LayerPtr plyr, HitGeneratorList gens, PropagatorPtr pprop); // destructor ~LayerSimGeneric(); // return the list of generators GeneratorList get_generators(); // Generate clusters void add_clusters(const VTrack& trv); }; } // end namespace trf #endif