17 ObjId(0), Id(0),Nhit(0), Nparj(0), Npare(0),
18 AlignableChi2(0.), AlignableNdof(0)
35 tree->Branch(
"Id", &
Id,
"Id/i");
38 tree->Branch(
"Nhit", &
Nhit,
"Nhit/I");
40 tree->Branch(
"Jtvj", &
Jtvj,
"Jtvj[Nparj]/D");
42 tree->Branch(
"Jtve", &
Jtve,
"Jtve[Npare]/D");
45 tree->Branch(
"Par", &
Par,
"Par[Npare]/D");
46 tree->Branch(
"ParError", &
ParError,
"ParError[Npare]/D");
53 tree->SetBranchAddress(
"Id", &
Id);
56 tree->SetBranchAddress(
"Nhit", &
Nhit);
58 tree->SetBranchAddress(
"Jtvj", &
Jtvj);
60 tree->SetBranchAddress(
"Jtve", &
Jtve);
63 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;
116 int np=jtve.num_row();
122 for(
int row=0;row<
np;row++){
124 Par[row]=alipar[row];
150 tree->GetEntry(entry);
158 for(
int row=0;row<
np;row++) {
160 alipar[row]=
Par[row];
188 const char*
filename,
int iter,
bool validCheck,
int& ierr)
192 iret =
open(filename,iter,
true);
193 if (iret!=0) { ierr=-1;
return;}
194 iret =
write(alivec,validCheck);
195 if (iret!=0) { ierr=-2;
return;}
197 if (iret!=0) { ierr=-3;
return;}
202 std::vector<AlignmentUserVariables*>
204 const char*
filename,
int iter,
int& ierr)
206 std::vector<AlignmentUserVariables*>
result;
209 iret =
open(filename,iter,
false);
210 if (iret!=0) { ierr=-1;
return result;}
211 result =
read(alivec,iret);
212 if (iret!=0) { ierr=-2;
return result;}
214 if (iret!=0) { ierr=-3;
return result;}
int writeOne(Alignable *ali)
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
int findEntry(unsigned int detId, int comp)
int open(const char *filename, int iteration, bool writemode)
std::vector< Alignable * > Alignables
AlignmentUserVariables * readOne(Alignable *ali, int &ierr)
void setBranchAddresses(void)
set root branches
void createBranches(void)
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
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]
(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