CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlignmentAlgorithmBase.h
Go to the documentation of this file.
1 
2 #ifndef Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h
3 #define Alignment_CommonAlignmentAlgorithm_AlignmentAlgorithmBase_h
4 
10 
11 #include <vector>
12 #include <utility>
13 
14 class AlignableTracker;
15 class AlignableMuon;
16 class AlignableExtras;
19 class Trajectory;
20 // These data formats cannot be forward declared since they are typedef's,
21 // so include the headers that define the typedef's
22 // (no need to include in dependencies in BuildFile):
23 // class TsosVectorCollection;
24 // class TkFittedLasBeamCollection;
25 // class AliClusterValueMap;
30 
31 namespace edm { class EventID; class RunID; class EventSetup; class ParameterSet; }
32 namespace reco { class Track; class BeamSpot; }
33 
35 {
36 
37 public:
38 
39  typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair;
40  typedef std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection;
42  typedef std::pair<RunNumber,RunNumber> RunRange;
43 
45  struct EventInfo {
46  EventInfo(const edm::EventID &eventId,
47  const ConstTrajTrackPairCollection &trajTrackPairs,
48  const reco::BeamSpot &beamSpot,
49  const AliClusterValueMap *clusterValueMap)
50  : eventId_(eventId), trajTrackPairs_(trajTrackPairs), beamSpot_(beamSpot), clusterValueMap_(clusterValueMap) {}
51 
56  };
57 
59  struct EndRunInfo {
60  EndRunInfo(const edm::RunID &runId, const TkFittedLasBeamCollection *tkLasBeams,
61  const TsosVectorCollection *tkLasBeamTsoses)
62  : runId_(runId), tkLasBeams_(tkLasBeams), tkLasBeamTsoses_(tkLasBeamTsoses) {}
66  };
67 
70 
73 
75  virtual void initialize( const edm::EventSetup& setup,
78  AlignableExtras* extras,
79  AlignmentParameterStore* store ) = 0;
84  virtual bool addCalibrations(const std::vector<IntegratedCalibrationBase*> &iCals){return false;}
85 
88  virtual void startNewLoop() {}
89 
91  virtual void terminate(const edm::EventSetup& iSetup) = 0;
92 
94  virtual void run( const edm::EventSetup &setup, const EventInfo &eventInfo) = 0;
95 
97  virtual void beginRun(const edm::EventSetup &setup) {};
98 
100  virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) {};
101 
103  virtual void beginLuminosityBlock(const edm::EventSetup &setup) {};
104 
106  virtual void endLuminosityBlock(const edm::EventSetup &setup) {};
107 
110  virtual bool setParametersForRunRange(const RunRange& rr) { return false; };
111 };
112 
113 #endif
virtual void beginLuminosityBlock(const edm::EventSetup &setup)
called at begin of luminosity block (no lumi block info passed yet)
virtual void beginRun(const edm::EventSetup &setup)
called at begin of run
cond::RealTimeType< cond::runnumber >::type RunNumber
virtual void run(const edm::EventSetup &setup, const EventInfo &eventInfo)=0
Run the algorithm (must be implemented in derived class)
virtual void terminate(const edm::EventSetup &iSetup)=0
Call at end of each loop (must be implemented in derived class)
virtual void endLuminosityBlock(const edm::EventSetup &setup)
called at end of luminosity block (no lumi block info passed yet)
AlignmentAlgorithmBase(const edm::ParameterSet &cfg)
Constructor.
std::pair< RunNumber, RunNumber > RunRange
const ConstTrajTrackPairCollection & trajTrackPairs_
const TsosVectorCollection * tkLasBeamTsoses_
might be null!
virtual bool addCalibrations(const std::vector< IntegratedCalibrationBase * > &iCals)
virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup)
called at end of run - order of arguments like in EDProducer etc.
virtual bool setParametersForRunRange(const RunRange &rr)
virtual ~AlignmentAlgorithmBase()
Destructor.
EndRunInfo(const edm::RunID &runId, const TkFittedLasBeamCollection *tkLasBeams, const TsosVectorCollection *tkLasBeamTsoses)
virtual void initialize(const edm::EventSetup &setup, AlignableTracker *tracker, AlignableMuon *muon, AlignableExtras *extras, AlignmentParameterStore *store)=0
Call at beginning of job (must be implemented in derived class)
const AliClusterValueMap * clusterValueMap_
EventInfo(const edm::EventID &eventId, const ConstTrajTrackPairCollection &trajTrackPairs, const reco::BeamSpot &beamSpot, const AliClusterValueMap *clusterValueMap)
const TkFittedLasBeamCollection * tkLasBeams_
define run information passed to algorithms (in endRun)
std::vector< TkFittedLasBeam > TkFittedLasBeamCollection
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
std::vector< std::vector< TrajectoryStateOnSurface > > TsosVectorCollection
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
define event information passed to algorithms