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...
 
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...
 
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 39 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 20 of file SimplifiedGeometry.cc.

21  : geomProperty_(geomProperty)
22  , index_(-1)
23  , detLayer_(nullptr)
26 {}
CaloType caloType_
Hack to interface "old" Calorimetry with "new" 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 ( )
virtual

Default destructor.

Definition at line 17 of file SimplifiedGeometry.cc.

18 {}

Member Function Documentation

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

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

Definition at line 64 of file SimplifiedGeometry.h.

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

64 { return caloType_; }
CaloType caloType_
Hack to interface "old" Calorimetry with "new" Tracker.
const DetLayer* fastsim::SimplifiedGeometry::getDetLayer ( ) const
inline

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

Necessary to create SimHits.

Definition at line 125 of file SimplifiedGeometry.h.

References ecaldqm::isForward().

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

125 { 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 94 of file SimplifiedGeometry.h.

References position.

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

94 { 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 144 of file SimplifiedGeometry.h.

References edm::operator<<().

Referenced by FastSimProducer::produce().

144 { 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 119 of file SimplifiedGeometry.h.

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 86 of file SimplifiedGeometry.h.

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

86 {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
void fastsim::SimplifiedGeometry::setCaloType ( CaloType  type)
inline

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

Definition at line 61 of file SimplifiedGeometry.h.

61 { caloType_ = type; }
type
Definition: HCALResponse.h:21
CaloType caloType_
Hack to interface "old" Calorimetry with "new" 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 77 of file SimplifiedGeometry.h.

77 { 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 149 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 159 of file SimplifiedGeometry.h.

const DetLayer* fastsim::SimplifiedGeometry::detLayer_
protected

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

Definition at line 154 of file SimplifiedGeometry.h.

double fastsim::SimplifiedGeometry::geomProperty_
protected

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

Definition at line 152 of file SimplifiedGeometry.h.

Referenced by 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 153 of file SimplifiedGeometry.h.

Referenced by fastsim::operator<<().

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

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

Definition at line 158 of file SimplifiedGeometry.h.

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

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

Definition at line 155 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 157 of file SimplifiedGeometry.h.

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

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

Definition at line 156 of file SimplifiedGeometry.h.

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