CMS 3D CMS Logo

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) {}
fastsim::SimplifiedGeometry
Implementation of a generic detector layer (base class for forward/barrel layers).
Definition: SimplifiedGeometry.h:35
fastsim::SimplifiedGeometry::~SimplifiedGeometry
virtual ~SimplifiedGeometry()
Default destructor.
Definition: SimplifiedGeometry.cc:15
fastsim::operator<<
std::ostream & operator<<(std::ostream &os, const fastsim::Geometry &geometry)
Definition: Geometry.cc:158
SimplifiedGeometry.h
fastsim::SimplifiedGeometry::geomProperty_
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer)
Definition: SimplifiedGeometry.h:154
NONE
Definition: TkAlStyle.cc:47
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
fastsim::SimplifiedGeometry::index_
int index_
Return index of this layer (layers are numbered according to their position in the detector)....
Definition: SimplifiedGeometry.h:155