50 surveyResiduals_(cfg.getUntrackedParameter<
std::vector<
std::
string> >(
"surveyResiduals"))
93 if (isCollector)
edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Collector mode";
108 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] constructed.";
119 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Initializing...";
132 unsigned int firstrun = first1.
eventID().
run();
135 bool findMatchIOV=
false;
139 iovapp.append(
".root");
140 iovapp.insert(0,
"_");
155 edm::LogWarning(
"Alignment") <<
"error! Didn't find the matched IOV file!";
160 iovapp.append(
".root");
161 iovapp.insert(0,
"_");
187 for (std::vector<edm::ParameterSet>::const_iterator setiter =
theAPEParameterSet.begin();
190 std::vector<Alignable*> alignables;
195 if (alignParams.size() == 1 && alignParams[0] ==
std::string(
"selected")) {
203 std::vector<double> apeSPar = setiter->getParameter<std::vector<double> >(
"apeSPar");
204 std::vector<double> apeRPar = setiter->getParameter<std::vector<double> >(
"apeRPar");
205 std::string function = setiter->getParameter<std::string>(
"function");
207 if (apeSPar.size() != 3 || apeRPar.size() != 3)
208 throw cms::Exception(
"BadConfig") <<
"apeSPar and apeRPar must have 3 values each" << std::endl;
210 for (std::vector<double>::const_iterator
i = apeRPar.begin();
i != apeRPar.end(); ++
i) {
211 apeSPar.push_back(*
i);
214 if (
function == std::string(
"linear")) {
215 apeSPar.push_back(0.);
217 else if (
function == std::string(
"exponential")) {
218 apeSPar.push_back(1.);
220 else if (
function == std::string(
"step")) {
221 apeSPar.push_back(2.);
224 throw cms::Exception(
"BadConfig") <<
"APE function must be \"linear\" or \"exponential\"." << std::endl;
227 theAPEParameters.push_back(std::pair<std::vector<Alignable*>, std::vector<double> >(alignables, apeSPar));
237 for( std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
252 int numAlignablesFromFile = theAlignablePositionsFromFile.size();
254 if (numAlignablesFromFile==0) {
275 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Alignables Read " 276 << numAlignablesFromFile;
286 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Iteration increased by one!";
290 edm::LogInfo(
"Alignment") <<
"[HIPAlignmentAlgorithm] Apply positions from file ...";
292 theAlignablePositionsFromFile,
ioerr);
296 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Current Iteration number: " 321 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm] Using survey constraint";
327 for (
unsigned int i = 0;
i < nAlignable; ++
i)
335 int nhit = uservar->
nhit;
339 int tmp_Type = tl.first;
340 int tmp_Layer = tl.second;
342 float tmpz = pos.
z();
343 if(nhit< 1500 || (tmp_Type==5 && tmp_Layer==4 && fabs(tmpz)>90)){
359 uservar->
jtvj += invCov;
360 uservar->
jtve += invCov * sensResid;
380 for(std::vector<Alignable*>::const_iterator
408 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::terminate] Aligned units: " << ialigned;
463 static const unsigned int hitDim = 1;
488 covmat = covmat + ipcovmat;
492 if (covmat[0][0] != 0.) xpull = (pos[0] - coor[0])/
sqrt(fabs(covmat[0][0]));
499 int npar = derivs2D.num_row();
502 for (
int ipar=0;ipar<npar;ipar++) {
503 for (
unsigned int idim=0;idim<hitDim;idim++) {
504 derivs[ipar][idim] = derivs2D[ipar][idim];
522 if (!useThisHit)
return false;
532 thisjtvj.assign(jtvjtmp);
533 thisjtve=derivs * covmat * (pos-coor);
536 hitresidual[0] = (pos[0] - coor[0]);
539 hitresidualT = hitresidual.T();
544 uservar->
jtvj += hitwt*thisjtvj;
545 uservar->
jtve += hitwt*thisjtve;
553 thischi2 = hitwt*(hitresidualT *covmat *hitresidual)[0];
555 if (
verbose && ((thischi2/ static_cast<float>(uservar->
nhit)) >10.0) ) {
556 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::processHit1D]Added to Chi2 the number " << thischi2 <<
" having " 557 << uservar->
nhit <<
" dof " << std::endl <<
"X-resid " 558 << hitresidual[0] <<
" Y-resid " 559 << hitresidual[1] << std::endl <<
" Cov^-1 matr (covmat): [0][0]= " 560 << covmat[0][0] <<
" [0][1]= " 561 << covmat[0][1] <<
" [1][0]= " 562 << covmat[1][0] <<
" [1][1]= " 563 << covmat[1][1] << std::endl;
578 static const unsigned int hitDim = 2;
609 covmat = covmat + ipcovmat;
614 if (covmat[0][0] != 0.) xpull = (pos[0] - coor[0])/
sqrt(fabs(covmat[0][0]));
615 if (covmat[1][1] != 0.) ypull = (pos[1] - coor[1])/
sqrt(fabs(covmat[1][1]));
622 int npar = derivs2D.num_row();
625 for (
int ipar=0;ipar<npar;ipar++) {
626 for (
unsigned int idim=0;idim<hitDim;idim++) {
627 derivs[ipar][idim] = derivs2D[ipar][idim];
645 if (!useThisHit)
return false;
655 thisjtvj.assign(jtvjtmp);
656 thisjtve=derivs * covmat * (pos-coor);
659 hitresidual[0] = (pos[0] - coor[0]);
660 hitresidual[1] = (pos[1] - coor[1]);
667 hitresidualT = hitresidual.T();
671 uservar->
jtvj += hitwt*thisjtvj;
672 uservar->
jtve += hitwt*thisjtve;
680 thischi2 = hitwt*(hitresidualT *covmat *hitresidual)[0];
682 if (
verbose && ((thischi2/ static_cast<float>(uservar->
nhit)) >10.0) ) {
683 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::processHit2D]Added to Chi2 the number " << thischi2 <<
" having " 684 << uservar->
nhit <<
" dof " << std::endl <<
"X-resid " 685 << hitresidual[0] <<
" Y-resid " 686 << hitresidual[1] << std::endl <<
" Cov^-1 matr (covmat): [0][0]= " 687 << covmat[0][0] <<
" [0][1]= " 688 << covmat[0][1] <<
" [1][0]= " 689 << covmat[1][0] <<
" [1][1]= " 690 << covmat[1][1] << std::endl;
721 for (ConstTrajTrackPairCollection::const_iterator it=tracks.begin();
730 float pt = track->
pt();
733 float p = track->
p();
736 float d0 = track->
d0();
737 float dz = track->
dz();
758 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))");
760 trkwt =
Scale*(my_formula->Eval(fabs(eta)));}
764 double r = gRandom->Rndm();
769 else if (
trackWt){ihitwt=trkwt;}
796 std::vector<const TransientTrackingRecHit*> hitvec;
797 std::vector<TrajectoryStateOnSurface> tsosvec;
800 std::vector<TrajectoryMeasurement> measurements = traj->
measurements();
801 for (std::vector<TrajectoryMeasurement>::iterator im=measurements.begin();
802 im!=measurements.end();
829 const std::type_info &
type =
typeid(*rechit);
840 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Strip RecHit failed! " 841 <<
"TypeId of the RecHit: " <<
className(*hit) <<std::endl;
854 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Strip RecHit failed! " 856 <<
"TypeId of the TTRH: " <<
className(*hit) << std::endl;
869 <<
"ERROR in <HIPAlignmentAlgorithm::run>: Dynamic cast of Pixel RecHit failed! " 871 <<
"TypeId of the TTRH: " <<
className(*hit) << std::endl;
886 hitvec.push_back(hit);
887 tsosvec.push_back(tsos);
899 std::vector<TrajectoryStateOnSurface>::const_iterator itsos=tsosvec.begin();
900 std::vector<const TransientTrackingRecHit*>::const_iterator ihit=hitvec.begin();
903 while (itsos != tsosvec.end()) {
906 const GeomDet* det = (*ihit)->det();
908 uint32_t nhitDim = (*ihit)->dimension();
927 double angle = TMath::ASin(sin_theta);
942 if ((nhitDim==1)&&(ihitwt!=0)) {
944 }
else if ((nhitDim==2)&&(ihitwt!=0)) {
971 std::ifstream inIterFile(filename.c_str(),
std::ios::in);
973 edm::LogError(
"Alignment") <<
"[HIPAlignmentAlgorithm::readIterationFile] ERROR! " 974 <<
"Unable to open Iteration file";
979 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::readIterationFile] " 980 <<
"Read last iteration number from file: " <<
result;
991 std::ofstream outIterFile((filename.c_str()),
std::ios::out);
993 edm::LogError(
"Alignment") <<
"[HIPAlignmentAlgorithm::writeIterationFile] ERROR: Unable to write Iteration file";
997 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::writeIterationFile] writing iteration number to file: " << iter;
1013 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::setAlignmentPositionError] No APE applied";
1018 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::setAlignmentPositionError] Apply APE!";
1020 double apeSPar[3], apeRPar[3];
1021 for (std::vector<std::pair<std::vector<Alignable*>, std::vector<double> > >::const_iterator alipars =
theAPEParameters.begin();
1024 const std::vector<Alignable*> &alignables = alipars->first;
1025 const std::vector<double> &pars = alipars->second;
1027 apeSPar[0] = pars[0];
1028 apeSPar[1] = pars[1];
1029 apeSPar[2] = pars[2];
1030 apeRPar[0] = pars[3];
1031 apeRPar[1] = pars[4];
1032 apeRPar[2] = pars[5];
1034 double function = pars[6];
1037 printf(
"APE: %u alignables\n", (
unsigned int)alignables.size());
1038 for (
int i=0;
i<21; ++
i ) {
1039 double apelinstest=
calcAPE(apeSPar,
i,0.);
1040 double apeexpstest=
calcAPE(apeSPar,
i,1.);
1041 double apestepstest=
calcAPE(apeSPar,
i,2.);
1042 double apelinrtest=
calcAPE(apeRPar,
i,0.);
1043 double apeexprtest=
calcAPE(apeRPar,
i,1.);
1044 double apesteprtest=
calcAPE(apeRPar,
i,2.);
1045 printf(
"APE: iter slin sexp sstep rlin rexp rstep: %5d %12.5f %12.5f %12.5f %12.5f %12.5f %12.5f \n",
1046 i,apelinstest,apeexpstest,apestepstest, apelinrtest,apeexprtest,apesteprtest);
1063 double diter=(double)iter;
1070 if (
function == 0.) {
1071 return std::max(par[1],par[0]+((par[1]-par[0])/par[2])*diter);
1073 else if (
function == 1.) {
1076 else if (
function == 2.) {
1077 int ipar2 = (
int) par[2];
1078 int step = iter/ipar2;
1079 double dstep = (double) step;
1080 return std::max(0.0, par[0] - par[1]*dstep);
1092 char iterString[15];
1093 snprintf(iterString,
sizeof(iterString),
"%i",
theIteration);
1095 tname.Append(iterString);
1104 TString tname_hit=
"T1_hit";
1105 tname_hit.Append(
"_");
1106 tname_hit.Append(iterString);
1108 theTree =
new TTree(tname,
"Eventwise tree");
1129 hitTree =
new TTree(tname_hit,
"Hitwise tree");
1140 theTree2 =
new TTree(
"T2",
"Alignablewise tree");
1156 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::bookRoot] Survey trees booked.";
1159 theTree3 =
new TTree(tname,
"Survey Tree");
1165 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::bookRoot] Root trees booked.";
1186 for (std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
1220 <<
"------------------------------------------------------------------------\n" 1221 <<
" ALIGNABLE: " << setw(6) << naligned
1223 <<
"hits: " << setw(4) <<
m2_Nhit 1224 <<
" type: " << setw(4) <<
m2_Type 1225 <<
" layer: " << setw(4) <<
m2_Layer 1226 <<
" id: " << setw(4) <<
m2_Id 1227 <<
" objId: " << setw(4) <<
m2_ObjId 1239 << setw(12) << pars[0]
1240 << setw(12) << pars[1]
1241 << setw(12) << pars[2]
1242 << setw(12) << pars[3]
1243 << setw(12) << pars[4]
1244 << setw(12) << pars[5];
1261 int nhit = uservar->
nhit;
1280 int npar = jtve.num_row();
1286 if (params.num_row()!=1){
1287 edm::LogError(
"Alignment") <<
"For scanning, please only turn on one parameter! check common_cff_py.txt";
1291 else params[0]=
step;
1306 params = - (jtvjinv * jtve);
1312 for (
int i=0;
i<npar;
i++) {
1313 if (fabs(cov[
i][
i])>0) paramerr[
i] =
sqrt(fabs(cov[i][i]));
1314 else paramerr[
i] = params[
i];
1315 if (params[i]!=0) relerr[
i] = fabs(paramerr[i]/params[i]);
1326 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::CalcParameters]: parameters = " << params;
1329 uservar->
alierr=paramerr;
1342 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::collector] called for iteration " 1352 std::stringstream ss;
1358 std::vector<AlignmentUserVariables*> uvarvec =
1363 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::collector] could not read user variable files for job " 1369 std::vector<AlignmentUserVariables*> uvarvecadd;
1370 std::vector<AlignmentUserVariables*>::const_iterator iuvarnew=uvarvec.begin();
1371 for (std::vector<Alignable*>::const_iterator it=
theAlignables.begin();
1392 uvarvecadd.push_back(uvar);
1415 snprintf(treeName,
sizeof(treeName),
"T1_%d", iter);
1417 char hitTreeName[64];
1418 snprintf(hitTreeName,
sizeof(hitTreeName),
"T1_hit_%d", iter);
1422 TFile *jobfile =
new TFile(filename,
"READ");
1424 TTree *jobtree = (TTree*)jobfile->Get(treeName);
1425 TTree *hittree = (TTree*)jobfile->Get(hitTreeName);
1427 static const int nmaxtrackperevent = 1000;
1428 int jobNtracks, jobNhitspertrack[nmaxtrackperevent], jobnhPXB[nmaxtrackperevent], jobnhPXF[nmaxtrackperevent],jobnhTIB[nmaxtrackperevent], jobnhTOB[nmaxtrackperevent],jobnhTID[nmaxtrackperevent], jobnhTEC[nmaxtrackperevent];
1429 float jobP[nmaxtrackperevent], jobPt[nmaxtrackperevent], jobEta[nmaxtrackperevent] , jobPhi[nmaxtrackperevent];
1430 float jobd0[nmaxtrackperevent],jobwt[nmaxtrackperevent], jobdz[nmaxtrackperevent] , jobChi2n[nmaxtrackperevent];
1431 float jobsinTheta,jobHitWt,jobangle;
1434 jobtree->SetBranchAddress(
"Ntracks", &jobNtracks);
1435 jobtree->SetBranchAddress(
"Nhits", jobNhitspertrack);
1436 jobtree->SetBranchAddress(
"nhPXB", jobnhPXB);
1437 jobtree->SetBranchAddress(
"nhPXF", jobnhPXF);
1438 jobtree->SetBranchAddress(
"nhTIB", jobnhTIB);
1439 jobtree->SetBranchAddress(
"nhTOB", jobnhTOB);
1440 jobtree->SetBranchAddress(
"nhTID", jobnhTID);
1441 jobtree->SetBranchAddress(
"nhTEC", jobnhTEC);
1442 jobtree->SetBranchAddress(
"Pt", jobPt);
1443 jobtree->SetBranchAddress(
"P", jobP);
1444 jobtree->SetBranchAddress(
"d0", jobd0);
1445 jobtree->SetBranchAddress(
"dz", jobdz);
1446 jobtree->SetBranchAddress(
"Eta", jobEta);
1447 jobtree->SetBranchAddress(
"Phi", jobPhi);
1448 jobtree->SetBranchAddress(
"Chi2n", jobChi2n);
1449 jobtree->SetBranchAddress(
"wt", jobwt);
1452 hittree->SetBranchAddress(
"sinTheta", &jobsinTheta);
1453 hittree->SetBranchAddress(
"HitImpactAngle", &jobangle);
1454 hittree->SetBranchAddress(
"Id", &jobDetId);
1455 hittree->SetBranchAddress(
"wt", &jobHitWt);
1458 for (ievent=0;ievent<jobtree->GetEntries();++ievent) {
1459 jobtree->GetEntry(ievent);
1469 m_Nhits[ntrk] = jobNhitspertrack[ntrk];
1470 m_Pt[ntrk] = jobPt[ntrk];
1471 m_P[ntrk] = jobP[ntrk];
1472 m_nhPXB[ntrk] = jobnhPXB[ntrk];
1473 m_nhPXF[ntrk] = jobnhPXF[ntrk];
1474 m_nhTIB[ntrk] = jobnhTIB[ntrk];
1475 m_nhTOB[ntrk] = jobnhTOB[ntrk];
1476 m_nhTID[ntrk] = jobnhTID[ntrk];
1477 m_nhTEC[ntrk] = jobnhTEC[ntrk];
1478 m_Eta[ntrk] = jobEta[ntrk];
1479 m_Phi[ntrk] = jobPhi[ntrk];
1480 m_Chi2n[ntrk] = jobChi2n[ntrk];
1481 m_d0[ntrk] = jobd0[ntrk];
1482 m_dz[ntrk] = jobdz[ntrk];
1483 m_wt[ntrk] = jobwt[ntrk];
1486 edm::LogWarning(
"Alignment") <<
"[HIPAlignmentAlgorithm::fillEventwiseTree] Number of tracks in Eventwise tree exceeds MAXREC: " 1487 <<
m_Ntracks <<
" Skipping exceeding tracks.";
1496 for (ihit=0;ihit<hittree->GetEntries();++ihit) {
1497 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
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)
static AlignableObjectId commonObjectIdProvider(const AlignableObjectId &, const AlignableObjectId &)
TSOS combine(const TSOS &pTsos1, const TSOS &pTsos2) const
virtual AlignmentParameters * cloneFromSelected(const AlgebraicVector &par, const AlgebraicSymMatrix &cov) const =0
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
def setup(process, global_tag, zero_tesla=False)
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)
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
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
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.
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)
virtual LocalPoint localPosition() const =0
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.
ClusterRef cluster() const
CompositeAlignmentParameters selectParameters(const std::vector< AlignableDet * > &alignabledets) const
AlgebraicSymMatrix inverseCovariance() const
Get inverse of survey covariance wrt given structure type in constructor.
std::unique_ptr< AlignableObjectId > alignableObjectId_
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
const std::vector< std::string > surveyResiduals_
std::vector< AlignableAbsData > AlignablePositions
void writeAlignableAbsolutePositions(const align::Alignables &alivec, const char *filename, int iter, bool validCheck, int &ierr)
write Alignable current absolute positions
eventInfo
add run, event number and lumi section
DetId geographicalId() const
const IOVSyncValue & first() const
virtual LocalError localPositionError() 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.
double theMaxRelParameterError
const PositionType & position() const
T const * product() 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