src
MagneticField
Layers
src
MagBSlab.cc
Go to the documentation of this file.
1
// #include "Utilities/Configuration/interface/Architecture.h"
2
3
/*
4
* See header file for a description of this class.
5
*
6
* \author N. Amapane - INFN Torino
7
*/
8
9
#include "
MagneticField/Layers/interface/MagBSlab.h
"
10
#include "
MagneticField/VolumeGeometry/interface/MagVolume.h
"
11
#include "
MagneticField/VolumeGeometry/interface/MagVolume6Faces.h
"
12
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
#include <iostream>
15
16
using namespace
std
;
17
18
MagBSlab::MagBSlab
(
const
vector<MagVolume*>&
volumes
,
double
zMin
) : theVolumes(
volumes
), theZMin(
zMin
) {}
19
20
MagBSlab::~MagBSlab
() {
21
for
(vector<MagVolume*>::const_iterator ivol =
theVolumes
.begin(); ivol !=
theVolumes
.end(); ++ivol) {
22
delete
(*ivol);
23
}
24
}
25
26
const
MagVolume
*
MagBSlab::findVolume
(
const
GlobalPoint
&
gp
,
double
tolerance
)
const
{
27
for
(vector<MagVolume*>::const_iterator ivol =
theVolumes
.begin(); ivol !=
theVolumes
.end(); ++ivol) {
28
// FIXME : use a binfinder
29
LogTrace
(
"MagGeometry"
) <<
" Trying volume "
<< (
static_cast<
MagVolume6Faces
*
>
(*ivol))->volumeNo << endl;
30
if
((*ivol)->inside(
gp
,
tolerance
))
31
return
(*ivol);
32
}
33
34
return
nullptr
;
35
}
MagBSlab::findVolume
const MagVolume * findVolume(const GlobalPoint &gp, double tolerance) const
Find the volume containing a point, with a given tolerance.
Definition:
MagBSlab.cc:26
MessageLogger.h
MagBSlab.h
tolerance
const double tolerance
Definition:
HGCalGeomParameters.cc:29
volumeBasedMagneticField_160812_cfi.volumes
volumes
Definition:
volumeBasedMagneticField_160812_cfi.py:57
MagVolume6Faces.h
MagVolume6Faces
Definition:
MagVolume6Faces.h:23
std
Definition:
JetResolutionObject.h:76
MagVolume.h
LogTrace
#define LogTrace(id)
Definition:
MessageLogger.h:242
photonAnalyzer_cfi.zMin
zMin
Definition:
photonAnalyzer_cfi.py:94
runTauDisplay.gp
gp
Definition:
runTauDisplay.py:431
MagVolume
Definition:
MagVolume.h:13
MagBSlab::~MagBSlab
virtual ~MagBSlab()
Destructor.
Definition:
MagBSlab.cc:20
MagBSlab::MagBSlab
MagBSlab(const std::vector< MagVolume *> &volumes, double zMin)
Constructor.
Definition:
MagBSlab.cc:18
MagBSlab::theVolumes
std::vector< MagVolume * > theVolumes
Definition:
MagBSlab.h:38
Point3DBase< float, GlobalTag >
Generated for CMSSW Reference Manual by
1.8.14