17 ObjId(0), Id(0),Nhit(0), Nparj(0), Npare(0),
18 AlignableChi2(0.), AlignableNdof(0)
33 tree->Branch(
"Id", &
Id,
"Id/i");
36 tree->Branch(
"Nhit", &
Nhit,
"Nhit/I");
38 tree->Branch(
"Jtvj", &
Jtvj,
"Jtvj[Nparj]/D");
40 tree->Branch(
"Jtve", &
Jtve,
"Jtve[Npare]/D");
49 tree->SetBranchAddress(
"Id", &
Id);
52 tree->SetBranchAddress(
"Nhit", &
Nhit);
54 tree->SetBranchAddress(
"Jtvj", &
Jtvj);
56 tree->SetBranchAddress(
"Jtve", &
Jtve);
68 edm::LogInfo(
"Alignment") <<
"[HIPUserVariablesIORoot::findEntry] fill map ...";
70 for (
int ev = 0;ev<
tree->GetEntries();ev++) {
78 treemaptype::iterator imap =
treemap.find(std::make_pair(detId,comp));
80 if (imap !=
treemap.end()) result=(*imap).second;
109 int np=jtve.num_row();
115 for(
int row=0;row<
np;row++){
142 tree->GetEntry(entry);
148 for(
int row=0;row<
np;row++) {
175 const char*
filename,
int iter,
bool validCheck,
int& ierr)
179 iret =
open(filename,iter,
true);
180 if (iret!=0) { ierr=-1;
return;}
181 iret =
write(alivec,validCheck);
182 if (iret!=0) { ierr=-2;
return;}
184 if (iret!=0) { ierr=-3;
return;}
189 std::vector<AlignmentUserVariables*>
191 const char*
filename,
int iter,
int& ierr)
193 std::vector<AlignmentUserVariables*>
result;
196 iret =
open(filename,iter,
false);
197 if (iret!=0) { ierr=-1;
return result;}
198 result =
read(alivec,iret);
199 if (iret!=0) { ierr=-2;
return result;}
201 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
std::vector< AlignmentUserVariables * > readHIPUserVariables(const Alignables &alivec, const char *filename, int iter, int &ierr)
std::pair< std::string, MonitorElement * > entry
double Jtvj[nparmax *(nparmax+1)/2]
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
(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