CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonSimHitProducer Class Reference

#include <FastSimulation/MuonSimHitProducer/src/MuonSimHitProducer.cc>

Inheritance diagram for MuonSimHitProducer:
edm::stream::EDProducer<>

Public Member Functions

 MuonSimHitProducer (const edm::ParameterSet &)
 
 ~MuonSimHitProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () 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
 
PropagatorpropagatorWithoutMaterial
 
const RPCGeometryrpcGeom
 
edm::InputTag simMuonLabel
 
edm::EDGetTokenT< std::vector< SimTrack > > simMuonToken
 
edm::InputTag simVertexLabel
 
edm::EDGetTokenT< std::vector< SimVertex > > simVertexToken
 
Chi2MeasurementEstimator theEstimator
 
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: <one line="" class="" summary>="">

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

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

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

Definition at line 58 of file MuonSimHitProducer.h.

Constructor & Destructor Documentation

◆ MuonSimHitProducer()

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

Definition at line 78 of file MuonSimHitProducer.cc.

79  : theEstimator(iConfig.getParameter<double>("Chi2EstimatorCut")), propagatorWithoutMaterial(nullptr) {
80  // Read relevant parameters
82  iConfig.getParameter<edm::ParameterSet>("TRACKS"),
83  iConfig.getParameter<edm::ParameterSet>("MaterialEffectsForMuons"));
84 
85  //
86  // register your products ... need to declare at least one possible product...
87  //
88  produces<edm::PSimHitContainer>("MuonCSCHits");
89  produces<edm::PSimHitContainer>("MuonDTHits");
90  produces<edm::PSimHitContainer>("MuonRPCHits");
91 
92  edm::ParameterSet serviceParameters = iConfig.getParameter<edm::ParameterSet>("ServiceParameters");
93  theService = new MuonServiceProxy(serviceParameters, consumesCollector(), MuonServiceProxy::UseEventSetupIn::Run);
94 
95  // consumes
96  simMuonToken = consumes<std::vector<SimTrack> >(simMuonLabel);
97  simVertexToken = consumes<std::vector<SimVertex> >(simVertexLabel);
98 }

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

◆ ~MuonSimHitProducer()

MuonSimHitProducer::~MuonSimHitProducer ( )
override

Definition at line 129 of file MuonSimHitProducer.cc.

129  {
130  // do anything here that needs to be done at destruction time
131  // (e.g. close files, deallocate resources etc.)
132 
133  if (theMaterialEffects)
134  delete theMaterialEffects;
137 }

References propagatorWithoutMaterial, and theMaterialEffects.

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 538 of file MuonSimHitProducer.cc.

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

References fastSimProducer_cff::bremsstrahlung, ALCARECOTkAlJpsiMuMu_cff::charge, TrajectoryStateOnSurface::charge(), fastSimProducer_cff::energyLoss, MaterialEffects::energyLossSimulator(), dqmMemoryStats::float, TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), PV3DBase< T, PVType, FrameType >::mag2(), magfield, rawparticle::makeMuon(), RawParticle::momentum(), amptDefaultParameters_cff::mu, fastSimProducer_cff::multipleScattering, MaterialEffects::multipleScatteringSimulator(), MaterialEffects::muonBremsstrahlungSimulator(), 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 101 of file MuonSimHitProducer.cc.

101  {
102  //services
104  edm::ESHandle<DTGeometry> dtGeometry;
105  edm::ESHandle<CSCGeometry> cscGeometry;
106  edm::ESHandle<RPCGeometry> rpcGeometry;
108 
109  es.get<IdealMagneticFieldRecord>().get(magField);
110  es.get<MuonGeometryRecord>().get("MisAligned", dtGeometry);
111  es.get<MuonGeometryRecord>().get("MisAligned", cscGeometry);
112  es.get<MuonGeometryRecord>().get(rpcGeometry);
113 
114  magfield = &(*magField);
115  dtGeom = &(*dtGeometry);
116  cscGeom = &(*cscGeometry);
117  rpcGeom = &(*rpcGeometry);
118 
119  bool duringEvent = false;
120  theService->update(es, duringEvent);
121 
122  // A few propagators
123  propagatorWithMaterial = &(*(theService->propagator("SteppingHelixPropagatorAny")));
125  SteppingHelixPropagator* SHpropagator = dynamic_cast<SteppingHelixPropagator*>(propagatorWithoutMaterial); // Beuark!
126  SHpropagator->setMaterialMode(true); // switches OFF material effects;
127 }

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 145 of file MuonSimHitProducer.cc.

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

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, Propagator::propagateWithPath(), 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_2018_cff::xAxis, y, HLT_2018_cff::yAxis, z, PV3DBase< T, PVType, FrameType >::z(), and HLT_2018_cff::zAxis.

◆ readParameters()

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

Definition at line 503 of file MuonSimHitProducer.cc.

505  {
506  // Muons
507  std::string _simModuleLabel = fastMuons.getParameter<std::string>("simModuleLabel");
508  std::string _simModuleProcess = fastMuons.getParameter<std::string>("simModuleProcess");
509  simMuonLabel = edm::InputTag(_simModuleLabel, _simModuleProcess);
510  simVertexLabel = edm::InputTag(_simModuleLabel);
511 
512  std::vector<double> simHitIneffDT = fastMuons.getParameter<std::vector<double> >("simHitDTIneffParameters");
513  std::vector<double> simHitIneffCSC = fastMuons.getParameter<std::vector<double> >("simHitCSCIneffParameters");
514  kDT = simHitIneffDT[0];
515  fDT = simHitIneffDT[1];
516  kCSC = simHitIneffCSC[0];
517  fCSC = simHitIneffCSC[1];
518 
519  // Tracks
520  fullPattern_ = fastTracks.getUntrackedParameter<bool>("FullPatternRecognition");
521 
522  // The following should be on LogInfo
523  // std::cout << " MUON SIM HITS: FastSimulation parameters " << std::endl;
524  // std::cout << " ============================================== " << std::endl;
525  // if ( fullPattern_ )
526  // std::cout << " The FULL pattern recognition option is turned ON" << std::endl;
527  // else
528  // std::cout << " The FAST tracking option is turned ON" << std::endl;
529 
530  // Material Effects
531  theMaterialEffects = nullptr;
532  if (matEff.getParameter<bool>("PairProduction") || matEff.getParameter<bool>("Bremsstrahlung") ||
533  matEff.getParameter<bool>("MuonBremsstrahlung") || matEff.getParameter<bool>("EnergyLoss") ||
534  matEff.getParameter<bool>("MultipleScattering"))
535  theMaterialEffects = new MaterialEffects(matEff);
536 }

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

Referenced by MuonSimHitProducer().

Member Data Documentation

◆ cscGeom

const CSCGeometry* MuonSimHitProducer::cscGeom
private

Definition at line 69 of file MuonSimHitProducer.h.

Referenced by beginRun(), and produce().

◆ doGL_

bool MuonSimHitProducer::doGL_
private

Definition at line 95 of file MuonSimHitProducer.h.

◆ doL1_

bool MuonSimHitProducer::doL1_
private

Definition at line 95 of file MuonSimHitProducer.h.

◆ doL3_

bool MuonSimHitProducer::doL3_
private

Definition at line 95 of file MuonSimHitProducer.h.

◆ dtGeom

const DTGeometry* MuonSimHitProducer::dtGeom
private

Definition at line 68 of file MuonSimHitProducer.h.

Referenced by beginRun(), and produce().

◆ fCSC

double MuonSimHitProducer::fCSC
private

Definition at line 84 of file MuonSimHitProducer.h.

Referenced by produce(), and readParameters().

◆ fDT

double MuonSimHitProducer::fDT
private

Definition at line 82 of file MuonSimHitProducer.h.

Referenced by produce(), and readParameters().

◆ fullPattern_

bool MuonSimHitProducer::fullPattern_
private

Definition at line 94 of file MuonSimHitProducer.h.

Referenced by readParameters().

◆ kCSC

double MuonSimHitProducer::kCSC
private

Definition at line 83 of file MuonSimHitProducer.h.

Referenced by produce(), and readParameters().

◆ kDT

double MuonSimHitProducer::kDT
private

Definition at line 81 of file MuonSimHitProducer.h.

Referenced by produce(), and readParameters().

◆ magfield

const MagneticField* MuonSimHitProducer::magfield
private

Definition at line 67 of file MuonSimHitProducer.h.

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

◆ propagatorWithMaterial

const Propagator* MuonSimHitProducer::propagatorWithMaterial
private

Definition at line 71 of file MuonSimHitProducer.h.

Referenced by beginRun(), and produce().

◆ propagatorWithoutMaterial

Propagator* MuonSimHitProducer::propagatorWithoutMaterial
private

Definition at line 72 of file MuonSimHitProducer.h.

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

◆ rpcGeom

const RPCGeometry* MuonSimHitProducer::rpcGeom
private

Definition at line 70 of file MuonSimHitProducer.h.

Referenced by beginRun(), and produce().

◆ simMuonLabel

edm::InputTag MuonSimHitProducer::simMuonLabel
private

Definition at line 98 of file MuonSimHitProducer.h.

Referenced by MuonSimHitProducer(), and readParameters().

◆ simMuonToken

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

Definition at line 102 of file MuonSimHitProducer.h.

Referenced by MuonSimHitProducer(), and produce().

◆ simVertexLabel

edm::InputTag MuonSimHitProducer::simVertexLabel
private

Definition at line 99 of file MuonSimHitProducer.h.

Referenced by MuonSimHitProducer(), and readParameters().

◆ simVertexToken

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

Definition at line 103 of file MuonSimHitProducer.h.

Referenced by MuonSimHitProducer(), and produce().

◆ theEstimator

Chi2MeasurementEstimator MuonSimHitProducer::theEstimator
private

Definition at line 65 of file MuonSimHitProducer.h.

Referenced by produce().

◆ theMaterialEffects

MaterialEffects* MuonSimHitProducer::theMaterialEffects
private

◆ theService

MuonServiceProxy* MuonSimHitProducer::theService
private

Definition at line 64 of file MuonSimHitProducer.h.

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

Vector3DBase
Definition: Vector3DBase.h:8
TrajectoryFactories_cff.MaterialEffects
MaterialEffects
Definition: TrajectoryFactories_cff.py:21
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:355
anyDirection
Definition: PropagationDirection.h:4
MuonSimHitProducer::fCSC
double fCSC
Definition: MuonSimHitProducer.h:84
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.h:69
MuonSimHitProducer::fDT
double fDT
Definition: MuonSimHitProducer.h:82
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
MaterialEffects::muonBremsstrahlungSimulator
MuonBremsstrahlungSimulator * muonBremsstrahlungSimulator() const
Return the Muon Bremsstrahlung engine.
Definition: MaterialEffects.h:83
DTChamber
Definition: DTChamber.h:24
MuonSimHitProducer::fullPattern_
bool fullPattern_
Definition: MuonSimHitProducer.h:94
SimTrack::trackerSurfaceMomentum
const math::XYZTLorentzVectorD & trackerSurfaceMomentum() const
Definition: SimTrack.h:39
MuonSimHitProducer::simMuonToken
edm::EDGetTokenT< std::vector< SimTrack > > simMuonToken
Definition: MuonSimHitProducer.h:102
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.h:81
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.h:64
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:15
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.h:71
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
MuonSimHitProducer::propagatorWithoutMaterial
Propagator * propagatorWithoutMaterial
Definition: MuonSimHitProducer.h:72
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:73
TrackCandidateProducer_cfi.propagator
propagator
Definition: TrackCandidateProducer_cfi.py:17
fastSimProducer_cff.multipleScattering
multipleScattering
Definition: fastSimProducer_cff.py:64
MuonPatternRecoDumper
Definition: MuonPatternRecoDumper.h:18
MaterialEffects::energyLossSimulator
EnergyLossSimulator * energyLossSimulator() const
Return the Energy Loss engine.
Definition: MaterialEffects.h:80
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.h:98
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.h:83
edm::ESHandle< MagneticField >
CSCChamber
Definition: CSCChamber.h:22
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.h:103
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
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
MuonSimHitProducer::magfield
const MagneticField * magfield
Definition: MuonSimHitProducer.h:67
SteppingHelixStateInfo::radPath
double radPath() const
Definition: SteppingHelixStateInfo.h:63
MuonSimHitProducer::simVertexLabel
edm::InputTag simVertexLabel
Definition: MuonSimHitProducer.h:99
MuonSimHitProducer::theEstimator
Chi2MeasurementEstimator theEstimator
Definition: MuonSimHitProducer.h:65
fastSimProducer_cff.bremsstrahlung
bremsstrahlung
Definition: fastSimProducer_cff.py:38
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:113
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
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:538
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
HLT_2018_cff.xAxis
xAxis
Definition: HLT_2018_cff.py:44410
MuonSimHitProducer::theMaterialEffects
MaterialEffects * theMaterialEffects
Definition: MuonSimHitProducer.h:74
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
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
Propagator::propagateWithPath
virtual std::pair< TrajectoryStateOnSurface, double > propagateWithPath(const FreeTrajectoryState &, const Surface &) const final
Definition: Propagator.cc:10
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.h:70
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.h:68
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
HLT_2018_cff.yAxis
yAxis
Definition: HLT_2018_cff.py:44412
CSCGeometry::idToDetUnit
const GeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
Definition: CSCGeometry.cc:89
MaterialEffects::multipleScatteringSimulator
MultipleScatteringSimulator * multipleScatteringSimulator() const
Return the Multiple Scattering engine.
Definition: MaterialEffects.h:77
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
HLT_2018_cff.zAxis
zAxis
Definition: HLT_2018_cff.py:44411
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:26
RandomEngineAndDistribution
Definition: RandomEngineAndDistribution.h:18
MuonSimHitProducer::readParameters
void readParameters(const edm::ParameterSet &, const edm::ParameterSet &, const edm::ParameterSet &)
Definition: MuonSimHitProducer.cc:503