22 #include "Randomize.hh" 23 #include "CLHEP/Units/GlobalSystemOfUnits.h" 24 #include "CLHEP/Units/GlobalPhysicalConstants.h" 27 #include "G4ParticleDefinition.hh" 28 #include "G4DynamicParticle.hh" 29 #include "G4DecayPhysics.hh" 30 #include "G4ParticleTable.hh" 31 #include "G4ParticleTypes.hh" 50 edm::LogInfo(
"FastCalorimetry") <<
"initHFShowerLibrary::initialization";
66 G4DecayPhysics decays;
67 decays.ConstructParticle();
68 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
69 partTable->SetReadiness();
71 G4ParticleTable* partTable = G4ParticleTable::GetParticleTable();
78 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: recoHFShowerLibrary ";
83 edm::LogInfo(
"FastCalorimetry") <<
"FastHFShowerLibrary: we should not be here ";
100 int parCode = myTrack.
type();
101 double tSlice = 0.1*vertex.mag()/29.98;
103 std::vector<HFShowerLibrary::Hit>
hits =
104 hfshower->fillHits(vertex,direction,parCode,eGen,ok,weight,tSlice,
false);
106 for (
unsigned int i=0;
i<hits.size(); ++
i) {
107 G4ThreeVector
pos = hits[
i].position;
108 int depth = hits[
i].depth;
109 double time = hits[
i].time;
119 std::map<CaloHitID,float>::iterator cellitr;
120 cellitr =
hitMap.find(current_id);
121 if(cellitr==
hitMap.end()) {
122 hitMap.insert(std::pair<CaloHitID,float>(current_id,1.0));
124 cellitr->second += 1.0;
138 if (hid.
depth() <= 2) {
139 int dep = (G4UniformRand() > 0.5) ? (2+hid.
depth()) : hid.
depth();
T getParameter(std::string const &) const
const RawParticle & vfcalEntrance() const
The particle at VFCAL entrance.
HcalSubdetector subdet() const
get the subdetector
const edm::ParameterSet fast
void recoHFShowerLibrary(const FSimTrack &myTrack)
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
void modifyDepth(uint32_t &id)
static int PMTNumber(const G4ThreeVector &pe_effect)
uint32_t rawId() const
get the raw id
int depth() const
get the tower depth
HcalNumberingScheme numberingScheme
double Y() const
y of vertex
int ieta() const
get the cell ieta
double Z() const
z of vertex
static std::once_flag initializeOnce
std::unique_ptr< HcalNumberingFromDDD > numberingFromDDD
const XYZTLorentzVector & vertex() const
the vertex fourvector
int iphi() const
get the cell iphi
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
int maxHFDepth(const int &ieta, const int &iphi) const
HcalDDDSimConstants * hcalConstants