src
MagneticField
Interpolation
src
MFGridFactory.cc
Go to the documentation of this file.
1
#include "
MagneticField/Interpolation/interface/MFGridFactory.h
"
2
#include "
MagneticField/Interpolation/interface/binary_ifstream.h
"
3
#include "
DataFormats/GeometrySurface/interface/GloballyPositioned.h
"
4
5
#include "
RectangularCartesianMFGrid.h
"
6
#include "
RectangularCylindricalMFGrid.h
"
7
#include "
TrapezoidalCartesianMFGrid.h
"
8
#include "
TrapezoidalCylindricalMFGrid.h
"
9
#include "
SpecialCylindricalMFGrid.h
"
10
#include "
CylinderFromSectorMFGrid.h
"
11
12
#include <iostream>
13
14
using namespace
std
;
15
16
MFGrid
*
MFGridFactory::build
(
const
string
&
name
,
const
GloballyPositioned<float>
& vol) {
17
magneticfield::interpolation::binary_ifstream
inFile
(
name
);
18
return
build
(
inFile
, vol);
19
}
20
21
MFGrid
*
MFGridFactory::build
(
binary_ifstream
&
inFile
,
const
GloballyPositioned<float>
& vol) {
22
int
gridType;
23
inFile
>> gridType;
24
25
MFGrid
*
result
;
26
switch
(gridType) {
27
case
1:
28
result
=
new
RectangularCartesianMFGrid
(
inFile
, vol);
29
break
;
30
case
2:
31
result
=
new
TrapezoidalCartesianMFGrid
(
inFile
, vol);
32
break
;
33
case
3:
34
result
=
new
RectangularCylindricalMFGrid
(
inFile
, vol);
35
break
;
36
case
4:
37
result
=
new
TrapezoidalCylindricalMFGrid
(
inFile
, vol);
38
break
;
39
case
5:
40
result
=
new
SpecialCylindricalMFGrid
(
inFile
, vol, gridType);
41
break
;
42
case
6:
43
result
=
new
SpecialCylindricalMFGrid
(
inFile
, vol, gridType);
44
break
;
45
default
:
46
cout
<<
"ERROR Grid type unknown: "
<< gridType << endl;
47
// result = new GlobalGridWrapper(vol, name);
48
result
=
nullptr
;
49
break
;
50
}
51
return
result
;
52
}
53
54
MFGrid
*
MFGridFactory::build
(
const
string
&
name
,
const
GloballyPositioned<float>
& vol,
double
phiMin
,
double
phiMax
) {
55
MFGrid
* sectorGrid =
build
(
name
, vol);
56
return
new
CylinderFromSectorMFGrid
(vol,
phiMin
,
phiMax
, sectorGrid);
57
}
CylinderFromSectorMFGrid.h
mps_fire.result
result
Definition:
mps_fire.py:311
TrapezoidalCartesianMFGrid.h
SpecialCylindricalMFGrid.h
SpecialCylindricalMFGrid
Definition:
SpecialCylindricalMFGrid.h:18
RectangularCartesianMFGrid.h
std
Definition:
JetResolutionObject.h:76
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition:
AlignmentTrackSelector_cfi.py:18
GloballyPositioned.h
TrapezoidalCylindricalMFGrid
Definition:
TrapezoidalCylindricalMFGrid.h:12
TrapezoidalCylindricalMFGrid.h
MFGridFactory::build
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
testHGCalDigi_cfg.inFile
inFile
Definition:
testHGCalDigi_cfg.py:73
magneticfield::interpolation::binary_ifstream
Definition:
binary_ifstream.h:9
newFWLiteAna.build
build
Definition:
newFWLiteAna.py:126
GloballyPositioned< float >
MFGrid
Definition:
MFGrid.h:27
MFGridFactory.h
RectangularCylindricalMFGrid.h
TrapezoidalCartesianMFGrid
Definition:
TrapezoidalCartesianMFGrid.h:21
RectangularCartesianMFGrid
Definition:
RectangularCartesianMFGrid.h:11
CylinderFromSectorMFGrid
Definition:
CylinderFromSectorMFGrid.h:7
gather_cfg.cout
cout
Definition:
gather_cfg.py:144
RectangularCylindricalMFGrid
Definition:
RectangularCylindricalMFGrid.h:11
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition:
AlignmentTrackSelector_cfi.py:17
binary_ifstream.h
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
Generated for CMSSW Reference Manual by
1.8.14