Definition at line 103 of file HFShowerParam.cc.
References funct::abs(), aperture, applyFidCut, attLMeanInv, gather_cfg::cout, egammaForCoreTracking_cff::depth, HFShowerParam::Hit::depth, HFShowerParam::Hit::edep, edMin, em_2d_1, em_2d_2, em_lateral_1, em_lateral_2, em_long_1, em_long_2, em_long_gflash, em_long_sl, JetChargeProducer_cfi::exp, fibre, fillHisto, HFShowerLibrary::getHits(), GeV, gflash, HFGflash::gfParameterization(), gpar, hfClusterShapes_cfi::hits, hzvem, hzvhad, mps_fire::i, cuy::ii, G4TrackToParticleID::isGammaElectronPositron(), convertSQLiteXML::ok, onlyLong, trackingPlots::other, parametrizeLast, callgraph::path, pePerGeV, HFFibreFiducial::PMTNumber(), HFShowerParam::Hit::position, position, funct::pow(), diffTwoXMLs::r1, diffTwoXMLs::r2, ref_index, alignCSCRings::s, showerLibrary, mathSSE::sqrt(), AlCaHLTBitMon_QueryRunRegistry::string, HFShowerParam::Hit::time, ntuplemaker::time, HiIsolationCommonParameters_cff::track, trackEM, HFFibre::tShift(), mps_merge::weight, z, HFFibre::zShift(), and geometryCSVtoXML::zz.
106 auto const preStepPoint = aStep->GetPreStepPoint();
107 auto const track = aStep->GetTrack();
109 const G4ThreeVector& hitPoint = preStepPoint->GetPosition();
111 G4ThreeVector localPoint = G4ThreeVector(hitPoint.x(),hitPoint.y(),zv);
113 double pin = (preStepPoint->GetTotalEnergy())/
GeV;
114 double zint = hitPoint.z();
119 <<
track->GetDefinition()->GetParticleName()
120 <<
" of energy " << pin <<
" GeV" 121 <<
" Pos x,y,z = " << hitPoint.x() <<
"," 122 << hitPoint.y() <<
"," << zint <<
" (" << zz <<
"," 123 << localPoint.z() <<
", " 124 << (localPoint.z()+0.5*
gpar[1]) <<
") Local " 127 std::vector<HFShowerParam::Hit>
hits;
133 double pBeta =
track->GetDynamicParticle()->GetTotalMomentum() /
track->GetDynamicParticle()->GetTotalEnergy();
134 double dirz = (
track->GetDynamicParticle()->GetMomentumDirection()).
z();
135 if (hitPoint.z() < 0) dirz *= -1.;
138 <<
track->GetDynamicParticle()->GetMomentumDirection()
139 <<
" HitPoint " << hitPoint <<
" dirz " << dirz;
141 if (!isEM &&
track->GetDefinition()->GetPDGCharge() != 0 && pBeta > (1/
ref_index) &&
142 aStep->GetTotalEnergyDeposit() > 0.) { other =
true; }
151 }
else if ((
track->GetDefinition()->GetPDGCharge() != 0) &&
153 edep = (aStep->GetTotalEnergyDeposit())/
GeV;
159 <<
", Kill = " << kill <<
", pin = " << pin
160 <<
", edMin = " <<
edMin <<
" Other " <<
other;
167 for (
unsigned int i=0;
i<hitSL.size();
i++) {
174 if (npmt <= 0) ok =
false;
178 hit.
depth = hitSL[
i].depth;
179 hit.
time = hitSL[
i].time;
189 if (hit.
depth == 1) {
193 }
else if (hit.
depth == 2) {
202 << hit.
depth <<
" with edep " << hit.
edep 203 <<
" Time " << hit.
time;
209 for (
unsigned int i=0;
i<hitSL.size(); ++
i) {
211 G4ThreeVector pe_effect(hitSL[
i].
position.x(), hitSL[
i].position.y(),
212 hitSL[
i].position.z());
217 if (zv < 0. || zv >
gpar[1]) {
219 std::cout<<
"-#Zcut-HFShowerParam::getHits:z="<<zv<<
",m="<<gpar[1]<<std::endl;
227 << npmt <<
",z = " << zv;
232 <<
"getHits: npmt = " << npmt;
235 }
else if (npmt > 24) {
241 <<
"getHits:zMin=" << gpar[0];
248 <<
" zv " <<
std::abs(pe_effect.z())
249 <<
":" << gpar[4] <<
":" << zv <<
":" 250 << gpar[0] <<
" ok " << ok <<
" depth " 254 if (G4UniformRand() > 0.5) depth = 2;
255 if (depth == 2 && zv < gpar[0]) ok =
false;
259 double r1 = G4UniformRand();
262 <<
") " << dist <<
", exclusion flag " 267 double r2 = G4UniformRand();
270 << r2 <<
">" <<
weight <<
" " 278 hit.
time = time + hitSL[
i].time;
287 if (hit.
depth == 1) {
291 }
else if (hit.
depth == 2) {
300 << hit.
depth <<
" with edep " 301 << hit.
edep <<
" Time " << hit.
time;
310 double tSlice = (aStep->GetPostStepPoint()->GetGlobalTime());
315 if (npmt <= 0) ok =
false;
318 edm::LogVerbatim(
"HFShower") <<
"HFShowerParam: getHits hitPoint " << hitPoint <<
" flag " <<
ok;
327 << edep <<
" Time " << tSlice <<
":" << time
331 double zv =
std::abs(hitPoint.z()) - gpar[4];
343 << edep <<
" Time " << tSlice <<
":" << time
355 for (
unsigned int ii=0;
ii<hits.size(); ++
ii) {
357 if (zv > 12790)
edm::LogVerbatim(
"HFShower")<<
"HFShowerParam: Abnormal hit along " 359 << preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetName()
360 <<
" at " << hits[
ii].position <<
" zz " 361 << zv <<
" Edep " << edep <<
" due to " 362 <<
track->GetDefinition()->GetParticleName()
363 <<
" time " << hit.
time;
366 <<
") track " <<
track->GetTrackID()
367 <<
" at " << hitPoint
368 <<
" and deposit " << edep <<
" " << hits.size()
369 <<
" times" <<
" ZZ " << zz <<
" " << gpar[0];
double tShift(const G4ThreeVector &point, int depth, int fromEndAbs=0)
std::vector< Hit > gfParameterization(const G4Step *aStep, bool onlyLong=false)
std::vector< Hit > getHits(const G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
std::vector< double > gpar
double zShift(const G4ThreeVector &point, int depth, int fromEndAbs=0)
HFShowerLibrary * showerLibrary
Abs< T >::type abs(const T &t)
int PMTNumber(const G4ThreeVector &pe_effect)
static int position[264][3]
static bool isGammaElectronPositron(int pdgCode)
Power< A, B >::type pow(const A &a, const B &b)