17 #include "Randomize.hh"
18 #include "CLHEP/Units/GlobalSystemOfUnits.h"
19 #include "CLHEP/Units/GlobalPhysicalConstants.h"
22 #include "G4ParticleDefinition.hh"
23 #include "G4DynamicParticle.hh"
24 #include "G4DecayPhysics.hh"
25 #include "G4ParticleTable.hh"
26 #include "G4ParticleTypes.hh"
43 edm::LogInfo(
"FastCalorimetry") <<
"initHFShowerLibrary::initialization";
53 G4DecayPhysics decays;
54 decays.ConstructParticle();
55 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
56 partTable->SetReadiness();
64 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: recoHFShowerLibrary ";
69 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: we should not be here ";
86 int parCode = myTrack.
type();
87 double tSlice = 0.1*vertex.mag()/29.98;
89 std::vector<HFShowerLibrary::Hit> hits =
90 hfshower->fillHits(vertex,direction,parCode,eGen,ok,weight,
false,tSlice);
92 for (
unsigned int i=0;
i<hits.size(); ++
i) {
93 G4ThreeVector pos = hits[
i].position;
95 double time = hits[
i].time;
105 std::map<CaloHitID,float>::iterator cellitr;
106 cellitr =
hitMap.find(current_id);
107 if(cellitr==
hitMap.end()) {
108 hitMap.insert(std::pair<CaloHitID,float>(current_id,1.0));
110 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