CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoTBCalo/EcalTBAnalysisCoreTools/interface/TBPositionCalc.h

Go to the documentation of this file.
00001 #ifndef TBPositionCalc_h
00002 #define TBPositionCalc_h
00003 
00004 #include "CLHEP/Vector/ThreeVector.h"
00005 #include "CLHEP/Vector/Rotation.h"
00006 #include "Rtypes.h"
00007 
00008 #include <fstream>
00009 #include <vector>
00010 #include <cmath>
00011 #include <map>
00012 
00013 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00014 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00015 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00016 #include "DataFormats/Math/interface/Point3D.h"
00017 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00018 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00019 #include "Geometry/CaloGeometry/interface/TruncatedPyramid.h"
00020 #include "Geometry/EcalTestBeam/interface/EcalTBCrystalMap.h"
00021 
00022 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00023 #include "CLHEP/Units/GlobalSystemOfUnits.h" 
00024 
00025 
00026 class TBPositionCalc
00027 {
00028  public:
00029   
00030   TBPositionCalc(std::map<std::string,double> providedParameters, const std::string& mapFile, const CaloSubdetectorGeometry *passedGeometry);  
00031 
00032   TBPositionCalc() { };
00033 
00034   ~TBPositionCalc();
00035 
00036   CLHEP::Hep3Vector CalculateTBPos(std::vector<EBDetId> passedDetIds, int myCrystal, EcalRecHitCollection const *passedRecHitsMap);
00037   
00038   CLHEP::Hep3Vector CalculateCMSPos(std::vector<EBDetId> passedDetIds, int myCrystal, EcalRecHitCollection const *passedRecHitsMap);
00039   
00040   void computeRotation(int myCrystal, CLHEP::HepRotation & CMStoTB );
00041     
00042 
00043  private:
00044   bool        param_LogWeighted_;
00045   Double32_t  param_X0_;
00046   Double32_t  param_T0_;
00047   Double32_t  param_W0_;
00048 
00049   EcalTBCrystalMap * theTestMap;
00050 
00051   const CaloSubdetectorGeometry *theGeometry_;
00052 };
00053   
00054 #endif
00055 
00056