CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonSimHitProducer Class Reference
Inheritance diagram for MuonSimHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 MuonSimHitProducer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Private Member Functions

void applyMaterialEffects (TrajectoryStateOnSurface &tsosWithdEdx, TrajectoryStateOnSurface &tsos, double radPath, RandomEngineAndDistribution const *, HepPDT::ParticleDataTable const &)
 Simulate material effects in iron (dE/dx, multiple scattering) More...
 
void beginRun (edm::Run const &run, const edm::EventSetup &es) override
 
void produce (edm::Event &, const edm::EventSetup &) override
 
void readParameters (const edm::ParameterSet &, const edm::ParameterSet &, const edm::ParameterSet &)
 

Private Attributes

const CSCGeometrycscGeom
 
bool doGL_
 
bool doL1_
 
bool doL3_
 
const DTGeometrydtGeom
 
double fCSC
 
double fDT
 
bool fullPattern_
 
double kCSC
 
double kDT
 
const MagneticFieldmagfield
 
const PropagatorpropagatorWithMaterial
 
std::unique_ptr< PropagatorpropagatorWithoutMaterial
 
const RPCGeometryrpcGeom
 
edm::InputTag simMuonLabel
 
edm::EDGetTokenT< std::vector< SimTrack > > simMuonToken
 
edm::InputTag simVertexLabel
 
edm::EDGetTokenT< std::vector< SimVertex > > simVertexToken
 
Chi2MeasurementEstimator theEstimator
 
std::unique_ptr< MaterialEffectstheMaterialEffects
 
MuonServiceProxytheService
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Description: Fast simulation producer of Muon Sim Hits (to be used for realistic Muon reconstruction)

Implementation: <Notes on="" implementation>="">

Definition at line 51 of file MuonSimHitProducer.cc.

Constructor & Destructor Documentation

◆ MuonSimHitProducer()

MuonSimHitProducer::MuonSimHitProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 104 of file MuonSimHitProducer.cc.

105  : theEstimator(iConfig.getParameter<double>("Chi2EstimatorCut")), propagatorWithoutMaterial(nullptr) {
106  // Read relevant parameters
108  iConfig.getParameter<edm::ParameterSet>("TRACKS"),
109  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuons"));
110 
111  //
112  // register your products ... need to declare at least one possible product...
113  //
114  produces<edm::PSimHitContainer>("MuonCSCHits");
115  produces<edm::PSimHitContainer>("MuonDTHits");
116  produces<edm::PSimHitContainer>("MuonRPCHits");
117 
118  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
119  theService = new MuonServiceProxy(serviceParameters, consumesCollector(), MuonServiceProxy::UseEventSetupIn::Run);
120 
121  // consumes
122  simMuonToken = consumes<std::vector<SimTrack> >(simMuonLabel);
123  simVertexToken = consumes<std::vector<SimVertex> >(simVertexLabel);
124 }

References edm::ParameterSet::getParameter(), MuonServiceProxy_cff::MuonServiceProxy, readParameters(), MuonServiceProxy::Run, simMuonLabel, simMuonToken, simVertexLabel, simVertexToken, and theService.

Member Function Documentation

◆ applyMaterialEffects()

void MuonSimHitProducer::applyMaterialEffects ( TrajectoryStateOnSurface tsosWithdEdx,
TrajectoryStateOnSurface tsos,
double  radPath,
RandomEngineAndDistribution const *  random,
HepPDT::ParticleDataTable const &  table 
)
private

Simulate material effects in iron (dE/dx, multiple scattering)

Definition at line 555 of file MuonSimHitProducer.cc.

559  {
560  // The energy loss simulator
561  EnergyLossSimulator* energyLoss = theMaterialEffects->energyLossSimulator();
562 
563  // The multiple scattering simulator
564  MultipleScatteringSimulator* multipleScattering = theMaterialEffects->multipleScatteringSimulator();
565 
566  // The Muon Bremsstrahlung simulator
567  MuonBremsstrahlungSimulator* bremsstrahlung = theMaterialEffects->muonBremsstrahlungSimulator();
568 
569  // Initialize the Particle position, momentum and energy
570  const Surface& nextSurface = tsos.surface();
571  GlobalPoint gPos = energyLoss ? tsos.globalPosition() : tsosWithdEdx.globalPosition();
572  GlobalVector gMom = energyLoss ? tsos.globalMomentum() : tsosWithdEdx.globalMomentum();
573  double mu = 0.1056583692;
574  double en = std::sqrt(gMom.mag2() + mu * mu);
575 
576  // And now create the Particle
577  XYZTLorentzVector position(gPos.x(), gPos.y(), gPos.z(), 0.);
578  XYZTLorentzVector momentum(gMom.x(), gMom.y(), gMom.z(), en);
579  float charge = (float)(tsos.charge());
580  ParticlePropagator theMuon(rawparticle::makeMuon(charge < 1., momentum, position), nullptr, nullptr, &table);
581 
582  // Recompute the energy loss to get the fluctuations
583  if (energyLoss) {
584  // Difference between with and without dE/dx (average only)
585  // (for corrections once fluctuations are applied)
586  GlobalPoint gPosWithdEdx = tsosWithdEdx.globalPosition();
587  GlobalVector gMomWithdEdx = tsosWithdEdx.globalMomentum();
588  double enWithdEdx = std::sqrt(gMomWithdEdx.mag2() + mu * mu);
589  XYZTLorentzVector deltaPos(
590  gPosWithdEdx.x() - gPos.x(), gPosWithdEdx.y() - gPos.y(), gPosWithdEdx.z() - gPos.z(), 0.);
591  XYZTLorentzVector deltaMom(
592  gMomWithdEdx.x() - gMom.x(), gMomWithdEdx.y() - gMom.y(), gMomWithdEdx.z() - gMom.z(), enWithdEdx - en);
593 
594  // Energy loss in iron (+ fluctuations)
595  energyLoss->updateState(theMuon, radPath, random);
596 
597  // Correcting factors to account for slight differences in material descriptions
598  // (Material description is more accurate in the stepping helix propagator)
599  radPath *= -deltaMom.E() / energyLoss->mostLikelyLoss();
600  double fac = energyLoss->deltaMom().E() / energyLoss->mostLikelyLoss();
601 
602  // Particle momentum & position after energy loss + fluctuation
603  XYZTLorentzVector theNewMomentum = theMuon.particle().momentum() + energyLoss->deltaMom() + fac * deltaMom;
604  XYZTLorentzVector theNewPosition = theMuon.particle().vertex() + fac * deltaPos;
605  fac = (theNewMomentum.E() * theNewMomentum.E() - mu * mu) / theNewMomentum.Vect().Mag2();
606  fac = fac > 0. ? std::sqrt(fac) : 1E-9;
607  theMuon.particle().setMomentum(
608  theNewMomentum.Px() * fac, theNewMomentum.Py() * fac, theNewMomentum.Pz() * fac, theNewMomentum.E());
609  theMuon.particle().setVertex(theNewPosition);
610  }
611 
612  // Does the actual mutliple scattering
613  if (multipleScattering) {
614  // Pass the vector normal to the "next" surface
615  GlobalVector normal = nextSurface.tangentPlane(tsos.globalPosition())->normalVector();
616  multipleScattering->setNormalVector(normal);
617  // Compute the amount of multiple scattering after a given path length
618  multipleScattering->updateState(theMuon, radPath, random);
619  }
620 
621  // Muon Bremsstrahlung
622  if (bremsstrahlung) {
623  // Compute the amount of Muon Bremsstrahlung after given path length
624  bremsstrahlung->updateState(theMuon, radPath, random);
625  }
626 
627  // Fill the propagated state
628  GlobalPoint propagatedPosition(theMuon.particle().X(), theMuon.particle().Y(), theMuon.particle().Z());
629  GlobalVector propagatedMomentum(theMuon.particle().Px(), theMuon.particle().Py(), theMuon.particle().Pz());
630  GlobalTrajectoryParameters propagatedGtp(propagatedPosition, propagatedMomentum, (int)charge, magfield);
631  tsosWithdEdx = TrajectoryStateOnSurface(propagatedGtp, nextSurface);
632 }

References fastSimProducer_cff::bremsstrahlung, ALCARECOTkAlJpsiMuMu_cff::charge, TrajectoryStateOnSurface::charge(), fastSimProducer_cff::energyLoss, dqmMemoryStats::float, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), PV3DBase< T, PVType, FrameType >::mag2(), magfield, rawparticle::makeMuon(), RawParticle::momentum(), amptDefaultParameters_cff::mu, fastSimProducer_cff::multipleScattering, BaseParticlePropagator::particle(), position, RawParticle::Px(), RawParticle::Py(), RawParticle::Pz(), RawParticle::setMomentum(), RawParticle::setVertex(), mathSSE::sqrt(), TrajectoryStateOnSurface::surface(), TableParser::table, Surface::tangentPlane(), theMaterialEffects, RawParticle::vertex(), PV3DBase< T, PVType, FrameType >::x(), RawParticle::X(), PV3DBase< T, PVType, FrameType >::y(), RawParticle::Y(), PV3DBase< T, PVType, FrameType >::z(), and RawParticle::Z().

Referenced by produce().

◆ beginRun()

void MuonSimHitProducer::beginRun ( edm::Run const &  run,
const edm::EventSetup es 
)
overrideprivate

Definition at line 127 of file MuonSimHitProducer.cc.

127  {
128  //services
130  edm::ESHandle<DTGeometry> dtGeometry;
131  edm::ESHandle<CSCGeometry> cscGeometry;
132  edm::ESHandle<RPCGeometry> rpcGeometry;
134 
135  es.get<IdealMagneticFieldRecord>().get(magField);
136  es.get<MuonGeometryRecord>().get("MisAligned", dtGeometry);
137  es.get<MuonGeometryRecord>().get("MisAligned", cscGeometry);
138  es.get<MuonGeometryRecord>().get(rpcGeometry);
139 
140  magfield = &(*magField);
141  dtGeom = &(*dtGeometry);
142  cscGeom = &(*cscGeometry);
143  rpcGeom = &(*rpcGeometry);
144 
145  bool duringEvent = false;
146  theService->update(es, duringEvent);
147 
148  // A few propagators
149  propagatorWithMaterial = &(*(theService->propagator("SteppingHelixPropagatorAny")));
151  SteppingHelixPropagator* SHpropagator =
152  dynamic_cast<SteppingHelixPropagator*>(propagatorWithoutMaterial.get()); // Beuark!
153  SHpropagator->setMaterialMode(true); // switches OFF material effects;
154 }

References Propagator::clone(), cscGeom, dtGeom, edm::EventSetup::get(), get, magfield, TrackCandidateProducer_cfi::propagator, MuonServiceProxy::propagator(), propagatorWithMaterial, propagatorWithoutMaterial, rpcGeom, SteppingHelixPropagator::setMaterialMode(), theService, and MuonServiceProxy::update().

◆ produce()

void MuonSimHitProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 162 of file MuonSimHitProducer.cc.

162  {
163  // using namespace edm;
164  // using namespace std;
166  iSetup.getData(pdg);
167 
168  RandomEngineAndDistribution random(iEvent.streamID());
169 
170  MuonPatternRecoDumper dumper;
171 
174  std::vector<PSimHit> theCSCHits;
175  std::vector<PSimHit> theDTHits;
176  std::vector<PSimHit> theRPCHits;
177 
179  iEvent.getByToken(simMuonToken, simMuons);
180  iEvent.getByToken(simVertexToken, simVertices);
181 
182  for (unsigned int itrk = 0; itrk < simMuons->size(); itrk++) {
183  const SimTrack& mySimTrack = (*simMuons)[itrk];
184  math::XYZTLorentzVector mySimP4(
185  mySimTrack.momentum().x(), mySimTrack.momentum().y(), mySimTrack.momentum().z(), mySimTrack.momentum().t());
186 
187  // Decaying hadrons are now in the list, and so are their muon daughter
188  // Ignore the hadrons here.
189  int pid = mySimTrack.type();
190  if (abs(pid) != 13 && abs(pid) != 1000024)
191  continue;
192  double t0 = 0;
193  GlobalPoint initialPosition;
194  int ivert = mySimTrack.vertIndex();
195  if (ivert >= 0) {
196  t0 = (*simVertices)[ivert].position().t();
197  GlobalPoint xyzzy((*simVertices)[ivert].position().x(),
198  (*simVertices)[ivert].position().y(),
199  (*simVertices)[ivert].position().z());
200  initialPosition = xyzzy;
201  }
202  //
203  // Presumably t0 has dimensions of cm if not mm?
204  // Convert to ns for internal calculations.
205  // I wonder where we should get c from?
206  //
207  double tof = t0 / 29.98;
208 
209 #ifdef FAMOS_DEBUG
210  std::cout << " ===> MuonSimHitProducer::reconstruct() found SIMTRACK - pid = " << pid;
211  std::cout << " : pT = " << mySimP4.Pt() << ", eta = " << mySimP4.Eta() << ", phi = " << mySimP4.Phi() << std::endl;
212 #endif
213 
214  //
215  // Produce muons sim hits starting from undecayed simulated muons
216  //
217 
218  GlobalPoint startingPosition(mySimTrack.trackerSurfacePosition().x(),
219  mySimTrack.trackerSurfacePosition().y(),
220  mySimTrack.trackerSurfacePosition().z());
221  GlobalVector startingMomentum(mySimTrack.trackerSurfaceMomentum().x(),
222  mySimTrack.trackerSurfaceMomentum().y(),
223  mySimTrack.trackerSurfaceMomentum().z());
224  //
225  // Crap... there's no time-of-flight to the trackerSurfacePosition()...
226  // So, this will be wrong when the curvature can't be neglected, but that
227  // will be rather seldom... May as well ignore the mass too.
228  //
229  GlobalVector dtracker = startingPosition - initialPosition;
230  tof += dtracker.mag() / 29.98;
231 
232 #ifdef FAMOS_DEBUG
233  std::cout << " the Muon START position " << startingPosition << std::endl;
234  std::cout << " the Muon START momentum " << startingMomentum << std::endl;
235 #endif
236 
237  //
238  // Some magic to define a TrajectoryStateOnSurface
239  //
240  PlaneBuilder pb;
241  GlobalVector zAxis = startingMomentum.unit();
242  GlobalVector yAxis(zAxis.y(), -zAxis.x(), 0);
243  GlobalVector xAxis = yAxis.cross(zAxis);
245  PlaneBuilder::ReturnType startingPlane = pb.plane(startingPosition, rot);
246  GlobalTrajectoryParameters gtp(startingPosition, startingMomentum, (int)mySimTrack.charge(), magfield);
247  TrajectoryStateOnSurface startingState(gtp, *startingPlane);
248 
249  std::vector<const DetLayer*> navLayers;
250  if (fabs(startingState.globalMomentum().eta()) > 4.5) {
251  navLayers = navigation.compatibleEndcapLayers(*(startingState.freeState()), alongMomentum);
252  } else {
253  navLayers = navigation.compatibleLayers(*(startingState.freeState()), alongMomentum);
254  }
255  /*
256  edm::ESHandle<Propagator> propagator =
257  theService->propagator("SteppingHelixPropagatorAny");
258  */
259 
260  if (navLayers.empty())
261  continue;
262 
263 #ifdef FAMOS_DEBUG
264  std::cout << "Found " << navLayers.size() << " compatible DetLayers..." << std::endl;
265 #endif
266 
267  TrajectoryStateOnSurface propagatedState = startingState;
268  for (unsigned int ilayer = 0; ilayer < navLayers.size(); ilayer++) {
269 #ifdef FAMOS_DEBUG
270  std::cout << "Propagating to layer " << ilayer << " " << dumper.dumpLayer(navLayers[ilayer]) << std::endl;
271 #endif
272 
273  std::vector<DetWithState> comps =
274  navLayers[ilayer]->compatibleDets(propagatedState, *propagatorWithMaterial, theEstimator);
275  if (comps.empty())
276  continue;
277 
278 #ifdef FAMOS_DEBUG
279  std::cout << "Propagating " << propagatedState << std::endl;
280 #endif
281 
282  // Starting momentum
283  double pi = propagatedState.globalMomentum().mag();
284 
285  // Propagate with material effects (dE/dx average only)
286  SteppingHelixStateInfo shsStart(*(propagatedState.freeTrajectoryState()));
287  SteppingHelixStateInfo shsDest;
289  ->propagate(shsStart, navLayers[ilayer]->surface(), shsDest);
290  std::pair<TrajectoryStateOnSurface, double> next(shsDest.getStateOnSurface(navLayers[ilayer]->surface()),
291  shsDest.path());
292  // No need to continue if there is no valid propagation available.
293  // This happens rarely (~0.1% of ttbar events)
294  if (!next.first.isValid())
295  continue;
296  // This is the estimate of the number of radiation lengths traversed,
297  // together with the total path length
298  double radPath = shsDest.radPath();
299  double pathLength = next.second;
300 
301  // Now propagate without dE/dx (average)
302  // [To add the dE/dx fluctuations to the actual dE/dx]
303  std::pair<TrajectoryStateOnSurface, double> nextNoMaterial =
304  propagatorWithoutMaterial->propagateWithPath(propagatedState, navLayers[ilayer]->surface());
305 
306  // Update the propagated state
307  propagatedState = next.first;
308  double pf = propagatedState.globalMomentum().mag();
309 
310  // Insert dE/dx fluctuations and multiple scattering
311  // Skip this step if nextNoMaterial.first is not valid
312  // This happens rarely (~0.02% of ttbar events)
313  if (theMaterialEffects && nextNoMaterial.first.isValid())
314  applyMaterialEffects(propagatedState, nextNoMaterial.first, radPath, &random, *pdg);
315  // Check that the 'shaken' propagatedState is still valid, otherwise continue
316  if (!propagatedState.isValid())
317  continue;
318  // (No evidence that this ever happens)
319  //
320  // Consider this... 1 GeV muon has a velocity that is only 0.5% slower than c...
321  // We probably can safely ignore the mass for anything that makes it out to the
322  // muon chambers.
323  //
324  double pavg = 0.5 * (pi + pf);
325  double m = mySimP4.M();
326  double rbeta = sqrt(1 + m * m / (pavg * pavg)) / 29.98;
327  double dtof = pathLength * rbeta;
328 
329 #ifdef FAMOS_DEBUG
330  std::cout << "Propagated to next surface... path length = " << pathLength << " cm, dTOF = " << dtof << " ns"
331  << std::endl;
332 #endif
333 
334  tof += dtof;
335 
336  for (unsigned int icomp = 0; icomp < comps.size(); icomp++) {
337  const GeomDet* gd = comps[icomp].first;
338  if (gd->subDetector() == GeomDetEnumerators::DT) {
340  const DTChamber* chamber = dtGeom->chamber(id);
341  std::vector<const DTSuperLayer*> superlayer = chamber->superLayers();
342  for (unsigned int isl = 0; isl < superlayer.size(); isl++) {
343  std::vector<const DTLayer*> layer = superlayer[isl]->layers();
344  for (unsigned int ilayer = 0; ilayer < layer.size(); ilayer++) {
345  DTLayerId lid = layer[ilayer]->id();
346 #ifdef FAMOS_DEBUG
347  std::cout << " Extrapolated to DT (" << lid.wheel() << "," << lid.station() << "," << lid.sector()
348  << "," << lid.superlayer() << "," << lid.layer() << ")" << std::endl;
349 #endif
350 
351  const GeomDetUnit* det = dtGeom->idToDetUnit(lid);
352 
353  HelixArbitraryPlaneCrossing crossing(propagatedState.globalPosition().basicVector(),
354  propagatedState.globalMomentum().basicVector(),
355  propagatedState.transverseCurvature(),
356  anyDirection);
357  std::pair<bool, double> path = crossing.pathLength(det->surface());
358  if (!path.first)
359  continue;
360  LocalPoint lpos = det->toLocal(GlobalPoint(crossing.position(path.second)));
361  if (!det->surface().bounds().inside(lpos))
362  continue;
363  const DTTopology& dtTopo = layer[ilayer]->specificTopology();
364  int wire = dtTopo.channel(lpos);
365  if (wire - dtTopo.firstChannel() < 0 || wire - dtTopo.lastChannel() > 0)
366  continue;
367  // no drift cell here (on the chamber edge or just outside)
368  // this hit would otherwise be discarded downstream in the digitizer
369 
370  DTWireId wid(lid, wire);
371  double thickness = det->surface().bounds().thickness();
372  LocalVector lmom = det->toLocal(GlobalVector(crossing.direction(path.second)));
373  lmom = lmom.unit() * propagatedState.localMomentum().mag();
374 
375  // Factor that takes into account the (rec)hits lost because of delta's, etc.:
376  // (Not fully satisfactory patch, but it seems to work...)
377  double pmu = lmom.mag();
378  double theDTHitIneff = pmu > 0 ? exp(kDT * log(pmu) + fDT) : 0.;
379  if (random.flatShoot() < theDTHitIneff)
380  continue;
381 
382  double eloss = 0;
383  double pz = fabs(lmom.z());
384  LocalPoint entry = lpos - 0.5 * thickness * lmom / pz;
385  LocalPoint exit = lpos + 0.5 * thickness * lmom / pz;
386  double dtof = path.second * rbeta;
387  int trkid = mySimTrack.trackId();
388  unsigned int id = wid.rawId();
389  short unsigned int processType = 2;
390  PSimHit hit(
391  entry, exit, lmom.mag(), tof + dtof, eloss, pid, id, trkid, lmom.theta(), lmom.phi(), processType);
392  theDTHits.push_back(hit);
393  }
394  }
395  } else if (gd->subDetector() == GeomDetEnumerators::CSC) {
396  CSCDetId id(gd->geographicalId());
397  const CSCChamber* chamber = cscGeom->chamber(id);
398  std::vector<const CSCLayer*> layers = chamber->layers();
399  for (unsigned int ilayer = 0; ilayer < layers.size(); ilayer++) {
400  CSCDetId lid = layers[ilayer]->id();
401 
402 #ifdef FAMOS_DEBUG
403  std::cout << " Extrapolated to CSC (" << lid.endcap() << "," << lid.ring() << "," << lid.station() << ","
404  << lid.layer() << ")" << std::endl;
405 #endif
406 
407  const GeomDetUnit* det = cscGeom->idToDetUnit(lid);
408  HelixArbitraryPlaneCrossing crossing(propagatedState.globalPosition().basicVector(),
409  propagatedState.globalMomentum().basicVector(),
410  propagatedState.transverseCurvature(),
411  anyDirection);
412  std::pair<bool, double> path = crossing.pathLength(det->surface());
413  if (!path.first)
414  continue;
415  LocalPoint lpos = det->toLocal(GlobalPoint(crossing.position(path.second)));
416  // For CSCs the Bounds are for chamber frames not gas regions
417  // if ( ! det->surface().bounds().inside(lpos) ) continue;
418  // New function knows where the 'active' volume is:
419  const CSCLayerGeometry* laygeom = layers[ilayer]->geometry();
420  if (!laygeom->inside(lpos))
421  continue;
422  //double thickness = laygeom->thickness(); gives number which is about 20 times too big
423  double thickness = det->surface().bounds().thickness(); // this one works much better...
424  LocalVector lmom = det->toLocal(GlobalVector(crossing.direction(path.second)));
425  lmom = lmom.unit() * propagatedState.localMomentum().mag();
426 
427  // Factor that takes into account the (rec)hits lost because of delta's, etc.:
428  // (Not fully satisfactory patch, but it seems to work...)
429  double pmu = lmom.mag();
430  double theCSCHitIneff = pmu > 0 ? exp(kCSC * log(pmu) + fCSC) : 0.;
431  // Take into account the different geometry in ME11:
432  if (id.station() == 1 && id.ring() == 1)
433  theCSCHitIneff = theCSCHitIneff * 0.442;
434  if (random.flatShoot() < theCSCHitIneff)
435  continue;
436 
437  double eloss = 0;
438  double pz = fabs(lmom.z());
439  LocalPoint entry = lpos - 0.5 * thickness * lmom / pz;
440  LocalPoint exit = lpos + 0.5 * thickness * lmom / pz;
441  double dtof = path.second * rbeta;
442  int trkid = mySimTrack.trackId();
443  unsigned int id = lid.rawId();
444  short unsigned int processType = 2;
445  PSimHit hit(
446  entry, exit, lmom.mag(), tof + dtof, eloss, pid, id, trkid, lmom.theta(), lmom.phi(), processType);
447  theCSCHits.push_back(hit);
448  }
449  } else if (gd->subDetector() == GeomDetEnumerators::RPCBarrel ||
451  RPCDetId id(gd->geographicalId());
452  const RPCChamber* chamber = rpcGeom->chamber(id);
453  std::vector<const RPCRoll*> roll = chamber->rolls();
454  for (unsigned int iroll = 0; iroll < roll.size(); iroll++) {
455  RPCDetId rid = roll[iroll]->id();
456 
457 #ifdef FAMOS_DEBUG
458  std::cout << " Extrapolated to RPC (" << rid.ring() << "," << rid.station() << "," << rid.sector() << ","
459  << rid.subsector() << "," << rid.layer() << "," << rid.roll() << ")" << std::endl;
460 #endif
461 
462  const GeomDetUnit* det = rpcGeom->idToDetUnit(rid);
463  HelixArbitraryPlaneCrossing crossing(propagatedState.globalPosition().basicVector(),
464  propagatedState.globalMomentum().basicVector(),
465  propagatedState.transverseCurvature(),
466  anyDirection);
467  std::pair<bool, double> path = crossing.pathLength(det->surface());
468  if (!path.first)
469  continue;
470  LocalPoint lpos = det->toLocal(GlobalPoint(crossing.position(path.second)));
471  if (!det->surface().bounds().inside(lpos))
472  continue;
473  double thickness = det->surface().bounds().thickness();
474  LocalVector lmom = det->toLocal(GlobalVector(crossing.direction(path.second)));
475  lmom = lmom.unit() * propagatedState.localMomentum().mag();
476  double eloss = 0;
477  double pz = fabs(lmom.z());
478  LocalPoint entry = lpos - 0.5 * thickness * lmom / pz;
479  LocalPoint exit = lpos + 0.5 * thickness * lmom / pz;
480  double dtof = path.second * rbeta;
481  int trkid = mySimTrack.trackId();
482  unsigned int id = rid.rawId();
483  short unsigned int processType = 2;
484  PSimHit hit(
485  entry, exit, lmom.mag(), tof + dtof, eloss, pid, id, trkid, lmom.theta(), lmom.phi(), processType);
486  theRPCHits.push_back(hit);
487  }
488  } else {
489  std::cout << "Extrapolated to unknown subdetector '" << gd->subDetector() << "'..." << std::endl;
490  }
491  }
492  }
493  }
494 
495  std::unique_ptr<edm::PSimHitContainer> pcsc(new edm::PSimHitContainer);
496  int n = 0;
497  for (std::vector<PSimHit>::const_iterator i = theCSCHits.begin(); i != theCSCHits.end(); i++) {
498  pcsc->push_back(*i);
499  n += 1;
500  }
501  iEvent.put(std::move(pcsc), "MuonCSCHits");
502 
503  std::unique_ptr<edm::PSimHitContainer> pdt(new edm::PSimHitContainer);
504  n = 0;
505  for (std::vector<PSimHit>::const_iterator i = theDTHits.begin(); i != theDTHits.end(); i++) {
506  pdt->push_back(*i);
507  n += 1;
508  }
509  iEvent.put(std::move(pdt), "MuonDTHits");
510 
511  std::unique_ptr<edm::PSimHitContainer> prpc(new edm::PSimHitContainer);
512  n = 0;
513  for (std::vector<PSimHit>::const_iterator i = theRPCHits.begin(); i != theRPCHits.end(); i++) {
514  prpc->push_back(*i);
515  n += 1;
516  }
517  iEvent.put(std::move(prpc), "MuonRPCHits");
518 }

References funct::abs(), alongMomentum, anyDirection, applyMaterialEffects(), PV3DBase< T, PVType, FrameType >::basicVector(), Surface::bounds(), relativeConstraints::chamber, RPCGeometry::chamber(), CSCGeometry::chamber(), DTGeometry::chamber(), DTTopology::channel(), CoreSimTrack::charge(), gather_cfg::cout, GeomDetEnumerators::CSC, cscGeom, MuonServiceProxy::detLayerGeometry(), GeomDetEnumerators::DT, dtGeom, CSCDetId::endcap(), mps_splice::entry, beamvalidation::exit(), JetChargeProducer_cfi::exp, fCSC, fDT, DTTopology::firstChannel(), TrajectoryStateOnSurface::freeTrajectoryState(), GeomDet::geographicalId(), edm::EventSetup::getData(), SteppingHelixStateInfo::getStateOnSurface(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), mps_fire::i, triggerObjects_cff::id, RPCGeometry::idToDetUnit(), DTGeometry::idToDetUnit(), CSCGeometry::idToDetUnit(), iEvent, Bounds::inside(), CSCLayerGeometry::inside(), TrajectoryStateOnSurface::isValid(), kCSC, kDT, DTTopology::lastChannel(), DTLayerId::layer(), CSCDetId::layer(), hgcalTopologyTester_cfi::layers, TrajectoryStateOnSurface::localMomentum(), dqm-mbProfile::log, visualization-live-secondInstance_cfg::m, PV3DBase< T, PVType, FrameType >::mag(), magfield, CoreSimTrack::momentum(), eostools::move(), dqmiodumpmetadata::n, GetRecoTauVFromDQM_MC_cff::next, castor_dqm_sourceclient_file_cfg::path, SteppingHelixStateInfo::path(), dileptonTrigSettings_cff::pdg, packedPFCandidateRefMixer_cfi::pf, PV3DBase< T, PVType, FrameType >::phi(), pi, PlaneBuilder::plane(), position, propagatorWithMaterial, propagatorWithoutMaterial, SteppingHelixStateInfo::radPath(), DetId::rawId(), bril_dqm_clientPB-live_cfg::rid, CSCDetId::ring(), relativeConstraints::ring, makeMuonMisalignmentScenario::rot, GeomDetEnumerators::RPCBarrel, GeomDetEnumerators::RPCEndcap, rpcGeom, DTChamberId::sector(), simMuonToken, simVertexToken, HGCalValidator_cfi::simVertices, mathSSE::sqrt(), DTChamberId::station(), relativeConstraints::station, CSCDetId::station(), GeomDet::subDetector(), DTSuperLayerId::superlayer(), GeomDet::surface(), FrontierCondition_GT_autoExpress_cfi::t0, theEstimator, theMaterialEffects, theService, PV3DBase< T, PVType, FrameType >::theta(), Bounds::thickness(), Calorimetry_cff::thickness, GeomDet::toLocal(), SimTrack::trackerSurfaceMomentum(), SimTrack::trackerSurfacePosition(), CoreSimTrack::trackId(), TrajectoryStateOnSurface::transverseCurvature(), CoreSimTrack::type(), Vector3DBase< T, FrameTag >::unit(), SimTrack::vertIndex(), DTChamberId::wheel(), x, HLT_FULL_cff::xAxis, y, HLT_FULL_cff::yAxis, z, PV3DBase< T, PVType, FrameType >::z(), and HLT_FULL_cff::zAxis.

◆ readParameters()

void MuonSimHitProducer::readParameters ( const edm::ParameterSet fastMuons,
const edm::ParameterSet fastTracks,
const edm::ParameterSet matEff 
)
private

Definition at line 520 of file MuonSimHitProducer.cc.

522  {
523  // Muons
524  std::string _simModuleLabel = fastMuons.getParameter<std::string>("simModuleLabel");
525  std::string _simModuleProcess = fastMuons.getParameter<std::string>("simModuleProcess");
526  simMuonLabel = edm::InputTag(_simModuleLabel, _simModuleProcess);
527  simVertexLabel = edm::InputTag(_simModuleLabel);
528 
529  std::vector<double> simHitIneffDT = fastMuons.getParameter<std::vector<double> >("simHitDTIneffParameters");
530  std::vector<double> simHitIneffCSC = fastMuons.getParameter<std::vector<double> >("simHitCSCIneffParameters");
531  kDT = simHitIneffDT[0];
532  fDT = simHitIneffDT[1];
533  kCSC = simHitIneffCSC[0];
534  fCSC = simHitIneffCSC[1];
535 
536  // Tracks
537  fullPattern_ = fastTracks.getUntrackedParameter<bool>("FullPatternRecognition");
538 
539  // The following should be on LogInfo
540  // std::cout << " MUON SIM HITS: FastSimulation parameters " << std::endl;
541  // std::cout << " ============================================== " << std::endl;
542  // if ( fullPattern_ )
543  // std::cout << " The FULL pattern recognition option is turned ON" << std::endl;
544  // else
545  // std::cout << " The FAST tracking option is turned ON" << std::endl;
546 
547  // Material Effects
548  theMaterialEffects = nullptr;
549  if (matEff.getParameter<bool>("PairProduction") || matEff.getParameter<bool>("Bremsstrahlung") ||
550  matEff.getParameter<bool>("MuonBremsstrahlung") || matEff.getParameter<bool>("EnergyLoss") ||
551  matEff.getParameter<bool>("MultipleScattering"))
552  theMaterialEffects = std::make_unique<MaterialEffects>(matEff);
553 }

References fCSC, fDT, fullPattern_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_FULL_cff::InputTag, kCSC, kDT, simMuonLabel, simVertexLabel, AlCaHLTBitMon_QueryRunRegistry::string, and theMaterialEffects.

Referenced by MuonSimHitProducer().

Member Data Documentation

◆ cscGeom

const CSCGeometry* MuonSimHitProducer::cscGeom
private

Definition at line 61 of file MuonSimHitProducer.cc.

Referenced by beginRun(), and produce().

◆ doGL_

bool MuonSimHitProducer::doGL_
private

Definition at line 87 of file MuonSimHitProducer.cc.

◆ doL1_

bool MuonSimHitProducer::doL1_
private

Definition at line 87 of file MuonSimHitProducer.cc.

◆ doL3_

bool MuonSimHitProducer::doL3_
private

Definition at line 87 of file MuonSimHitProducer.cc.

◆ dtGeom

const DTGeometry* MuonSimHitProducer::dtGeom
private

Definition at line 60 of file MuonSimHitProducer.cc.

Referenced by beginRun(), and produce().

◆ fCSC

double MuonSimHitProducer::fCSC
private

Definition at line 76 of file MuonSimHitProducer.cc.

Referenced by produce(), and readParameters().

◆ fDT

double MuonSimHitProducer::fDT
private

Definition at line 74 of file MuonSimHitProducer.cc.

Referenced by produce(), and readParameters().

◆ fullPattern_

bool MuonSimHitProducer::fullPattern_
private

Definition at line 86 of file MuonSimHitProducer.cc.

Referenced by readParameters().

◆ kCSC

double MuonSimHitProducer::kCSC
private

Definition at line 75 of file MuonSimHitProducer.cc.

Referenced by produce(), and readParameters().

◆ kDT

double MuonSimHitProducer::kDT
private

Definition at line 73 of file MuonSimHitProducer.cc.

Referenced by produce(), and readParameters().

◆ magfield

const MagneticField* MuonSimHitProducer::magfield
private

Definition at line 59 of file MuonSimHitProducer.cc.

Referenced by applyMaterialEffects(), beginRun(), and produce().

◆ propagatorWithMaterial

const Propagator* MuonSimHitProducer::propagatorWithMaterial
private

Definition at line 63 of file MuonSimHitProducer.cc.

Referenced by beginRun(), and produce().

◆ propagatorWithoutMaterial

std::unique_ptr<Propagator> MuonSimHitProducer::propagatorWithoutMaterial
private

Definition at line 64 of file MuonSimHitProducer.cc.

Referenced by beginRun(), and produce().

◆ rpcGeom

const RPCGeometry* MuonSimHitProducer::rpcGeom
private

Definition at line 62 of file MuonSimHitProducer.cc.

Referenced by beginRun(), and produce().

◆ simMuonLabel

edm::InputTag MuonSimHitProducer::simMuonLabel
private

Definition at line 90 of file MuonSimHitProducer.cc.

Referenced by MuonSimHitProducer(), and readParameters().

◆ simMuonToken

edm::EDGetTokenT<std::vector<SimTrack> > MuonSimHitProducer::simMuonToken
private

Definition at line 94 of file MuonSimHitProducer.cc.

Referenced by MuonSimHitProducer(), and produce().

◆ simVertexLabel

edm::InputTag MuonSimHitProducer::simVertexLabel
private

Definition at line 91 of file MuonSimHitProducer.cc.

Referenced by MuonSimHitProducer(), and readParameters().

◆ simVertexToken

edm::EDGetTokenT<std::vector<SimVertex> > MuonSimHitProducer::simVertexToken
private

Definition at line 95 of file MuonSimHitProducer.cc.

Referenced by MuonSimHitProducer(), and produce().

◆ theEstimator

Chi2MeasurementEstimator MuonSimHitProducer::theEstimator
private

Definition at line 57 of file MuonSimHitProducer.cc.

Referenced by produce().

◆ theMaterialEffects

std::unique_ptr<MaterialEffects> MuonSimHitProducer::theMaterialEffects
private

Definition at line 66 of file MuonSimHitProducer.cc.

Referenced by applyMaterialEffects(), produce(), and readParameters().

◆ theService

MuonServiceProxy* MuonSimHitProducer::theService
private

Definition at line 56 of file MuonSimHitProducer.cc.

Referenced by beginRun(), MuonSimHitProducer(), and produce().

Vector3DBase
Definition: Vector3DBase.h:8
TkRotation< float >
DDAxes::y
CoreSimTrack::momentum
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
rawparticle::makeMuon
RawParticle makeMuon(bool isParticle, const math::XYZTLorentzVector &p, const math::XYZTLorentzVector &xStart)
Definition: makeMuon.cc:20
TrajectoryStateOnSurface::freeTrajectoryState
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:60
MuonServiceProxy::UseEventSetupIn::Run
TrajectoryStateOnSurface::localMomentum
LocalVector localMomentum() const
Definition: TrajectoryStateOnSurface.h:75
mps_fire.i
i
Definition: mps_fire.py:428
anyDirection
Definition: PropagationDirection.h:4
MuonSimHitProducer::fCSC
double fCSC
Definition: MuonSimHitProducer.cc:76
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
GeomDetEnumerators::RPCEndcap
Definition: GeomDetEnumerators.h:20
GeomDet
Definition: GeomDet.h:27
DTTopology::channel
int channel(const LocalPoint &p) const override
Definition: DTTopology.cc:54
MuonSimHitProducer::cscGeom
const CSCGeometry * cscGeom
Definition: MuonSimHitProducer.cc:61
MuonSimHitProducer::fDT
double fDT
Definition: MuonSimHitProducer.cc:74
DTGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: DTGeometry.cc:75
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
relativeConstraints.station
station
Definition: relativeConstraints.py:67
CSCDetId::ring
int ring() const
Definition: CSCDetId.h:68
mps_splice.entry
entry
Definition: mps_splice.py:68
PV3DBase::theta
Geom::Theta< T > theta() const
Definition: PV3DBase.h:72
RPCDetId
Definition: RPCDetId.h:16
TrajectoryStateOnSurface::globalPosition
GlobalPoint globalPosition() const
Definition: TrajectoryStateOnSurface.h:65
gather_cfg.cout
cout
Definition: gather_cfg.py:144
DTChamber
Definition: DTChamber.h:24
MuonSimHitProducer::fullPattern_
bool fullPattern_
Definition: MuonSimHitProducer.cc:86
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:85964
SimTrack::trackerSurfaceMomentum
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: SimTrack.h:39
MuonSimHitProducer::simMuonToken
edm::EDGetTokenT< std::vector< SimTrack > > simMuonToken
Definition: MuonSimHitProducer.cc:94
TrajectoryStateOnSurface::charge
TrackCharge charge() const
Definition: TrajectoryStateOnSurface.h:68
dileptonTrigSettings_cff.pdg
pdg
Definition: dileptonTrigSettings_cff.py:6
MultipleScatteringSimulator
Definition: MultipleScatteringSimulator.h:26
MuonSimHitProducer::kDT
double kDT
Definition: MuonSimHitProducer.cc:73
Surface
Definition: Surface.h:36
CoreSimTrack::charge
float charge() const
charge
Definition: CoreSimTrack.cc:17
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
TrajectoryStateOnSurface::transverseCurvature
double transverseCurvature() const
Definition: TrajectoryStateOnSurface.h:70
MuonSimHitProducer::theService
MuonServiceProxy * theService
Definition: MuonSimHitProducer.cc:56
ReferenceCountingPointer< Plane >
DTSuperLayerId::superlayer
int superlayer() const
Return the superlayer number (deprecated method name)
Definition: DTSuperLayerId.h:42
DDAxes::x
XYZTLorentzVector
math::XYZTLorentzVector XYZTLorentzVector
Definition: RawParticle.h:25
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
PV3DBase::mag2
T mag2() const
Definition: PV3DBase.h:63
edm::Handle
Definition: AssociativeIterator.h:50
GloballyPositioned< float >::RotationType
TkRotation< float > RotationType
Definition: GloballyPositioned.h:22
RPCChamber
Definition: RPCChamber.h:19
MuonServiceProxy_cff.MuonServiceProxy
MuonServiceProxy
Definition: MuonServiceProxy_cff.py:14
DTGeometry::chamber
const DTChamber * chamber(const DTChamberId &id) const
Return a DTChamber given its id.
Definition: DTGeometry.cc:90
RPCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: RPCGeometry.cc:30
MuonSimHitProducer::propagatorWithMaterial
const Propagator * propagatorWithMaterial
Definition: MuonSimHitProducer.cc:63
SteppingHelixStateInfo::getStateOnSurface
TrajectoryStateOnSurface getStateOnSurface(const Surface &surf, bool returnTangentPlane=false) const
Definition: SteppingHelixStateInfo.cc:60
DTTopology
Definition: DTTopology.h:28
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
DirectMuonNavigation
Definition: DirectMuonNavigation.h:20
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
GeomDet::surface
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
TrajectoryStateOnSurface
Definition: TrajectoryStateOnSurface.h:16
SteppingHelixPropagator
Definition: SteppingHelixPropagator.h:36
Vector3DBase::unit
Vector3DBase unit() const
Definition: Vector3DBase.h:54
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
fastSimProducer_cff.multipleScattering
multipleScattering
Definition: fastSimProducer_cff.py:64
MuonPatternRecoDumper
Definition: MuonPatternRecoDumper.h:18
DTTopology::firstChannel
int firstChannel() const
Returns the wire number of the first wire.
Definition: DTTopology.h:79
DTWireId
Definition: DTWireId.h:12
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
Bounds::inside
virtual bool inside(const Local3DPoint &) const =0
Determine if the point is inside the bounds.
MuonSimHitProducer::simMuonLabel
edm::InputTag simMuonLabel
Definition: MuonSimHitProducer.cc:90
Calorimetry_cff.thickness
thickness
Definition: Calorimetry_cff.py:114
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
CSCLayerGeometry
Definition: CSCLayerGeometry.h:25
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
Surface::bounds
const Bounds & bounds() const
Definition: Surface.h:87
CSCDetId::layer
int layer() const
Definition: CSCDetId.h:56
DDAxes::z
MuonSimHitProducer::kCSC
double kCSC
Definition: MuonSimHitProducer.cc:75
edm::ESHandle< MagneticField >
CSCChamber
Definition: CSCChamber.h:22
HLT_FULL_cff.zAxis
zAxis
Definition: HLT_FULL_cff.py:46206
HelixArbitraryPlaneCrossing
Definition: HelixArbitraryPlaneCrossing.h:10
GlobalTrajectoryParameters
Definition: GlobalTrajectoryParameters.h:15
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
MuonSimHitProducer::simVertexToken
edm::EDGetTokenT< std::vector< SimVertex > > simVertexToken
Definition: MuonSimHitProducer.cc:95
Point3DBase< float, GlobalTag >
GeomDet::toLocal
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:58
DTLayerId
Definition: DTLayerId.h:12
GeomDetEnumerators::CSC
Definition: GeomDetEnumerators.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SteppingHelixStateInfo
Definition: SteppingHelixStateInfo.h:27
MuonServiceProxy::update
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
Definition: MuonServiceProxy.cc:111
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
GeomDetEnumerators::DT
Definition: GeomDetEnumerators.h:18
GeomDet::geographicalId
DetId geographicalId() const
The label of this GeomDet.
Definition: GeomDet.h:64
Surface::tangentPlane
virtual ConstReferenceCountingPointer< TangentPlane > tangentPlane(const GlobalPoint &) const =0
CSCLayerGeometry::inside
bool inside(const Local3DPoint &, const LocalError &, float scale=1.f) const override
Definition: CSCLayerGeometry.cc:282
Bounds::thickness
virtual float thickness() const =0
SimTrack::trackerSurfacePosition
const math::XYZVectorD & trackerSurfacePosition() const
Definition: SimTrack.h:37
MuonSimHitProducer::propagatorWithoutMaterial
std::unique_ptr< Propagator > propagatorWithoutMaterial
Definition: MuonSimHitProducer.cc:64
edm::ParameterSet
Definition: ParameterSet.h:47
MuonSimHitProducer::magfield
const MagneticField * magfield
Definition: MuonSimHitProducer.cc:59
SteppingHelixStateInfo::radPath
double radPath() const
Definition: SteppingHelixStateInfo.h:63
MuonSimHitProducer::simVertexLabel
edm::InputTag simVertexLabel
Definition: MuonSimHitProducer.cc:91
MuonSimHitProducer::theEstimator
Chi2MeasurementEstimator theEstimator
Definition: MuonSimHitProducer.cc:57
fastSimProducer_cff.bremsstrahlung
bremsstrahlung
Definition: fastSimProducer_cff.py:38
HLT_FULL_cff.yAxis
yAxis
Definition: HLT_FULL_cff.py:46207
SteppingHelixStateInfo::path
double path() const
Definition: SteppingHelixStateInfo.h:62
CSCDetId
Definition: CSCDetId.h:26
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
ParticlePropagator
Definition: ParticlePropagator.h:28
MuonServiceProxy::propagator
edm::ESHandle< Propagator > propagator(std::string propagatorName) const
get the propagator
Definition: MuonServiceProxy.cc:177
iEvent
int iEvent
Definition: GenABIO.cc:224
CoreSimTrack::type
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:22
PlaneBuilder::plane
ReturnType plane(const PositionType &pos, const RotationType &rot) const
Definition: PlaneBuilder.h:21
get
#define get
SteppingHelixPropagator::setMaterialMode
void setMaterialMode(bool noMaterial)
Switch for material effects mode: no material effects if true.
Definition: SteppingHelixPropagator.h:124
PV3DBase::basicVector
const BasicVectorType & basicVector() const
Definition: PV3DBase.h:53
edm::EventSetup::getData
bool getData(T &iHolder) const
Definition: EventSetup.h:120
CoreSimTrack::trackId
unsigned int trackId() const
Definition: CoreSimTrack.h:31
DTTopology::lastChannel
int lastChannel() const
Returns the wire number of the last wire.
Definition: DTTopology.h:81
PV3DBase::mag
T mag() const
Definition: PV3DBase.h:64
MuonSimHitProducer::theMaterialEffects
std::unique_ptr< MaterialEffects > theMaterialEffects
Definition: MuonSimHitProducer.cc:66
RPCGeometry::chamber
const RPCChamber * chamber(RPCDetId id) const
Definition: RPCGeometry.cc:46
TrajectoryStateOnSurface::globalMomentum
GlobalVector globalMomentum() const
Definition: TrajectoryStateOnSurface.h:66
DTChamberId::sector
int sector() const
Definition: DTChamberId.h:49
MuonSimHitProducer::applyMaterialEffects
void applyMaterialEffects(TrajectoryStateOnSurface &tsosWithdEdx, TrajectoryStateOnSurface &tsos, double radPath, RandomEngineAndDistribution const *, HepPDT::ParticleDataTable const &)
Simulate material effects in iron (dE/dx, multiple scattering)
Definition: MuonSimHitProducer.cc:555
eostools.move
def move(src, dest)
Definition: eostools.py:511
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
Propagator::clone
virtual Propagator * clone() const =0
SimTrack
Definition: SimTrack.h:6
packedPFCandidateRefMixer_cfi.pf
pf
Definition: packedPFCandidateRefMixer_cfi.py:4
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
CSCDetId::endcap
int endcap() const
Definition: CSCDetId.h:85
MuonBremsstrahlungSimulator
Definition: MuonBremsstrahlungSimulator.h:29
HLT_FULL_cff.xAxis
xAxis
Definition: HLT_FULL_cff.py:46205
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
makeMuonMisalignmentScenario.rot
rot
Definition: makeMuonMisalignmentScenario.py:322
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
SimTrack::vertIndex
int vertIndex() const
index of the vertex in the Event container (-1 if no vertex)
Definition: SimTrack.h:30
pdg
Definition: pdg_functions.h:28
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
TrajectoryStateOnSurface::surface
const SurfaceType & surface() const
Definition: TrajectoryStateOnSurface.h:78
PlaneBuilder
Definition: PlaneBuilder.h:13
EnergyLossSimulator
Definition: EnergyLossSimulator.h:25
GeomDetEnumerators::RPCBarrel
Definition: GeomDetEnumerators.h:19
pi
const Double_t pi
Definition: trackSplitPlot.h:36
MuonSimHitProducer::rpcGeom
const RPCGeometry * rpcGeom
Definition: MuonSimHitProducer.cc:62
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
DTChamberId
Definition: DTChamberId.h:14
MuonSimHitProducer::dtGeom
const DTGeometry * dtGeom
Definition: MuonSimHitProducer.cc:60
HGCalValidator_cfi.simVertices
simVertices
Definition: HGCalValidator_cfi.py:43
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
beamvalidation.exit
def exit(msg="")
Definition: beamvalidation.py:53
CSCDetId::station
int station() const
Definition: CSCDetId.h:79
PSimHit
Definition: PSimHit.h:15
JetChargeProducer_cfi.exp
exp
Definition: JetChargeProducer_cfi.py:6
TableParser.table
table
Definition: TableParser.py:111
DTLayerId::layer
int layer() const
Return the layer number.
Definition: DTLayerId.h:42
CSCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89
fastSimProducer_cff.energyLoss
energyLoss
Definition: fastSimProducer_cff.py:55
MuonGeometryRecord
Definition: MuonGeometryRecord.h:34
MuonServiceProxy::detLayerGeometry
edm::ESHandle< MuonDetLayerGeometry > detLayerGeometry() const
get the detLayer geometry
Definition: MuonServiceProxy.h:62
DTChamberId::wheel
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:39
alongMomentum
Definition: PropagationDirection.h:4
hgcalTopologyTester_cfi.layers
layers
Definition: hgcalTopologyTester_cfi.py:8
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
CSCGeometry::chamber
const CSCChamber * chamber(CSCDetId id) const
Return the chamber corresponding to given DetId.
Definition: CSCGeometry.cc:100
TrajectoryStateOnSurface::isValid
bool isValid() const
Definition: TrajectoryStateOnSurface.h:54
GeomDet::subDetector
virtual SubDetector subDetector() const
Which subdetector.
Definition: GeomDet.cc:38
DTChamberId::station
int station() const
Return the station number.
Definition: DTChamberId.h:42
hit
Definition: SiStripHitEffFromCalibTree.cc:88
GetRecoTauVFromDQM_MC_cff.next
next
Definition: GetRecoTauVFromDQM_MC_cff.py:31
bril_dqm_clientPB-live_cfg.rid
rid
Definition: bril_dqm_clientPB-live_cfg.py:30
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18
MuonSimHitProducer::readParameters
void readParameters(const edm::ParameterSet &, const edm::ParameterSet &, const edm::ParameterSet &)
Definition: MuonSimHitProducer.cc:520