WriteESAlignments

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#ifndef Geometry_EcalAlgo_WriteESAlignments_h
#define Geometry_EcalAlgo_WriteESAlignments_h

namespace edm {
  class ConsumesCollector;
  class EventSetup;
}  // namespace edm

#include "FWCore/Utilities/interface/ESGetToken.h"
#include "CondFormats/Alignment/interface/Alignments.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"

class WriteESAlignments {
public:
  typedef std::vector<AlignTransform> AliVec;

  typedef AlignTransform::Translation Trl;
  typedef AlignTransform::Rotation Rot;

  typedef std::vector<double> DVec;

  static const unsigned int k_nA;

  WriteESAlignments(edm::ConsumesCollector&& cc);

  void writeAlignments(const edm::EventSetup& eventSetup,
                       const DVec& alphaVec,
                       const DVec& betaVec,
                       const DVec& gammaVec,
                       const DVec& xtranslVec,
                       const DVec& ytranslVec,
                       const DVec& ztranslVec);

private:
  void convert(const edm::EventSetup& eS,
               const DVec& a,
               const DVec& b,
               const DVec& g,
               const DVec& x,
               const DVec& y,
               const DVec& z,
               AliVec& va);

  void write(const Alignments& ali);

  edm::ESGetToken<CaloGeometry, CaloGeometryRecord> geometryToken_;
  edm::ESGetToken<Alignments, ESAlignmentRcd> alignmentToken_;
};

#endif