File indexing completed on 2024-04-06 12:11:12
0001 #ifndef CaloHitMaker_h
0002 #define CaloHitMaker_h
0003
0004 #include "DataFormats/DetId/interface/DetId.h"
0005 #include "DataFormats/Math/interface/Vector3D.h"
0006 #include "Math/GenVector/Plane3D.h"
0007 #include "SimG4CMS/Calo/interface/CaloHitID.h"
0008
0009
0010
0011
0012
0013
0014 #include <string>
0015 #include <map>
0016
0017 class CaloGeometryHelper;
0018 class CalorimeterProperties;
0019
0020 class CaloHitMaker {
0021 public:
0022 typedef math::XYZVector XYZVector;
0023 typedef math::XYZVector XYZPoint;
0024 typedef ROOT::Math::Plane3D Plane3D;
0025
0026 CaloHitMaker(const CaloGeometryHelper* calo, DetId::Detector det, int subdetn, int cal, unsigned sht = 0);
0027 virtual ~CaloHitMaker() { ; }
0028
0029 virtual bool addHit(double r, double phi, unsigned layer = 0) = 0;
0030 virtual void setSpotEnergy(double e) = 0;
0031 virtual const std::map<CaloHitID, float>& getHits() = 0;
0032
0033 const CaloGeometryHelper* getCalorimeter() const {
0034
0035 return myCalorimeter;
0036 }
0037
0038 protected:
0039
0040
0041 static XYZPoint intersect(
0042 const Plane3D& p, const XYZPoint& a, const XYZPoint& b, double& t, bool segment, bool debug = false);
0043
0044 const CaloGeometryHelper* myCalorimeter;
0045 const CalorimeterProperties* theCaloProperties;
0046 double moliereRadius;
0047 double interactionLength;
0048 double spotEnergy;
0049
0050 bool EMSHOWER;
0051 bool HADSHOWER;
0052 bool MIP;
0053
0054 private:
0055 DetId::Detector base_;
0056 int subdetn_;
0057 int onCal_;
0058
0059 protected:
0060 unsigned showerType_;
0061 std::map<CaloHitID, float> hitMap_;
0062 };
0063
0064 #endif