1 #ifndef Alignment_MillePedeAlignmentAlgorithm_MillePedeAlignmentAlgorithm_h 2 #define Alignment_MillePedeAlignmentAlgorithm_MillePedeAlignmentAlgorithm_h 81 bool addCalibrations(
const std::vector<IntegratedCalibrationBase *> &iCals)
override;
150 gbl::GblPoint &gblPoint);
156 unsigned int addHitCount(
const std::vector<AlignmentParameters *> &parVec,
157 const std::vector<bool> &validHitVecY)
const;
160 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
162 unsigned int iTrajHit,
163 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
164 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
165 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM);
171 template <
typename CovarianceMatrix,
typename Res
idualMatrix,
typename LocalDerivativeMatrix>
173 unsigned int iVirtualMeas,
174 Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
175 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
176 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM);
183 std::vector<float> &globalDerivativesX,
184 std::vector<float> &globalDerivativesY,
185 std::vector<int> &globalLabels,
193 std::vector<double> &globalDerivativesX,
194 std::vector<double> &globalDerivativesY,
195 std::vector<int> &globalLabels,
203 std::vector<float> &globalDerivativesX,
204 std::vector<float> &globalDerivativesY,
205 std::vector<int> &globalLabels)
const;
209 unsigned int iTrajHit,
210 const std::vector<int> &globalLabels,
211 const std::vector<float> &globalDerivativesX,
212 const std::vector<float> &globalDerivativesY);
216 unsigned int iTrajHit,
217 const std::vector<int> &globalLabels,
218 const std::vector<float> &globalDerivativesX);
224 unsigned int iTrajHit,
225 const std::vector<int> &globalLabels,
226 const std::vector<float> &globalDerivativesx,
227 const std::vector<float> &globalDerivativesy);
230 typename LocalDerivativeMatrix,
231 typename ResidualMatrix,
232 typename GlobalDerivativeMatrix>
233 void diagonalize(Eigen::MatrixBase<CovarianceMatrix> &aHitCovarianceM,
234 Eigen::MatrixBase<LocalDerivativeMatrix> &aLocalDerivativesM,
235 Eigen::MatrixBase<ResidualMatrix> &aHitResidualsM,
236 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM)
const;
239 template <
typename GlobalDerivativeMatrix>
241 const std::vector<float> &globalDerivativesy,
242 Eigen::MatrixBase<GlobalDerivativeMatrix> &aGlobalDerivativesM);
267 const std::vector<TrajectoryStateOnSurface> &tsoses);
bool processesEvents() override
Returns whether MP should process events in the current configuration.
std::vector< int > theIntBuffer
std::shared_ptr< AlignPCLThresholdsHG > theThresholds
const align::RunNumber firstIOV_
bool supportsCalibrations() override
Returns whether MP supports calibrations.
std::unordered_map< std::string, std::vector< float > > param_map
std::unique_ptr< MillePedeMonitor > theMonitor
bool setParametersForRunRange(const RunRange &runrange) override
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
bool addCalibrations(const std::vector< IntegratedCalibrationBase *> &iCals) override
Pass integrated calibrations to Millepede (they are not owned by Millepede!)
const bool enableAlignableUpdates_
virtual void endRun(const EventInfo &, const EndRunInfo &, const edm::EventSetup &)
Run on run products, e.g. TkLAS.
std::map< std::string, AlignPCLThreshold > threshold_map
void endLuminosityBlock(const edm::EventSetup &) override
called at end of luminosity block
std::unique_ptr< TrajectoryFactoryBase > theTrajectoryFactory
bool theDoSurveyPixelBarrel
std::vector< RunRange > RunRanges
bool areEmptyParams(const align::Alignables &alignables) const
std::unique_ptr< gbl::MilleBinary > theBinary
int addGlobalData(const edm::EventSetup &setup, const EventInfo &eventInfo, const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iHit, gbl::GblPoint &gblPoint)
unsigned int theMinNumHits
std::shared_ptr< PedeLabelerBase > thePedeLabels
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
std::vector< std::string > getExistingFormattedFiles(const std::vector< std::string > &plainFiles, const std::string &theDir)
bool areIOVsSpecified() const
bool isMode(unsigned int testMode) const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
int callMille2D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy)
math::Error< 5 >::type CovarianceMatrix
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
const bool ignoreFirstIOVCheck_
const bool ignoreHitsWithoutGlobalDerivatives_
void addLasBeam(const EventInfo &eventInfo, const TkFittedLasBeam &lasBeam, const std::vector< TrajectoryStateOnSurface > &tsoses)
align::Alignables theAlignables
define event information passed to algorithms
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
void beginLuminosityBlock(const edm::EventSetup &) override
called at begin of luminosity block (resets Mille binary in mille mode)
std::vector< align::RunNumber > cachedRuns_
int callMille1D(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iTrajHit, const std::vector< int > &globalLabels, const std::vector< float > &globalDerivativesX)
calls Mille for 1D hits
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)
virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholdsHG::threshold_map &thresholdMap, const AlignPCLThresholdsHG::param_map &floatMap)
void beginRun(const edm::Run &run, const edm::EventSetup &setup, bool changed) override
called at begin of run
bool is2D(const TransientTrackingRecHit::ConstRecHitPointer &recHit) const
true if hit belongs to 2D detector (currently tracker specific)
void makeGlobDerivMatrix(const std::vector< float > &globalDerivativesx, const std::vector< float > &globalDerivativesy, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM)
std::shared_ptr< TrackingRecHit const > ConstRecHitPointer
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
std::shared_ptr< PixelTopologyMap > pixelTopologyMap
const edm::ESGetToken< AlignPCLThresholdsHG, AlignPCLThresholdsHGRcd > aliThrToken_
AlignmentParameterStore * theAlignmentParameterStore
directory for all kind of files
bool addHitStatistics(int fromLoop, const std::string &outFile, const std::vector< std::string > &inFiles) const
void diagonalize(Eigen::MatrixBase< CovarianceMatrix > &aHitCovarianceM, Eigen::MatrixBase< LocalDerivativeMatrix > &aLocalDerivativesM, Eigen::MatrixBase< ResidualMatrix > &aHitResidualsM, Eigen::MatrixBase< GlobalDerivativeMatrix > &aGlobalDerivativesM) const
edm::ParameterSet theConfig
bool addHits(const align::Alignables &alis, const std::vector< AlignmentUserVariables *> &mpVars) const
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 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
unsigned int decodeMode(const std::string &mode) const
(Abstract) Base class for alignment algorithm user variables
unsigned int addHitCount(const std::vector< AlignmentParameters *> &parVec, const std::vector< bool > &validHitVecY) const
std::unique_ptr< PedeSteerer > thePedeSteer
bool storeAlignments() override
Returns whether MP produced results to be stored.
void terminate() override
Called at end of job.
const bool skipGlobalPositionRcdCheck_
void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store) override
Called at beginning of job.
void addVirtualMeas(const ReferenceTrajectoryBase::ReferenceTrajectoryPtr &refTrajPtr, unsigned int iVirtualMeas)
adds data for virtual measurements from reference trajectory
bool readFromPede(const edm::ParameterSet &mprespset, bool setUserVars, const RunRange &runrange)
read pede input defined by 'psetName', flag to create/not create MillePedeVariables ...
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 buildUserVariables(const align::Alignables &alignables) const
add MillePedeVariables for each AlignmentParameters (exception if no parameters...)
std::vector< float > theFloatBufferX
std::vector< IntegratedCalibrationBase * > theCalibrations
std::vector< Alignable * > Alignables
void run(const edm::EventSetup &setup, const EventInfo &eventInfo) override
Run the algorithm on trajectories and tracks.
align::RunNumber lastProcessedRun_
const bool enforceSingleIOVInput_
~MillePedeAlignmentAlgorithm() override
Destructor.
MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
Constructor.
std::vector< TkFittedLasBeam > TkFittedLasBeamCollection
std::vector< float > theFloatBufferY
#define DEFINE_EDM_PLUGIN(factory, type, name)
eventInfo
add run, event number and lumi section
void addPxbSurvey(const edm::ParameterSet &pxbSurveyCfg)
add measurement data from PXB survey
std::unique_ptr< AlignableNavigator > theAlignableNavigator
const align::RunRanges uniqueRunRanges_
unsigned int doIO(int loop) const
std::vector< std::vector< TrajectoryStateOnSurface > > TsosVectorCollection
define run information passed to algorithms (in endRun)
Constructor of the full muon geometry.
cond::RealTimeType< cond::runnumber >::type RunNumber
std::unique_ptr< Mille > theMille