CMS 3D CMS Logo

SimplifiedGeometryFactory.h
Go to the documentation of this file.
1 #ifndef FASTSIM_SIMPLIFIEDGEOMETRYFACTORY
2 #define FASTSIM_SIMPLIFIEDGEOMETRYFACTORY
3 
5 class MagneticField;
6 class DetLayer;
7 class BarrelDetLayer;
8 class ForwardDetLayer;
9 
10 #include <memory>
11 #include <map>
12 #include <vector>
13 #include <string>
14 
16 // Author: L. Vanelderen
17 // Date: 13 May 2014
18 //
19 // Revision: Class structure modified to match SimplifiedGeometryPropagator
20 // S. Kurz, 29 May 2017
22 
23 namespace edm {
24  class ParameterSet;
25 }
26 
27 namespace fastsim {
28  class SimplifiedGeometry;
29  class BarrelSimplifiedGeometry;
30  class ForwardSimplifiedGeometry;
31  class InteractionModel;
32 
34 
41  public:
43 
50  SimplifiedGeometryFactory(const GeometricSearchTracker *geometricSearchTracker,
52  const std::map<std::string, fastsim::InteractionModel *> &interactionModelMap,
53  double magneticFieldHistMaxR,
54  double magneticFieldHistMaxZ);
55 
58 
60 
65  std::unique_ptr<SimplifiedGeometry> createSimplifiedGeometry(LayerType type, const edm::ParameterSet &cfg) const;
66 
68 
73  std::unique_ptr<ForwardSimplifiedGeometry> createForwardSimplifiedGeometry(LayerType type,
74  const edm::ParameterSet &cfg) const;
75 
77 
81  std::unique_ptr<BarrelSimplifiedGeometry> createBarrelSimplifiedGeometry(const edm::ParameterSet &cfg) const;
82 
83  private:
85 
93  const DetLayer *getDetLayer(const std::string &detLayerName,
94  const GeometricSearchTracker &geometricSearchTracker) const;
95 
98  const std::map<std::string, fastsim::InteractionModel *> *interactionModelMap_;
99  const double magneticFieldHistMaxR_;
100  const double magneticFieldHistMaxZ_;
101  std::map<std::string, const std::vector<BarrelDetLayer const *> *>
103  std::map<std::string, const std::vector<ForwardDetLayer const *> *>
105  };
106 } // namespace fastsim
107 
108 #endif
fastsim::SimplifiedGeometryFactory::createForwardSimplifiedGeometry
std::unique_ptr< ForwardSimplifiedGeometry > createForwardSimplifiedGeometry(LayerType type, const edm::ParameterSet &cfg) const
Helper method for createSimplifiedGeometry(..) to create a forward layer (ForwardSimplifiedGeometry).
Definition: SimplifiedGeometryFactory.cc:46
DetLayer
Definition: DetLayer.h:21
fastsim::SimplifiedGeometryFactory::barrelDetLayersMap_
std::map< std::string, const std::vector< BarrelDetLayer const * > * > barrelDetLayersMap_
A map of strings and pointers to detLayers.
Definition: SimplifiedGeometryFactory.h:102
edm
HLT enums.
Definition: AlignableModifier.h:19
HLT_FULL_cff.magneticField
magneticField
Definition: HLT_FULL_cff.py:348
fastsim::SimplifiedGeometryFactory::magneticField_
const MagneticField *const magneticField_
The full magnetic field.
Definition: SimplifiedGeometryFactory.h:97
fastsim::SimplifiedGeometryFactory::SimplifiedGeometryFactory
SimplifiedGeometryFactory(const GeometricSearchTracker *geometricSearchTracker, const MagneticField &magneticField, const std::map< std::string, fastsim::InteractionModel * > &interactionModelMap, double magneticFieldHistMaxR, double magneticFieldHistMaxZ)
Constructor.
Definition: SimplifiedGeometryFactory.cc:14
fastsim::SimplifiedGeometryFactory
Constructs a tracker layer according to entry in python config (incl interaction models).
Definition: SimplifiedGeometryFactory.h:40
fastsim::SimplifiedGeometryFactory::POSFWD
Definition: SimplifiedGeometryFactory.h:57
fastsim::SimplifiedGeometryFactory::NEGFWD
Definition: SimplifiedGeometryFactory.h:57
fastsim::SimplifiedGeometryFactory::createBarrelSimplifiedGeometry
std::unique_ptr< BarrelSimplifiedGeometry > createBarrelSimplifiedGeometry(const edm::ParameterSet &cfg) const
Helper method for createSimplifiedGeometry(..) to create a barrel layer (BarrelSimplifiedGeometry).
Definition: SimplifiedGeometryFactory.cc:39
fastsim::SimplifiedGeometryFactory::createSimplifiedGeometry
std::unique_ptr< SimplifiedGeometry > createSimplifiedGeometry(LayerType type, const edm::ParameterSet &cfg) const
Main method of this class. Creates a new detector layer (SimplifiedGeometry).
Definition: SimplifiedGeometryFactory.cc:57
fastsim::SimplifiedGeometryFactory::interactionModelMap_
const std::map< std::string, fastsim::InteractionModel * > * interactionModelMap_
Map of interaction models.
Definition: SimplifiedGeometryFactory.h:98
fastsim::SimplifiedGeometryFactory::BARREL
Definition: SimplifiedGeometryFactory.h:57
fastsim::SimplifiedGeometryFactory::LayerType
LayerType
Each layer is either a barrel layer, or a forward layer (either at ppositive or negative Z).
Definition: SimplifiedGeometryFactory.h:57
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
fastsim::SimplifiedGeometryFactory::magneticFieldHistMaxR_
const double magneticFieldHistMaxR_
Limit in R for histogram of magnetic field.
Definition: SimplifiedGeometryFactory.h:99
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
fastsim::SimplifiedGeometryFactory::geometricSearchTracker_
const GeometricSearchTracker *const geometricSearchTracker_
The full tracker geometry.
Definition: SimplifiedGeometryFactory.h:96
fastsim::SimplifiedGeometryFactory::magneticFieldHistMaxZ_
const double magneticFieldHistMaxZ_
Limit in +-Z for histogram of magnetic field.
Definition: SimplifiedGeometryFactory.h:100
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BarrelDetLayer
Definition: BarrelDetLayer.h:22
looper.cfg
cfg
Definition: looper.py:296
ForwardDetLayer
Definition: ForwardDetLayer.h:22
GeometricSearchTracker
Definition: GeometricSearchTracker.h:15
fastsim::SimplifiedGeometryFactory::forwardDetLayersMap_
std::map< std::string, const std::vector< ForwardDetLayer const * > * > forwardDetLayersMap_
A map of strings and pointers to detLayers.
Definition: SimplifiedGeometryFactory.h:104
fastsim
Definition: BarrelSimplifiedGeometry.h:15
MagneticField
Definition: MagneticField.h:19
fastsim::SimplifiedGeometryFactory::getDetLayer
const DetLayer * getDetLayer(const std::string &detLayerName, const GeometricSearchTracker &geometricSearchTracker) const
Method returns a pointer to a DetLayer according to the string that was passed.
Definition: SimplifiedGeometryFactory.cc:222