CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/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 #include "SimG4CMS/Calo/interface/CaloHitID.h"
00008 
00009 //CLHEP headers
00010 //#include "CLHEP/Geometry/Point3D.h"
00011 //#include "CLHEP/Geometry/Plane3D.h"
00012 
00013 
00014 //STL headers
00015 #include <string>
00016 #include <map>
00017 
00018 class CaloGeometryHelper;
00019 class CalorimeterProperties;
00020 
00021 class CaloHitMaker
00022 {
00023  public:
00024 
00025   typedef math::XYZVector XYZVector;
00026   typedef math::XYZVector XYZPoint;
00027   typedef ROOT::Math::Plane3D Plane3D;
00028 
00029   CaloHitMaker(const CaloGeometryHelper * calo,DetId::Detector det,int subdetn,int cal,unsigned sht=0);
00030   virtual ~CaloHitMaker(){;}
00031   
00032   virtual bool addHit(double r,double phi,unsigned layer=0)=0;
00033   virtual void setSpotEnergy(double e)=0;
00034   virtual const std::map<CaloHitID,float>& getHits()=0; 
00035 
00036   const CaloGeometryHelper * getCalorimeter() const 
00037     {
00038       //      std::cout << "CaloHitMaker is returning myCalorimeter " << myCalorimeter << std::endl;
00039       return myCalorimeter;
00040     }
00041 
00042  protected:
00045   static XYZPoint intersect(const Plane3D& p,const XYZPoint& a,const XYZPoint& b,double& t,bool segment,bool debug=false);
00046 
00047   const CaloGeometryHelper * myCalorimeter;    
00048   const CalorimeterProperties * theCaloProperties;
00049   double moliereRadius;
00050   double interactionLength;
00051   double spotEnergy;
00052 
00053   bool EMSHOWER;
00054   bool HADSHOWER;
00055   bool MIP;
00056 
00057  private:
00058   DetId::Detector base_;
00059   int subdetn_;
00060   int onCal_;
00061 
00062 
00063  protected:
00064   unsigned showerType_;
00065   std::map<CaloHitID,float> hitMap_;
00066   
00067 };
00068 
00069 #endif