CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SimplifiedGeometry.cc
Go to the documentation of this file.
2 
3 #include <iostream>
4 #include <TH1F.h>
5 
6 std::ostream& fastsim::operator<<(std::ostream& os, const SimplifiedGeometry& layer) {
7  os << (layer.isForward() ? "ForwardSimplifiedGeometry" : "BarrelSimplifiedGeometry") << " index=" << layer.index_
8  << (layer.isForward() ? " z=" : " radius=") << layer.geomProperty_;
9  return os;
10 }
11 
12 // note: define destructor and constructor in .cc file,
13 // otherwise one cannot forward declare TH1F in the header file
14 // w/o compilation issues
16 
18  : geomProperty_(geomProperty),
19  index_(-1),
20  detLayer_(nullptr),
21  nuclearInteractionThicknessFactor_(1.),
22  caloType_(fastsim::SimplifiedGeometry::NONE) {}
Implementation of a generic detector layer (base class for forward/barrel layers).
constexpr std::array< uint8_t, layerIndexSize > layer
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:160
virtual bool isForward() const =0
Returns false/true depending if the object is a (non-abstract) barrel/forward layer.
int index_
Return index of this layer (layers are numbered according to their position in the detector)...
SimplifiedGeometry(double geomProperty)
Default constructor.
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer) ...
virtual ~SimplifiedGeometry()
Default destructor.