CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/FastSimulation/CaloHitMakers/interface/CaloHitMaker.h

Go to the documentation of this file.
00001 #ifndef CaloHitMaker_h
00002 #define CaloHitMaker_h
00003 
00004 #include "DataFormats/DetId/interface/DetId.h"
00005 #include "DataFormats/Math/interface/Vector3D.h"
00006 #include "Math/GenVector/Plane3D.h"
00007 
00008 //CLHEP headers
00009 //#include "CLHEP/Geometry/Point3D.h"
00010 //#include "CLHEP/Geometry/Plane3D.h"
00011 
00012 
00013 //STL headers
00014 #include <string>
00015 #include <map>
00016 
00017 class CaloGeometryHelper;
00018 class CalorimeterProperties;
00019 
00020 class CaloHitMaker
00021 {
00022  public:
00023 
00024   typedef math::XYZVector XYZVector;
00025   typedef math::XYZVector XYZPoint;
00026   typedef ROOT::Math::Plane3D Plane3D;
00027 
00028   CaloHitMaker(const CaloGeometryHelper * calo,DetId::Detector det,int subdetn,int cal,unsigned sht=0);
00029   virtual ~CaloHitMaker(){;}
00030   
00031   virtual bool addHit(double r,double phi,unsigned layer=0)=0;
00032   virtual void setSpotEnergy(double e)=0;
00033   virtual const std::map<uint32_t,float>& getHits()=0; 
00034 
00035   const CaloGeometryHelper * getCalorimeter() const 
00036     {
00037       //      std::cout << "CaloHitMaker is returning myCalorimeter " << myCalorimeter << std::endl;
00038       return myCalorimeter;
00039     }
00040 
00041  protected:
00044   static XYZPoint intersect(const Plane3D& p,const XYZPoint& a,const XYZPoint& b,double& t,bool segment,bool debug=false);
00045 
00046   const CaloGeometryHelper * myCalorimeter;    
00047   const CalorimeterProperties * theCaloProperties;
00048   double moliereRadius;
00049   double interactionLength;
00050   double spotEnergy;
00051 
00052   bool EMSHOWER;
00053   bool HADSHOWER;
00054   bool MIP;
00055 
00056  private:
00057   DetId::Detector base_;
00058   int subdetn_;
00059   int onCal_;
00060 
00061 
00062  protected:
00063   unsigned showerType_;
00064   std::map<uint32_t,float> hitMap_;
00065   
00066 };
00067 
00068 #endif