Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-07 02:12:53

0001 #ifndef SimG4CMS_HFShowerParam_h
0002 #define SimG4CMS_HFShowerParam_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HFShowerParam.h
0005 // Description: Generates hits for HF with some parametrized information
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h"
0011 #include "CondFormats/GeometryObjects/interface/HcalSimulationParameters.h"
0012 #include "SimG4CMS/Calo/interface/HFShowerLibrary.h"
0013 #include "SimG4CMS/Calo/interface/HFFibre.h"
0014 #include "SimG4CMS/Calo/interface/HFGflash.h"
0015 
0016 #include "G4ThreeVector.hh"
0017 
0018 class G4Step;
0019 
0020 #include <TH1F.h>
0021 #include <TH2F.h>
0022 #include <string>
0023 #include <vector>
0024 
0025 class HFShowerParam {
0026 public:
0027   HFShowerParam(const std::string& name,
0028                 const HcalDDDSimConstants* hcons,
0029                 const HcalSimulationParameters* hps,
0030                 edm::ParameterSet const& p);
0031   virtual ~HFShowerParam();
0032 
0033 public:
0034   struct Hit {
0035     Hit() {}
0036     G4ThreeVector position;
0037     int depth;
0038     double time;
0039     double edep;
0040   };
0041   std::vector<Hit> getHits(const G4Step* aStep, double weight, bool& isKilled);
0042 
0043 private:
0044   const HcalDDDSimConstants* hcalConstants_;
0045   std::unique_ptr<HFShowerLibrary> showerLibrary_;
0046   std::unique_ptr<HFFibre> fibre_;
0047   std::unique_ptr<HFGflash> gflash_;
0048   bool fillHisto_;
0049   double pePerGeV_, edMin_, ref_index_, aperture_, attLMeanInv_;
0050   bool trackEM_, equalizeTimeShift_, onlyLong_, applyFidCut_, parametrizeLast_;
0051   G4int emPDG_, epPDG_, gammaPDG_;
0052   std::vector<double> gpar_;
0053   TH1F *em_long_1_, *em_lateral_1_, *em_long_2_, *em_lateral_2_;
0054   TH1F *hzvem_, *hzvhad_, *em_long_1_tuned_, *em_long_gflash_;
0055   TH1F* em_long_sl_;
0056   TH2F *em_2d_1_, *em_2d_2_;
0057 };
0058 
0059 #endif  // HFShowerParam_h