17 ObjId(0), Id(0), Nhit(0), Nparj(0), Npare(0),
19 AlignableChi2(0.), AlignableNdof(0)
35 tree->Branch(
"Id", &
Id,
"Id/i");
38 tree->Branch(
"Nhit", &
Nhit,
"Nhit/I");
41 tree->Branch(
"Jtvj", &
Jtvj,
"Jtvj[Nparj]/D");
43 tree->Branch(
"Jtve", &
Jtve,
"Jtve[Npare]/D");
46 tree->Branch(
"Par", &
Par,
"Par[Npare]/D");
47 tree->Branch(
"ParError", &
ParError,
"ParError[Npare]/D");
53 tree->SetBranchAddress(
"Id", &
Id);
56 tree->SetBranchAddress(
"Nhit", &
Nhit);
59 tree->SetBranchAddress(
"Jtvj", &
Jtvj);
61 tree->SetBranchAddress(
"Jtve", &
Jtve);
64 tree->SetBranchAddress(
"Par", &
Par);
73 edm::LogInfo(
"Alignment") <<
"[HIPUserVariablesIORoot::findEntry] fill map ...";
83 treemaptype::iterator imap =
treemap.find(std::make_pair(detId, comp));
85 if (imap !=
treemap.end()) result=(*imap).second;
115 int np=jtve.num_row();
122 for (
int row=0; row<
np; row++){
124 Par[row]=alipar[row];
149 tree->GetEntry(entry);
157 for (
int row=0; row<
np; row++){
159 alipar[row]=
Par[row];
189 const char*
filename,
int iter,
bool validCheck,
int& ierr
193 iret =
open(filename, iter,
true);
194 if (iret!=0) { ierr=-1;
return; }
195 iret =
write(alivec, validCheck);
196 if (iret!=0) { ierr=-2;
return; }
198 if (iret!=0) { ierr=-3;
return; }
205 const char*
filename,
int iter,
int& ierr
207 std::vector<AlignmentUserVariables*>
result;
210 iret =
open(filename, iter,
false);
211 if (iret!=0) { ierr=-1;
return result; }
212 result =
read(alivec, iret);
213 if (iret!=0) { ierr=-2;
return result; }
215 if (iret!=0) { ierr=-3;
return result; }
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
AlignmentUserVariables * readOne(Alignable *ali, int &ierr) override
int findEntry(unsigned int detId, int comp)
void createBranches(void) override
create root branches
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
void writeHIPUserVariables(const Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
unsigned int AlignableNdof
void setBranchAddresses(void) override
set root branches
int writeOne(Alignable *ali) override
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
std::vector< AlignmentUserVariables * > readHIPUserVariables(const Alignables &alivec, const char *filename, int iter, int &ierr)
double Jtvj[nparmax *(nparmax+1)/2]
align::Alignables Alignables
(Abstract) Base class for alignment algorithm user variables
CLHEP::HepVector AlgebraicVector
int write(const align::Alignables &alivec, bool validCheck)
std::vector< AlignmentUserVariables * > read(const align::Alignables &alivec, int &ierr)
CLHEP::HepSymMatrix AlgebraicSymMatrix
int open(const char *filename, int iteration, bool writemode) override