CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Private Member Functions | Private Attributes
HFShowerParam Class Reference

#include <HFShowerParam.h>

Classes

struct  Hit
 

Public Member Functions

std::vector< HitgetHits (G4Step *aStep, double weight)
 
 HFShowerParam (std::string &name, const DDCompactView &cpv, edm::ParameterSet const &p)
 
void initRun (G4ParticleTable *)
 
virtual ~HFShowerParam ()
 

Private Member Functions

std::vector< double > getDDDArray (const std::string &, const DDsvalues_type &)
 

Private Attributes

double aperture
 
bool applyFidCut
 
double attLMeanInv
 
double edMin
 
TH2F * em_2d_1
 
TH2F * em_2d_2
 
TH1F * em_lateral_1
 
TH1F * em_lateral_2
 
TH1F * em_long_1
 
TH1F * em_long_1_tuned
 
TH1F * em_long_2
 
TH1F * em_long_gflash
 
TH1F * em_long_sl
 
G4int emPDG
 
G4int epPDG
 
HFFibrefibre
 
bool fillHisto
 
G4int gammaPDG
 
HFGflashgflash
 
std::vector< double > gpar
 
TH1F * hzvem
 
TH1F * hzvhad
 
bool onlyLong
 
bool parametrizeLast
 
double pePerGeV
 
double ref_index
 
HFShowerLibraryshowerLibrary
 
bool trackEM
 

Detailed Description

Definition at line 26 of file HFShowerParam.h.

Constructor & Destructor Documentation

HFShowerParam::HFShowerParam ( std::string &  name,
const DDCompactView cpv,
edm::ParameterSet const &  p 
)

Definition at line 29 of file HFShowerParam.cc.

References DDFilteredView::addFilter(), aperture, applyFidCut, HFFibre::attLength(), attLMeanInv, funct::cos(), edMin, em_2d_1, em_2d_2, em_lateral_1, em_lateral_2, em_long_1, em_long_1_tuned, em_long_2, em_long_gflash, em_long_sl, DDSpecificsFilter::equals, edm::hlt::Exception, fibre, fillHisto, alcazmumu_cfi::filter, DDFilteredView::firstChild(), getDDDArray(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gflash, gpar, hzvem, hzvhad, edm::Service< T >::isAvailable(), LogDebug, TFileDirectory::make(), DDFilteredView::mergedSpecifics(), TFileDirectory::mkdir(), mergeVDriftHistosByStation::name, onlyLong, parametrizeLast, pePerGeV, ref_index, DDSpecificsFilter::setCriteria(), showerLibrary, trackEM, and relativeConstraints::value.

30  : showerLibrary(0),
31  fibre(0), gflash(0),
32  fillHisto(false) {
33  edm::ParameterSet m_HF = p.getParameter<edm::ParameterSet>("HFShower");
34  pePerGeV = m_HF.getParameter<double>("PEPerGeV");
35  trackEM = m_HF.getParameter<bool>("TrackEM");
36  bool useShowerLibrary = m_HF.getParameter<bool>("UseShowerLibrary");
37  bool useGflash = m_HF.getParameter<bool>("UseHFGflash");
38  edMin = m_HF.getParameter<double>("EminLibrary");
39  onlyLong = m_HF.getParameter<bool>("OnlyLong");
40  ref_index = m_HF.getParameter<double>("RefIndex");
41  double lambdaMean = m_HF.getParameter<double>("LambdaMean");
42  aperture = cos(asin(m_HF.getParameter<double>("Aperture")));
43  applyFidCut = m_HF.getParameter<bool>("ApplyFiducialCut");
44  parametrizeLast = m_HF.getUntrackedParameter<bool>("ParametrizeLast",false);
45  edm::LogInfo("HFShower") << "HFShowerParam::Use of shower library is set to "
46  << useShowerLibrary << " Use of Gflash is set to "
47  << useGflash << " P.E. per GeV " << pePerGeV
48  << ", ref. index of fibre " << ref_index
49  << ", Track EM Flag " << trackEM << ", edMin "
50  << edMin << " GeV, use of Short fibre info in"
51  << " shower library set to " << !(onlyLong)
52  << ", use of parametrization for last part set to "
53  << parametrizeLast << ", Mean lambda " << lambdaMean
54  << ", aperture (cutoff) " << aperture
55  << ", Application of Fiducial Cut " << applyFidCut;
56 
57 #ifdef plotDebug
59  if (tfile.isAvailable()) {
60  fillHisto = true;
61  LogDebug("HFShower") << "HFShowerParam::Save histos in directory "
62  << "ProfileFromParam";
63  TFileDirectory showerDir = tfile->mkdir("ProfileFromParam");
64  hzvem = showerDir.make<TH1F>("hzvem", "Longitudinal Profile (EM Part);Number of PE",330,0.0,1650.0);
65  hzvhad = showerDir.make<TH1F>("hzvhad","Longitudinal Profile (Had Part);Number of PE",330,0.0,1650.0);
66  em_2d_1 = showerDir.make<TH2F>("em_2d_1","Lateral Profile vs. Shower Depth;cm;Events",800,800.0,1600.0,100,50.0,150.0);
67  em_long_1 = showerDir.make<TH1F>("em_long_1","Longitudinal Profile;Radiation Length;Number of Spots",800,800.0,1600.0);
68  em_long_1_tuned = showerDir.make<TH1F>("em_long_1_tuned","Longitudinal Profile;Radiation Length;Number of Spots",800,800.0,1600.0);
69  em_lateral_1 = showerDir.make<TH1F>("em_lateral_1","Lateral Profile;cm;Events",100,50.0,150.0);
70  em_2d_2 = showerDir.make<TH2F>("em_2d_2","Lateral Profile vs. Shower Depth;cm;Events",800,800.0,1600.0,100,50.0,150.0);
71  em_long_2 = showerDir.make<TH1F>("em_long_2","Longitudinal Profile;Radiation Length;Number of Spots",800,800.0,1600.0);
72  em_lateral_2 = showerDir.make<TH1F>("em_lateral_2","Lateral Profile;cm;Events",100,50.0,150.0);
73  em_long_gflash = showerDir.make<TH1F>("em_long_gflash","Longitudinal Profile From GFlash;cm;Number of Spots",800,800.0,1600.0);
74  em_long_sl = showerDir.make<TH1F>("em_long_sl","Longitudinal Profile From Shower Library;cm;Number of Spots",800,800.0,1600.0);
75  } else {
76  fillHisto = false;
77  edm::LogInfo("HFShower") << "HFShowerParam::No file is available for "
78  << "saving histos so the flag is set to false";
79  }
80 #endif
81 
82  G4String attribute = "ReadOutName";
83  G4String value = name;
85  DDValue ddv(attribute,value,0);
87  DDFilteredView fv(cpv);
88  fv.addFilter(filter);
89  bool dodet = fv.firstChild();
90  if (dodet) {
91  DDsvalues_type sv(fv.mergedSpecifics());
92  //Special Geometry parameters
93  gpar = getDDDArray("gparHF",sv);
94  edm::LogInfo("HFShower") << "HFShowerParam: " <<gpar.size() <<" gpar (cm)";
95  for (unsigned int ig=0; ig<gpar.size(); ig++)
96  edm::LogInfo("HFShower") << "HFShowerParam: gpar[" << ig << "] = "
97  << gpar[ig]/cm << " cm";
98  } else {
99  edm::LogError("HFShower") << "HFShowerParam: cannot get filtered "
100  << " view for " << attribute << " matching " << name;
101  throw cms::Exception("Unknown", "HFShowerParam") << "cannot match " << attribute
102  << " to " << name <<"\n";
103  }
104 
105  if (useShowerLibrary) showerLibrary = new HFShowerLibrary(name, cpv, p);
106  if (useGflash) gflash = new HFGflash(p);
107  fibre = new HFFibre(name, cpv, p);
108  attLMeanInv = fibre->attLength(lambdaMean);
109  edm::LogInfo("HFShower") << "att. length used for (lambda=" << lambdaMean
110  << ") = " << 1/(attLMeanInv*cm) << " cm";
111 }
#define LogDebug(id)
T getParameter(std::string const &) const
double attLMeanInv
Definition: HFShowerParam.h:54
T getUntrackedParameter(std::string const &, T const &) const
bool parametrizeLast
Definition: HFShowerParam.h:55
double attLength(double lambda)
Definition: HFFibre.cc:113
std::vector< double > gpar
Definition: HFShowerParam.h:57
HFShowerLibrary * showerLibrary
Definition: HFShowerParam.h:51
TH1F * em_lateral_2
Definition: HFShowerParam.h:59
HFFibre * fibre
Definition: HFShowerParam.h:52
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
std::maps an index to a DDValue. The index corresponds to the index assigned to the name of the std::...
Definition: DDsvalues.h:19
bool isAvailable() const
Definition: Service.h:47
HFGflash * gflash
Definition: HFShowerParam.h:53
std::vector< double > getDDDArray(const std::string &, const DDsvalues_type &)
double ref_index
Definition: HFShowerParam.h:54
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
TH1F * em_long_gflash
Definition: HFShowerParam.h:60
TH1F * em_long_sl
Definition: HFShowerParam.h:61
TH1F * em_long_1
Definition: HFShowerParam.h:59
TH1F * em_long_1_tuned
Definition: HFShowerParam.h:60
TH1F * em_lateral_1
Definition: HFShowerParam.h:59
T * make() const
make new ROOT object
void setCriteria(const DDValue &nameVal, comp_op, log_op l=AND, bool asString=true, bool merged=true)
Definition: DDFilter.cc:285
TH1F * em_long_2
Definition: HFShowerParam.h:59
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.
Definition: DDFilter.h:37
HFShowerParam::~HFShowerParam ( )
virtual

Definition at line 113 of file HFShowerParam.cc.

References fibre, gflash, and showerLibrary.

113  {
114  if (fibre) delete fibre;
115  if (gflash) delete gflash;
116  if (showerLibrary) delete showerLibrary;
117 }
HFShowerLibrary * showerLibrary
Definition: HFShowerParam.h:51
HFFibre * fibre
Definition: HFShowerParam.h:52
HFGflash * gflash
Definition: HFShowerParam.h:53

Member Function Documentation

std::vector< double > HFShowerParam::getDDDArray ( const std::string &  str,
const DDsvalues_type sv 
)
private

Definition at line 416 of file HFShowerParam.cc.

References DDfetch(), DDValue::doubles(), edm::hlt::Exception, LogDebug, and relativeConstraints::value.

Referenced by HFShowerParam().

418 {
419 #ifdef DebugLog
420  LogDebug("HFShower") << "HFShowerParam:getDDDArray called for " << str;
421 #endif
422  DDValue value(str);
423  if (DDfetch(&sv,value))
424  {
425 #ifdef DebugLog
426  LogDebug("HFShower") << value;
427 #endif
428  const std::vector<double> & fvec = value.doubles();
429  int nval = fvec.size();
430  if (nval < 2) {
431  edm::LogError("HFShower") << "HFShowerParam : # of " << str
432  << " bins " << nval << " < 2 ==> illegal";
433  throw cms::Exception("Unknown", "HFShowerParam") << "nval < 2 for array "
434  << str << "\n";
435  }
436  return fvec;
437  } else {
438  edm::LogError("HFShower") << "HFShowerParam : cannot get array " << str;
439  throw cms::Exception("Unknown", "HFShowerParam") << "cannot get array "
440  << str << "\n";
441  }
442 }
#define LogDebug(id)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:102
std::vector< HFShowerParam::Hit > HFShowerParam::getHits ( G4Step *  aStep,
double  weight 
)

Definition at line 130 of file HFShowerParam.cc.

References abs, aperture, applyFidCut, attLMeanInv, gather_cfg::cout, 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, emPDG, epPDG, create_public_lumi_plots::exp, fibre, fillHisto, gammaPDG, HFShowerLibrary::getHits(), GetVolume(), gflash, HFGflash::gfParameterization(), gpar, hzvem, hzvhad, i, cuy::ii, convertSQLiteXML::ok, onlyLong, parametrizeLast, getHLTPrescaleColumns::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, cond::rpcobgas::time, trackEM, HFFibre::tShift(), histoStyle::weight, detailsBasic3DVector::z, and HFFibre::zShift().

Referenced by HCalSD::getFromParam().

131  {
132  G4StepPoint * preStepPoint = aStep->GetPreStepPoint();
133  G4Track * track = aStep->GetTrack();
134  G4ThreeVector hitPoint = preStepPoint->GetPosition();
135  G4int particleCode = track->GetDefinition()->GetPDGEncoding();
136  double zv = std::abs(hitPoint.z()) - gpar[4] - 0.5*gpar[1];
137  G4ThreeVector localPoint = G4ThreeVector(hitPoint.x(),hitPoint.y(),zv);
138 
139  double pin = (preStepPoint->GetTotalEnergy())/GeV;
140  double zint = hitPoint.z();
141  double zz = std::abs(zint) - gpar[4];
142 
143 #ifdef DebugLog
144  edm::LogInfo("HFShower") << "HFShowerParam: getHits "
145  << track->GetDefinition()->GetParticleName()
146  << " of energy " << pin << " GeV"
147  << " Pos x,y,z = " << hitPoint.x() << ","
148  << hitPoint.y() << "," << zint << " (" << zz << ","
149  << localPoint.z() << ", "
150  << (localPoint.z()+0.5*gpar[1]) << ") Local "
151  << localPoint;
152 #endif
153  std::vector<HFShowerParam::Hit> hits;
155  hit.position = hitPoint;
156 
157  // look for other charged particles
158  bool other = false;
159  double pBeta = track->GetDynamicParticle()->GetTotalMomentum() / track->GetDynamicParticle()->GetTotalEnergy();
160  double dirz = (track->GetDynamicParticle()->GetMomentumDirection()).z();
161  if (hitPoint.z() < 0) dirz *= -1.;
162 #ifdef DebugLog
163  edm::LogInfo("HFShower") << "HFShowerParam: getHits Momentum "
164  <<track->GetDynamicParticle()->GetMomentumDirection()
165  << " HitPoint " << hitPoint << " dirz " << dirz;
166 #endif
167  if (particleCode != emPDG && particleCode != epPDG && particleCode != gammaPDG ) {
168  if (track->GetDefinition()->GetPDGCharge() != 0 && pBeta > (1/ref_index) &&
169  aStep->GetTotalEnergyDeposit() > 0) other = true;
170  }
171 
172  // take only e+-/gamma/or special particles
173  if (particleCode == emPDG || particleCode == epPDG ||
174  particleCode == gammaPDG || other) {
175  // Leave out the last part
176  double edep = 0.;
177  bool kill = false;
178  if ((!trackEM) && ((zz<(gpar[1]-gpar[2])) || parametrizeLast) && (!other)){
179  edep = pin;
180  kill = true;
181  } else if ((track->GetDefinition()->GetPDGCharge() != 0) &&
182  (pBeta > (1/ref_index)) && (dirz > aperture)) {
183  edep = (aStep->GetTotalEnergyDeposit())/GeV;
184  }
185  std::string path = "ShowerLibrary";
186 #ifdef DebugLog
187  edm::LogInfo("HFShower") << "HFShowerParam: getHits edep = " << edep
188  << " weight " << weight << " final " <<edep*weight
189  << ", Kill = " << kill << ", pin = " << pin
190  << ", edMin = " << edMin << " Other " << other;
191 #endif
192  edep *= weight;
193  if (edep > 0) {
194  if ((showerLibrary || gflash) && kill && pin > edMin && (!other)) {
195  if (showerLibrary) {
196  std::vector<HFShowerLibrary::Hit> hitSL = showerLibrary->getHits(aStep,kill,weight,onlyLong);
197  for (unsigned int i=0; i<hitSL.size(); i++) {
198  bool ok = true;
199 #ifdef DebugLog
200  edm::LogInfo("HFShower") << "HFShowerParam: getHits applyFidCut = " << applyFidCut;
201 #endif
202  if (applyFidCut) { // @@ For showerlibrary no z-cut for Short (no z)
203  int npmt = HFFibreFiducial:: PMTNumber(hitSL[i].position);
204  if (npmt <= 0) ok = false;
205  }
206  if (ok) {
207  hit.position = hitSL[i].position;
208  hit.depth = hitSL[i].depth;
209  hit.time = hitSL[i].time;
210  hit.edep = 1;
211  hits.push_back(hit);
212 #ifdef plotDebug
213  if (fillHisto) {
214  double zv = std::abs(hit.position.z()) - gpar[4];
215  hzvem->Fill(zv);
216  em_long_sl->Fill(hit.position.z()/cm);
217  double sq = sqrt(pow(hit.position.x()/cm,2)+pow(hit.position.y()/cm,2));
218  double zp = hit.position.z()/cm;
219  if (hit.depth == 1) {
220  em_2d_1->Fill(zp, sq);
221  em_lateral_1->Fill(sq);
222  em_long_1->Fill(zp);
223  } else if (hit.depth == 2) {
224  em_2d_2->Fill(zp, sq);
225  em_lateral_2->Fill(sq);
226  em_long_2->Fill(zp);
227  }
228  }
229 #endif
230 #ifdef DebugLog
231  edm::LogInfo("HFShower") << "HFShowerParam: Hit at depth "
232  << hit.depth << " with edep " << hit.edep
233  << " Time " << hit.time;
234 #endif
235  }
236  }
237  } else { // GFlash clusters with known z
238  std::vector<HFGflash::Hit>hitSL=gflash->gfParameterization(aStep,kill, onlyLong);
239  for (unsigned int i=0; i<hitSL.size(); ++i) {
240  bool ok = true;
241  G4ThreeVector pe_effect(hitSL[i].position.x(), hitSL[i].position.y(),
242  hitSL[i].position.z());
243  double zv = std::abs(pe_effect.z()) - gpar[4];
244  //depth
245  int depth = 1;
246  int npmt = 0;
247  if (zv < 0. || zv > gpar[1]) {
248 #ifdef mkdebug
249  std::cout<<"-#Zcut-HFShowerParam::getHits:z="<<zv<<",m="<<gpar[1]<<std::endl;
250 #endif
251  ok = false;
252  }
253  if (ok && applyFidCut) {
254  npmt = HFFibreFiducial:: PMTNumber(pe_effect);
255 #ifdef DebugLog
256  edm::LogInfo("HFShower") << "HFShowerParam::getHits:#PMT= "
257  << npmt << ",z = " << zv;
258 #endif
259  if (npmt <= 0) {
260 #ifdef DebugLog
261  edm::LogInfo("HFShower") << "-#PMT=0 cut-HFShowerParam::"
262  << "getHits: npmt = " << npmt;
263 #endif
264  ok = false;
265  } else if (npmt > 24) { // a short fibre
266  if (zv > gpar[0]) {
267  depth = 2;
268  } else {
269 #ifdef DebugLog
270  edm::LogInfo("HFShower") << "-SHORT cut-HFShowerParam::"
271  << "getHits:zMin=" << gpar[0];
272 #endif
273  ok = false;
274  }
275  }
276 #ifdef DebugLog
277  edm::LogInfo("HFShower") << "HFShowerParam: npmt " << npmt
278  << " zv " << std::abs(pe_effect.z())
279  << ":" << gpar[4] << ":" << zv << ":"
280  << gpar[0] << " ok " << ok << " depth "
281  << depth;
282 #endif
283  } else {
284  if (G4UniformRand() > 0.5) depth = 2;
285  if (depth == 2 && zv < gpar[0]) ok = false;
286  }
287  //attenuation
288  double dist = fibre->zShift(localPoint,depth,0); // distance to PMT
289  double r1 = G4UniformRand();
290 #ifdef DebugLog
291  edm::LogInfo("HFShower") << "HFShowerParam:Distance to PMT (" <<npmt
292  << ") " << dist << ", exclusion flag "
293  << (r1 > exp(-attLMeanInv*zv));
294 #endif
295  if (r1 > exp(-attLMeanInv*dist)) ok = false;
296  if (ok) {
297  double r2 = G4UniformRand();
298 #ifdef DebugLog
299  edm::LogInfo("HFShower") << "HFShowerParam:Extra exclusion "
300  << r2 << ">" << weight << " "
301  << (r2 > weight);
302 #endif
303  if (r2 < weight) {
304  double time = fibre->tShift(localPoint,depth,0);
305 
306  hit.position = hitSL[i].position;
307  hit.depth = depth;
308  hit.time = time + hitSL[i].time;
309  hit.edep = 1;
310  hits.push_back(hit);
311 #ifdef plotDebug
312  if (fillHisto) {
313  em_long_gflash->Fill(pe_effect.z()/cm, hitSL[i].edep);
314  hzvem->Fill(zv);
315  double sq = sqrt(pow(hit.position.x()/cm,2)+pow(hit.position.y()/cm,2));
316  double zp = hit.position.z()/cm;
317  if (hit.depth == 1) {
318  em_2d_1->Fill(zp, sq);
319  em_lateral_1->Fill(s);
320  em_long_1->Fill(zp);
321  } else if (hit.depth == 2) {
322  em_2d_2->Fill(zp, sq);
323  em_lateral_2->Fill(sq);
324  em_long_2->Fill(zp);
325  }
326  }
327 #endif
328 #ifdef DebugLog
329  edm::LogInfo("HFShower") << "HFShowerParam: Hit at depth "
330  << hit.depth << " with edep "
331  << hit.edep << " Time " << hit.time;
332 #endif
333  }
334  }
335  }
336  }
337  } else {
338  path = "Rest";
339  edep *= pePerGeV;
340  double tSlice = (aStep->GetPostStepPoint()->GetGlobalTime());
341  double time = fibre->tShift(localPoint,1,0); // remaining part
342  bool ok = true;
343  if (applyFidCut) { // @@ For showerlibrary no z-cut for Short (no z)
344  int npmt = HFFibreFiducial:: PMTNumber(hitPoint);
345  if (npmt <= 0) ok = false;
346  }
347 #ifdef DebugLog
348  edm::LogInfo("HFShower") << "HFShowerParam: getHits hitPoint " << hitPoint << " flag " << ok;
349 #endif
350  if (ok) {
351  hit.depth = 1;
352  hit.time = tSlice+time;
353  hit.edep = edep;
354  hits.push_back(hit);
355 #ifdef DebugLog
356  edm::LogInfo("HFShower") << "HFShowerParam: Hit at depth 1 with edep "
357  << edep << " Time " << tSlice << ":" << time
358  << ":" << hit.time;
359 #endif
360 #ifdef plotDebug
361  double zv = std::abs(hitPoint.z()) - gpar[4];
362  if (fillHisto) {
363  hzvhad->Fill(zv);
364  }
365 #endif
366  if (zz >= gpar[0]) {
367  time = fibre->tShift(localPoint,2,0);
368  hit.depth = 2;
369  hit.time = tSlice+time;
370  hits.push_back(hit);
371 #ifdef DebugLog
372  edm::LogInfo("HFShower") <<"HFShowerParam: Hit at depth 2 with edep "
373  << edep << " Time " << tSlice << ":" << time
374  << hit.time;
375 #endif
376 #ifdef plotDebug
377  if (fillHisto) {
378  hzvhad->Fill(zv);
379  }
380 #endif
381  }
382  }
383  }
384 #ifdef DebugLog
385  for (unsigned int ii=0; ii<hits.size(); ++ii) {
386  double zv = std::abs(hits[ii].position.z());
387  if (zv > 12790) edm::LogInfo("HFShower")<< "HFShowerParam: Abnormal hit along "
388  << path << " in "
389  << preStepPoint->GetPhysicalVolume()->GetLogicalVolume()->GetName()
390  << " at " << hits[ii].position << " zz "
391  << zv << " Edep " << edep << " due to "
392  <<track->GetDefinition()->GetParticleName()
393  << " time " << hit.time;
394  }
395 #endif
396  if (kill) {
397  track->SetTrackStatus(fStopAndKill);
398  G4TrackVector tv = *(aStep->GetSecondary());
399  for (unsigned int kk=0; kk<tv.size(); ++kk) {
400  if (tv[kk]->GetVolume() == preStepPoint->GetPhysicalVolume())
401  tv[kk]->SetTrackStatus(fStopAndKill);
402  }
403  }
404 #ifdef DebugLog
405  edm::LogInfo("HFShower") << "HFShowerParam: getHits kill (" << kill
406  << ") track " << track->GetTrackID()
407  << " at " << hitPoint
408  << " and deposit " << edep << " " << hits.size()
409  << " times" << " ZZ " << zz << " " << gpar[0];
410 #endif
411  }
412  }
413  return hits;
414 }
std::vector< Hit > gfParameterization(G4Step *aStep, bool &ok, bool onlyLong=false)
Definition: HFGflash.cc:88
double attLMeanInv
Definition: HFShowerParam.h:54
int i
Definition: DBlmapReader.cc:9
bool parametrizeLast
Definition: HFShowerParam.h:55
static int PMTNumber(G4ThreeVector pe_effect)
std::vector< Hit > getHits(G4Step *aStep, bool &ok, double weight, bool onlyLong=false)
std::vector< double > gpar
Definition: HFShowerParam.h:57
#define abs(x)
Definition: mlp_lapack.h:159
HFShowerLibrary * showerLibrary
Definition: HFShowerParam.h:51
int ii
Definition: cuy.py:588
TH1F * em_lateral_2
Definition: HFShowerParam.h:59
HFFibre * fibre
Definition: HFShowerParam.h:52
float float float z
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
double zShift(G4ThreeVector point, int depth, int fromEndAbs=0)
Definition: HFFibre.cc:143
T sqrt(T t)
Definition: SSEVec.h:48
double tShift(G4ThreeVector point, int depth, int fromEndAbs=0)
Definition: HFFibre.cc:131
HFGflash * gflash
Definition: HFShowerParam.h:53
G4ThreeVector position
Definition: HFShowerParam.h:38
static const G4LogicalVolume * GetVolume(const std::string &name)
double ref_index
Definition: HFShowerParam.h:54
TH1F * em_long_gflash
Definition: HFShowerParam.h:60
TH1F * em_long_sl
Definition: HFShowerParam.h:61
TH1F * em_long_1
Definition: HFShowerParam.h:59
TH1F * em_lateral_1
Definition: HFShowerParam.h:59
tuple cout
Definition: gather_cfg.py:121
TH1F * em_long_2
Definition: HFShowerParam.h:59
int weight
Definition: histoStyle.py:50
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
void HFShowerParam::initRun ( G4ParticleTable *  theParticleTable)

Definition at line 119 of file HFShowerParam.cc.

References emPDG, epPDG, gammaPDG, HFShowerLibrary::initRun(), and showerLibrary.

Referenced by HCalSD::initRun().

119  {
120  emPDG = theParticleTable->FindParticle("e-")->GetPDGEncoding();
121  epPDG = theParticleTable->FindParticle("e+")->GetPDGEncoding();
122  gammaPDG = theParticleTable->FindParticle("gamma")->GetPDGEncoding();
123 #ifdef DebugLog
124  edm::LogInfo("HFShower") << "HFShowerParam: Particle code for e- = " << emPDG
125  << " for e+ = " << epPDG << " for gamma = " << gammaPDG;
126 #endif
127  if (showerLibrary) showerLibrary->initRun(theParticleTable);
128 }
HFShowerLibrary * showerLibrary
Definition: HFShowerParam.h:51
void initRun(G4ParticleTable *theParticleTable)

Member Data Documentation

double HFShowerParam::aperture
private

Definition at line 54 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

bool HFShowerParam::applyFidCut
private

Definition at line 55 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

double HFShowerParam::attLMeanInv
private

Definition at line 54 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

double HFShowerParam::edMin
private

Definition at line 54 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH2F* HFShowerParam::em_2d_1
private

Definition at line 62 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH2F * HFShowerParam::em_2d_2
private

Definition at line 62 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F * HFShowerParam::em_lateral_1
private

Definition at line 59 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F * HFShowerParam::em_lateral_2
private

Definition at line 59 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F* HFShowerParam::em_long_1
private

Definition at line 59 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F * HFShowerParam::em_long_1_tuned
private

Definition at line 60 of file HFShowerParam.h.

Referenced by HFShowerParam().

TH1F * HFShowerParam::em_long_2
private

Definition at line 59 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F * HFShowerParam::em_long_gflash
private

Definition at line 60 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F* HFShowerParam::em_long_sl
private

Definition at line 61 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

G4int HFShowerParam::emPDG
private

Definition at line 56 of file HFShowerParam.h.

Referenced by getHits(), and initRun().

G4int HFShowerParam::epPDG
private

Definition at line 56 of file HFShowerParam.h.

Referenced by getHits(), and initRun().

HFFibre* HFShowerParam::fibre
private

Definition at line 52 of file HFShowerParam.h.

Referenced by getHits(), HFShowerParam(), and ~HFShowerParam().

bool HFShowerParam::fillHisto
private

Definition at line 58 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

G4int HFShowerParam::gammaPDG
private

Definition at line 56 of file HFShowerParam.h.

Referenced by getHits(), and initRun().

HFGflash* HFShowerParam::gflash
private

Definition at line 53 of file HFShowerParam.h.

Referenced by getHits(), HFShowerParam(), and ~HFShowerParam().

std::vector<double> HFShowerParam::gpar
private

Definition at line 57 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F* HFShowerParam::hzvem
private

Definition at line 60 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

TH1F * HFShowerParam::hzvhad
private

Definition at line 60 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

bool HFShowerParam::onlyLong
private

Definition at line 55 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

bool HFShowerParam::parametrizeLast
private

Definition at line 55 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

double HFShowerParam::pePerGeV
private

Definition at line 54 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

double HFShowerParam::ref_index
private

Definition at line 54 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().

HFShowerLibrary* HFShowerParam::showerLibrary
private

Definition at line 51 of file HFShowerParam.h.

Referenced by getHits(), HFShowerParam(), initRun(), and ~HFShowerParam().

bool HFShowerParam::trackEM
private

Definition at line 55 of file HFShowerParam.h.

Referenced by getHits(), and HFShowerParam().