test
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 
37 
38 /*** Alignment ***/
40 
44 
49 
55 
56 /*** Records for ESWatcher ***/
59 
63 
68 
75 
78 
79 /*** Forward declarations ***/
81 
82 
83 
85  //========================== PUBLIC METHODS ==================================
86  public: //====================================================================
87 
91  virtual ~PCLTrackerAlProducer();
92 
93  /*** Code which implements the interface
94  Called from outside ***/
95 
97  virtual void beginJob() override;
98  virtual void endJob() override;
99 
100  virtual void beginRun(const edm::Run&, const edm::EventSetup&) override;
101  virtual void endRun (const edm::Run&, const edm::EventSetup&) override;
102 
103  virtual void beginLuminosityBlock(const edm::LuminosityBlock&,
104  const edm::EventSetup&) override;
105  virtual void endLuminosityBlock (const edm::LuminosityBlock&,
106  const edm::EventSetup&) override;
107 
108  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
109 
110 
111  //======================== PRIVATE METHODS =================================
112  private: //=================================================================
113 
114  /*** Code which is independent of Event & Setup
115  Called from constructor ***/
116 
119 
121  void createMonitors (const edm::ParameterSet&);
122 
125 
126 
127 
128  /*** Code which is dependent of Event & Setup
129  Called and checked for each Event ***/
130 
132  bool setupChanged(const edm::EventSetup&);
133 
137 
139  void initBeamSpot(const edm::Event&);
140 
142  void createGeometries(const edm::EventSetup&, const TrackerTopology*);
143 
147 
150  void createAlignables(const TrackerTopology* const);
151 
153  void buildParameterStore();
154 
156  void applyMisalignment();
157 
159  void simpleMisalignment(const Alignables&, const std::string&,
160  float, float, bool);
161 
165 
168  template<class G, class Rcd, class ErrRcd>
169  void applyDB(G*, const edm::EventSetup&, const AlignTransform&) const;
170 
172  template<class G, class DeformationRcd>
173  void applyDB(G*, const edm::EventSetup&) const;
174 
176  void readInSurveyRcds(const edm::EventSetup&);
177 
179  void addSurveyInfo(Alignable*);
180 
181 
182 
183  /*** Code for writing results to database
184  Called from endJob() ***/
185 
188  void finish();
189 
191  void storeAlignmentsToDB();
192 
195 
199 
204  const std::string&, const AlignTransform*, cond::Time_t) const;
205 
209  const std::string&, cond::Time_t) const;
210 
211 
212 
213  //========================== PRIVATE DATA ====================================
214  //============================================================================
215 
216  /*** Alignment data ***/
217 
221 
226 
230 
231  // TODO: Change pointers to std::shared_ptr
232  boost::shared_ptr<TrackerGeometry> theTrackerGeometry;
233  boost::shared_ptr<DTGeometry> theMuonDTGeometry;
234  boost::shared_ptr<CSCGeometry> theMuonCSCGeometry;
235 
236  int nevent_;
237 
238 
239 
240  /*** Parameters from config-file ***/
241 
243 
244  const int stNFixAlignables_;
250  const bool useSurvey_;
251 
260 
267 
268  // file-names
269  //std::string millePedeLogFile_ = "millepede.log";
270  //std::string millePedeResFile_ = "millepede.res";
271 
272 
273  /*** ESWatcher ***/
274 
277 
281 
286 
293 
294 
295 
296  /*** Survey stuff ***/
297 
301 
302 };
303 
304 #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
virtual void beginJob() override
std::vector< RunRange > RunRanges
const edm::InputTag tjTkAssociationMapTag_
Map with tracks/trajectories.
void createGeometries(const edm::EventSetup &, const TrackerTopology *)
Creates ideal geometry from IdealGeometryRecord.
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