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
fastsim::SimplifiedGeometry::magneticFieldHist_
std::unique_ptr< TH1F > magneticFieldHist_
Histogram that stores the size of the magnetic field along the layer.
Definition: SimplifiedGeometry.h:157
DetLayer
Definition: DetLayer.h:21
edm
HLT enums.
Definition: AlignableModifier.h:19
fastsim::SimplifiedGeometry
Implementation of a generic detector layer (base class for forward/barrel layers).
Definition: SimplifiedGeometry.h:35
fastsim::SimplifiedGeometry::getCaloType
CaloType getCaloType() const
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:65
fastsim::SimplifiedGeometry::~SimplifiedGeometry
virtual ~SimplifiedGeometry()
Default destructor.
Definition: SimplifiedGeometry.cc:15
fastsim::SimplifiedGeometry::caloType_
CaloType caloType_
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:162
fastsim::SimplifiedGeometry::CaloType
CaloType
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometryFactory
Constructs a tracker layer according to entry in python config (incl interaction models).
Definition: SimplifiedGeometryFactory.h:40
fastsim::SimplifiedGeometry::NONE
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::getMagneticFieldZ
virtual const double getMagneticFieldZ(const math::XYZTLorentzVector &position) const =0
Return magnetic field (field only has Z component!) on the layer.
fastsim::SimplifiedGeometry::getThickness
virtual const double getThickness(const math::XYZTLorentzVector &position) const =0
Return thickness of the layer at a given position.
fastsim::SimplifiedGeometry::nuclearInteractionThicknessFactor_
double nuclearInteractionThicknessFactor_
Some layers have a different thickness for nuclear interactions.
Definition: SimplifiedGeometry.h:159
fastsim::SimplifiedGeometry::getNuclearInteractionThicknessFactor
const double getNuclearInteractionThicknessFactor() const
Some layers have a different thickness for nuclear interactions.
Definition: SimplifiedGeometry.h:121
fastsim::SimplifiedGeometry::HCAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::TRACKERBOUNDARY
Definition: SimplifiedGeometry.h:59
fastsim::operator<<
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:158
fastsim::SimplifiedGeometry::interactionModels_
std::vector< InteractionModel * > interactionModels_
Vector of all interaction models that are assigned with a layer.
Definition: SimplifiedGeometry.h:161
fastsim::SimplifiedGeometry::thicknessHist_
std::unique_ptr< TH1F > thicknessHist_
Histogram that stores the tickness (radLengths) along the layer.
Definition: SimplifiedGeometry.h:158
fastsim::SimplifiedGeometry::getInteractionModels
const std::vector< InteractionModel * > & getInteractionModels() const
Return the vector of all interaction models that are assigned with a layer.
Definition: SimplifiedGeometry.h:146
ParameterSet
Definition: Functions.h:16
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
fastsim::SimplifiedGeometry::getGeomProperty
const double getGeomProperty() const
Return geometric attribute of the layer.
Definition: SimplifiedGeometry.h:95
fastsim::SimplifiedGeometry::operator=
SimplifiedGeometry & operator=(SimplifiedGeometry &&)=default
fastsim::SimplifiedGeometry::getDetLayer
const DetLayer * getDetLayer() const
Return pointer to the assigned active layer (if any).
Definition: SimplifiedGeometry.h:127
type
type
Definition: HCALResponse.h:21
fastsim::SimplifiedGeometry::PRESHOWER1
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::geomProperty_
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer)
Definition: SimplifiedGeometry.h:154
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
GeometricSearchTracker
Definition: GeometricSearchTracker.h:14
fastsim::SimplifiedGeometry::setIndex
void setIndex(int index)
Set index of this layer (layers are numbered according to their position in the detector).
Definition: SimplifiedGeometry.h:78
fastsim::SimplifiedGeometry::VFCAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::setCaloType
void setCaloType(CaloType type)
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:62
fastsim::SimplifiedGeometry::ECAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::isForward
virtual bool isForward() const =0
Returns false/true depending if the object is a (non-abstract) barrel/forward layer.
fastsim::SimplifiedGeometry::SimplifiedGeometry
SimplifiedGeometry(double geomProperty)
Default constructor.
Definition: SimplifiedGeometry.cc:17
fastsim
Definition: BarrelSimplifiedGeometry.h:15
MagneticField
Definition: MagneticField.h:19
fastsim::SimplifiedGeometry::operator<<
friend std::ostream & operator<<(std::ostream &os, const SimplifiedGeometry &layer)
Some basic output.
fastsim::SimplifiedGeometry::detLayer_
const DetLayer * detLayer_
Return pointer to the assigned active layer (if any).
Definition: SimplifiedGeometry.h:156
fastsim::SimplifiedGeometry::index_
int index_
Return index of this layer (layers are numbered according to their position in the detector)....
Definition: SimplifiedGeometry.h:155
fastsim::SimplifiedGeometry::PRESHOWER2
Definition: SimplifiedGeometry.h:59