Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:24:08

0001 #ifndef SimG4CMS_HGCSD_h
0002 #define SimG4CMS_HGCSD_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HGCSD.h
0005 // Description: Stores hits of the High Granularity Calorimeter (HGC) in the
0006 //              appropriate container
0007 ///////////////////////////////////////////////////////////////////////////////
0008 
0009 #include "SimG4CMS/Calo/interface/CaloSD.h"
0010 #include "SimG4Core/Notification/interface/BeginOfJob.h"
0011 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
0012 #include "SimG4CMS/Calo/interface/HGCNumberingScheme.h"
0013 #include "SimG4CMS/Calo/interface/HGCMouseBite.h"
0014 
0015 #include <string>
0016 #include <TTree.h>
0017 
0018 class G4LogicalVolume;
0019 class G4Material;
0020 class G4Step;
0021 
0022 class HGCSD : public CaloSD, public Observer<const BeginOfJob *> {
0023 public:
0024   HGCSD(const std::string &,
0025         const HGCalDDDConstants *,
0026         const SensitiveDetectorCatalog &,
0027         edm::ParameterSet const &,
0028         const SimTrackManager *);
0029   ~HGCSD() override = default;
0030 
0031   uint32_t setDetUnitId(const G4Step *step) override;
0032 
0033 protected:
0034   double getEnergyDeposit(const G4Step *) override;
0035   using CaloSD::update;
0036   void update(const BeginOfJob *) override;
0037   void initRun() override;
0038   void initEvent(const BeginOfEvent *) override;
0039   void endEvent() override;
0040   bool filterHit(CaloG4Hit *, double) override;
0041 
0042 private:
0043   uint32_t setDetUnitId(ForwardSubdetector &, int, int, int, int, G4ThreeVector &);
0044   bool isItinFidVolume(const G4ThreeVector &) { return true; }
0045 
0046   const HGCalDDDConstants *hgcons_;
0047   std::string nameX_;
0048   HGCalGeometryMode::GeometryMode geom_mode_;
0049   std::unique_ptr<HGCNumberingScheme> numberingScheme_;
0050   std::unique_ptr<HGCMouseBite> mouseBite_;
0051   double eminHit_;
0052   ForwardSubdetector myFwdSubdet_;
0053   double slopeMin_;
0054   int levelT_;
0055   bool storeAllG4Hits_, rejectMB_, waferRot_;
0056   double mouseBiteCut_;
0057   std::vector<double> angles_;
0058 
0059   TTree *tree_;
0060   uint32_t t_EventID_;
0061   std::vector<int> t_Layer_, t_Parcode_;
0062   std::vector<double> t_dEStep1_, t_dEStep2_, t_TrackE_;
0063   std::vector<double> t_Angle_;
0064 };
0065 
0066 #endif  // HGCSD_h