CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PCLTrackerAlProducer.h
Go to the documentation of this file.
1 #ifndef Alignment_CommonAlignmentProducer_PCLTrackerAlProducer_h
2 #define Alignment_CommonAlignmentProducer_PCLTrackerAlProducer_h
3 
25 /*** System includes ***/
26 #include <vector>
27 #include <memory>
28 #include <sstream>
29 #include <iostream>
30 
31 /*** Core framework functionality ***/
35 
38 
39 /*** Alignment ***/
41 
45 
50 
56 
57 /*** Records for ESWatcher ***/
60 
64 
69 
76 
77 /*** Forward declarations ***/
79 
80 
81 
83  //========================== PUBLIC METHODS ==================================
84  public: //====================================================================
85 
89  virtual ~PCLTrackerAlProducer();
90 
91  /*** Code which implements the interface
92  Called from outside ***/
93 
95  virtual void beginJob() override;
96  virtual void endJob() override;
97 
98  virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
99  virtual void endRun (const edm::Run&, const edm::EventSetup&) override;
100 
101  virtual void beginLuminosityBlock(const edm::LuminosityBlock&,
102  const edm::EventSetup&) override;
103  virtual void endLuminosityBlock (const edm::LuminosityBlock&,
104  const edm::EventSetup&) override;
105 
106  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
107 
108 
109  //======================== PRIVATE METHODS =================================
110  private: //=================================================================
111 
112  /*** Code which is independent of Event & Setup
113  Called from constructor ***/
114 
117 
119  void createMonitors (const edm::ParameterSet&);
120 
123 
124 
125 
126  /*** Code which is dependent of Event & Setup
127  Called and checked for each Event ***/
128 
130  bool setupChanged(const edm::EventSetup&);
131 
135 
137  void initBeamSpot(const edm::Event&);
138 
140  void createGeometries(const edm::EventSetup&);
141 
145 
148  void createAlignables(const TrackerTopology* const);
149 
151  void buildParameterStore();
152 
154  void applyMisalignment();
155 
157  void simpleMisalignment(const Alignables&, const std::string&,
158  float, float, bool);
159 
163 
166  template<class G, class Rcd, class ErrRcd>
167  void applyDB(G*, const edm::EventSetup&, const AlignTransform&) const;
168 
170  template<class G, class DeformationRcd>
171  void applyDB(G*, const edm::EventSetup&) const;
172 
174  void readInSurveyRcds(const edm::EventSetup&);
175 
177  void addSurveyInfo(Alignable*);
178 
179 
180 
181  /*** Code for writing results to database
182  Called from endJob() ***/
183 
186  void finish();
187 
189  void storeAlignmentsToDB();
190 
193 
197 
202  const std::string&, const AlignTransform*, cond::Time_t) const;
203 
207  const std::string&, cond::Time_t) const;
208 
209 
210 
211  //========================== PRIVATE DATA ====================================
212  //============================================================================
213 
214  /*** Alignment data ***/
215 
219 
224 
228 
229  // TODO: Change pointers to std::shared_ptr
230  boost::shared_ptr<TrackerGeometry> theTrackerGeometry;
231  boost::shared_ptr<DTGeometry> theMuonDTGeometry;
232  boost::shared_ptr<CSCGeometry> theMuonCSCGeometry;
233 
234  int nevent_;
235 
236 
237 
238  /*** Parameters from config-file ***/
239 
241 
242  const int stNFixAlignables_;
248  const bool useSurvey_;
249 
258 
259 
260 
261  /*** ESWatcher ***/
262 
265 
269 
274 
281 
282 
284 
285  /*** Survey stuff ***/
286 
290 
291 };
292 
293 #endif
AlignableMuon * theMuonAlignables
const Alignments * theSurveyValues
edm::ESWatcher< TrackerAlignmentRcd > watchTrackerAlRcd
void buildParameterStore()
Creates the , which manages all Alignables.
edm::ESWatcher< DTSurveyErrorExtendedRcd > watchDTSurveyErrExtRcd
void createCalibrations(const edm::ParameterSet &)
Creates the calibrations (specified in config-file)
AlignableExtras * theExtraAlignables
std::vector< Alignable * > Alignables
Definition: Alignable.h:246
boost::shared_ptr< DTGeometry > theMuonDTGeometry
edm::ESWatcher< TrackerSurveyErrorExtendedRcd > watchTkSurveyErrExtRcd
RunRanges makeNonOverlappingRunRanges(const edm::VParameterSet &)
Makes unique RunRanges (specified in config-file)
std::vector< AlignmentMonitorBase * > AlignmentMonitors
edm::ESWatcher< DTAlignmentRcd > watchDTAlRcd
void applyMisalignment()
Applies misalignment scenario to .
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
void writeDB(Alignments *, const std::string &, AlignmentErrorsExtended *, const std::string &, const AlignTransform *, cond::Time_t) const
void storeAlignmentsToDB()
Writes Alignments (i.e. Records) to database-file.
edm::ESWatcher< TrackerAlignmentErrorExtendedRcd > watchTrackerAlErrorExtRcd
boost::shared_ptr< TrackerGeometry > theTrackerGeometry
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::ESWatcher< CSCSurveyErrorExtendedRcd > watchCSCSurveyErrExtRcd
AlignmentAlgorithmBase * theAlignmentAlgo
virtual void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void applyAlignmentsToDB(const edm::EventSetup &)
AlignmentParameterStore * theAlignmentParameterStore
Interface/Base class for alignment algorithms, each alignment algorithm has to be derived from this c...
const edm::InputTag beamSpotTag_
BeamSpot.
void applyDB(G *, const edm::EventSetup &, const AlignTransform &) const
virtual ~PCLTrackerAlProducer()
Destructor.
const SurveyErrors * theSurveyErrors
edm::ESWatcher< DTSurveyRcd > watchDTSurveyRcd
void createMonitors(const edm::ParameterSet &)
Creates the monitors (specified in config-file)
unsigned long long Time_t
Definition: Time.h:16
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
virtual void endJob() override
std::vector< IntegratedCalibrationBase * > Calibrations
void simpleMisalignment(const Alignables &, const std::string &, float, float, bool)
Applies misalignment scenario to .
const edm::InputTag clusterValueMapTag_
ValueMap containing associtaion cluster-flag.
void readInSurveyRcds(const edm::EventSetup &)
Reads in survey records.
bool setupChanged(const edm::EventSetup &)
Checks if one of the EventSetup-Records has changed.
boost::shared_ptr< CSCGeometry > theMuonCSCGeometry
tuple G
Definition: callgraph.py:12
void createGeometries(const edm::EventSetup &)
Creates ideal geometry from IdealGeometryRecord.
virtual void beginJob() override
std::vector< RunRange > RunRanges
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
edm::ESWatcher< IdealGeometryRecord > watchIdealGeometryRcd
virtual void endRun(const edm::Run &, const edm::EventSetup &) override
edm::ESWatcher< CSCSurveyRcd > watchCSCSurveyRcd
edm::ESWatcher< DTAlignmentErrorExtendedRcd > watchDTAlErrExtRcd
const Alignments * globalPositions_
GlobalPositions that might be read from DB, NULL otherwise.
edm::ESWatcher< CSCAlignmentRcd > watchCSCAlRcd
edm::ESWatcher< CSCAlignmentErrorExtendedRcd > watchCSCAlErrExtRcd
edm::ESWatcher< TrackerSurfaceDeformationRcd > watchTrackerSurDeRcd
edm::ESWatcher< GlobalPositionRcd > watchGlobalPositionRcd
void writeForRunRange(cond::Time_t)
edm::ESWatcher< TrackerSurveyRcd > watchTkSurveyRcd
void addSurveyInfo(Alignable *)
Adds survey info to an Alignable.
virtual void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void initBeamSpot(const edm::Event &)
Initializes Beamspot of Alignables .
void createAlignmentAlgorithm(const edm::ParameterSet &)
Creates the choosen alignment algorithm (specified in config-file)
AlignmentMonitors theMonitors
AlignableTracker * theTrackerAlignables
const edm::InputTag tkLasBeamTag_
LAS beams in edm::Run (ignore if empty)
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
void createAlignables(const TrackerTopology *const)
PCLTrackerAlProducer(const edm::ParameterSet &)
Constructor.
Definition: Run.h:41
edm::ParameterSet theParameterSet
void initAlignmentAlgorithm(const edm::EventSetup &)
edm::Handle< reco::BeamSpot > theBeamSpot