CMS 3D CMS Logo

Geometry.h
Go to the documentation of this file.
1 #ifndef FASTSIM_GEOMETRY_H
2 #define FASTSIM_GEOMETRY_H
3 
8 
10 // Author: L. Vanelderen, S. Kurz
11 // Date: 29 May 2017
13 
15 class MagneticField;
16 
17 #include <vector>
18 
19 namespace edm {
20  //class ParameterSet;
21  class EventSetup;
22 } // namespace edm
23 
24 namespace fastsim {
25  class InteractionModel;
26 
28 
32  class Geometry {
33  public:
36 
38  ~Geometry();
39 
41 
47  void update(const edm::EventSetup& iSetup, const std::map<std::string, InteractionModel*>& interactionModelMap);
48 
50 
56 
58 
62  const std::vector<std::unique_ptr<BarrelSimplifiedGeometry>>& barrelLayers() const { return barrelLayers_; }
63 
65 
69  const std::vector<std::unique_ptr<ForwardSimplifiedGeometry>>& forwardLayers() const { return forwardLayers_; }
70 
72 
76  double getMaxRadius() { return maxRadius_; }
77 
79 
83  double getMaxZ() { return maxZ_; }
84 
86  friend std::ostream& operator<<(std::ostream& o, const fastsim::Geometry& geometry);
87 
89 
95  if (layer == nullptr) {
96  return nullptr;
97  }
98  unsigned nextLayerIndex = layer->index() + 1;
99  return nextLayerIndex < barrelLayers_.size() ? barrelLayers_[nextLayerIndex].get() : nullptr;
100  }
101 
103 
109  if (layer == nullptr) {
110  return nullptr;
111  }
112  unsigned nextLayerIndex = layer->index() + 1;
113  return nextLayerIndex < forwardLayers_.size() ? forwardLayers_[nextLayerIndex].get() : nullptr;
114  }
115 
117 
123  if (layer == nullptr) {
124  return barrelLayers_.back().get();
125  }
126  return layer->index() > 0 ? barrelLayers_[layer->index() - 1].get() : nullptr;
127  }
128 
130 
136  if (layer == nullptr) {
137  return forwardLayers_.back().get();
138  }
139  return layer->index() > 0 ? forwardLayers_[layer->index() - 1].get() : nullptr;
140  }
141 
142  private:
143  std::vector<std::unique_ptr<BarrelSimplifiedGeometry>>
145  std::vector<std::unique_ptr<ForwardSimplifiedGeometry>>
147  std::unique_ptr<MagneticField>
149 
152 
156  const double fixedMagneticFieldZ_;
157  const bool
160  const std::vector<edm::ParameterSet>
162  const std::vector<edm::ParameterSet>
164  const double maxRadius_;
165  const double maxZ_;
166 
167  const bool barrelBoundary_;
168  const bool forwardBoundary_;
171  };
172  std::ostream& operator<<(std::ostream& os, const fastsim::Geometry& geometry);
173 } // namespace fastsim
174 
175 #endif
fastsim::Geometry::trackerBarrelBoundaryCfg_
const edm::ParameterSet trackerBarrelBoundaryCfg_
Hack to interface "old" calo to "new" tracking.
Definition: Geometry.h:169
fastsim::Geometry
Definition the tracker geometry (vectors of forward/barrel layers).
Definition: Geometry.h:32
fastsim::Geometry::magneticField_
const MagneticField * magneticField_
The tracker geometry.
Definition: Geometry.h:154
fastsim::Geometry::trackerForwardBoundaryCfg_
const edm::ParameterSet trackerForwardBoundaryCfg_
Hack to interface "old" calo to "new" tracking.
Definition: Geometry.h:170
fastsim::Geometry::forwardBoundary_
const bool forwardBoundary_
Hack to interface "old" calo to "new" tracking.
Definition: Geometry.h:168
fastsim::Geometry::cacheIdentifierIdealMagneticField_
unsigned long long cacheIdentifierIdealMagneticField_
Check interval of validity of the magnetic field.
Definition: Geometry.h:151
fastsim::Geometry::trackerAlignmentLabel_
const std::string trackerAlignmentLabel_
The tracker alignment label.
Definition: Geometry.h:159
fastsim::Geometry::cacheIdentifierTrackerRecoGeometry_
unsigned long long cacheIdentifierTrackerRecoGeometry_
Check interval of validity of the tracker geometry.
Definition: Geometry.h:150
fastsim::Geometry::maxRadius_
const double maxRadius_
Definition: Geometry.h:164
fastsim::Geometry::ownedMagneticField_
std::unique_ptr< MagneticField > ownedMagneticField_
Needed to create a uniform magnetic field if speciefied in config.
Definition: Geometry.h:148
fastsim::Geometry::barrelLayers_
std::vector< std::unique_ptr< BarrelSimplifiedGeometry > > barrelLayers_
The vector of barrel layers (increasing radius)
Definition: Geometry.h:144
edm
HLT enums.
Definition: AlignableModifier.h:19
geometry
Definition: geometry.py:1
fastsim::Geometry::nextLayer
const BarrelSimplifiedGeometry * nextLayer(const BarrelSimplifiedGeometry *layer) const
Helps to navigate through the vector of barrel layers.
Definition: Geometry.h:94
fastsim::Geometry::previousLayer
const ForwardSimplifiedGeometry * previousLayer(const ForwardSimplifiedGeometry *layer) const
Helps to navigate through the vector of forward layers.
Definition: Geometry.h:135
fastsim::Geometry::fixedMagneticFieldZ_
const double fixedMagneticFieldZ_
Use a uniform magnetic field or non-uniform from MagneticFieldRecord.
Definition: Geometry.h:156
fastsim::Geometry::barrelLayers
const std::vector< std::unique_ptr< BarrelSimplifiedGeometry > > & barrelLayers() const
Return the vector of barrel layers.
Definition: Geometry.h:62
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
fastsim::Geometry::Geometry
Geometry(const edm::ParameterSet &cfg)
Constructor.
Definition: Geometry.cc:24
fastsim::Geometry::barrelLayerCfg_
const std::vector< edm::ParameterSet > barrelLayerCfg_
The config in which all parameters of the barrel layers are defined.
Definition: Geometry.h:161
fastsim::ForwardSimplifiedGeometry
Implementation of a forward detector layer (disk).
Definition: ForwardSimplifiedGeometry.h:21
fastsim::BarrelSimplifiedGeometry
Implementation of a barrel detector layer (cylindrical).
Definition: BarrelSimplifiedGeometry.h:22
fastsim::Geometry::~Geometry
~Geometry()
Default destructor.
Definition: Geometry.cc:22
fastsim::Geometry::getMaxRadius
double getMaxRadius()
Upper bound of the radius of the whole tracker geometry.
Definition: Geometry.h:76
fastsim::Geometry::nextLayer
const ForwardSimplifiedGeometry * nextLayer(const ForwardSimplifiedGeometry *layer) const
Helps to navigate through the vector of forward layers.
Definition: Geometry.h:108
fastsim::Geometry::getMagneticFieldZ
double getMagneticFieldZ(const math::XYZTLorentzVector &position) const
Initializes the tracker geometry.
Definition: Geometry.cc:155
fastsim::Geometry::previousLayer
const BarrelSimplifiedGeometry * previousLayer(const BarrelSimplifiedGeometry *layer) const
Helps to navigate through the vector of barrel layers.
Definition: Geometry.h:122
fastsim::Geometry::maxZ_
const double maxZ_
Upper bound of the radius of the whole tracker geometry.
Definition: Geometry.h:165
fastsim::Geometry::barrelBoundary_
const bool barrelBoundary_
Upper bound of the length/2 (0 to +Z) of the whole tracker geometry.
Definition: Geometry.h:167
BarrelSimplifiedGeometry.h
fastsim::Geometry::useTrackerRecoGeometryRecord_
const bool useTrackerRecoGeometryRecord_
Use GeometricSearchTracker (active layers/reco geometry). Can be used to get position/radius of track...
Definition: Geometry.h:158
fastsim::operator<<
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:159
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
LorentzVector.h
fastsim::SimplifiedGeometry::index
int index() const
Return index of this layer (layers are numbered according to their position in the detector).
Definition: SimplifiedGeometry.h:87
ForwardSimplifiedGeometry.h
fastsim::Geometry::geometricSearchTracker_
const GeometricSearchTracker * geometricSearchTracker_
Definition: Geometry.h:153
edm::EventSetup
Definition: EventSetup.h:57
fastsim::Geometry::forwardLayers
const std::vector< std::unique_ptr< ForwardSimplifiedGeometry > > & forwardLayers() const
Return the vector of forward layers (disks).
Definition: Geometry.h:69
looper.cfg
cfg
Definition: looper.py:297
fastsim::Geometry::forwardLayers_
std::vector< std::unique_ptr< ForwardSimplifiedGeometry > > forwardLayers_
The vector of forward layers (increasing Z-position)
Definition: Geometry.h:146
fastsim::Geometry::operator<<
friend std::ostream & operator<<(std::ostream &o, const fastsim::Geometry &geometry)
Provides some basic output for e.g. debugging.
fastsim::Geometry::getMaxZ
double getMaxZ()
Upper bound of the length/2 (0 to +Z) of the whole tracker geometry.
Definition: Geometry.h:83
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
GeometricSearchTracker
Definition: GeometricSearchTracker.h:14
fastsim
Definition: BarrelSimplifiedGeometry.h:15
EventSetup
ParameterSet.h
fastsim::Geometry::forwardLayerCfg_
const std::vector< edm::ParameterSet > forwardLayerCfg_
The config in which all parameters of the forward layers are defined.
Definition: Geometry.h:163
MagneticField
Definition: MagneticField.h:19
fastsim::Geometry::useFixedMagneticFieldZ_
const bool useFixedMagneticFieldZ_
Needed to create a uniform magnetic field if speciefied in config.
Definition: Geometry.h:155
fastsim::Geometry::update
void update(const edm::EventSetup &iSetup, const std::map< std::string, InteractionModel * > &interactionModelMap)
Initializes the tracker geometry.
Definition: Geometry.cc:50