#include <MillePedeAlignmentAlgorithm.h>
Public Member Functions | |
virtual bool | addCalibrations (const std::vector< IntegratedCalibrationBase * > &iCals) |
pass integrated calibrations to Millepede (they are not owned by Millepede!) More... | |
virtual void | endRun (const EventInfo &eventInfo, const EndRunInfo &runInfo, const edm::EventSetup &setup) |
Run on run products, e.g. TkLAS. More... | |
virtual void | initialize (const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) |
Call at beginning of job. More... | |
MillePedeAlignmentAlgorithm (const edm::ParameterSet &cfg) | |
Constructor. More... | |
virtual void | run (const edm::EventSetup &setup, const EventInfo &eventInfo) |
Run the algorithm on trajectories and tracks. More... | |
virtual bool | setParametersForRunRange (const RunRange &runrange) |
virtual void | terminate (const edm::EventSetup &iSetup) |
Call at end of job. More... | |
virtual | ~MillePedeAlignmentAlgorithm () |
Destructor. More... | |
Public Member Functions inherited from AlignmentAlgorithmBase | |
AlignmentAlgorithmBase (const edm::ParameterSet &cfg) | |
Constructor. More... | |
virtual void | beginLuminosityBlock (const edm::EventSetup &setup) |
called at begin of luminosity block (no lumi block info passed yet) More... | |
virtual void | beginRun (const edm::EventSetup &setup) |
called at begin of run More... | |
virtual void | endLuminosityBlock (const edm::EventSetup &setup) |
called at end of luminosity block (no lumi block info passed yet) More... | |
virtual void | endRun (const EndRunInfo &runInfo, const edm::EventSetup &setup) |
called at end of run - order of arguments like in EDProducer etc. More... | |
virtual void | startNewLoop () |
virtual | ~AlignmentAlgorithmBase () |
Destructor. More... | |
Private Types | |
enum | EModeBit { myMilleBit = 1 << 0, myPedeRunBit = 1 << 1, myPedeSteerBit = 1 << 2, myPedeReadBit = 1 << 3 } |
enum | MeasurementDirection { kLocalX = 0, kLocalY } |
Private Member Functions | |
unsigned int | addHitCount (const std::vector< AlignmentParameters * > &parVec, const std::vector< bool > &validHitVecY) const |
bool | addHits (const std::vector< Alignable * > &alis, const std::vector< AlignmentUserVariables * > &mpVars) const |
bool | addHitStatistics (int fromLoop, const std::string &outFile, const std::vector< std::string > &inFiles) const |
void | addLasBeam (const EventInfo &eventInfo, const TkFittedLasBeam &lasBeam, const std::vector< TrajectoryStateOnSurface > &tsoses) |
void | addLaserData (const EventInfo &eventInfo, const TkFittedLasBeamCollection &tkLasBeams, const TsosVectorCollection &tkLasBeamTsoses) |
int | addMeasurementData (const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, AlignmentParameters *¶ms) |
void | addPxbSurvey (const edm::ParameterSet &pxbSurveyCfg) |
add measurement data from PXB survey More... | |
std::pair< unsigned int, unsigned int > | addReferenceTrajectory (const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr) |
fill mille for a trajectory, returning number of x/y hits ([0,0] if 'bad' trajectory) More... | |
void | addRefTrackData2D (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, TMatrixDSym &aHitCovarianceM, TMatrixF &aHitResidualsM, TMatrixF &aLocalDerivativesM) |
adds data from reference trajectory from a specific Hit More... | |
void | addRefTrackVirtualMeas1D (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas, TMatrixDSym &aHitCovarianceM, TMatrixF &aHitResidualsM, TMatrixF &aLocalDerivativesM) |
adds data for a specific virtual measurement from reference trajectory More... | |
void | addVirtualMeas (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas) |
adds data for virtual measurements from reference trajectory More... | |
bool | areEmptyParams (const std::vector< Alignable * > &alignables) const |
void | buildUserVariables (const std::vector< Alignable * > &alignables) const |
add MillePedeVariables for each AlignmentParameters (exception if no parameters...) More... | |
int | callMille (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX, const std::vector< float > &globalDerivativesY) |
calls callMille1D or callMille2D More... | |
int | callMille1D (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX) |
calls Mille for 1D hits More... | |
int | callMille2D (const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy) |
unsigned int | decodeMode (const std::string &mode) const |
void | diagonalize (TMatrixDSym &aHitCovarianceM, TMatrixF &aLocalDerivativesM, TMatrixF &aHitResidualsM, TMatrixF &theGlobalDerivativesM) const |
unsigned int | doIO (int loop) const |
void | globalDerivativesCalibration (const TransientTrackingRecHit::ConstRecHitPointer &recHit, const TrajectoryStateOnSurface &tsos, const edm::EventSetup &setup, const EventInfo &eventInfo, std::vector< float > &globalDerivativesX, std::vector< float > &globalDerivativesY, std::vector< int > &globalLabels) const |
adding derivatives from integrated calibrations More... | |
bool | globalDerivativesHierarchy (const EventInfo &eventInfo, const TrajectoryStateOnSurface &tsos, Alignable *ali, const AlignableDetOrUnitPtr &alidet, std::vector< float > &globalDerivativesX, std::vector< float > &globalDerivativesY, std::vector< int > &globalLabels, AlignmentParameters *&lowestParams) const |
recursively adding derivatives and labels, false if problems More... | |
bool | is2D (const TransientTrackingRecHit::ConstRecHitPointer &recHit) const |
true if hit belongs to 2D detector (currently tracker specific) More... | |
bool | isMode (unsigned int testMode) const |
void | makeGlobDerivMatrix (const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy, TMatrixF &aGlobalDerivativesM) |
bool | readFromPede (const edm::ParameterSet &mprespset, bool setUserVars, const RunRange &runrange) |
read pede input defined by 'psetName', flag to create/not create MillePedeVariables More... | |
Private Attributes | |
AlignableNavigator * | theAlignableNavigator |
std::vector< Alignable * > | theAlignables |
AlignmentParameterStore * | theAlignmentParameterStore |
directory for all kind of files More... | |
std::vector < IntegratedCalibrationBase * > | theCalibrations |
edm::ParameterSet | theConfig |
std::string | theDir |
bool | theDoSurveyPixelBarrel |
std::vector< float > | theFloatBufferX |
std::vector< float > | theFloatBufferY |
std::vector< int > | theIntBuffer |
int | theLastWrittenIov |
double | theMaximalCor2D |
Mille * | theMille |
unsigned int | theMinNumHits |
unsigned int | theMode |
MillePedeMonitor * | theMonitor |
PedeLabelerBase * | thePedeLabels |
PedeSteerer * | thePedeSteer |
TrajectoryFactoryBase * | theTrajectoryFactory |
Additional Inherited Members | |
Public Types inherited from AlignmentAlgorithmBase | |
typedef std::pair< const Trajectory *, const reco::Track * > | ConstTrajTrackPair |
typedef std::vector < ConstTrajTrackPair > | ConstTrajTrackPairCollection |
typedef cond::RealTimeType < cond::runnumber >::type | RunNumber |
typedef std::pair< RunNumber, RunNumber > | RunRange |
CMSSW interface to pede: produces pede's binary input and steering file(s)
(last update by
)
Definition at line 54 of file MillePedeAlignmentAlgorithm.h.
|
private |
Enumerator | |
---|---|
myMilleBit | |
myPedeRunBit | |
myPedeSteerBit | |
myPedeReadBit |
Definition at line 193 of file MillePedeAlignmentAlgorithm.h.
|
private |
MillePedeAlignmentAlgorithm::MillePedeAlignmentAlgorithm | ( | const edm::ParameterSet & | cfg | ) |
Constructor.
Definition at line 83 of file MillePedeAlignmentAlgorithm.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), isMode(), myMilleBit, AlCaHLTBitMon_QueryRunRegistry::string, theConfig, theDir, and theMille.
|
virtual |
Destructor.
Definition at line 105 of file MillePedeAlignmentAlgorithm.cc.
References theAlignableNavigator, theMille, theMonitor, thePedeLabels, thePedeSteer, and theTrajectoryFactory.
|
virtual |
pass integrated calibrations to Millepede (they are not owned by Millepede!)
Reimplemented from AlignmentAlgorithmBase.
Definition at line 241 of file MillePedeAlignmentAlgorithm.cc.
References PedeLabelerBase::addCalibrations(), theCalibrations, and thePedeLabels.
|
private |
Increase hit counting of MillePedeVariables behind each parVec[i] (and also for parameters higher in hierarchy), assuming 'parVec' and 'validHitVecY' to be parallel. Returns number of valid y-hits.
Definition at line 392 of file MillePedeAlignmentAlgorithm.cc.
References Alignable::alignmentParameters(), MillePedeVariables::increaseHitsX(), MillePedeVariables::increaseHitsY(), Alignable::mother(), and AlignmentParameters::userVariables().
Referenced by addReferenceTrajectory().
|
private |
Definition at line 795 of file MillePedeAlignmentAlgorithm.cc.
References MillePedeVariables::hitsX(), MillePedeVariables::hitsY(), MillePedeVariables::increaseHitsX(), MillePedeVariables::increaseHitsY(), MillePedeVariables::size(), and AlignmentParameters::userVariables().
Referenced by addHitStatistics().
|
private |
Definition at line 768 of file MillePedeAlignmentAlgorithm.cc.
References addHits(), i, MillePedeVariablesIORoot::readMillePedeVariables(), AlCaHLTBitMon_QueryRunRegistry::string, theAlignables, and theDir.
Referenced by doIO().
|
private |
Definition at line 1103 of file MillePedeAlignmentAlgorithm.cc.
References AlignableNavigator::alignableFromDetId(), funct::derivative(), TkFittedLasBeam::derivatives(), Mille::end(), relativeConstraints::error, TkFittedLasBeam::firstFixedParameter(), TkLasBeam::getBeamId(), TkLasBeam::getData(), SiStripLaserRecHit2D::getDetId(), globalDerivativesHierarchy(), PedeLabelerBase::lasBeamLabel(), SiStripLaserRecHit2D::localPosition(), Mille::mille(), PedeLabelerBase::parameterLabel(), TkFittedLasBeam::parameters(), theAlignableNavigator, theFloatBufferX, theFloatBufferY, theIntBuffer, theMille, and thePedeLabels.
Referenced by addLaserData().
|
private |
Definition at line 1084 of file MillePedeAlignmentAlgorithm.cc.
References addLasBeam().
Referenced by endRun().
|
private |
If hit is usable: callMille for x and (probably) y direction. If globalDerivatives fine: returns 2 if 2D-hit, 1 if 1D-hit, 0 if no Alignable for hit. Returns -1 if any problem (for params cf. globalDerivativesHierarchy)
Definition at line 432 of file MillePedeAlignmentAlgorithm.cc.
References AlignableNavigator::alignableFromDetId(), callMille(), globalDerivativesCalibration(), globalDerivativesHierarchy(), theAlignableNavigator, theFloatBufferX, theFloatBufferY, and theIntBuffer.
Referenced by addReferenceTrajectory().
|
private |
add measurement data from PXB survey
Definition at line 1149 of file MillePedeAlignmentAlgorithm.cc.
References a, AlignableNavigator::alignableFromDetId(), PedeLabelerBase::alignableLabel(), gather_cfg::cout, SurveyPxbDicer::doDice(), Mille::end(), lut2db_cfg::filename, MillePedeMonitor::fillPxbSurveyHistsChi2(), MillePedeMonitor::fillPxbSurveyHistsLocalPars(), edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), i, j, Mille::mille(), SurveyPxbImageLocalFit::nMsrmts, getDQMSummary::outfile, matplotRender::reader, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, Alignable::surface(), theAlignableNavigator, theMille, theMonitor, thePedeLabels, AlignableSurface::toGlobal(), and AlignableSurface::toLocal().
Referenced by initialize().
|
private |
fill mille for a trajectory, returning number of x/y hits ([0,0] if 'bad' trajectory)
Definition at line 346 of file MillePedeAlignmentAlgorithm.cc.
References addHitCount(), addMeasurementData(), addVirtualMeas(), Mille::end(), Mille::kill(), theMille, and theMinNumHits.
Referenced by run().
|
private |
adds data from reference trajectory from a specific Hit
Definition at line 883 of file MillePedeAlignmentAlgorithm.cc.
References i.
|
private |
adds data for a specific virtual measurement from reference trajectory
Definition at line 856 of file MillePedeAlignmentAlgorithm.cc.
References i.
|
private |
adds data for virtual measurements from reference trajectory
Definition at line 1060 of file MillePedeAlignmentAlgorithm.cc.
Referenced by addReferenceTrajectory().
|
private |
Definition at line 637 of file MillePedeAlignmentAlgorithm.cc.
References AlignmentParameters::covariance(), i, j, and AlignmentParameters::parameters().
Referenced by readFromPede().
|
private |
add MillePedeVariables for each AlignmentParameters (exception if no parameters...)
Definition at line 719 of file MillePedeAlignmentAlgorithm.cc.
References PedeLabelerBase::alignableLabel(), edm::hlt::Exception, MillePedeVariables::setAllDefault(), AlignmentParameters::setUserVariables(), MillePedeVariables::size(), AlignmentParameters::size(), thePedeLabels, and AlignmentParameters::userVariables().
Referenced by initialize(), and setParametersForRunRange().
|
private |
calls callMille1D or callMille2D
Definition at line 916 of file MillePedeAlignmentAlgorithm.cc.
Referenced by addMeasurementData().
|
private |
calls Mille for 1D hits
Definition at line 934 of file MillePedeAlignmentAlgorithm.cc.
References i.
|
private |
calls Mille for x and possibly y component of hit, y is skipped for non-real 2D (e.g. SiStripRecHit2D), for TID/TEC first diagonalises if correlation is larger than configurable
Definition at line 973 of file MillePedeAlignmentAlgorithm.cc.
References Abs(), corr, pat::helper::ParametrizationHelper::dimension(), mathSSE::sqrt(), std::swap(), SiStripDetId::TEC, SiStripDetId::TID, and DetId::Tracker.
|
private |
Definition at line 744 of file MillePedeAlignmentAlgorithm.cc.
References edm::hlt::Exception, myMilleBit, myPedeReadBit, myPedeRunBit, and myPedeSteerBit.
|
private |
Definition at line 831 of file MillePedeAlignmentAlgorithm.cc.
|
private |
Definition at line 659 of file MillePedeAlignmentAlgorithm.cc.
References addHitStatistics(), edm::ParameterSet::getParameter(), cmsHarvester::loop, GetRecoTauVFromDQM_MC_cff::outFile, query::result, AlCaHLTBitMon_QueryRunRegistry::string, theAlignables, theConfig, theDir, AlignmentIORoot::writeAlignableAbsolutePositions(), AlignmentIORoot::writeAlignableOriginalPositions(), MillePedeVariablesIORoot::writeMillePedeVariables(), and AlignmentIORoot::writeOrigRigidBodyAlignmentParameters().
Referenced by setParametersForRunRange(), and terminate().
|
virtual |
Run on run products, e.g. TkLAS.
Definition at line 422 of file MillePedeAlignmentAlgorithm.cc.
References addLaserData(), AlignmentAlgorithmBase::EndRunInfo::tkLasBeams(), and AlignmentAlgorithmBase::EndRunInfo::tkLasBeamTsoses().
|
private |
adding derivatives from integrated calibrations
Definition at line 526 of file MillePedeAlignmentAlgorithm.cc.
References PedeLabelerBase::calibrationLabel(), theCalibrations, and thePedeLabels.
Referenced by addMeasurementData().
|
private |
recursively adding derivatives and labels, false if problems
Definition at line 469 of file MillePedeAlignmentAlgorithm.cc.
References Alignable::alignmentParameters(), AlignmentParameters::derivatives(), Alignable::mother(), and AlignmentParameters::selector().
Referenced by addLasBeam(), and addMeasurementData().
|
virtual |
Call at beginning of job.
Implements AlignmentAlgorithmBase.
Definition at line 123 of file MillePedeAlignmentAlgorithm.cc.
References addPxbSurvey(), edm::ParameterSet::addUntrackedParameter(), AlignmentParameterStore::alignables(), AlignmentParameterStore::applyParameters(), PedeSteerer::buildSubSteer(), buildUserVariables(), relativeConstraints::empty, edm::hlt::Exception, edm::ParameterSet::exists(), reco::get(), edm::EventSetup::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), isMode(), myMilleBit, myPedeSteerBit, edm::ESHandle< class >::product(), readFromPede(), AlignmentParameterStore::resetParameters(), cond::runnumber, findQualityFiles::size, AlCaHLTBitMon_QueryRunRegistry::string, theAlignableNavigator, theAlignables, theAlignmentParameterStore, theConfig, theDir, theDoSurveyPixelBarrel, theMonitor, thePedeLabels, thePedeSteer, theTrajectoryFactory, and cond::timeTypeSpecs.
|
private |
true if hit belongs to 2D detector (currently tracker specific)
Definition at line 581 of file MillePedeAlignmentAlgorithm.cc.
|
inlineprivate |
Definition at line 196 of file MillePedeAlignmentAlgorithm.h.
References theMode.
Referenced by initialize(), MillePedeAlignmentAlgorithm(), run(), setParametersForRunRange(), and terminate().
|
private |
Definition at line 818 of file MillePedeAlignmentAlgorithm.cc.
References i.
|
private |
read pede input defined by 'psetName', flag to create/not create MillePedeVariables
Definition at line 600 of file MillePedeAlignmentAlgorithm.cc.
References areEmptyParams(), dbtoconf::out, PedeReader::read(), matplotRender::reader, theAlignables, thePedeLabels, and thePedeSteer.
Referenced by initialize(), and setParametersForRunRange().
|
virtual |
Run the algorithm on trajectories and tracks.
Implements AlignmentAlgorithmBase.
Definition at line 307 of file MillePedeAlignmentAlgorithm.cc.
References addReferenceTrajectory(), AlignmentAlgorithmBase::EventInfo::beamSpot(), MillePedeMonitor::fillRefTrajectory(), MillePedeMonitor::fillTrack(), MillePedeMonitor::fillUsedTrack(), isMode(), myMilleBit, theMonitor, theTrajectoryFactory, testEve_cfg::tracks, TrajectoryFactoryBase::trajectories(), and AlignmentAlgorithmBase::EventInfo::trajTrackPairs().
Referenced by Types.EventID::cppID(), and Types.LuminosityBlockID::cppID().
|
virtual |
called in order to pass parameters to alignables for a specific run range in case the algorithm supports run range dependent alignment.
Reimplemented from AlignmentAlgorithmBase.
Definition at line 249 of file MillePedeAlignmentAlgorithm.cc.
References AlignmentParameterStore::applyParameters(), buildUserVariables(), doIO(), edm::ParameterSet::getParameter(), isMode(), myPedeReadBit, readFromPede(), AlignmentParameterStore::resetParameters(), AlignmentParameterStore::restoreCachedTransformations(), theAlignables, theAlignmentParameterStore, theConfig, and theLastWrittenIov.
|
virtual |
Call at end of job.
Implements AlignmentAlgorithmBase.
Definition at line 274 of file MillePedeAlignmentAlgorithm.cc.
References PedeSteerer::buildMasterSteer(), AlignmentParameterStore::cacheTransformations(), doIO(), MainPageGenerator::files, edm::ParameterSet::getParameter(), i, isMode(), myMilleBit, myPedeRunBit, PedeSteerer::runPede(), AlCaHLTBitMon_QueryRunRegistry::string, theAlignmentParameterStore, theConfig, theDir, theLastWrittenIov, theMille, and thePedeSteer.
|
private |
Definition at line 207 of file MillePedeAlignmentAlgorithm.h.
Referenced by addLasBeam(), addMeasurementData(), addPxbSurvey(), initialize(), and ~MillePedeAlignmentAlgorithm().
|
private |
Definition at line 206 of file MillePedeAlignmentAlgorithm.h.
Referenced by addHitStatistics(), doIO(), initialize(), readFromPede(), and setParametersForRunRange().
|
private |
directory for all kind of files
Definition at line 205 of file MillePedeAlignmentAlgorithm.h.
Referenced by initialize(), setParametersForRunRange(), and terminate().
|
private |
Definition at line 213 of file MillePedeAlignmentAlgorithm.h.
Referenced by addCalibrations(), and globalDerivativesCalibration().
|
private |
Definition at line 202 of file MillePedeAlignmentAlgorithm.h.
Referenced by doIO(), initialize(), MillePedeAlignmentAlgorithm(), setParametersForRunRange(), and terminate().
|
private |
Definition at line 204 of file MillePedeAlignmentAlgorithm.h.
Referenced by addHitStatistics(), doIO(), initialize(), MillePedeAlignmentAlgorithm(), and terminate().
|
private |
Definition at line 221 of file MillePedeAlignmentAlgorithm.h.
Referenced by initialize().
|
private |
Definition at line 218 of file MillePedeAlignmentAlgorithm.h.
Referenced by addLasBeam(), and addMeasurementData().
|
private |
Definition at line 219 of file MillePedeAlignmentAlgorithm.h.
Referenced by addLasBeam(), and addMeasurementData().
|
private |
Definition at line 220 of file MillePedeAlignmentAlgorithm.h.
Referenced by addLasBeam(), and addMeasurementData().
|
private |
maximal correlation allowed for 2D hit in TID/TEC. If larger, the 2D measurement gets diagonalized!!!
Definition at line 217 of file MillePedeAlignmentAlgorithm.h.
Referenced by setParametersForRunRange(), and terminate().
|
private |
Definition at line 215 of file MillePedeAlignmentAlgorithm.h.
|
private |
Definition at line 209 of file MillePedeAlignmentAlgorithm.h.
Referenced by addLasBeam(), addPxbSurvey(), addReferenceTrajectory(), MillePedeAlignmentAlgorithm(), terminate(), and ~MillePedeAlignmentAlgorithm().
|
private |
Definition at line 214 of file MillePedeAlignmentAlgorithm.h.
Referenced by addReferenceTrajectory().
|
private |
Definition at line 203 of file MillePedeAlignmentAlgorithm.h.
Referenced by isMode().
|
private |
Definition at line 208 of file MillePedeAlignmentAlgorithm.h.
Referenced by addPxbSurvey(), initialize(), run(), and ~MillePedeAlignmentAlgorithm().
|
private |
Definition at line 210 of file MillePedeAlignmentAlgorithm.h.
Referenced by addCalibrations(), addLasBeam(), addPxbSurvey(), buildUserVariables(), globalDerivativesCalibration(), initialize(), readFromPede(), and ~MillePedeAlignmentAlgorithm().
|
private |
Definition at line 211 of file MillePedeAlignmentAlgorithm.h.
Referenced by initialize(), readFromPede(), terminate(), and ~MillePedeAlignmentAlgorithm().
|
private |
Definition at line 212 of file MillePedeAlignmentAlgorithm.h.
Referenced by initialize(), run(), and ~MillePedeAlignmentAlgorithm().