Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef SimG4CMS_HFCherenkov_h
0002 #define SimG4CMS_HFCherenkov_h 1
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File:  HFCherenkov.h
0005 // Description: Generate Cherenkov photons for HF
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 
0011 #include "G4DynamicParticle.hh"
0012 #include "G4ParticleDefinition.hh"
0013 #include "G4Step.hh"
0014 #include "G4ThreeVector.hh"
0015 #include "globals.hh"
0016 
0017 #include <vector>
0018 
0019 class HFCherenkov {
0020 public:
0021   HFCherenkov(edm::ParameterSet const& p);
0022   virtual ~HFCherenkov();
0023 
0024   int computeNPE(const G4Step* step,
0025                  const G4ParticleDefinition* pDef,
0026                  double pBeta,
0027                  double u,
0028                  double v,
0029                  double w,
0030                  double step_length,
0031                  double zFiber,
0032                  double Dose,
0033                  int Npe_Dose);
0034 
0035   int computeNPEinPMT(const G4ParticleDefinition* pDef, double pBeta, double u, double v, double w, double step_length);
0036 
0037   int computeNPhTrapped(
0038       double pBeta, double u, double v, double w, double step_length, double zFiber, double Dose, int Npe_Dose);
0039   double smearNPE(G4int Npe);
0040 
0041   std::vector<double> getMom();
0042   std::vector<double> getWL();
0043   std::vector<double> getWLIni();
0044   std::vector<double> getWLTrap();
0045   std::vector<double> getWLAtten();
0046   std::vector<double> getWLHEM();
0047   std::vector<double> getWLQEff();
0048   void clearVectors();
0049 
0050 private:
0051   bool isApplicable(const G4ParticleDefinition* aParticleType);
0052   // Returns true -> 'is applicable', for all charged particles.
0053   int computeNbOfPhotons(double pBeta, double step_length);
0054   double computeQEff(double wavelength);
0055   double computeHEMEff(double wavelength);
0056 
0057 private:
0058   double ref_index;
0059   double lambda1, lambda2;
0060   double aperture, aperturetrapped, apertureTrap;
0061   double gain, fibreR, sinPsimax;
0062   bool checkSurvive;
0063   bool UseNewPMT;
0064 
0065   G4ThreeVector phMom;
0066   std::vector<double> wl;
0067   std::vector<double> momZ;
0068   std::vector<double> wlini;
0069   std::vector<double> wltrap;
0070   std::vector<double> wlatten;
0071   std::vector<double> wlhem;
0072   std::vector<double> wlqeff;
0073 };
0074 
0075 #endif