Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:29:47

0001 #ifndef SimG4CMS_Calo_HcalQie_H
0002 #define SimG4CMS_Calo_HcalQie_H
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HcalQie.h
0005 // Qie simulation for HCal hits
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "SimDataFormats/CaloHit/interface/CaloHit.h"
0011 
0012 #include <vector>
0013 
0014 namespace CLHEP {
0015   class HepRandomEngine;
0016 }
0017 
0018 class HcalQie {
0019 public:
0020   HcalQie(edm::ParameterSet const& p);
0021   virtual ~HcalQie();
0022 
0023   std::vector<int> getCode(int, const std::vector<CaloHit>&, CLHEP::HepRandomEngine*);
0024   double getEnergy(const std::vector<int>&);
0025 
0026 private:
0027   std::vector<double> shape();
0028   std::vector<int> code();
0029   std::vector<double> charge();
0030   std::vector<double> weight(int binofmax, int mode, int npre, int numbucket);
0031   double codeToQ(int ic);
0032   int getCode(double charge);
0033   double getShape(double time);
0034 
0035 private:
0036   std::vector<double> shape_;
0037   std::vector<int> code_;
0038   std::vector<double> charge_;
0039   int binOfMax, signalBuckets, preSamples, numOfBuckets;
0040   std::vector<double> weight_;
0041   double sigma, qToPE, eDepPerPE, baseline;
0042   int bmin_, bmax_;
0043   double phase_, rescale_;
0044 };
0045 
0046 #endif