21 #include "TClonesArray.h"
40 theRootFile =
new TFile(
"report.root",
"RECREATE",
"Simple ROOT Ntuple");
42 CocoaTree =
new TTree(
"CocoaTree",
"CocoaTree");
122 ALIint nMeas = 0, nUnk = 0;
125 std::vector<Measurement*>::const_iterator vmcite;
129 double c2 = ((*vmcite)->value(
ii) - (*vmcite)->valueSimulated(
ii)) / (*vmcite)->sigma(
ii);
135 std::vector<Entry*>::iterator veite;
137 if ((*veite)->quality() == 2)
139 if ((*veite)->quality() == 1) {
142 double c2 = (*veite)->valueDisplacementByFitting() / (*veite)->sigma();
156 int theMinEntryQuality = 1;
158 std::vector<Entry*>::const_iterator vecite;
161 if ((*vecite)->quality() >= theMinEntryQuality) {
162 ALIint ipos = (*vecite)->fitPos();
174 std::cout <<
"EEE " << (*vecite)->ValueDimensionFactor() <<
" " << (*vecite)->SigmaDimensionFactor() <<
" "
176 <<
" " << fe->
getQuality() <<
" " << (*vecite)->type() <<
" " << std::endl;
189 if ((*vecite)->type() ==
"centre" || (*vecite)->type() ==
"length")
239 std::vector<OpticalObject*>::const_iterator vecobj;
246 if (!(*vecobj)->parent()) {
253 std::vector<OpticalObject*>::const_iterator vecobj2;
255 if ((*vecobj2)->name() == (*vecobj)->parent()->name()) {
276 for (
int i = 0;
i < 3;
i++)
290 std::vector<Measurement*>::const_iterator vmcite;
292 std::vector<ALIstring> optonamelist = (*vmcite)->OptONameList();
293 int last = optonamelist.size() - 1;
298 if (optobj->
Name == LastOptOName)
302 if ((*vmcite)->type() ==
"SENSOR2D") {
306 for (
ALIuint i = 0;
i < (*vmcite)->dim();
i++) {
313 if ((*vmcite)->type() ==
"DISTANCEMETER") {
322 if ((*vmcite)->type() ==
"DISTANCEMETER1DIM") {
331 if ((*vmcite)->type() ==
"TILTMETER") {
340 if ((*vmcite)->type() ==
"COPS") {
344 for (
ALIuint i = 0;
i < (*vmcite)->dim();
i++) {
363 double xx = rmGlob.xx();
364 if (fabs(
xx) < 1.
e-08)
366 double xy = rmGlob.xy();
367 if (fabs(
xy) < 1.
e-08)
369 double xz = rmGlob.xz();
370 if (fabs(
xz) < 1.
e-08)
372 double yx = rmGlob.yx();
373 if (fabs(yx) < 1.
e-08)
375 double yy = rmGlob.yy();
376 if (fabs(
yy) < 1.
e-08)
378 double yz = rmGlob.yz();
379 if (fabs(
yz) < 1.
e-08)
381 double zx = rmGlob.zx();
382 if (fabs(zx) < 1.
e-08)
384 double zy = rmGlob.zy();
385 if (fabs(zy) < 1.
e-08)
387 double zz = rmGlob.zz();
388 if (fabs(
zz) < 1.
e-08)
391 double beta = asin(-zx);
394 if (fabs(zx) != 1.) {
395 double sinalpha = zy /
cos(
beta);
398 alpha = asin(sinalpha);
404 double singamma = yx /
cos(
beta);
407 gamma = asin(singamma);
417 double cosgamma =
yy;
419 gamma = asin(singamma);
426 int GotGlobalAngles = 0;
428 GotGlobalAngles += 1;
430 GotGlobalAngles += 10;
432 GotGlobalAngles += 100;
434 GotGlobalAngles += 1000;
435 if (GotGlobalAngles > 0)
436 std::cout <<
"NtupleManager Warning: cannot get global rotation: " << GotGlobalAngles << std::endl;