Main Page
Namespaces
Classes
Package Documentation
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 "
MagneticField/Layers/interface/MagVerbosity.h
"
14
#include <iostream>
15
16
using namespace
std
;
17
18
19
MagELayer::MagELayer
(
const
vector<MagVolume*>& volumes,
double
zMin
,
double
zMax
) :
20
theVolumes(volumes),
21
theZMin(zMin),
22
theZMax(zMax)
23
{}
24
25
MagELayer::~MagELayer
(){
26
for
(vector<MagVolume *>::const_iterator ivol =
theVolumes
.begin();
27
ivol !=
theVolumes
.end(); ++ivol) {
28
delete
(*ivol);
29
}
30
}
31
32
33
const
MagVolume
*
34
MagELayer::findVolume
(
const
GlobalPoint
&
gp
,
double
tolerance
)
const
{
35
for
(vector<MagVolume*>::const_iterator ivol =
theVolumes
.begin();
36
ivol !=
theVolumes
.end(); ++ivol) {
37
// FIXME : use a binfinder
38
#ifdef MF_DEBUG
39
{
40
MagVolume6Faces
* mv =
static_cast<
MagVolume6Faces
*
>
(*ivol);
41
cout
<<
" Trying volume "
<< mv->
volumeNo
<<
" "
<<
int
(mv->
copyno
) << endl;
42
}
43
#endif
44
if
( (*ivol)->inside(gp,tolerance) )
return
(*ivol);
45
}
46
47
return
nullptr
;
48
}
49
MagVolume6Faces::volumeNo
short volumeNo
Definition:
MagVolume6Faces.h:38
MagELayer::MagELayer
MagELayer(const std::vector< MagVolume * > &volumes, double zMin, double zMax)
Constructor.
Definition:
MagELayer.cc:19
tolerance
const double tolerance
Definition:
HGCalGeomParameters.cc:25
MagELayer.h
MagVolume6Faces.h
MagVolume6Faces
Definition:
MagVolume6Faces.h:23
MagVolume6Faces::copyno
char copyno
Definition:
MagVolume6Faces.h:39
MagELayer::findVolume
const MagVolume * findVolume(const GlobalPoint &gp, double tolerance) const
Find the volume containing a point, with a given tolerance.
Definition:
MagELayer.cc:34
std
Definition:
JetResolutionObject.h:80
MagVerbosity.h
MagVolume.h
conversionPostprocessing_cfi.zMin
zMin
Definition:
conversionPostprocessing_cfi.py:32
runTauDisplay.gp
gp
Definition:
runTauDisplay.py:428
createfilelist.int
int
Definition:
createfilelist.py:10
MagVolume
Definition:
MagVolume.h:13
conversionPostprocessing_cfi.zMax
zMax
Definition:
conversionPostprocessing_cfi.py:33
MagELayer::theVolumes
std::vector< MagVolume * > theVolumes
Definition:
MagELayer.h:34
MagELayer::~MagELayer
virtual ~MagELayer()
Destructor.
Definition:
MagELayer.cc:25
Point3DBase< float, GlobalTag >
gather_cfg.cout
cout
Definition:
gather_cfg.py:143
Generated for CMSSW Reference Manual by
1.8.11