CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
FiducialVolume Class Reference

#include <FiducialVolume.h>

Public Member Functions

void addActivePoint (const GlobalPoint &point)
 add a point that belongs to the active volume More...
 
void determinInnerDimensions ()
 
 FiducialVolume (double tolerance=1.0)
 
bool isValid () const
 check whether the volume is properly defined More...
 
double maxR (bool withTolerance=true) const
 
double maxZ (bool withTolerance=true) const
 
double minR (bool withTolerance=true) const
 
double minZ (bool withTolerance=true) const
 
void reset ()
 invalidate the volume More...
 

Private Attributes

double maxR_
 
double maxZ_
 
double minR_
 
double minZ_
 
double tolerance_
 

Detailed Description

The detector active volume is determined estimated as a non-zero thickness cylinder with outter dimensions maxZ and maxR. The inner dimensions are found as minimum R and Z for two cases "barrel" (|eta|<1) and "endcap" (|eta|>1.7) correspondingly

Definition at line 25 of file FiducialVolume.h.

Constructor & Destructor Documentation

◆ FiducialVolume()

FiducialVolume::FiducialVolume ( double  tolerance = 1.0)
inline

Definition at line 27 of file FiducialVolume.h.

27 : tolerance_(tolerance) { reset(); }

References reset().

Member Function Documentation

◆ addActivePoint()

void FiducialVolume::addActivePoint ( const GlobalPoint point)

add a point that belongs to the active volume

Definition at line 21 of file FiducialVolume.cc.

21  {
22  if (point.perp() > maxR_)
23  maxR_ = point.perp();
24  if (fabs(point.eta()) < 1 && point.perp() < minR_)
25  minR_ = point.perp();
26  if (fabs(point.z()) > maxZ_)
27  maxZ_ = fabs(point.z());
28  if (fabs(point.eta()) > 1.7 && fabs(point.z()) < minZ_)
29  minZ_ = fabs(point.z());
30 }

References maxR_, maxZ_, minR_, minZ_, and point.

Referenced by DetIdAssociator::buildMap().

◆ determinInnerDimensions()

void FiducialVolume::determinInnerDimensions ( )

finilize dimension calculations, fixes dimensions in a case of missing barrel or endcap

Definition at line 39 of file FiducialVolume.cc.

39  {
40  if (maxR_ > 0 && maxR_ < minR_)
41  minR_ = maxR_;
42  if (maxZ_ > 0 && maxZ_ < minZ_)
43  minZ_ = maxZ_;
44 }

References maxR_, maxZ_, minR_, and minZ_.

Referenced by DetIdAssociator::buildMap().

◆ isValid()

bool FiducialVolume::isValid ( void  ) const

check whether the volume is properly defined

Definition at line 19 of file FiducialVolume.cc.

19 { return minR_ < 1e4 && maxR_ >= minR_ && minZ_ < 1e4 && maxZ_ >= minZ_; }

References minR_, and minZ_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), CachedTrajectory::getTrajectory(), and core.AutoHandle.AutoHandle::ReallyLoad().

◆ maxR()

double FiducialVolume::maxR ( bool  withTolerance = true) const
inline

Definition at line 43 of file FiducialVolume.h.

43  {
44  if (withTolerance)
45  return maxR_ + tolerance_;
46  else
47  return maxR_;
48  }

References maxR_, and tolerance_.

Referenced by DetIdAssociator::buildMap(), and CachedTrajectory::getTrajectory().

◆ maxZ()

double FiducialVolume::maxZ ( bool  withTolerance = true) const
inline

Definition at line 55 of file FiducialVolume.h.

55  {
56  if (withTolerance)
57  return maxZ_ + tolerance_;
58  else
59  return maxZ_;
60  }

References maxZ_, and tolerance_.

Referenced by DetIdAssociator::buildMap(), and CachedTrajectory::getTrajectory().

◆ minR()

double FiducialVolume::minR ( bool  withTolerance = true) const
inline

Definition at line 37 of file FiducialVolume.h.

37  {
38  if (withTolerance && minR_ > tolerance_)
39  return minR_ - tolerance_;
40  else
41  return minR_;
42  }

References minR_, and tolerance_.

Referenced by DetIdAssociator::buildMap(), CachedTrajectory::getTrajectory(), and TrackExtrapolator::propagateTrackToVolume().

◆ minZ()

double FiducialVolume::minZ ( bool  withTolerance = true) const
inline

Definition at line 49 of file FiducialVolume.h.

49  {
50  if (withTolerance && minZ_ > tolerance_)
51  return minZ_ - tolerance_;
52  else
53  return minZ_;
54  }

References minZ_, and tolerance_.

Referenced by DetIdAssociator::buildMap(), CachedTrajectory::getTrajectory(), and TrackExtrapolator::propagateTrackToVolume().

◆ reset()

void FiducialVolume::reset ( void  )

invalidate the volume

Definition at line 32 of file FiducialVolume.cc.

32  {
33  minR_ = 1e5;
34  maxR_ = -1;
35  minZ_ = 1e5;
36  maxZ_ = -1;
37 }

References TrackValidation_cff::e5, maxR_, maxZ_, minR_, and minZ_.

Referenced by FiducialVolume().

Member Data Documentation

◆ maxR_

double FiducialVolume::maxR_
private

Definition at line 64 of file FiducialVolume.h.

Referenced by addActivePoint(), determinInnerDimensions(), maxR(), and reset().

◆ maxZ_

double FiducialVolume::maxZ_
private

Definition at line 66 of file FiducialVolume.h.

Referenced by addActivePoint(), determinInnerDimensions(), maxZ(), and reset().

◆ minR_

double FiducialVolume::minR_
private

Definition at line 63 of file FiducialVolume.h.

Referenced by addActivePoint(), determinInnerDimensions(), isValid(), minR(), and reset().

◆ minZ_

double FiducialVolume::minZ_
private

Definition at line 65 of file FiducialVolume.h.

Referenced by addActivePoint(), determinInnerDimensions(), isValid(), minZ(), and reset().

◆ tolerance_

double FiducialVolume::tolerance_
private

Definition at line 67 of file FiducialVolume.h.

Referenced by maxR(), maxZ(), minR(), and minZ().

TrackValidation_cff.e5
e5
Definition: TrackValidation_cff.py:654
FiducialVolume::maxR_
double maxR_
Definition: FiducialVolume.h:64
tolerance
const double tolerance
Definition: HGCalGeomParameters.cc:29
FiducialVolume::reset
void reset()
invalidate the volume
Definition: FiducialVolume.cc:32
FiducialVolume::tolerance_
double tolerance_
Definition: FiducialVolume.h:67
FiducialVolume::maxZ_
double maxZ_
Definition: FiducialVolume.h:66
FiducialVolume::minZ_
double minZ_
Definition: FiducialVolume.h:65
point
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
Definition: invegas.h:5
FiducialVolume::minR_
double minR_
Definition: FiducialVolume.h:63