CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Friends
fastsim::SimplifiedGeometry Class Referenceabstract

Implementation of a generic detector layer (base class for forward/barrel layers). More...

#include <SimplifiedGeometry.h>

Inheritance diagram for fastsim::SimplifiedGeometry:
fastsim::BarrelSimplifiedGeometry fastsim::ForwardSimplifiedGeometry

Public Types

enum  CaloType {
  NONE, TRACKERBOUNDARY, PRESHOWER1, PRESHOWER2,
  ECAL, HCAL, VFCAL
}
 Hack to interface "old" Calorimetry with "new" Tracker. More...
 

Public Member Functions

CaloType getCaloType () const
 Hack to interface "old" Calorimetry with "new" Tracker. More...
 
const DetLayergetDetLayer () const
 Return pointer to the assigned active layer (if any). More...
 
const double getGeomProperty () const
 Return geometric attribute of the layer. More...
 
const std::vector< InteractionModel * > & getInteractionModels () const
 Return the vector of all interaction models that are assigned with a layer. More...
 
virtual const double getMagneticFieldZ (const math::XYZTLorentzVector &position) const =0
 Return magnetic field (field only has Z component!) on the layer. More...
 
const double getNuclearInteractionThicknessFactor () const
 Some layers have a different thickness for nuclear interactions. More...
 
virtual const double getThickness (const math::XYZTLorentzVector &position) const =0
 Return thickness of the layer at a given position. More...
 
virtual const double getThickness (const math::XYZTLorentzVector &position, const math::XYZTLorentzVector &momentum) const =0
 Return thickness of the layer at a given position, also considering the incident angle. More...
 
int index () const
 Return index of this layer (layers are numbered according to their position in the detector). More...
 
virtual bool isForward () const =0
 Returns false/true depending if the object is a (non-abstract) barrel/forward layer. More...
 
SimplifiedGeometryoperator= (SimplifiedGeometry &&)=default
 
SimplifiedGeometryoperator= (SimplifiedGeometry const &)=delete
 
void setCaloType (CaloType type)
 Hack to interface "old" Calorimetry with "new" Tracker. More...
 
void setIndex (int index)
 Set index of this layer (layers are numbered according to their position in the detector). More...
 
 SimplifiedGeometry (double geomProperty)
 Default constructor. More...
 
 SimplifiedGeometry (SimplifiedGeometry &&)=default
 
 SimplifiedGeometry (SimplifiedGeometry const &)=delete
 
virtual ~SimplifiedGeometry ()
 Default destructor. More...
 

Protected Attributes

CaloType caloType_
 Hack to interface "old" Calorimetry with "new" Tracker. More...
 
const DetLayerdetLayer_
 Return pointer to the assigned active layer (if any). More...
 
double geomProperty_
 Geometric property of the layer: radius (barrel layer) / position z (forward layer) More...
 
int index_
 Return index of this layer (layers are numbered according to their position in the detector). The (usual) order is increasing 'geomProperty'. More...
 
std::vector< InteractionModel * > interactionModels_
 Vector of all interaction models that are assigned with a layer. More...
 
std::unique_ptr< TH1F > magneticFieldHist_
 Histogram that stores the size of the magnetic field along the layer. More...
 
double nuclearInteractionThicknessFactor_
 Some layers have a different thickness for nuclear interactions. More...
 
std::unique_ptr< TH1F > thicknessHist_
 Histogram that stores the tickness (radLengths) along the layer. More...
 

Friends

class fastsim::SimplifiedGeometryFactory
 
std::ostream & operator<< (std::ostream &os, const SimplifiedGeometry &layer)
 Some basic output. More...
 

Detailed Description

Implementation of a generic detector layer (base class for forward/barrel layers).

Each layer has a geometric attribute ('geomProperty') which depends on which kind of layer is actually created (radius for barrel layers, position z for forward layers). Furthermore, a thickness in radiation length is assigned which can vary throughout the layer.

See also
BarrelSimplifiedGeometry
ForwardSimplifiedGeometry

Definition at line 35 of file SimplifiedGeometry.h.

Member Enumeration Documentation

◆ CaloType

Hack to interface "old" Calorimetry with "new" Tracker.

Enumerator
NONE 
TRACKERBOUNDARY 
PRESHOWER1 
PRESHOWER2 
ECAL 
HCAL 
VFCAL 

Definition at line 59 of file SimplifiedGeometry.h.

Constructor & Destructor Documentation

◆ SimplifiedGeometry() [1/3]

fastsim::SimplifiedGeometry::SimplifiedGeometry ( double  geomProperty)

Default constructor.

'geomProperty' depends on which kind of layer is actually created

Definition at line 17 of file SimplifiedGeometry.cc.

18  : geomProperty_(geomProperty),
19  index_(-1),
20  detLayer_(nullptr),

◆ SimplifiedGeometry() [2/3]

fastsim::SimplifiedGeometry::SimplifiedGeometry ( SimplifiedGeometry &&  )
default

◆ SimplifiedGeometry() [3/3]

fastsim::SimplifiedGeometry::SimplifiedGeometry ( SimplifiedGeometry const &  )
delete

◆ ~SimplifiedGeometry()

fastsim::SimplifiedGeometry::~SimplifiedGeometry ( )
virtual

Default destructor.

Definition at line 15 of file SimplifiedGeometry.cc.

15 {}

Member Function Documentation

◆ getCaloType()

CaloType fastsim::SimplifiedGeometry::getCaloType ( ) const
inline

Hack to interface "old" Calorimetry with "new" Tracker.

Definition at line 65 of file SimplifiedGeometry.h.

65 { return caloType_; }

References caloType_.

Referenced by FastSimProducer::createFSimTrack().

◆ getDetLayer()

const DetLayer* fastsim::SimplifiedGeometry::getDetLayer ( ) const
inline

Return pointer to the assigned active layer (if any).

Necessary to create SimHits.

Definition at line 127 of file SimplifiedGeometry.h.

127 { return detLayer_; }

References detLayer_.

◆ getGeomProperty()

const double fastsim::SimplifiedGeometry::getGeomProperty ( ) const
inline

Return geometric attribute of the layer.

'geomProperty' depends on which kind of layer is actually created

Definition at line 95 of file SimplifiedGeometry.h.

95 { return geomProperty_; }

References geomProperty_.

◆ getInteractionModels()

const std::vector<InteractionModel*>& fastsim::SimplifiedGeometry::getInteractionModels ( ) const
inline

Return the vector of all interaction models that are assigned with a layer.

This makes it easy to switch on/off some interactions for some layers.

Definition at line 146 of file SimplifiedGeometry.h.

146 { return interactionModels_; }

References interactionModels_.

◆ getMagneticFieldZ()

virtual const double fastsim::SimplifiedGeometry::getMagneticFieldZ ( const math::XYZTLorentzVector position) const
pure virtual

Return magnetic field (field only has Z component!) on the layer.

Parameters
positionA position which has to be on the layer.
Returns
The magnetic field on the layer.

Implemented in fastsim::BarrelSimplifiedGeometry, and fastsim::ForwardSimplifiedGeometry.

◆ getNuclearInteractionThicknessFactor()

const double fastsim::SimplifiedGeometry::getNuclearInteractionThicknessFactor ( ) const
inline

Some layers have a different thickness for nuclear interactions.

Right now only considered for TEC layers.

Definition at line 121 of file SimplifiedGeometry.h.

References nuclearInteractionThicknessFactor_.

◆ getThickness() [1/2]

virtual const double fastsim::SimplifiedGeometry::getThickness ( const math::XYZTLorentzVector position) const
pure virtual

Return thickness of the layer at a given position.

Returns the thickness of the layer (in radiation length) at a specified position since the thickness can vary throughout the layer.

Parameters
positionA position which has to be on the layer.
Returns
The thickness of the layer (in radiation length).
See also
getThickness(const math::XYZTLorentzVector & position, const math::XYZTLorentzVector & momentum)

Implemented in fastsim::BarrelSimplifiedGeometry, and fastsim::ForwardSimplifiedGeometry.

Referenced by FastSimProducer::createFSimTrack().

◆ getThickness() [2/2]

virtual const double fastsim::SimplifiedGeometry::getThickness ( const math::XYZTLorentzVector position,
const math::XYZTLorentzVector momentum 
) const
pure virtual

Return thickness of the layer at a given position, also considering the incident angle.

Returns the thickness of the layer (in radiation length) at a specified position and a given incident angle since the thickness can vary throughout the layer.

Parameters
positionA position which has to be on the layer.
momentumThe momentum of the incident particle.
Returns
The thickness of the layer (in radiation length).
See also
getThickness(const math::XYZTLorentzVector & position)

Implemented in fastsim::BarrelSimplifiedGeometry, and fastsim::ForwardSimplifiedGeometry.

◆ index()

int fastsim::SimplifiedGeometry::index ( ) const
inline

Return index of this layer (layers are numbered according to their position in the detector).

The (usual) order is increasing 'geomProperty':

  • BarrelLayers: innermost to outermost
  • ForwardLayers: -z to +z Makes it more convenient to navigate from one layer to the previous/next layer.

Definition at line 87 of file SimplifiedGeometry.h.

87 { return index_; }

References index_.

Referenced by BeautifulSoup.PageElement::insert(), and setIndex().

◆ isForward()

virtual bool fastsim::SimplifiedGeometry::isForward ( ) const
pure virtual

Returns false/true depending if the object is a (non-abstract) barrel/forward layer.

Function to easily destinguish barrel from forward layers (which both inherit from SimplifiedGeometry).

Implemented in fastsim::BarrelSimplifiedGeometry, and fastsim::ForwardSimplifiedGeometry.

Referenced by FastSimProducer::createFSimTrack().

◆ operator=() [1/2]

SimplifiedGeometry& fastsim::SimplifiedGeometry::operator= ( SimplifiedGeometry &&  )
default

◆ operator=() [2/2]

SimplifiedGeometry& fastsim::SimplifiedGeometry::operator= ( SimplifiedGeometry const &  )
delete

◆ setCaloType()

void fastsim::SimplifiedGeometry::setCaloType ( CaloType  type)
inline

Hack to interface "old" Calorimetry with "new" Tracker.

Definition at line 62 of file SimplifiedGeometry.h.

62 { caloType_ = type; }

References caloType_.

◆ setIndex()

void fastsim::SimplifiedGeometry::setIndex ( int  index)
inline

Set index of this layer (layers are numbered according to their position in the detector).

The (usual) order is increasing 'geomProperty':

  • BarrelLayers: innermost to outermost
  • ForwardLayers: -z to +z Makes it more convenient to navigate from one layer to the previous/next layer.

Definition at line 78 of file SimplifiedGeometry.h.

78 { index_ = index; }

References index(), and index_.

Friends And Related Function Documentation

◆ fastsim::SimplifiedGeometryFactory

Definition at line 151 of file SimplifiedGeometry.h.

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const SimplifiedGeometry layer 
)
friend

Some basic output.

Member Data Documentation

◆ caloType_

CaloType fastsim::SimplifiedGeometry::caloType_
protected

Hack to interface "old" Calorimetry with "new" Tracker.

Definition at line 162 of file SimplifiedGeometry.h.

Referenced by getCaloType(), and setCaloType().

◆ detLayer_

const DetLayer* fastsim::SimplifiedGeometry::detLayer_
protected

Return pointer to the assigned active layer (if any).

Definition at line 156 of file SimplifiedGeometry.h.

Referenced by getDetLayer().

◆ geomProperty_

double fastsim::SimplifiedGeometry::geomProperty_
protected

Geometric property of the layer: radius (barrel layer) / position z (forward layer)

Definition at line 154 of file SimplifiedGeometry.h.

Referenced by getGeomProperty(), fastsim::BarrelSimplifiedGeometry::getRadius(), and fastsim::ForwardSimplifiedGeometry::getZ().

◆ index_

int fastsim::SimplifiedGeometry::index_
protected

Return index of this layer (layers are numbered according to their position in the detector). The (usual) order is increasing 'geomProperty'.

Definition at line 155 of file SimplifiedGeometry.h.

Referenced by index(), and setIndex().

◆ interactionModels_

std::vector<InteractionModel*> fastsim::SimplifiedGeometry::interactionModels_
protected

Vector of all interaction models that are assigned with a layer.

Definition at line 161 of file SimplifiedGeometry.h.

Referenced by getInteractionModels().

◆ magneticFieldHist_

std::unique_ptr<TH1F> fastsim::SimplifiedGeometry::magneticFieldHist_
protected

Histogram that stores the size of the magnetic field along the layer.

Definition at line 157 of file SimplifiedGeometry.h.

Referenced by fastsim::ForwardSimplifiedGeometry::getMagneticFieldZ(), and fastsim::BarrelSimplifiedGeometry::getMagneticFieldZ().

◆ nuclearInteractionThicknessFactor_

double fastsim::SimplifiedGeometry::nuclearInteractionThicknessFactor_
protected

Some layers have a different thickness for nuclear interactions.

Definition at line 159 of file SimplifiedGeometry.h.

Referenced by getNuclearInteractionThicknessFactor().

◆ thicknessHist_

std::unique_ptr<TH1F> fastsim::SimplifiedGeometry::thicknessHist_
protected

Histogram that stores the tickness (radLengths) along the layer.

Definition at line 158 of file SimplifiedGeometry.h.

Referenced by fastsim::ForwardSimplifiedGeometry::getThickness(), and fastsim::BarrelSimplifiedGeometry::getThickness().

fastsim::SimplifiedGeometry::caloType_
CaloType caloType_
Hack to interface "old" Calorimetry with "new" Tracker.
Definition: SimplifiedGeometry.h:162
fastsim::SimplifiedGeometry::NONE
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::nuclearInteractionThicknessFactor_
double nuclearInteractionThicknessFactor_
Some layers have a different thickness for nuclear interactions.
Definition: SimplifiedGeometry.h:159
fastsim::SimplifiedGeometry::HCAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::TRACKERBOUNDARY
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::interactionModels_
std::vector< InteractionModel * > interactionModels_
Vector of all interaction models that are assigned with a layer.
Definition: SimplifiedGeometry.h:161
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
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::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
fastsim::SimplifiedGeometry::VFCAL
Definition: SimplifiedGeometry.h:59
fastsim::SimplifiedGeometry::ECAL
Definition: SimplifiedGeometry.h:59
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