Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-10 02:21:11

0001 #ifndef TBPositionCalc_h
0002 #define TBPositionCalc_h
0003 
0004 #include "CLHEP/Vector/ThreeVector.h"
0005 #include "CLHEP/Vector/Rotation.h"
0006 #include "Rtypes.h"
0007 
0008 #include <fstream>
0009 #include <vector>
0010 #include <cmath>
0011 #include <map>
0012 
0013 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
0014 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
0015 #include "DataFormats/EcalDetId/interface/EBDetId.h"
0016 #include "DataFormats/Math/interface/Point3D.h"
0017 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
0018 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
0019 #include "Geometry/CaloGeometry/interface/TruncatedPyramid.h"
0020 #include "Geometry/EcalTestBeam/interface/EcalTBCrystalMap.h"
0021 
0022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0023 #include <CLHEP/Units/SystemOfUnits.h>
0024 
0025 class TBPositionCalc {
0026 public:
0027   TBPositionCalc(const std::map<std::string, double>& providedParameters,
0028                  const std::string& mapFile,
0029                  const CaloSubdetectorGeometry* passedGeometry);
0030 
0031   TBPositionCalc(){};
0032 
0033   ~TBPositionCalc();
0034 
0035   CLHEP::Hep3Vector CalculateTBPos(const std::vector<EBDetId>& passedDetIds,
0036                                    int myCrystal,
0037                                    EcalRecHitCollection const* passedRecHitsMap);
0038 
0039   CLHEP::Hep3Vector CalculateCMSPos(const std::vector<EBDetId>& passedDetIds,
0040                                     int myCrystal,
0041                                     EcalRecHitCollection const* passedRecHitsMap);
0042 
0043   void computeRotation(int myCrystal, CLHEP::HepRotation& CMStoTB);
0044 
0045 private:
0046   bool param_LogWeighted_;
0047   Double32_t param_X0_;
0048   Double32_t param_T0_;
0049   Double32_t param_W0_;
0050 
0051   EcalTBCrystalMap* theTestMap;
0052 
0053   const CaloSubdetectorGeometry* theGeometry_;
0054 };
0055 
0056 #endif