Alignment
SurveyAnalysis
src
SurveyOutput.cc
Go to the documentation of this file.
1
#include <sstream>
2
3
#include "TNtuple.h"
4
5
#include "
Alignment/CommonAlignment/interface/Alignable.h
"
6
// #include "Alignment/CommonAlignment/interface/AlignmentParameters.h"
7
8
#include "
Alignment/SurveyAnalysis/interface/SurveyOutput.h
"
9
10
SurveyOutput::SurveyOutput
(
const
align::Alignables
& alignables,
const
std::string
&
fileName
)
11
: theAlignables(alignables),
theFile
(
fileName
.c_str(),
"RECREATE"
) {}
12
13
void
SurveyOutput::write
(
unsigned
int
iter) {
14
std::ostringstream
o
;
15
16
o
<<
't'
<< iter;
17
18
TNtuple*
nt
=
new
TNtuple(
o
.str().c_str(),
""
,
"x:y:z:a:b:g"
);
19
20
unsigned
int
N
=
theAlignables
.size();
21
22
for
(
unsigned
int
i
= 0;
i
<
N
; ++
i
) {
23
const
Alignable
* ali =
theAlignables
[
i
];
24
25
align::GlobalVector
shifts = ali->
displacement
() * 1
e4
;
// cm to um
26
27
align::EulerAngles
angles
=
align::toAngles
(ali->
rotation
()) * 1
e3
;
// to mrad
28
29
nt
->Fill(shifts.
x
(), shifts.
y
(), shifts.
z
(),
angles
(1),
angles
(2),
angles
(3));
30
// const AlgebraicVector& pars = ali->alignmentParameters()->parameters();
31
32
// nt->Fill(pars[0], pars[1], pars[2], pars[3], pars[4], pars[5]);
33
}
34
35
theFile
.Write();
36
37
delete
nt
;
38
}
Vector3DBase< Scalar, GlobalTag >
align::toAngles
EulerAngles toAngles(const RotationType &)
Convert rotation matrix to angles about x-, y-, z-axes (frame rotation).
Definition:
Utilities.cc:8
mps_fire.i
i
Definition:
mps_fire.py:428
PV3DBase::x
T x() const
Definition:
PV3DBase.h:59
nt
int nt
Definition:
AMPTWrapper.h:42
Alignable
Definition:
Alignable.h:27
MillePedeFileConverter_cfg.fileName
fileName
Definition:
MillePedeFileConverter_cfg.py:32
EcalTangentSkim_cfg.o
o
Definition:
EcalTangentSkim_cfg.py:36
PV3DBase::z
T z() const
Definition:
PV3DBase.h:61
interactiveExample.theFile
theFile
Definition:
interactiveExample.py:17
N
#define N
Definition:
blowfish.cc:9
Alignable::displacement
const GlobalVector & displacement() const
Return change of the global position since the creation of the object.
Definition:
Alignable.h:141
SurveyOutput::SurveyOutput
SurveyOutput(const align::Alignables &, const std::string &fileName)
Definition:
SurveyOutput.cc:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
Alignable::rotation
const RotationType & rotation() const
Return change of orientation since the creation of the object.
Definition:
Alignable.h:144
PV3DBase::y
T y() const
Definition:
PV3DBase.h:60
align::EulerAngles
AlgebraicVector EulerAngles
Definition:
Definitions.h:34
SiPixelPhase1Clusters_cfi.e3
e3
Definition:
SiPixelPhase1Clusters_cfi.py:9
align::Alignables
std::vector< Alignable * > Alignables
Definition:
Utilities.h:31
particleFlowDisplacedVertex_cfi.angles
angles
Definition:
particleFlowDisplacedVertex_cfi.py:84
Alignable.h
SurveyOutput::write
void write(unsigned int iter)
write out variables
Definition:
SurveyOutput.cc:13
SurveyOutput.h
SurveyOutput::theFile
TFile theFile
Definition:
SurveyOutput.h:32
vertexPlots.e4
e4
Definition:
vertexPlots.py:64
SurveyOutput::theAlignables
const align::Alignables & theAlignables
Definition:
SurveyOutput.h:30
Generated for CMSSW Reference Manual by
1.8.16