|
|
Go to the documentation of this file. 1 #ifndef Alignment_MillePedeAlignmentAlgorithm_MillePedeAlignmentAlgorithm_h
2 #define Alignment_MillePedeAlignmentAlgorithm_MillePedeAlignmentAlgorithm_h
71 bool addCalibrations(
const std::vector<IntegratedCalibrationBase *> &iCals)
override;
138 gbl::GblPoint &gblPoint);
144 unsigned int addHitCount(
const std::vector<AlignmentParameters *> &parVec,
145 const std::vector<bool> &validHitVecY)
const;
148 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
150 unsigned int iTrajHit,
151 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
152 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
153 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM);
159 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
161 unsigned int iVirtualMeas,
162 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
163 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
164 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM);
171 std::vector<float> &globalDerivativesX,
172 std::vector<float> &globalDerivativesY,
173 std::vector<int> &globalLabels,
181 std::vector<double> &globalDerivativesX,
182 std::vector<double> &globalDerivativesY,
183 std::vector<int> &globalLabels,
191 std::vector<float> &globalDerivativesX,
192 std::vector<float> &globalDerivativesY,
193 std::vector<int> &globalLabels)
const;
197 unsigned int iTrajHit,
198 const std::vector<int> &globalLabels,
199 const std::vector<float> &globalDerivativesX,
200 const std::vector<float> &globalDerivativesY);
204 unsigned int iTrajHit,
205 const std::vector<int> &globalLabels,
206 const std::vector<float> &globalDerivativesX);
212 unsigned int iTrajHit,
213 const std::vector<int> &globalLabels,
214 const std::vector<float> &globalDerivativesx,
215 const std::vector<float> &globalDerivativesy);
218 typename LocalDerivativeMatrix,
219 typename ResidualMatrix,
220 typename GlobalDerivativeMatrix>
221 void diagonalize(Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
222 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM,
223 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
224 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM)
const;
227 template <
typename GlobalDerivativeMatrix>
229 const std::vector<float> &globalDerivativesy,
230 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM);
255 const std::vector<TrajectoryStateOnSurface> &tsoses);
std::vector< std::vector< TrajectoryStateOnSurface > > TsosVectorCollection
std::unique_ptr< PedeSteerer > thePedeSteer
edm::ParameterSet theConfig
const align::RunNumber firstIOV_
(Abstract) Base class for alignment algorithm user variables
void addRefTrackVirtualMeas1D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas, Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM)
adds data for a specific virtual measurement from reference trajectory
void makeGlobDerivMatrix(const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM)
MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg)
Constructor.
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
std::unique_ptr< MillePedeMonitor > theMonitor
std::vector< float > theFloatBufferX
cond::RealTimeType< cond::runnumber >::type RunNumber
align::Alignables theAlignables
std::unique_ptr< TrajectoryFactoryBase > theTrajectoryFactory
const align::RunRanges uniqueRunRanges_
std::vector< align::RunNumber > cachedRuns_
virtual void endRun(const EventInfo &, const EndRunInfo &, const edm::EventSetup &)
Run on run products, e.g. TkLAS.
unsigned int decodeMode(const std::string &mode) const
void endLuminosityBlock(const edm::EventSetup &) override
called at end of luminosity block
std::unique_ptr< Mille > theMille
void terminate() override
Called at end of job.
std::vector< std::string > getExistingFormattedFiles(const std::vector< std::string > &plainFiles, const std::string &theDir)
align::RunNumber lastProcessedRun_
std::shared_ptr< AlignPCLThresholds > theThresholds
bool theDoSurveyPixelBarrel
void beginRun(const edm::Run &run, const edm::EventSetup &setup, bool changed) override
called at begin of run
int addGlobalData(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, gbl::GblPoint &gblPoint)
math::Error< 5 >::type CovarianceMatrix
void addLaserData(const EventInfo &eventInfo, const TkFittedLasBeamCollection &tkLasBeams, const TsosVectorCollection &tkLasBeamTsoses)
bool isMode(unsigned int testMode) const
std::unique_ptr< AlignableNavigator > theAlignableNavigator
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
bool setParametersForRunRange(const RunRange &runrange) override
bool addHitStatistics(int fromLoop, const std::string &outFile, const std::vector< std::string > &inFiles) const
const bool enableAlignableUpdates_
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
bool supportsCalibrations() override
Returns whether MP supports calibrations.
std::vector< IntegratedCalibrationBase * > theCalibrations
std::unique_ptr< gbl::MilleBinary > theBinary
void diagonalize(Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM) const
std::vector< int > theIntBuffer
AlignmentParameterStore * theAlignmentParameterStore
directory for all kind of files
define run information passed to algorithms (in endRun)
#define DEFINE_EDM_PLUGIN(factory, type, name)
void addLasBeam(const EventInfo &eventInfo, const TkFittedLasBeam &lasBeam, const std::vector< TrajectoryStateOnSurface > &tsoses)
std::shared_ptr< PedeLabelerBase > thePedeLabels
void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override
Run the algorithm on trajectories and tracks.
unsigned int theMinNumHits
bool addHits(const align::Alignables &alis, const std::vector< AlignmentUserVariables * > &mpVars) const
int callMille2D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy)
const bool enforceSingleIOVInput_
bool areEmptyParams(const align::Alignables &alignables) const
bool processesEvents() override
Returns whether MP should process events in the current configuration.
void addPxbSurvey(const edm::ParameterSet &pxbSurveyCfg)
add measurement data from PXB survey
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)
void addRefTrackData2D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM)
adds data from reference trajectory from a specific Hit
Constructor of the full muon geometry.
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
void beginLuminosityBlock(const edm::EventSetup &) override
called at begin of luminosity block (resets Mille binary in mille mode)
int addMeasurementData(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, AlignmentParameters *¶ms)
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override
Called at beginning of job.
std::map< std::string, AlignPCLThreshold > threshold_map
~MillePedeAlignmentAlgorithm() override
Destructor.
int callMille1D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX)
calls Mille for 1D hits
std::vector< float > theFloatBufferY
virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholds::threshold_map &thresholdMap)
std::vector< Alignable * > Alignables
const bool skipGlobalPositionRcdCheck_
const bool ignoreFirstIOVCheck_
const bool ignoreHitsWithoutGlobalDerivatives_
bool addCalibrations(const std::vector< IntegratedCalibrationBase * > &iCals) override
Pass integrated calibrations to Millepede (they are not owned by Millepede!)
bool is2D(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
true if hit belongs to 2D detector (currently tracker specific)
unsigned int addHitCount(const std::vector< AlignmentParameters * > &parVec, const std::vector< bool > &validHitVecY) const
std::vector< TkFittedLasBeam > TkFittedLasBeamCollection
bool readFromPede(const edm::ParameterSet &mprespset, bool setUserVars, const RunRange &runrange)
read pede input defined by 'psetName', flag to create/not create MillePedeVariables
bool storeAlignments() override
Returns whether MP produced results to be stored.
std::vector< RunRange > RunRanges
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
void addVirtualMeas(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas)
adds data for virtual measurements from reference trajectory
unsigned int doIO(int loop) const
void buildUserVariables(const align::Alignables &alignables) const
add MillePedeVariables for each AlignmentParameters (exception if no parameters......
define event information passed to algorithms
bool areIOVsSpecified() const