20 #include "Randomize.hh"
21 #include "CLHEP/Units/GlobalSystemOfUnits.h"
22 #include "CLHEP/Units/GlobalPhysicalConstants.h"
25 #include "G4ParticleDefinition.hh"
26 #include "G4DynamicParticle.hh"
27 #include "G4DecayPhysics.hh"
28 #include "G4ParticleTable.hh"
29 #include "G4ParticleTypes.hh"
45 edm::LogInfo(
"FastCalorimetry") <<
"initHFShowerLibrary::initialization";
59 G4DecayPhysics decays;
60 decays.ConstructParticle();
61 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
62 partTable->SetReadiness();
64 hfshower->initRun(partTable, hcalConstants);
70 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: recoHFShowerLibrary ";
75 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: we should not be here ";
92 int parCode = myTrack.
type();
93 double tSlice = 0.1*vertex.mag()/29.98;
95 std::vector<HFShowerLibrary::Hit> hits =
96 hfshower->fillHits(vertex,direction,parCode,eGen,ok,weight,
false,tSlice);
98 for (
unsigned int i=0;
i<hits.size(); ++
i) {
99 G4ThreeVector pos = hits[
i].position;
100 int depth = hits[
i].depth;
101 double time = hits[
i].time;
111 std::map<CaloHitID,float>::iterator cellitr;
112 cellitr =
hitMap.find(current_id);
113 if(cellitr==
hitMap.end()) {
114 hitMap.insert(std::pair<CaloHitID,float>(current_id,1.0));
116 cellitr->second += 1.0;
T getParameter(std::string const &) const
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
const edm::ParameterSet fast
void recoHFShowerLibrary(const FSimTrack &myTrack)
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
static int PMTNumber(const G4ThreeVector &pe_effect)
HcalNumberingScheme numberingScheme
double Y() const
y of vertex
double Z() const
z of vertex
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
const XYZTLorentzVector & vertex() const
the vertex fourvector
FastHFShowerLibrary(edm::ParameterSet const &p)
double X() const
x of vertex
std::vector< std::vector< double > > tmp
int type() const
particle type (HEP PDT convension)
std::unique_ptr< HFShowerLibrary > hfshower
int id() const
the index in FBaseSimEvent and other vectors
void const initHFShowerLibrary(const edm::EventSetup &)
std::map< CaloHitID, float > hitMap