Go to the documentation of this file.00001 #ifndef SimG4CMS_CastorShowerLibrary_h
00002 #define SimG4CMS_CastorShowerLibrary_h
00003
00004
00005
00006
00007
00008
00009
00011
00012 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00013 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00014 #include "SimDataFormats/CaloHit/interface/CastorShowerLibraryInfo.h"
00015 #include "SimDataFormats/CaloHit/interface/CastorShowerEvent.h"
00016 #include "DetectorDescription/Core/interface/DDsvalues.h"
00017
00018 #include "G4ParticleTable.hh"
00019 #include "G4ThreeVector.hh"
00020
00021
00022 #include "TROOT.h"
00023 #include "TFile.h"
00024 #include "TTree.h"
00025 #include "TBranchObject.h"
00026
00027 #include <string>
00028 #include <memory>
00029
00030 class G4Step;
00031
00032 class CastorShowerLibrary {
00033
00034 public:
00035
00036
00037 CastorShowerLibrary(std::string & name, edm::ParameterSet const & p);
00038 ~CastorShowerLibrary();
00039
00040 public:
00041
00042 void initParticleTable(G4ParticleTable *);
00043 CastorShowerEvent getShowerHits(G4Step*, bool&);
00044 int FindEnergyBin(double);
00045 int FindEtaBin(double);
00046 int FindPhiBin(double);
00047
00048 protected:
00049
00050 void initFile(edm::ParameterSet const & );
00051 void getRecord(int, int);
00052 void loadEventInfo(TBranchObject *);
00053
00054 void select(int, double,double =0,double=9);
00055
00056
00057
00058 private:
00059
00060 TFile *hf;
00061 TBranchObject *evtInfo;
00062 TBranchObject *emBranch, *hadBranch;
00063
00064
00065 CastorShowerLibraryInfo *eventInfo;
00066 CastorShowerEvent *showerEvent;
00067
00068 bool verbose;
00069 unsigned int nMomBin, totEvents, evtPerBin;
00070
00071 std::vector<double> pmom;
00072
00073 int emPDG, epPDG, gammaPDG;
00074 int pi0PDG, etaPDG, nuePDG, numuPDG, nutauPDG;
00075 int anuePDG, anumuPDG, anutauPDG, geantinoPDG;
00076 int mumPDG, mupPDG;
00077
00078 unsigned int nBinsE, nBinsEta, nBinsPhi;
00079 unsigned int nEvtPerBinE, nEvtPerBinEta, nEvtPerBinPhi;
00080 std::vector<double> SLenergies;
00081 std::vector<double> SLetas;
00082 std::vector<double> SLphis;
00083 };
00084 #endif