-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10451 from cerminar/PCLSiPixelAli_75X_integ_v2
First integration of Pixel Alignment of large structures in PCL (75X)
- Loading branch information
Showing
33 changed files
with
3,037 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -243,4 +243,6 @@ class Alignable | |
|
||
}; | ||
|
||
typedef std::vector<Alignable*> Alignables; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,21 @@ | |
#ifndef Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h | ||
#define Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h | ||
|
||
/// | ||
/// Base class for the alignment algorithm | ||
/// | ||
/// Any algorithm should derive from this class | ||
/// | ||
/** | ||
* @package Alignment/CommonAlignmentAlgorithm | ||
* @file AlignmentAlgorithmBase.h | ||
* | ||
* @author ??? | ||
* | ||
* Last update: | ||
* @author Max Stark ([email protected]) | ||
* @date 2015/07/16 | ||
* | ||
* @brief Interface/Base class for alignment algorithms, each alignment | ||
* algorithm has to be derived from this class | ||
*/ | ||
|
||
|
||
|
||
#include <vector> | ||
#include <utility> | ||
|
@@ -32,11 +42,27 @@ class Trajectory; | |
namespace edm { class EventSetup; class ParameterSet; } | ||
namespace reco { class Track; class BeamSpot; } | ||
|
||
/*** Global typedefs part I (see EOF for part II) ***/ | ||
typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair; | ||
typedef std::vector< ConstTrajTrackPair > ConstTrajTrackPairs; | ||
|
||
typedef std::vector<IntegratedCalibrationBase*> Calibrations; | ||
|
||
typedef cond::RealTimeType<cond::runnumber>::type RunNumber; | ||
typedef std::pair<RunNumber,RunNumber> RunRange; | ||
typedef std::vector<RunRange> RunRanges; | ||
|
||
|
||
|
||
class AlignmentAlgorithmBase | ||
{ | ||
|
||
public: | ||
|
||
// TODO: DEPRECATED: For not breaking the interface, used in serveral files. | ||
// If possible use the global typedefs above. | ||
// With global typedefs one does not have to typedef again like | ||
// 'typedef AlignmentAlgorithmBase::ConstTrajTrackPair ConstTrajTrackPair;' | ||
// in other files. | ||
typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair; | ||
typedef std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection; | ||
typedef cond::RealTimeType<cond::runnumber>::type RunNumber; | ||
|
@@ -83,7 +109,7 @@ class AlignmentAlgorithmBase | |
}; | ||
|
||
/// Constructor | ||
AlignmentAlgorithmBase(const edm::ParameterSet& cfg); | ||
AlignmentAlgorithmBase(const edm::ParameterSet&) {}; | ||
|
||
/// Destructor | ||
virtual ~AlignmentAlgorithmBase() {}; | ||
|
@@ -94,18 +120,27 @@ class AlignmentAlgorithmBase | |
AlignableMuon* muon, | ||
AlignableExtras* extras, | ||
AlignmentParameterStore* store ) = 0; | ||
/// Pass integrated calibrations to algorithm, to be called after initialize(..). | ||
/// (Calibrations' ownership is NOT passed to algorithm.) | ||
/// Return whether feature is supported by algorithm, | ||
/// default implementation returns false. | ||
virtual bool addCalibrations(const std::vector<IntegratedCalibrationBase*> &iCals){return false;} | ||
|
||
/// Call at start of loop | ||
/// Default implementation is dummy for non-iterative algorithms | ||
/// Returns whether calibrations is supported by algorithm, | ||
/// default implementation returns false. | ||
virtual bool supportsCalibrations() { return false; } | ||
/// Pass integrated calibrations to algorithm, to be called after initialize() | ||
/// Calibrations' ownership is NOT passed to algorithm | ||
virtual bool addCalibrations(const Calibrations&) { return false; } | ||
|
||
/// Returns whether algorithm proccesses events in current configuration | ||
virtual bool processesEvents() { return true; } | ||
|
||
// TODO: DEPRECATED: Actually, there are no iterative algorithms, use | ||
// initialze() and terminate() | ||
/// Called at start of loop, default implementation is dummy for | ||
/// non-iterative algorithms | ||
virtual void startNewLoop() {} | ||
|
||
/// Call at end of each loop (must be implemented in derived class) | ||
virtual void terminate(const edm::EventSetup& iSetup) = 0; | ||
/// Called at end of job (must be implemented in derived class) | ||
virtual void terminate() {} | ||
|
||
/// Run the algorithm (must be implemented in derived class) | ||
virtual void run( const edm::EventSetup &setup, const EventInfo &eventInfo) = 0; | ||
|
@@ -127,4 +162,8 @@ class AlignmentAlgorithmBase | |
virtual bool setParametersForRunRange(const RunRange& rr) { return false; }; | ||
}; | ||
|
||
/*** Global typedefs part II ***/ | ||
typedef AlignmentAlgorithmBase::EventInfo EventInfo; | ||
typedef AlignmentAlgorithmBase::EndRunInfo EndRunInfo; | ||
|
||
#endif |
9 changes: 0 additions & 9 deletions
9
Alignment/CommonAlignmentAlgorithm/src/AlignmentAlgorithmBase.cc
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
Alignment/CommonAlignmentProducer/plugins/LSNumberFilter.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
//#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/EDFilter.h" | ||
|
||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/Run.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
|
||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
|
||
|
||
|
||
// | ||
// class declaration | ||
// | ||
|
||
|
||
|
||
class LSNumberFilter : public edm::EDFilter { | ||
public: | ||
explicit LSNumberFilter(const edm::ParameterSet&); | ||
~LSNumberFilter(); | ||
|
||
private: | ||
|
||
virtual void beginJob() override ; | ||
virtual bool filter(edm::Event&, const edm::EventSetup&) override; | ||
virtual void endJob() override ; | ||
|
||
unsigned int minLS; | ||
}; | ||
|
||
|
||
|
||
LSNumberFilter::LSNumberFilter(const edm::ParameterSet& iConfig): | ||
minLS(iConfig.getUntrackedParameter<unsigned>("minLS",21)) | ||
{} | ||
|
||
|
||
LSNumberFilter::~LSNumberFilter() | ||
{ | ||
|
||
// do anything here that needs to be done at desctruction time | ||
// (e.g. close files, deallocate resources etc.) | ||
|
||
} | ||
|
||
|
||
// | ||
// member functions | ||
// | ||
|
||
// ------------ method called on each new Event ------------ | ||
bool LSNumberFilter::filter(edm::Event& iEvent, | ||
const edm::EventSetup& iSetup) { | ||
|
||
if(iEvent.luminosityBlock() < minLS) return false; | ||
|
||
return true; | ||
|
||
} | ||
|
||
// ------------ method called once each job just before starting event loop ------------ | ||
void | ||
LSNumberFilter::beginJob() | ||
{} | ||
|
||
// ------------ method called once each job just after ending the event loop ------------ | ||
void | ||
LSNumberFilter::endJob() { | ||
} | ||
|
||
//define this as a plug-in | ||
DEFINE_FWK_MODULE(LSNumberFilter); |
Oops, something went wrong.