93 if (isCollector)
edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Collector mode";
112 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] constructed.";
123 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Initializing...";
129 unsigned int firstrun = first1.
eventID().
run();
132 bool findMatchIOV=
false;
136 iovapp.append(
".root");
137 iovapp.insert(0,
"_");
152 edm::LogWarning(
"Alignment") <<
"error! Didn't find the matched IOV file!";
157 iovapp.append(
".root");
158 iovapp.insert(0,
"_");
184 for (std::vector<edm::ParameterSet>::const_iterator setiter =
theAPEParameterSet.begin();
187 std::vector<Alignable*> alignables;
192 if (alignParams.size() == 1 && alignParams[0] ==
std::string(
"selected")) {
200 std::vector<double> apeSPar = setiter->getParameter<std::vector<double> >(
"apeSPar");
201 std::vector<double> apeRPar = setiter->getParameter<std::vector<double> >(
"apeRPar");
202 std::string function = setiter->getParameter<std::string>(
"function");
204 if (apeSPar.size() != 3 || apeRPar.size() != 3)
205 throw cms::Exception(
"BadConfig") <<
"apeSPar and apeRPar must have 3 values each" << std::endl;
207 for (std::vector<double>::const_iterator
i = apeRPar.begin();
i != apeRPar.end(); ++
i) {
208 apeSPar.push_back(*
i);
211 if (
function == std::string(
"linear")) {
212 apeSPar.push_back(0.);
214 else if (
function == std::string(
"exponential")) {
215 apeSPar.push_back(1.);
217 else if (
function == std::string(
"step")) {
218 apeSPar.push_back(2.);
221 throw cms::Exception(
"BadConfig") <<
"APE function must be \"linear\" or \"exponential\"." << std::endl;
224 theAPEParameters.push_back(std::pair<std::vector<Alignable*>, std::vector<double> >(alignables, apeSPar));
234 for( std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
249 int numAlignablesFromFile = theAlignablePositionsFromFile.size();
251 if (numAlignablesFromFile==0) {
272 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Alignables Read "
273 << numAlignablesFromFile;
283 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Iteration increased by one!";
287 edm::LogInfo(
"Alignment") <<
"[HIPAlignmentAlgorithm] Apply positions from file ...";
289 theAlignablePositionsFromFile,
ioerr);
293 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Current Iteration number: "
318 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Using survey constraint";
324 for (
unsigned int i = 0;
i < nAlignable; ++
i)
332 int nhit = uservar->
nhit;
336 int tmp_Type = tl.first;
337 int tmp_Layer = tl.second;
339 float tmpz = pos.
z();
340 if(nhit< 1500 || (tmp_Type==5 && tmp_Layer==4 && fabs(tmpz)>90)){
356 uservar->
jtvj += invCov;
357 uservar->
jtve += invCov * sensResid;
377 for(std::vector<Alignable*>::const_iterator
406 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::terminate] Aligned units: " << ialigned;
461 static const unsigned int hitDim = 1;
486 covmat = covmat + ipcovmat;
490 if (covmat[0][0] != 0.) xpull = (pos[0] - coor[0])/
sqrt(fabs(covmat[0][0]));
497 int npar = derivs2D.num_row();
500 for (
int ipar=0;ipar<npar;ipar++) {
501 for (
unsigned int idim=0;idim<hitDim;idim++) {
502 derivs[ipar][idim] = derivs2D[ipar][idim];
520 if (!useThisHit)
return false;
530 thisjtvj.assign(jtvjtmp);
531 thisjtve=derivs * covmat * (pos-coor);
534 hitresidual[0] = (pos[0] - coor[0]);
537 hitresidualT = hitresidual.T();
542 uservar->
jtvj += hitwt*thisjtvj;
543 uservar->
jtve += hitwt*thisjtve;
551 thischi2 = hitwt*(hitresidualT *covmat *hitresidual)[0];
553 if (
verbose && ((thischi2/ static_cast<float>(uservar->
nhit)) >10.0) ) {
554 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::processHit1D]Added to Chi2 the number " << thischi2 <<
" having "
555 << uservar->
nhit <<
" dof " << std::endl <<
"X-resid "
556 << hitresidual[0] <<
" Y-resid "
557 << hitresidual[1] << std::endl <<
" Cov^-1 matr (covmat): [0][0]= "
558 << covmat[0][0] <<
" [0][1]= "
559 << covmat[0][1] <<
" [1][0]= "
560 << covmat[1][0] <<
" [1][1]= "
561 << covmat[1][1] << std::endl;
576 static const unsigned int hitDim = 2;
607 covmat = covmat + ipcovmat;
612 if (covmat[0][0] != 0.) xpull = (pos[0] - coor[0])/
sqrt(fabs(covmat[0][0]));
613 if (covmat[1][1] != 0.) ypull = (pos[1] - coor[1])/
sqrt(fabs(covmat[1][1]));
620 int npar = derivs2D.num_row();
623 for (
int ipar=0;ipar<npar;ipar++) {
624 for (
unsigned int idim=0;idim<hitDim;idim++) {
625 derivs[ipar][idim] = derivs2D[ipar][idim];
643 if (!useThisHit)
return false;
653 thisjtvj.assign(jtvjtmp);
654 thisjtve=derivs * covmat * (pos-coor);
657 hitresidual[0] = (pos[0] - coor[0]);
658 hitresidual[1] = (pos[1] - coor[1]);
665 hitresidualT = hitresidual.T();
669 uservar->
jtvj += hitwt*thisjtvj;
670 uservar->
jtve += hitwt*thisjtve;
678 thischi2 = hitwt*(hitresidualT *covmat *hitresidual)[0];
680 if (
verbose && ((thischi2/ static_cast<float>(uservar->
nhit)) >10.0) ) {
681 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::processHit2D]Added to Chi2 the number " << thischi2 <<
" having "
682 << uservar->
nhit <<
" dof " << std::endl <<
"X-resid "
683 << hitresidual[0] <<
" Y-resid "
684 << hitresidual[1] << std::endl <<
" Cov^-1 matr (covmat): [0][0]= "
685 << covmat[0][0] <<
" [0][1]= "
686 << covmat[0][1] <<
" [1][0]= "
687 << covmat[1][0] <<
" [1][1]= "
688 << covmat[1][1] << std::endl;
719 for (ConstTrajTrackPairCollection::const_iterator it=tracks.begin();
728 float pt = track->
pt();
731 float p = track->
p();
734 float d0 = track->
d0();
735 float dz = track->
dz();
756 TFormula *my_formula =
new TFormula(
"formula",
"2.51469/(2.51469+4.11684*x-16.7847*pow(x,2)+46.1574*pow(x,3)-55.22*pow(x,4)+29.5591*pow(x,5)-5.39816*pow(x,6))");
758 trkwt =
Scale*(my_formula->Eval(fabs(eta)));}
762 double r = gRandom->Rndm();
767 else if (
trackWt){ihitwt=trkwt;}
794 std::vector<const TransientTrackingRecHit*> hitvec;
795 std::vector<TrajectoryStateOnSurface> tsosvec;
798 std::vector<TrajectoryMeasurement> measurements = traj->
measurements();
799 for (std::vector<TrajectoryMeasurement>::iterator im=measurements.begin();
800 im!=measurements.end();
817 bool skiphit =
false;
828 const std::type_info &
type =
typeid(*rechit);
839 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Strip RecHit failed! "
840 <<
"TypeId of the RecHit: " <<
className(*hit) <<std::endl;
853 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Strip RecHit failed! "
855 <<
"TypeId of the TTRH: " <<
className(*hit) << std::endl;
868 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Pixel RecHit failed! "
870 <<
"TypeId of the TTRH: " <<
className(*hit) << std::endl;
882 <<
"ERROR in <HIPAlignmentAlgorithm::run>: this hit should have been skipped!"
891 hitvec.push_back(hit);
892 tsosvec.push_back(tsos);
904 std::vector<TrajectoryStateOnSurface>::const_iterator itsos=tsosvec.begin();
905 std::vector<const TransientTrackingRecHit*>::const_iterator ihit=hitvec.begin();
908 while (itsos != tsosvec.end()) {
911 const GeomDet* det = (*ihit)->det();
913 uint32_t nhitDim = (*ihit)->dimension();
932 double angle = TMath::ASin(sin_theta);
947 if ((nhitDim==1)&&(ihitwt!=0)) {
949 }
else if ((nhitDim==2)&&(ihitwt!=0)) {
976 std::ifstream inIterFile(filename.c_str(),
std::ios::in);
978 edm::LogError(
"Alignment") <<
"[HIPAlignmentAlgorithm::readIterationFile] ERROR! "
979 <<
"Unable to open Iteration file";
984 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::readIterationFile] "
985 <<
"Read last iteration number from file: " <<
result;
996 std::ofstream outIterFile((filename.c_str()),
std::ios::out);
998 edm::LogError(
"Alignment") <<
"[HIPAlignmentAlgorithm::writeIterationFile] ERROR: Unable to write Iteration file";
1001 outIterFile << iter;
1002 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::writeIterationFile] writing iteration number to file: " << iter;
1004 outIterFile.close();
1018 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::setAlignmentPositionError] No APE applied";
1023 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::setAlignmentPositionError] Apply APE!";
1025 double apeSPar[3], apeRPar[3];
1026 for (std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > >::const_iterator alipars =
theAPEParameters.begin();
1029 const std::vector<Alignable*> &alignables = alipars->first;
1030 const std::vector<double> &pars = alipars->second;
1032 apeSPar[0] = pars[0];
1033 apeSPar[1] = pars[1];
1034 apeSPar[2] = pars[2];
1035 apeRPar[0] = pars[3];
1036 apeRPar[1] = pars[4];
1037 apeRPar[2] = pars[5];
1039 double function = pars[6];
1042 printf(
"APE: %u alignables\n", (
unsigned int)alignables.size());
1043 for (
int i=0;
i<21; ++
i ) {
1044 double apelinstest=
calcAPE(apeSPar,
i,0.);
1045 double apeexpstest=
calcAPE(apeSPar,
i,1.);
1046 double apestepstest=
calcAPE(apeSPar,
i,2.);
1047 double apelinrtest=
calcAPE(apeRPar,
i,0.);
1048 double apeexprtest=
calcAPE(apeRPar,
i,1.);
1049 double apesteprtest=
calcAPE(apeRPar,
i,2.);
1050 printf(
"APE: iter slin sexp sstep rlin rexp rstep: %5d %12.5f %12.5f %12.5f %12.5f %12.5f %12.5f \n",
1051 i,apelinstest,apeexpstest,apestepstest, apelinrtest,apeexprtest,apesteprtest);
1068 double diter=(double)iter;
1075 if (
function == 0.) {
1076 return std::max(par[1],par[0]+((par[1]-par[0])/par[2])*diter);
1078 else if (
function == 1.) {
1081 else if (
function == 2.) {
1082 int ipar2 = (int) par[2];
1083 int step = iter/ipar2;
1084 double dstep = (double) step;
1085 return std::max(0.0, par[0] - par[1]*dstep);
1098 snprintf(iterString,
sizeof(iterString),
"%i",
theIteration);
1100 tname.Append(iterString);
1109 TString tname_hit=
"T1_hit";
1110 tname_hit.Append(
"_");
1111 tname_hit.Append(iterString);
1113 theTree =
new TTree(tname,
"Eventwise tree");
1134 hitTree =
new TTree(tname_hit,
"Hitwise tree");
1145 theTree2 =
new TTree(
"T2",
"Alignablewise tree");
1161 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::bookRoot] Survey trees booked.";
1164 theTree3 =
new TTree(tname,
"Survey Tree");
1170 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::bookRoot] Root trees booked.";
1191 for (std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
1225 <<
"------------------------------------------------------------------------\n"
1226 <<
" ALIGNABLE: " << setw(6) << naligned
1228 <<
"hits: " << setw(4) <<
m2_Nhit
1229 <<
" type: " << setw(4) <<
m2_Type
1230 <<
" layer: " << setw(4) <<
m2_Layer
1231 <<
" id: " << setw(4) <<
m2_Id
1232 <<
" objId: " << setw(4) <<
m2_ObjId
1234 << std::fixed << std::setprecision(5)
1244 << setw(12) << pars[0]
1245 << setw(12) << pars[1]
1246 << setw(12) << pars[2]
1247 << setw(12) << pars[3]
1248 << setw(12) << pars[4]
1249 << setw(12) << pars[5];
1266 int nhit = uservar->
nhit;
1286 int npar = jtve.num_row();
1292 if (params.num_row()!=1){
1293 edm::LogError(
"Alignment") <<
"For scanning, please only turn on one parameter! check common_cff_py.txt";
1297 else params[0]=
step;
1312 params = - (jtvjinv * jtve);
1318 for (
int i=0;
i<npar;
i++) {
1319 if (fabs(cov[
i][
i])>0) paramerr[
i] =
sqrt(fabs(cov[i][i]));
1320 else paramerr[
i] = params[
i];
1321 if (params[i]!=0) relerr[
i] = fabs(paramerr[i]/params[i]);
1332 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::CalcParameters]: parameters = " << params;
1335 uservar->
alierr=paramerr;
1348 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::collector] called for iteration "
1358 std::stringstream
ss;
1364 std::vector<AlignmentUserVariables*> uvarvec =
1369 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::collector] could not read user variable files for job "
1375 std::vector<AlignmentUserVariables*> uvarvecadd;
1376 std::vector<AlignmentUserVariables*>::const_iterator iuvarnew=uvarvec.begin();
1377 for (std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
1398 uvarvecadd.push_back(uvar);
1421 snprintf(treeName,
sizeof(treeName),
"T1_%d", iter);
1423 char hitTreeName[64];
1424 snprintf(hitTreeName,
sizeof(hitTreeName),
"T1_hit_%d", iter);
1428 TFile *jobfile =
new TFile(filename,
"READ");
1430 TTree *jobtree = (TTree*)jobfile->Get(treeName);
1431 TTree *hittree = (TTree*)jobfile->Get(hitTreeName);
1433 static const int nmaxtrackperevent = 1000;
1434 int jobNtracks, jobNhitspertrack[nmaxtrackperevent], jobnhPXB[nmaxtrackperevent], jobnhPXF[nmaxtrackperevent],jobnhTIB[nmaxtrackperevent], jobnhTOB[nmaxtrackperevent],jobnhTID[nmaxtrackperevent], jobnhTEC[nmaxtrackperevent];
1435 float jobP[nmaxtrackperevent], jobPt[nmaxtrackperevent], jobEta[nmaxtrackperevent] , jobPhi[nmaxtrackperevent];
1436 float jobd0[nmaxtrackperevent],jobwt[nmaxtrackperevent], jobdz[nmaxtrackperevent] , jobChi2n[nmaxtrackperevent];
1437 float jobsinTheta,jobHitWt,jobangle;
1440 jobtree->SetBranchAddress(
"Ntracks", &jobNtracks);
1441 jobtree->SetBranchAddress(
"Nhits", jobNhitspertrack);
1442 jobtree->SetBranchAddress(
"nhPXB", jobnhPXB);
1443 jobtree->SetBranchAddress(
"nhPXF", jobnhPXF);
1444 jobtree->SetBranchAddress(
"nhTIB", jobnhTIB);
1445 jobtree->SetBranchAddress(
"nhTOB", jobnhTOB);
1446 jobtree->SetBranchAddress(
"nhTID", jobnhTID);
1447 jobtree->SetBranchAddress(
"nhTEC", jobnhTEC);
1448 jobtree->SetBranchAddress(
"Pt", jobPt);
1449 jobtree->SetBranchAddress(
"P", jobP);
1450 jobtree->SetBranchAddress(
"d0", jobd0);
1451 jobtree->SetBranchAddress(
"dz", jobdz);
1452 jobtree->SetBranchAddress(
"Eta", jobEta);
1453 jobtree->SetBranchAddress(
"Phi", jobPhi);
1454 jobtree->SetBranchAddress(
"Chi2n", jobChi2n);
1455 jobtree->SetBranchAddress(
"wt", jobwt);
1458 hittree->SetBranchAddress(
"sinTheta", &jobsinTheta);
1459 hittree->SetBranchAddress(
"HitImpactAngle", &jobangle);
1460 hittree->SetBranchAddress(
"Id", &jobDetId);
1461 hittree->SetBranchAddress(
"wt", &jobHitWt);
1464 for (ievent=0;ievent<jobtree->GetEntries();++ievent) {
1465 jobtree->GetEntry(ievent);
1475 m_Nhits[ntrk] = jobNhitspertrack[ntrk];
1476 m_Pt[ntrk] = jobPt[ntrk];
1477 m_P[ntrk] = jobP[ntrk];
1478 m_nhPXB[ntrk] = jobnhPXB[ntrk];
1479 m_nhPXF[ntrk] = jobnhPXF[ntrk];
1480 m_nhTIB[ntrk] = jobnhTIB[ntrk];
1481 m_nhTOB[ntrk] = jobnhTOB[ntrk];
1482 m_nhTID[ntrk] = jobnhTID[ntrk];
1483 m_nhTEC[ntrk] = jobnhTEC[ntrk];
1484 m_Eta[ntrk] = jobEta[ntrk];
1485 m_Phi[ntrk] = jobPhi[ntrk];
1486 m_Chi2n[ntrk] = jobChi2n[ntrk];
1487 m_d0[ntrk] = jobd0[ntrk];
1488 m_dz[ntrk] = jobdz[ntrk];
1489 m_wt[ntrk] = jobwt[ntrk];
1492 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::fillEventwiseTree] Number of tracks in Eventwise tree exceeds MAXREC: "
1493 <<
m_Ntracks <<
" Skipping exceeding tracks.";
1502 for (ihit=0;ihit<hittree->GetEntries();++ihit) {
1503 hittree->GetEntry(ihit);
ClusterRef cluster() const
void attachUserVariables(const align::Alignables &alivec, const std::vector< AlignmentUserVariables * > &uvarvec, int &ierr)
Attach User Variables to given alignables.
double p() const
momentum vector magnitude
T getParameter(std::string const &) const
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
T getUntrackedParameter(std::string const &, T const &) const
tuple start
Check for commandline option errors.
ConstRecHitPointer const & recHit() const
double d0() const
dxy parameter in perigee convention (d0 = -dxy)
AlignableDetOrUnitPtr alignableFromGeomDet(const GeomDet *geomDet)
Returns AlignableDetOrUnitPtr corresponding to given GeomDet.
AlignmentParameterStore * theAlignmentParameterStore
std::pair< int, int > typeAndLayer(const Alignable *ali, const TrackerTopology *tTopo) const
Obtain type and layer from Alignable.
const EventID & eventID() const
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
TSOS combine(const TSOS &pTsos1, const TSOS &pTsos2) const
int fillEventwiseTree(const char *filename, int iter, int ierr)
void setAlignmentPositionError(const align::Alignables &alivec, double valshift, double valrot)
Set Alignment position error.
LocalVector localDirection() const
LocalPoint localPosition() const
static char const * tname
align::StructureType m2_ObjId
Geom::Phi< T > phi() const
double phi() const
azimuthal angle of momentum vector
void writeIterationFile(std::string filename, int iter)
void applyParameters(void)
Obsolete: Use AlignableNavigator::alignableDetFromDetId and alignableFromAlignableDet.
Alignable * alignableFromAlignableDet(const AlignableDetOrUnitPtr &adet) const
Get relevant Alignable from AlignableDet.
HIPUserVariables * clone(void) const
void applyAlignableAbsolutePositions(const align::Alignables &alis, const AlignablePositions &newpos, int &ierr)
apply absolute positions to alignables
LocalError positionError() const
int numberOfValidStripTOBHits() const
AlignmentParameters * alignmentParameters() const
Get the AlignmentParameters.
const ConstTrajTrackPairCollection & trajTrackPairs() const
bool processHit1D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit, double hitwt)
define event information passed to algorithms
std::vector< unsigned > theIOVrangeSet
void writeHIPUserVariables(const Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
static align::StructureType stringToId(const char *)
bool calcParameters(Alignable *ali, int setDet, double start, double step)
std::vector< std::pair< std::vector< Alignable * >, std::vector< double > > > theAPEParameters
const AlgebraicVector & parameters(void) const
Get alignment parameters.
DataContainer const & measurements() const
AlignmentUserVariables * userVariables(void) const
Get pointer to user variables.
AlignablePositions readAlignableAbsolutePositions(const align::Alignables &alivec, const char *filename, int iter, int &ierr)
read Alignable current absolute positions
void clear()
remove all selected Alignables and geometrical restrictions
double eta() const
pseudorapidity of momentum vector
double calcAPE(double *par, int iter, double function)
void startNewLoop(void)
Called at start of new loop.
int numberOfValidPixelBarrelHits() const
std::vector< AlignmentUserVariables * > readHIPUserVariables(const Alignables &alivec, const char *filename, int iter, int &ierr)
void setAlignmentParameters(AlignmentParameters *dap)
Set the AlignmentParameters.
CLHEP::HepMatrix AlgebraicMatrix
HIPAlignmentAlgorithm(const edm::ParameterSet &cfg)
Constructor.
void setValid(bool v)
Set validity flag.
double pt() const
track transverse momentum
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store)
Call at beginning of job.
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
std::string siterationfile
AlignableNavigator * theAlignableDetAccessor
int numberOfValidStripTIDHits() const
ClusterRef cluster() const
void fillRoot(const edm::EventSetup &setup)
int readIterationFile(std::string filename)
unsigned short numberOfValidHits() const
number of valid hits found
int numberOfValidStripTECHits() const
std::vector< double > SetScanDet
const LocalTrajectoryError & localError() const
void setAlignmentPositionError(void)
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const AlignableSurface & surface() const
Return the Surface (global position and orientation) of the object.
TrajectoryStateOnSurface const & forwardPredictedState() const
Access to forward predicted state (from fitter or builder)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
const align::Alignables & selectedAlignables() const
vector of alignables selected so far
int numSelected(void) const
Get number of selected parameters.
virtual TrackingRecHit const * hit() const
CLHEP::HepVector AlgebraicVector
void setUserVariables(AlignmentUserVariables *auv)
Set pointer to user variables.
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
virtual LocalError localPositionError() const =0
ClusterRef cluster() const
CompositeAlignmentParameters selectParameters(const std::vector< AlignableDet * > &alignabledets) const
T const * product() const
AlgebraicSymMatrix inverseCovariance() const
Get inverse of survey covariance wrt given structure type in constructor.
std::string smisalignedfile
bool processHit2D(const AlignableDetOrUnitPtr &alidet, const Alignable *ali, const TrajectoryStateOnSurface &tsos, const TrackingRecHit *hit, double hitwt)
int numberOfValidStripTIBHits() const
std::vector< edm::ParameterSet > theAPEParameterSet
align::StructureType m3_ObjId
int numberOfValidPixelEndcapHits() const
virtual void terminate()
Called at end of job (must be implemented in derived class)
AlgebraicVector sensorResidual() const
std::vector< AlignableDetOrUnitPtr > alignablesFromHits(const std::vector< const TransientTrackingRecHit * > &hitvec)
Returns vector AlignableDetOrUnitPtr for given vector of Hits.
const AliClusterValueMap * clusterValueMap() const
bool isValid(void) const
Get validity flag.
CLHEP::HepSymMatrix AlgebraicSymMatrix
unsigned int addSelections(const edm::ParameterSet &pSet)
bool theFillTrackMonitoring
std::vector< AlignableAbsData > AlignablePositions
void writeAlignableAbsolutePositions(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
write Alignable current absolute positions
DetId geographicalId() const
const IOVSyncValue & first() const
virtual AlignmentParameters * cloneFromSelected(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
bool detAndSubdetInMap(const DetId &detid) const
Given a DetId, returns true if DetIds with this detector and subdetector id are in the map (not neces...
Constructor of the full muon geometry.
virtual LocalPoint localPosition() const =0
double theMaxRelParameterError
const PositionType & position() const
std::vector< align::StructureType > theLevels
double theMaxAllowedHitPull
std::vector< Alignable * > theAlignables
Power< A, B >::type pow(const A &a, const B &b)
const align::Alignables & alignables(void) const
get all alignables
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
std::string className(const T &t)
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)
int theMinimumNumberOfHits
std::string theCollectorPath
void run(const edm::EventSetup &setup, const EventInfo &eventInfo)
Run the algorithm.
virtual AlgebraicMatrix selectedDerivatives(const TrajectoryStateOnSurface &tsos, const AlignableDetOrUnitPtr &alidet) const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
std::string sparameterfile