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 
9 
11 // Author: L. Vanelderen, S. Kurz
12 // Date: 29 May 2017
14 
15 
16 class DetLayer;
17 class MagneticField;
19 class TH1F;
20 
21 namespace edm
22 {
23  class ParameterSet;
24 }
25 
26 namespace fastsim
27 {
28  class InteractionModel;
29  class SimplifiedGeometryFactory;
30 
32 
40  {
41  public:
43 
48  SimplifiedGeometry(double geomProperty);
49 
51  virtual ~SimplifiedGeometry();
52 
54  // HACK
56 
58  enum CaloType{NONE, TRACKERBOUNDARY, PRESHOWER1, PRESHOWER2, ECAL, HCAL, VFCAL};
59 
61  void setCaloType(CaloType type) { caloType_ = type; }
62 
64  CaloType getCaloType() const { return caloType_; }
65 
67  // END
69 
71 
77  void setIndex(int index) { index_ = index; }
78 
80 
86  int index() const {return index_;}
87 
89 
94  const double getGeomProperty() const { return geomProperty_; }
95 
97 
103  virtual const double getThickness(const math::XYZTLorentzVector & position) const = 0;
104 
106 
113  virtual const double getThickness(const math::XYZTLorentzVector & position, const math::XYZTLorentzVector & momentum) const = 0;
114 
116 
119  const double getNuclearInteractionThicknessFactor() const {return nuclearInteractionThicknessFactor_; }
120 
122 
125  const DetLayer* getDetLayer() const { return detLayer_; }
126 
128 
132  virtual const double getMagneticFieldZ(const math::XYZTLorentzVector & position) const = 0;
133 
135 
138  virtual bool isForward() const = 0;
139 
141 
144  const std::vector<InteractionModel *> & getInteractionModels() const { return interactionModels_; }
145 
147  friend std::ostream& operator << (std::ostream& os, const SimplifiedGeometry & layer);
148 
150 
151  protected:
152  double geomProperty_;
153  int index_;
154  const DetLayer * detLayer_;
155  std::unique_ptr<TH1F> magneticFieldHist_;
156  std::unique_ptr<TH1F> thicknessHist_;
158  std::vector<InteractionModel *> interactionModels_;
160  };
161 
162  std::ostream& operator << (std::ostream& os , const SimplifiedGeometry & layer);
163 
164 }
165 
166 #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::vector< InteractionModel * > interactionModels_
Vector of all interaction models that are assigned with a layer.
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::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 std::vector< InteractionModel * > & getInteractionModels() const
Return the vector of all interaction models that are assigned with a layer.
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 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:509
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).