Main Page
Namespaces
Classes
Package Documentation
MagneticField
Interpolation
src
MFGridFactory.cc
Go to the documentation of this file.
1
#include "
MagneticField/Interpolation/interface/MFGridFactory.h
"
2
#include "
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
binary_ifstream
inFile(name);
18
int
gridType;
19
inFile >> gridType;
20
21
MFGrid
*
result
;
22
switch
(gridType){
23
case
1:
24
result =
new
RectangularCartesianMFGrid
(inFile, vol);
25
break
;
26
case
2:
27
result =
new
TrapezoidalCartesianMFGrid
(inFile, vol);
28
break
;
29
case
3:
30
result =
new
RectangularCylindricalMFGrid
(inFile, vol);
31
break
;
32
case
4:
33
result =
new
TrapezoidalCylindricalMFGrid
(inFile, vol);
34
break
;
35
case
5:
36
result =
new
SpecialCylindricalMFGrid
(inFile, vol, gridType);
37
break
;
38
case
6:
39
result =
new
SpecialCylindricalMFGrid
(inFile, vol, gridType);
40
break
;
41
default
:
42
cout
<<
"ERROR Grid type unknown: "
<< gridType << endl;
43
// result = new GlobalGridWrapper(vol, name);
44
result =
nullptr
;
45
break
;
46
}
47
inFile.close();
48
return
result
;
49
}
50
51
MFGrid
*
MFGridFactory::build
(
const
string
& name,
52
const
GloballyPositioned<float>
& vol,
53
double
phiMin
,
double
phiMax
)
54
{
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:226
TrapezoidalCartesianMFGrid.h
SpecialCylindricalMFGrid.h
SpecialCylindricalMFGrid
Definition:
SpecialCylindricalMFGrid.h:17
RectangularCartesianMFGrid.h
std
Definition:
JetResolutionObject.h:80
AlignmentTrackSelector_cfi.phiMin
phiMin
Definition:
AlignmentTrackSelector_cfi.py:18
GloballyPositioned.h
TrapezoidalCylindricalMFGrid
Definition:
TrapezoidalCylindricalMFGrid.h:11
TrapezoidalCylindricalMFGrid.h
MFGridFactory::build
static MFGrid * build(const std::string &name, const GloballyPositioned< float > &vol)
Build interpolator for a binary grid file.
GloballyPositioned< float >
MFGrid
Definition:
MFGrid.h:29
MFGridFactory.h
binary_ifstream
Definition:
binary_ifstream.h:8
RectangularCylindricalMFGrid.h
TrapezoidalCartesianMFGrid
Definition:
TrapezoidalCartesianMFGrid.h:19
RectangularCartesianMFGrid
Definition:
RectangularCartesianMFGrid.h:9
CylinderFromSectorMFGrid
Definition:
CylinderFromSectorMFGrid.h:7
gather_cfg.cout
cout
Definition:
gather_cfg.py:143
RectangularCylindricalMFGrid
Definition:
RectangularCylindricalMFGrid.h:9
dataset.name
name
Definition:
dataset.py:45
AlignmentTrackSelector_cfi.phiMax
phiMax
Definition:
AlignmentTrackSelector_cfi.py:17
binary_ifstream.h
Generated for CMSSW Reference Manual by
1.8.11