src
MagneticField
Layers
src
MagELayer.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/MagELayer.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
MagELayer::MagELayer
(
const
vector<MagVolume*>&
volumes
,
double
zMin
,
double
zMax
)
19
: theVolumes(
volumes
), theZMin(
zMin
), theZMax(
zMax
) {}
20
21
MagELayer::~MagELayer
() {
22
for
(vector<MagVolume*>::const_iterator ivol =
theVolumes
.begin(); ivol !=
theVolumes
.end(); ++ivol) {
23
delete
(*ivol);
24
}
25
}
26
27
const
MagVolume
*
MagELayer::findVolume
(
const
GlobalPoint
&
gp
,
double
tolerance
)
const
{
28
for
(vector<MagVolume*>::const_iterator ivol =
theVolumes
.begin(); ivol !=
theVolumes
.end(); ++ivol) {
29
// FIXME : use a binfinder
30
#ifdef EDM_ML_DEBUG
31
{
32
MagVolume6Faces
* mv =
static_cast<
MagVolume6Faces
*
>
(*ivol);
33
LogTrace
(
"MagGeometry"
) <<
" Trying volume "
<< mv->
volumeNo
<<
" "
<<
int
(mv->
copyno
) << endl;
34
}
35
#endif
36
if
((*ivol)->inside(
gp
,
tolerance
))
37
return
(*ivol);
38
}
39
40
return
nullptr
;
41
}
MagVolume6Faces::volumeNo
short volumeNo
Definition:
MagVolume6Faces.h:38
MessageLogger.h
tolerance
const double tolerance
Definition:
HGCalGeomParameters.cc:29
MagELayer.h
volumeBasedMagneticField_160812_cfi.volumes
volumes
Definition:
volumeBasedMagneticField_160812_cfi.py:57
MagVolume6Faces.h
MagVolume6Faces
Definition:
MagVolume6Faces.h:23
MagVolume6Faces::copyno
char copyno
Definition:
MagVolume6Faces.h:39
std
Definition:
JetResolutionObject.h:76
MagVolume.h
photonAnalyzer_cfi.zMax
zMax
Definition:
photonAnalyzer_cfi.py:95
LogTrace
#define LogTrace(id)
Definition:
MessageLogger.h:234
photonAnalyzer_cfi.zMin
zMin
Definition:
photonAnalyzer_cfi.py:94
runTauDisplay.gp
gp
Definition:
runTauDisplay.py:431
MagELayer::findVolume
const MagVolume * findVolume(const GlobalPoint &gp, double tolerance) const
Find the volume containing a point, with a given tolerance.
Definition:
MagELayer.cc:27
createfilelist.int
int
Definition:
createfilelist.py:10
MagVolume
Definition:
MagVolume.h:13
MagELayer::theVolumes
std::vector< MagVolume * > theVolumes
Definition:
MagELayer.h:34
MagELayer::MagELayer
MagELayer(const std::vector< MagVolume *> &volumes, double zMin, double zMax)
Constructor.
Definition:
MagELayer.cc:18
MagELayer::~MagELayer
virtual ~MagELayer()
Destructor.
Definition:
MagELayer.cc:21
Point3DBase< float, GlobalTag >
Generated for CMSSW Reference Manual by
1.8.14