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 
48  SimplifiedGeometry& operator=(SimplifiedGeometry&&) = default;
49  SimplifiedGeometry& operator=(SimplifiedGeometry const&) = delete;
50 
52  virtual ~SimplifiedGeometry();
53 
55  // HACK
57 
59  enum CaloType { NONE, TRACKERBOUNDARY, PRESHOWER1, PRESHOWER2, ECAL, HCAL, VFCAL };
60 
62  void setCaloType(CaloType type) { caloType_ = type; }
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 
121  const double getNuclearInteractionThicknessFactor() const { return nuclearInteractionThicknessFactor_; }
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
type
Definition: HCALResponse.h:21
Implementation of a generic detector layer (base class for forward/barrel layers).
CaloType
Hack to interface "old" Calorimetry with "new" Tracker.
std::unique_ptr< TH1F > magneticFieldHist_
Histogram that stores the size of the magnetic field along the layer.
const double getNuclearInteractionThicknessFactor() const
Some layers have a different thickness for nuclear interactions.
bool isForward(DetId const &)
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
CaloType getCaloType() const
Hack to interface "old" Calorimetry with "new" Tracker.
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 std::vector< InteractionModel * > & getInteractionModels() const
Return the vector of all interaction models that are assigned with a layer.
const DetLayer * detLayer_
Return pointer to the assigned active layer (if any).
Constructs a tracker layer according to entry in python config (incl interaction models).
const double getGeomProperty() const
Return geometric attribute of the layer.
int index_
Return 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).
HLT enums.
int index() const
Return index of this layer (layers are numbered according to their position in the detector)...
static int position[264][3]
Definition: ReadPGInfo.cc:289
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer) ...
void setIndex(int index)
Set index of this layer (layers are numbered according to their position in the detector).