25 #include "Randomize.hh" 26 #include "CLHEP/Units/GlobalSystemOfUnits.h" 27 #include "CLHEP/Units/GlobalPhysicalConstants.h" 30 #include "G4ParticleDefinition.hh" 31 #include "G4DynamicParticle.hh" 32 #include "G4DecayPhysics.hh" 33 #include "G4ParticleTable.hh" 34 #include "G4ParticleTypes.hh" 51 edm::LogInfo(
"FastCalorimetry") <<
"initHFShowerLibrary::initialization";
72 decays.ConstructParticle();
73 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
74 partTable->SetReadiness();
82 G4Random::setTheEngine(&(rnd->
theEngine()));
83 LogDebug(
"FastHFShowerLibrary::recoHFShowerLibrary")
84 <<
"Begin of event " << G4UniformRand() <<
" " << rnd->
theEngine().name() <<
" " << rnd->
theEngine();
89 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: recoHFShowerLibrary ";
94 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: we should not be here ";
105 G4ThreeVector direction(
110 int parCode = myTrack.
type();
111 double tSlice = 0.1 *
vertex.mag() / 29.98;
113 std::vector<HFShowerLibrary::Hit>
hits =
114 hfshower->fillHits(
vertex, direction, parCode, eGen, ok, weight, tSlice,
false);
116 for (
unsigned int i = 0;
i < hits.size(); ++
i) {
117 G4ThreeVector
pos = hits[
i].position;
118 int depth = hits[
i].depth;
119 double time = hits[
i].time;
131 std::map<CaloHitID, float>::iterator cellitr;
132 cellitr =
hitMap.find(current_id);
133 if (cellitr ==
hitMap.end()) {
134 hitMap.insert(std::pair<CaloHitID, float>(current_id, 1.0));
136 cellitr->second += 1.0;
144 int ieta = (
id.zside == 0) ? -
id.etaR :
id.etaR;
147 if (G4UniformRand() > 0.5)
std::map< CaloHitID, float > hitMap
T getParameter(std::string const &) const
XYZVector Vect() const
the momentum threevector
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)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > XYZVectorD
spatial vector with cartesian internal representation
HcalNumberingScheme numberingScheme
double e() const
energy of the momentum
static std::once_flag initializeOnce
CLHEP::HepRandomEngine & theEngine() const
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
const HcalSimulationParameters * hcalsimpar() const
const XYZTLorentzVector & vertex() const
the vertex fourvector
int PMTNumber(const G4ThreeVector &pe_effect)
FastHFShowerLibrary(edm::ParameterSet const &p)
void modifyDepth(HcalNumberingFromDDD::HcalID &id)
void SetRandom(const RandomEngineAndDistribution *)
int type() const
particle type (HEP PDT convension)
std::unique_ptr< HFShowerLibrary > hfshower
int id() const
the index in FBaseSimEvent and other vectors
const HcalDDDSimConstants * hcalConstants
void const initHFShowerLibrary(const edm::EventSetup &)
int maxHFDepth(const int &ieta, const int &iphi) const
T const * product() const