CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Constructor & Destructor Documentation

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),
CaloType caloType_
Hack to interface &quot;old&quot; Calorimetry with &quot;new&quot; Tracker.
double nuclearInteractionThicknessFactor_
Some layers have a different thickness for nuclear interactions.
const DetLayer * detLayer_
Return pointer to the assigned active layer (if any).
int index_
Return index of this layer (layers are numbered according to their position in the detector)...
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer) ...
fastsim::SimplifiedGeometry::SimplifiedGeometry ( SimplifiedGeometry &&  )
default
fastsim::SimplifiedGeometry::SimplifiedGeometry ( SimplifiedGeometry const &  )
delete
fastsim::SimplifiedGeometry::~SimplifiedGeometry ( )
virtual

Default destructor.

Definition at line 15 of file SimplifiedGeometry.cc.

15 {}

Member Function Documentation

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

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

Definition at line 65 of file SimplifiedGeometry.h.

References caloType_.

Referenced by FastSimProducer::createFSimTrack(), and FastSimProducer::produce().

65 { return caloType_; }
CaloType caloType_
Hack to interface &quot;old&quot; Calorimetry with &quot;new&quot; Tracker.
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.

References detLayer_.

Referenced by fastsim::TrackerSimHitProducer::interact().

127 { return detLayer_; }
const DetLayer * detLayer_
Return pointer to the assigned active layer (if any).
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.

References geomProperty_.

Referenced by fastsim::MultipleScattering::interact().

95 { return geomProperty_; }
double geomProperty_
Geometric property of the layer: radius (barrel layer) / position z (forward layer) ...
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.

References interactionModels_.

Referenced by FastSimProducer::produce().

146 { return interactionModels_; }
std::vector< InteractionModel * > interactionModels_
Vector of all interaction models that are assigned with a layer.
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.

Referenced by fastsim::TrackerSimHitProducer::interact(), and fastsim::LayerNavigator::moveParticleToNextLayer().

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_.

Referenced by fastsim::NuclearInteraction::interact(), and fastsim::NuclearInteractionFTF::interact().

double nuclearInteractionThicknessFactor_
Some layers have a different thickness for nuclear interactions.
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(), fastsim::PairProduction::interact(), fastsim::EnergyLoss::interact(), fastsim::Bremsstrahlung::interact(), fastsim::MultipleScattering::interact(), fastsim::MuonBremsstrahlung::interact(), fastsim::TrackerSimHitProducer::interact(), fastsim::NuclearInteraction::interact(), fastsim::NuclearInteractionFTF::interact(), and FastSimProducer::produce().

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.

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.

References index_.

Referenced by BeautifulSoup.PageElement::_invert(), fastsim::ParticleManager::addSecondaries(), fastsim::LayerNavigator::moveParticleToNextLayer(), fastsim::Geometry::nextLayer(), fastsim::Geometry::previousLayer(), and setIndex().

87 { return index_; }
int index_
Return index of this layer (layers are numbered according to their position in the detector)...
virtual bool fastsim::SimplifiedGeometry::isForward ( ) const
pure virtual
SimplifiedGeometry& fastsim::SimplifiedGeometry::operator= ( SimplifiedGeometry &&  )
default
SimplifiedGeometry& fastsim::SimplifiedGeometry::operator= ( SimplifiedGeometry const &  )
delete
void fastsim::SimplifiedGeometry::setCaloType ( CaloType  type)
inline

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

Definition at line 62 of file SimplifiedGeometry.h.

References caloType_.

62 { caloType_ = type; }
CaloType caloType_
Hack to interface &quot;old&quot; Calorimetry with &quot;new&quot; Tracker.
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.

References index(), and index_.

78 { index_ = index; }
int index_
Return index of this layer (layers are numbered according to their position in the detector)...
int index() const
Return index of this layer (layers are numbered according to their position in the detector)...

Friends And Related Function Documentation

Definition at line 151 of file SimplifiedGeometry.h.

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

Some basic output.

Member Data Documentation

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().

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().

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(), fastsim::ForwardSimplifiedGeometry::getZ(), and fastsim::operator<<().

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(), fastsim::operator<<(), and setIndex().

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().

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().

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().

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().