Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-11-13 03:31:00

0001 #ifndef Geometry_EcalAlgo_WriteESAlignments_h
0002 #define Geometry_EcalAlgo_WriteESAlignments_h
0003 
0004 namespace edm {
0005   class ConsumesCollector;
0006   class EventSetup;
0007 }  // namespace edm
0008 
0009 #include "FWCore/Utilities/interface/ESGetToken.h"
0010 #include "CondFormats/Alignment/interface/Alignments.h"
0011 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
0012 #include "Geometry/Records/interface/CaloGeometryRecord.h"
0013 
0014 class WriteESAlignments {
0015 public:
0016   typedef std::vector<AlignTransform> AliVec;
0017 
0018   typedef AlignTransform::Translation Trl;
0019   typedef AlignTransform::Rotation Rot;
0020 
0021   typedef std::vector<double> DVec;
0022 
0023   static const unsigned int k_nA;
0024 
0025   WriteESAlignments(edm::ConsumesCollector&& cc);
0026 
0027   void writeAlignments(const edm::EventSetup& eventSetup,
0028                        const DVec& alphaVec,
0029                        const DVec& betaVec,
0030                        const DVec& gammaVec,
0031                        const DVec& xtranslVec,
0032                        const DVec& ytranslVec,
0033                        const DVec& ztranslVec);
0034 
0035 private:
0036   void convert(const edm::EventSetup& eS,
0037                const DVec& a,
0038                const DVec& b,
0039                const DVec& g,
0040                const DVec& x,
0041                const DVec& y,
0042                const DVec& z,
0043                AliVec& va);
0044 
0045   void write(const Alignments& ali);
0046 
0047   edm::ESGetToken<CaloGeometry, CaloGeometryRecord> geometryToken_;
0048   edm::ESGetToken<Alignments, ESAlignmentRcd> alignmentToken_;
0049 };
0050 
0051 #endif