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() <<
" " 175 << fe->getOptOName() <<
" " << fe->getEntryName() <<
" " << fe->getName() <<
" " << fe->getOrder()
176 <<
" " << fe->getQuality() <<
" " << (*vecite)->type() <<
" " << std::endl;
179 if (fe->getQuality() == 1)
181 else if (fe->getQuality() == 2)
185 if (optobj->
Name == fe->getOptOName())
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++)
289 int ss = 0,
dd = 0,
d1 = 0,
tt = 0, cc = 0;
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;
DistancemeterMeas * DistancemeterMeasA
void GetGlobalAngles(const CLHEP::HepRotation &rmGlob, double *theta)
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
static std::vector< OpticalObject * > & OptOList()
Sin< T >::type sin(const T &t)
TClonesArray * CloneOptObject
TClonesArray * CloneTiltmeterMeas
TClonesArray * CloneFitParam
double SimulatedPosition[2]
Cos< T >::type cos(const T &t)
TClonesArray * CloneDistancemeterMeas
TClonesArray * CloneSensor2DMeas
Sensor2DMeas * Sensor2DMeasA
TClonesArray * CloneCopsMeas
static NtupleManager * getInstance()
void FillOptObjects(MatrixMeschach *AtWAMatrix)
void FillFitParameters(MatrixMeschach *AtWAMatrix)
double Chi2CalibratedParameters
static std::vector< Measurement * > & MeasurementList()
TiltmeterMeas * TiltmeterMeasA
static constexpr float d1
static std::vector< Entry * > & EntryList()
Geom::Theta< T > theta() const
static NtupleManager * instance
double SimulatedPosition[4]
Distancemeter1DimMeas * Distancemeter1DimMeasA
TClonesArray * CloneDistancemeter1DimMeas