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;
31 
32 namespace edm { class EventSetup; class ParameterSet; }
33 namespace reco { class Track; class BeamSpot; }
34 
36 {
37 
38 public:
39 
40  typedef std::pair<const Trajectory*, const reco::Track*> ConstTrajTrackPair;
41  typedef std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection;
43  typedef std::pair<RunNumber,RunNumber> RunRange;
44 
46  class EventInfo {
47  public:
48  EventInfo(const edm::EventID &theEventId,
49  const ConstTrajTrackPairCollection &theTrajTrackPairs,
50  const reco::BeamSpot &theBeamSpot,
51  const AliClusterValueMap *theClusterValueMap)
52  : eventId_(theEventId), trajTrackPairs_(theTrajTrackPairs), beamSpot_(theBeamSpot), clusterValueMap_(theClusterValueMap) {}
53 
54  const edm::EventID eventId() const { return eventId_; }
56  const reco::BeamSpot& beamSpot() const { return beamSpot_; }
58 
59 
60  private:
65  };
66 
68  class EndRunInfo {
69  public:
70  EndRunInfo(const edm::RunID &theRunId, const TkFittedLasBeamCollection *theTkLasBeams,
71  const TsosVectorCollection *theTkLasBeamTsoses)
72  : runId_(theRunId), tkLasBeams_(theTkLasBeams), tkLasBeamTsoses_(theTkLasBeamTsoses) {}
73 
74  const edm::RunID runId() const { return runId_; }
75  const TkFittedLasBeamCollection* tkLasBeams() const { return tkLasBeams_; }
77 
78 
79  private:
83  };
84 
87 
90 
92  virtual void initialize( const edm::EventSetup& setup,
95  AlignableExtras* extras,
96  AlignmentParameterStore* store ) = 0;
101  virtual bool addCalibrations(const std::vector<IntegratedCalibrationBase*> &iCals){return false;}
102 
105  virtual void startNewLoop() {}
106 
108  virtual void terminate(const edm::EventSetup& iSetup) = 0;
109 
111  virtual void run( const edm::EventSetup &setup, const EventInfo &eventInfo) = 0;
112 
114  virtual void beginRun(const edm::EventSetup &setup) {};
115 
117  virtual void endRun(const EndRunInfo &runInfo, const edm::EventSetup &setup) {};
118 
120  virtual void beginLuminosityBlock(const edm::EventSetup &setup) {};
121 
123  virtual void endLuminosityBlock(const edm::EventSetup &setup) {};
124 
127  virtual bool setParametersForRunRange(const RunRange& rr) { return false; };
128 };
129 
130 #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)
const TsosVectorCollection * tkLasBeamTsoses_
might be null!
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
EndRunInfo(const edm::RunID &theRunId, const TkFittedLasBeamCollection *theTkLasBeams, const TsosVectorCollection *theTkLasBeamTsoses)
const edm::EventID eventId() const
virtual bool addCalibrations(const std::vector< IntegratedCalibrationBase * > &iCals)
const ConstTrajTrackPairCollection & trajTrackPairs() const
define event information passed to algorithms
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.
const TkFittedLasBeamCollection * tkLasBeams() const
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 TkFittedLasBeamCollection * tkLasBeams_
const edm::RunID runId_
might be null!
const edm::EventID eventId_
might be null!
const AliClusterValueMap * clusterValueMap_
const AliClusterValueMap * clusterValueMap() const
std::vector< TkFittedLasBeam > TkFittedLasBeamCollection
const reco::BeamSpot & beamSpot() const
EventInfo(const edm::EventID &theEventId, const ConstTrajTrackPairCollection &theTrajTrackPairs, const reco::BeamSpot &theBeamSpot, const AliClusterValueMap *theClusterValueMap)
std::pair< const Trajectory *, const reco::Track * > ConstTrajTrackPair
std::vector< std::vector< TrajectoryStateOnSurface > > TsosVectorCollection
define run information passed to algorithms (in endRun)
const TsosVectorCollection * tkLasBeamTsoses() const
might be null!
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
const ConstTrajTrackPairCollection & trajTrackPairs_
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection