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 
79 
80 /*** Forward declarations ***/
82 
83 
84 
86  //========================== PUBLIC METHODS ==================================
87  public: //====================================================================
88 
92  virtual ~PCLTrackerAlProducer();
93 
94  /*** Code which implements the interface
95  Called from outside ***/
96 
98  virtual void beginJob() override;
99  virtual void endJob() override;
100 
101  virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
102  virtual void endRun (const edm::Run&, const edm::EventSetup&) override;
103 
104  virtual void beginLuminosityBlock(const edm::LuminosityBlock&,
105  const edm::EventSetup&) override;
106  virtual void endLuminosityBlock (const edm::LuminosityBlock&,
107  const edm::EventSetup&) override;
108 
109  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
110 
111 
112  //======================== PRIVATE METHODS =================================
113  private: //=================================================================
114 
115  /*** Code which is independent of Event & Setup
116  Called from constructor ***/
117 
120 
122  void createMonitors (const edm::ParameterSet&);
123 
126 
127 
128 
129  /*** Code which is dependent of Event & Setup
130  Called and checked for each Event ***/
131 
133  bool setupChanged(const edm::EventSetup&);
134 
138 
140  void initBeamSpot(const edm::Event&);
141 
143  void createGeometries(const edm::EventSetup&);
144 
148 
151  void createAlignables(const TrackerTopology* const);
152 
154  void buildParameterStore();
155 
157  void applyMisalignment();
158 
160  void simpleMisalignment(const Alignables&, const std::string&,
161  float, float, bool);
162 
166 
169  template<class G, class Rcd, class ErrRcd>
170  void applyDB(G*, const edm::EventSetup&, const AlignTransform&) const;
171 
173  template<class G, class DeformationRcd>
174  void applyDB(G*, const edm::EventSetup&) const;
175 
177  void readInSurveyRcds(const edm::EventSetup&);
178 
180  void addSurveyInfo(Alignable*);
181 
182 
183 
184  /*** Code for writing results to database
185  Called from endJob() ***/
186 
189  void finish();
190 
192  void storeAlignmentsToDB();
193 
196 
200 
205  const std::string&, const AlignTransform*, cond::Time_t) const;
206 
210  const std::string&, cond::Time_t) const;
211 
212 
213 
214  //========================== PRIVATE DATA ====================================
215  //============================================================================
216 
217  /*** Alignment data ***/
218 
222 
227 
231 
232  // TODO: Change pointers to std::shared_ptr
233  boost::shared_ptr<TrackerGeometry> theTrackerGeometry;
234  boost::shared_ptr<DTGeometry> theMuonDTGeometry;
235  boost::shared_ptr<CSCGeometry> theMuonCSCGeometry;
236 
237  int nevent_;
238 
239 
240 
241  /*** Parameters from config-file ***/
242 
244 
245  const int stNFixAlignables_;
251  const bool useSurvey_;
252 
261 
267 
268 
269  /*** ESWatcher ***/
270 
273 
277 
282 
289 
290 
292 
293  /*** Survey stuff ***/
294 
298 
299 };
300 
301 #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:251
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::EDGetTokenT< TkFittedLasBeamCollection > tkLasBeamToken
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...
edm::EDGetTokenT< TsosVectorCollection > tsosVectorToken
const edm::InputTag beamSpotTag_
BeamSpot.
void applyDB(G *, const edm::EventSetup &, const AlignTransform &) const
virtual ~PCLTrackerAlProducer()
Destructor.
const SurveyErrors * theSurveyErrors
edm::EDGetTokenT< AliClusterValueMap > clusterValueMapToken
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.
edm::EDGetTokenT< reco::BeamSpot > beamSpotToken
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.
edm::EDGetTokenT< TrajTrackAssociationCollection > tjTkAssociationMapToken
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:43
edm::ParameterSet theParameterSet
void initAlignmentAlgorithm(const edm::EventSetup &)
edm::Handle< reco::BeamSpot > theBeamSpot