#include <Alignment/SurveyAnalysis/interface/SurveyOutput.h>
Public Member Functions | |
SurveyOutput (const std::vector< Alignable * > &, const std::string &fileName) | |
void | write (unsigned int iter) |
write out variables | |
Private Attributes | |
const std::vector< Alignable * > & | theAlignables |
TFile | theFile |
Definition at line 19 of file SurveyOutput.h.
SurveyOutput::SurveyOutput | ( | const std::vector< Alignable * > & | alignables, | |
const std::string & | fileName | |||
) |
Definition at line 10 of file SurveyOutput.cc.
00011 : 00012 theAlignables(alignables), 00013 theFile(fileName.c_str(), "RECREATE") 00014 { 00015 }
write out variables
Definition at line 17 of file SurveyOutput.cc.
References Alignable::displacement(), e3, e4, i, N, Alignable::rotation(), theAlignables, theFile, align::toAngles(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by SurveyAlignment::iterate().
00018 { 00019 std::ostringstream o; 00020 00021 o << 't' << iter; 00022 00023 TNtuple* nt = new TNtuple(o.str().c_str(), "", "x:y:z:a:b:g"); 00024 00025 unsigned int N = theAlignables.size(); 00026 00027 for (unsigned int i = 0; i < N; ++i) 00028 { 00029 const Alignable* ali = theAlignables[i]; 00030 00031 align::GlobalVector shifts = ali->displacement() * 1e4; // cm to um 00032 00033 align::EulerAngles angles = align::toAngles( ali->rotation() ) * 1e3; // to mrad 00034 00035 nt->Fill( shifts.x(), shifts.y(), shifts.z(), 00036 angles(1), angles(2), angles(3) ); 00037 // const AlgebraicVector& pars = ali->alignmentParameters()->parameters(); 00038 00039 // nt->Fill(pars[0], pars[1], pars[2], pars[3], pars[4], pars[5]); 00040 } 00041 00042 theFile.Write(); 00043 00044 delete nt; 00045 }
const std::vector<Alignable*>& SurveyOutput::theAlignables [private] |
TFile SurveyOutput::theFile [private] |