CMS 3D CMS Logo

SimplifiedGeometry.h
Go to the documentation of this file.
1 #ifndef FASTSIM_SIMPLIFIEDGEOMETRY_H
2 #define FASTSIM_SIMPLIFIEDGEOMETRY_H
3 
5 
6 #include <memory>
7 #include <vector>
8 
10 // Author: L. Vanelderen, S. Kurz
11 // Date: 29 May 2017
13 
14 class DetLayer;
15 class MagneticField;
17 class TH1F;
18 
19 namespace edm {
20  class ParameterSet;
21 }
22 
23 namespace fastsim {
24  class InteractionModel;
25  class SimplifiedGeometryFactory;
26 
28 
36  public:
38 
43  SimplifiedGeometry(double geomProperty);
44 
46  SimplifiedGeometry(SimplifiedGeometry const&) = delete;
47 
50 
52  virtual ~SimplifiedGeometry();
53 
55  // HACK
57 
60 
63 
65  CaloType getCaloType() const { return caloType_; }
66 
68  // END
70 
72 
78  void setIndex(int index) { index_ = index; }
79 
81 
87  int index() const { return index_; }
88 
90 
95  const double getGeomProperty() const { return geomProperty_; }
96 
98 
104  virtual const double getThickness(const math::XYZTLorentzVector& position) const = 0;
105 
107 
114  virtual const double getThickness(const math::XYZTLorentzVector& position,
115  const math::XYZTLorentzVector& momentum) const = 0;
116 
118 
122 
124 
127  const DetLayer* getDetLayer() const { return detLayer_; }
128 
130 
134  virtual const double getMagneticFieldZ(const math::XYZTLorentzVector& position) const = 0;
135 
137 
140  virtual bool isForward() const = 0;
141 
143 
146  const std::vector<InteractionModel*>& getInteractionModels() const { return interactionModels_; }
147 
149  friend std::ostream& operator<<(std::ostream& os, const SimplifiedGeometry& layer);
150 
152 
153  protected:
154  double geomProperty_;
155  int index_;
157  std::unique_ptr<TH1F> magneticFieldHist_;
158  std::unique_ptr<TH1F> thicknessHist_;
160  std::vector<InteractionModel*>
163  };
164 
165  std::ostream& operator<<(std::ostream& os, const SimplifiedGeometry& layer);
166 
167 } // namespace fastsim
168 
169 #endif
CaloType getCaloType() const
Hack to interface "old" Calorimetry with "new" Tracker.
Implementation of a generic detector layer (base class for forward/barrel layers).
virtual const double getMagneticFieldZ(const math::XYZTLorentzVector &position) const =0
Return magnetic field (field only has Z component!) on the layer.
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
CaloType
Hack to interface "old" Calorimetry with "new" Tracker.
const double getNuclearInteractionThicknessFactor() const
Some layers have a different thickness for nuclear interactions.
std::unique_ptr< TH1F > magneticFieldHist_
Histogram that stores the size of the magnetic field along the layer.
const std::vector< InteractionModel * > & getInteractionModels() const
Return the vector of all interaction models that are assigned with a layer.
std::vector< InteractionModel * > interactionModels_
Vector of all interaction models that are assigned with a layer.
std::unique_ptr< TH1F > thicknessHist_
Histogram that stores the tickness (radLengths) along the layer.
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const double getGeomProperty() const
Return geometric attribute of the layer.
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:160
CaloType caloType_
Hack to interface "old" Calorimetry with "new" Tracker.
double nuclearInteractionThicknessFactor_
Some layers have a different thickness for nuclear interactions.
void setCaloType(CaloType type)
Hack to interface "old" Calorimetry with "new" Tracker.
const DetLayer * detLayer_
Return pointer to the assigned active layer (if any).
virtual bool isForward() const =0
Returns false/true depending if the object is a (non-abstract) barrel/forward layer.
Constructs a tracker layer according to entry in python config (incl interaction models).
int index_
Return index of this layer (layers are numbered according to their position in the detector)...
SimplifiedGeometry(double geomProperty)
Default constructor.
int index() const
Return index of this layer (layers are numbered according to their position in the detector)...
HLT enums.
friend std::ostream & operator<<(std::ostream &os, const SimplifiedGeometry &layer)
Some basic output.
static int position[264][3]
Definition: ReadPGInfo.cc:289
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer) ...
SimplifiedGeometry & operator=(SimplifiedGeometry &&)=default
virtual ~SimplifiedGeometry()
Default destructor.
void setIndex(int index)
Set index of this layer (layers are numbered according to their position in the detector).
const DetLayer * getDetLayer() const
Return pointer to the assigned active layer (if any).