Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-05-26 22:38:29

0001 #ifndef SimG4CMS_HGCalSD_h
0002 #define SimG4CMS_HGCalSD_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HGCalSD.h
0005 // Description: Stores hits of the High Granularity Calorimeter (HGC) in the
0006 //              appropriate container (post TDR version)
0007 ///////////////////////////////////////////////////////////////////////////////
0008 
0009 #include "SimG4CMS/Calo/interface/CaloSD.h"
0010 #include "SimG4Core/Notification/interface/BeginOfJob.h"
0011 #include "SimG4CMS/Calo/interface/HGCalNumberingScheme.h"
0012 #include "SimG4CMS/Calo/interface/HGCGuardRing.h"
0013 #include "SimG4CMS/Calo/interface/HGCMouseBite.h"
0014 
0015 #include <string>
0016 
0017 class HGCalDDDConstants;
0018 class G4LogicalVolume;
0019 class G4Step;
0020 
0021 class HGCalSD : public CaloSD, public Observer<const BeginOfJob *> {
0022 public:
0023   HGCalSD(const std::string &,
0024           const HGCalDDDConstants *,
0025           const SensitiveDetectorCatalog &,
0026           edm::ParameterSet const &,
0027           const SimTrackManager *);
0028   ~HGCalSD() override = default;
0029 
0030   uint32_t setDetUnitId(const G4Step *step) override;
0031 
0032 protected:
0033   double getEnergyDeposit(const G4Step *) override;
0034   using CaloSD::update;
0035   void update(const BeginOfJob *) override;
0036   void initRun() override;
0037   bool filterHit(CaloG4Hit *, double) override;
0038 
0039 private:
0040   uint32_t setDetUnitId(int, int, int, int, G4ThreeVector &);
0041   bool isItinFidVolume(const G4ThreeVector &);
0042 
0043   const HGCalDDDConstants *hgcons_;
0044   std::unique_ptr<HGCalNumberingScheme> numberingScheme_;
0045   std::unique_ptr<HGCGuardRing> guardRing_;
0046   std::unique_ptr<HGCMouseBite> mouseBite_;
0047   DetId::Detector mydet_;
0048   std::string nameX_;
0049   HGCalGeometryMode::GeometryMode geom_mode_;
0050   double eminHit_, slopeMin_, distanceFromEdge_;
0051   double mouseBiteCut_, weight_;
0052   int levelT1_, levelT2_, cornerMinMask_;
0053   bool storeAllG4Hits_;
0054   bool fiducialCut_, rejectMB_, waferRot_, checkID_;
0055   int useSimWt_, verbose_;
0056   const double tan30deg_, cos30deg_;
0057   std::vector<double> angles_;
0058   std::string missingFile_;
0059 };
0060 
0061 #endif  // HGCalSD_h