CMS 3D CMS Logo

CTPPSDirectProtonSimulation.cc
Go to the documentation of this file.
1 /****************************************************************************
2  * Authors:
3  * Jan Kašpar
4  * Laurent Forthomme
5  ****************************************************************************/
6 
15 
17 
21 
27 
30 
33 
36 
41 
44 
45 #include "CLHEP/Random/RandGauss.h"
46 #include "CLHEP/Units/GlobalPhysicalConstants.h"
47 
48 #include <unordered_map>
49 
50 #include "TMath.h"
51 #include "TMatrixD.h"
52 #include "TVectorD.h"
53 #include "TF1.h"
54 #include "TF2.h"
55 
56 //----------------------------------------------------------------------------------------------------
57 
59 public:
61  ~CTPPSDirectProtonSimulation() override {}
62 
64 
65 private:
66  void produce(edm::Event &, const edm::EventSetup &) override;
67 
68  void processProton(const HepMC::GenVertex *in_vtx,
69  const HepMC::GenParticle *in_trk,
70  const CTPPSGeometry &geometry,
71  const LHCInfo &lhcInfo,
72  const CTPPSBeamParameters &beamParameters,
74  CLHEP::HepRandomEngine *rndEngine,
75 
76  std::vector<CTPPSLocalTrackLite> &out_tracks,
77 
78  edm::DetSetVector<TotemRPRecHit> &out_strip_hits,
80  edm::DetSetVector<CTPPSDiamondRecHit> &out_diamond_hits,
81 
82  std::map<int, edm::DetSetVector<TotemRPRecHit>> &out_strip_hits_per_particle,
83  std::map<int, edm::DetSetVector<CTPPSPixelRecHit>> &out_pixel_hits_per_particle,
84  std::map<int, edm::DetSetVector<CTPPSDiamondRecHit>> &out_diamond_hits_per_particle) const;
85 
86  // ------------ config file parameters ------------
87 
91 
93 
96  bool produceRecHits_;
97 
99  bool checkApertures_;
100 
102  //aperture parameters
103  std::unique_ptr<TF2> empiricalAperture45_;
104  std::unique_ptr<TF2> empiricalAperture56_;
105 
107  bool roundToPitch_;
109 
110  double pitchStrips_;
111  double insensitiveMarginStrips_;
112 
114  double pitchPixelsVer_;
115 
116  std::unique_ptr<TF1> timeResolutionDiamonds45_,
118 
119  unsigned int verbosity_;
120 
121  // ------------ internal parameters ------------
122 
124  double stripZeroPosition_;
125 };
126 
127 //----------------------------------------------------------------------------------------------------
128 
130  : lhcInfoLabel_(iConfig.getParameter<std::string>("lhcInfoLabel")),
131  opticsLabel_(iConfig.getParameter<std::string>("opticsLabel")),
132  hepMCToken_(consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("hepMCTag"))),
133 
134  produceScoringPlaneHits_(iConfig.getParameter<bool>("produceScoringPlaneHits")),
135  produceRecHits_(iConfig.getParameter<bool>("produceRecHits")),
136 
137  useEmpiricalApertures_(iConfig.getParameter<bool>("useEmpiricalApertures")),
138  empiricalAperture45_(
139  new TF2("empiricalAperture45", iConfig.getParameter<std::string>("empiricalAperture45").c_str())),
140  empiricalAperture56_(
141  new TF2("empiricalAperture56", iConfig.getParameter<std::string>("empiricalAperture56").c_str())),
142 
143  produceHitsRelativeToBeam_(iConfig.getParameter<bool>("produceHitsRelativeToBeam")),
144  roundToPitch_(iConfig.getParameter<bool>("roundToPitch")),
145  checkIsHit_(iConfig.getParameter<bool>("checkIsHit")),
146 
147  pitchStrips_(iConfig.getParameter<double>("pitchStrips")),
148  insensitiveMarginStrips_(iConfig.getParameter<double>("insensitiveMarginStrips")),
149 
150  pitchPixelsHor_(iConfig.getParameter<double>("pitchPixelsHor")),
151  pitchPixelsVer_(iConfig.getParameter<double>("pitchPixelsVer")),
152 
153  timeResolutionDiamonds45_(
154  new TF1("timeResolutionDiamonds45", iConfig.getParameter<std::string>("timeResolutionDiamonds45").c_str())),
155  timeResolutionDiamonds56_(
156  new TF1("timeResolutionDiamonds56", iConfig.getParameter<std::string>("timeResolutionDiamonds56").c_str())),
157 
158  verbosity_(iConfig.getUntrackedParameter<unsigned int>("verbosity", 0)) {
160  produces<std::vector<CTPPSLocalTrackLite>>();
161 
162  if (produceRecHits_) {
163  produces<edm::DetSetVector<TotemRPRecHit>>();
164  produces<edm::DetSetVector<CTPPSDiamondRecHit>>();
165  produces<edm::DetSetVector<CTPPSPixelRecHit>>();
166 
167  produces<std::map<int, edm::DetSetVector<TotemRPRecHit>>>();
168  produces<std::map<int, edm::DetSetVector<CTPPSDiamondRecHit>>>();
169  produces<std::map<int, edm::DetSetVector<CTPPSPixelRecHit>>>();
170  }
171 
172  // v position of strip 0
175 }
176 
177 //----------------------------------------------------------------------------------------------------
178 
181  desc.addUntracked<unsigned int>("verbosity", 0);
182 
183  desc.add<std::string>("lhcInfoLabel", "")->setComment("label of the LHCInfo record");
184  desc.add<std::string>("opticsLabel", "")->setComment("label of the optics records");
185  desc.add<edm::InputTag>("hepMCTag", edm::InputTag("generator", "unsmeared"));
186 
187  desc.add<bool>("produceScoringPlaneHits", true);
188  desc.add<bool>("produceRecHits", true);
189 
190  desc.add<bool>("useEmpiricalApertures", false);
191  desc.add<std::string>("empiricalAperture45", "0")->setComment("2D function of xi and xangle for cutoff on sec 45");
192  desc.add<std::string>("empiricalAperture56", "0")->setComment("2D function of xi and xangle for cutoff on sec 56");
193 
194  desc.add<bool>("produceHitsRelativeToBeam", false);
195  desc.add<bool>("roundToPitch", true);
196  desc.add<bool>("checkIsHit", true);
197  desc.add<double>("pitchStrips", 66.e-3); // in mm
198  desc.add<double>("insensitiveMarginStrips", 34.e-3); // in mm
199 
200  desc.add<double>("pitchPixelsHor", 100.e-3);
201  desc.add<double>("pitchPixelsVer", 150.e-3);
202 
203  desc.add<std::string>("timeResolutionDiamonds45", "0.200")
204  ->setComment("time resolution of single diamond sensor in sector 45, in ns");
205  desc.add<std::string>("timeResolutionDiamonds56", "0.200")
206  ->setComment("time resolution of single diamond sensor in sector 56, in ns");
207 
208  descriptions.add("ctppsDirectProtonSimulation", desc);
209 }
210 
211 //----------------------------------------------------------------------------------------------------
212 
214  // get input
216  iEvent.getByToken(hepMCToken_, hepmc_prod);
217 
218  // get conditions
219  edm::ESHandle<LHCInfo> hLHCInfo;
220  iSetup.get<LHCInfoRcd>().get(lhcInfoLabel_, hLHCInfo);
221 
222  edm::ESHandle<CTPPSBeamParameters> hBeamParameters;
223  iSetup.get<CTPPSBeamParametersRcd>().get(hBeamParameters);
224 
226  iSetup.get<CTPPSInterpolatedOpticsRcd>().get(opticsLabel_, hOpticalFunctions);
227 
230 
231  // prepare outputs
232  std::unique_ptr<edm::DetSetVector<TotemRPRecHit>> pStripRecHits(new edm::DetSetVector<TotemRPRecHit>());
233  std::unique_ptr<edm::DetSetVector<CTPPSDiamondRecHit>> pDiamondRecHits(new edm::DetSetVector<CTPPSDiamondRecHit>());
234  std::unique_ptr<edm::DetSetVector<CTPPSPixelRecHit>> pPixelRecHits(new edm::DetSetVector<CTPPSPixelRecHit>());
235 
236  auto pStripRecHitsPerParticle = std::make_unique<std::map<int, edm::DetSetVector<TotemRPRecHit>>>();
237  auto pDiamondRecHitsPerParticle = std::make_unique<std::map<int, edm::DetSetVector<CTPPSDiamondRecHit>>>();
238  auto pPixelRecHitsPerParticle = std::make_unique<std::map<int, edm::DetSetVector<CTPPSPixelRecHit>>>();
239 
240  std::unique_ptr<std::vector<CTPPSLocalTrackLite>> pTracks(new std::vector<CTPPSLocalTrackLite>());
241 
242  // get random engine
244  CLHEP::HepRandomEngine *engine = &rng->getEngine(iEvent.streamID());
245 
246  // loop over event vertices
247  auto evt = hepmc_prod->GetEvent();
248  for (auto it_vtx = evt->vertices_begin(); it_vtx != evt->vertices_end(); ++it_vtx) {
249  auto vtx = *(it_vtx);
250 
251  // loop over outgoing particles
252  for (auto it_part = vtx->particles_out_const_begin(); it_part != vtx->particles_out_const_end(); ++it_part) {
253  auto part = *(it_part);
254 
255  // accept only stable protons
256  if (part->pdg_id() != 2212)
257  continue;
258 
259  if (part->status() != 1 && part->status() < 83)
260  continue;
261 
263  part,
264  *geometry,
265  *hLHCInfo,
266  *hBeamParameters,
267  *hOpticalFunctions,
268  engine,
269  *pTracks,
270  *pStripRecHits,
271  *pPixelRecHits,
272  *pDiamondRecHits,
273  *pStripRecHitsPerParticle,
274  *pPixelRecHitsPerParticle,
275  *pDiamondRecHitsPerParticle);
276  }
277  }
278 
280  iEvent.put(std::move(pTracks));
281 
282  if (produceRecHits_) {
283  iEvent.put(std::move(pStripRecHits));
284  iEvent.put(std::move(pPixelRecHits));
285  iEvent.put(std::move(pDiamondRecHits));
286 
287  iEvent.put(std::move(pStripRecHitsPerParticle));
288  iEvent.put(std::move(pPixelRecHitsPerParticle));
289  iEvent.put(std::move(pDiamondRecHitsPerParticle));
290  }
291 }
292 
293 //----------------------------------------------------------------------------------------------------
294 
296  const HepMC::GenVertex *in_vtx,
297  const HepMC::GenParticle *in_trk,
298  const CTPPSGeometry &geometry,
299  const LHCInfo &lhcInfo,
300  const CTPPSBeamParameters &beamParameters,
302  CLHEP::HepRandomEngine *rndEngine,
303  std::vector<CTPPSLocalTrackLite> &out_tracks,
304  edm::DetSetVector<TotemRPRecHit> &out_strip_hits,
305  edm::DetSetVector<CTPPSPixelRecHit> &out_pixel_hits,
306  edm::DetSetVector<CTPPSDiamondRecHit> &out_diamond_hits,
307  std::map<int, edm::DetSetVector<TotemRPRecHit>> &out_strip_hits_per_particle,
308  std::map<int, edm::DetSetVector<CTPPSPixelRecHit>> &out_pixel_hits_per_particle,
309  std::map<int, edm::DetSetVector<CTPPSDiamondRecHit>> &out_diamond_hits_per_particle) const {
312 
313  std::stringstream ssLog;
314 
315  // vectors in CMS convention
316  const HepMC::FourVector &vtx_cms = in_vtx->position(); // in mm
317  const HepMC::FourVector &mom_cms = in_trk->momentum();
318 
319  // transformation to LHC/TOTEM convention
320  HepMC::FourVector vtx_lhc(-vtx_cms.x(), vtx_cms.y(), -vtx_cms.z(), vtx_cms.t());
321  HepMC::FourVector mom_lhc(-mom_cms.x(), mom_cms.y(), -mom_cms.z(), mom_cms.t());
322 
323  // determine the LHC arm and related parameters
324  unsigned int arm = 3;
325  double z_sign;
326  double beamMomentum = 0.;
327  double xangle = 0.;
328  const std::unique_ptr<TF2> *empiricalAperture;
329  if (mom_lhc.z() < 0) // sector 45
330  {
331  arm = 0;
332  z_sign = -1;
333  beamMomentum = beamParameters.getBeamMom45();
334  xangle = beamParameters.getHalfXangleX45();
335  empiricalAperture = &empiricalAperture45_;
336  } else { // sector 56
337  arm = 1;
338  z_sign = +1;
339  beamMomentum = beamParameters.getBeamMom56();
340  xangle = beamParameters.getHalfXangleX56();
341  empiricalAperture = &empiricalAperture56_;
342  }
343 
344  // calculate effective RP arrival time
345  // effective time mimics the timing calibration -> effective times are distributed about 0
346  // units:
347  // vertex: all components in mm
348  // c_light: in mm/ns
349  // time_eff: in ns
350  const double time_eff = (vtx_lhc.t() - z_sign * vtx_lhc.z()) / CLHEP::c_light;
351 
352  // calculate kinematics for optics parametrisation
353  const double p = mom_lhc.rho();
354  const double xi = 1. - p / beamMomentum;
355  const double th_x_phys = mom_lhc.x() / p;
356  const double th_y_phys = mom_lhc.y() / p;
357  const double vtx_lhc_eff_x = vtx_lhc.x() - vtx_lhc.z() * (mom_lhc.x() / mom_lhc.z() + xangle);
358  const double vtx_lhc_eff_y = vtx_lhc.y() - vtx_lhc.z() * (mom_lhc.y() / mom_lhc.z());
359 
360  if (verbosity_) {
361  ssLog << "simu: xi = " << xi << ", th_x_phys = " << th_x_phys << ", th_y_phys = " << th_y_phys
362  << ", vtx_lhc_eff_x = " << vtx_lhc_eff_x << ", vtx_lhc_eff_y = " << vtx_lhc_eff_y << std::endl;
363  }
364 
365  // check empirical aperture
367  const auto &xangle = lhcInfo.crossingAngle();
368  (*empiricalAperture)->SetParameter("xi", xi);
369  (*empiricalAperture)->SetParameter("xangle", xangle);
370  const double th_x_th = (*empiricalAperture)->EvalPar(nullptr);
371 
372  if (th_x_th > th_x_phys) {
373  if (verbosity_) {
374  ssLog << "stop because of empirical appertures";
375  edm::LogInfo("CTPPSDirectProtonSimulation") << ssLog.str();
376  }
377 
378  return;
379  }
380  }
381 
382  // transport the proton into each pot/scoring plane
383  for (const auto &ofp : opticalFunctions) {
384  CTPPSDetId rpId(ofp.first);
385  const unsigned int rpDecId = rpId.arm() * 100 + rpId.station() * 10 + rpId.rp();
386 
387  // first check the arm
388  if (rpId.arm() != arm)
389  continue;
390 
391  if (verbosity_)
392  ssLog << " RP " << rpDecId << std::endl;
393 
394  // transport proton
396  vtx_lhc_eff_x * 1E-1, th_x_phys, vtx_lhc_eff_y * 1E-1, th_y_phys, xi}; // conversions: mm -> cm
398  ofp.second.transport(k_in, k_out, true);
399 
400  double b_x = k_out.x * 1E1, b_y = k_out.y * 1E1; // conversions: cm -> mm
401  double a_x = k_out.th_x, a_y = k_out.th_y;
402 
403  // if needed, subtract beam position and angle
405  // determine beam position
406  LHCInterpolatedOpticalFunctionsSet::Kinematics k_be_in = {0., 0., 0., 0., 0.};
408  ofp.second.transport(k_be_in, k_be_out, true);
409 
410  a_x -= k_be_out.th_x;
411  a_y -= k_be_out.th_y;
412  b_x -= k_be_out.x * 1E1;
413  b_y -= k_be_out.y * 1E1; // conversions: cm -> mm
414  }
415 
416  const double z_scoringPlane = ofp.second.getScoringPlaneZ() * 1E1; // conversion: cm --> mm
417 
418  if (verbosity_) {
419  ssLog << " proton transported: a_x = " << a_x << " rad, a_y = " << a_y << " rad, b_x = " << b_x
420  << " mm, b_y = " << b_y << " mm, z = " << z_scoringPlane << " mm" << std::endl;
421  }
422 
423  // save scoring plane hit
425  out_tracks.emplace_back(
426  rpId.rawId(), b_x, 0., b_y, 0., 0., 0., 0., 0., 0., CTPPSpixelLocalTrackReconstructionInfo::invalid, 0, 0., 0.);
427 
428  // stop if rec hits are not to be produced
429  if (!produceRecHits_)
430  continue;
431 
432  // loop over all sensors in the RP
433  for (const auto &detIdInt : geometry.sensorsInRP(rpId)) {
434  CTPPSDetId detId(detIdInt);
435 
436  // determine the track impact point (in global coordinates)
437  // !! this assumes that local axes (1, 0, 0) and (0, 1, 0) describe the sensor surface
438  const auto &gl_o = geometry.localToGlobal(detId, CTPPSGeometry::Vector(0, 0, 0));
439  const auto &gl_a1 = geometry.localToGlobal(detId, CTPPSGeometry::Vector(1, 0, 0)) - gl_o;
440  const auto &gl_a2 = geometry.localToGlobal(detId, CTPPSGeometry::Vector(0, 1, 0)) - gl_o;
441 
442  double gl_o_z = gl_o.z();
443  if (detId.subdetId() == CTPPSDetId::sdTimingDiamond)
444  gl_o_z = -gl_o_z; // fix bug in diamond geometry
445 
446  TMatrixD A(3, 3);
447  TVectorD B(3);
448  A(0, 0) = a_x;
449  A(0, 1) = -gl_a1.x();
450  A(0, 2) = -gl_a2.x();
451  B(0) = gl_o.x() - b_x;
452  A(1, 0) = a_y;
453  A(1, 1) = -gl_a1.y();
454  A(1, 2) = -gl_a2.y();
455  B(1) = gl_o.y() - b_y;
456  A(2, 0) = z_sign;
457  A(2, 1) = -gl_a1.z();
458  A(2, 2) = -gl_a2.z();
459  B(2) = gl_o_z - z_scoringPlane;
460  TMatrixD Ai(3, 3);
461  Ai = A.Invert();
462  TVectorD P(3);
463  P = Ai * B;
464 
465  double ze = P(0);
466  const CTPPSGeometry::Vector h_glo(a_x * ze + b_x, a_y * ze + b_y, z_sign * ze + z_scoringPlane);
467 
468  // hit in local coordinates
469  auto h_loc = geometry.globalToLocal(detId, h_glo);
470 
471  if (verbosity_) {
472  ssLog << std::endl
473  << " de z = " << P(0) << " mm, p1 = " << P(1) << " mm, p2 = " << P(2) << " mm" << std::endl
474  << " h_glo: x = " << h_glo.x() << " mm, y = " << h_glo.y() << " mm, z = " << h_glo.z() << " mm"
475  << std::endl
476  << " h_loc: c1 = " << h_loc.x() << " mm, c2 = " << h_loc.y() << " mm, c3 = " << h_loc.z() << " mm"
477  << std::endl;
478  }
479 
480  // strips
481  if (detId.subdetId() == CTPPSDetId::sdTrackingStrip) {
482  double u = h_loc.x();
483  double v = h_loc.y();
484 
485  if (verbosity_ > 5)
486  ssLog << " u=" << u << ", v=" << v;
487 
488  // is it within detector?
490  if (verbosity_ > 5)
491  ssLog << " | no hit" << std::endl;
492  continue;
493  }
494 
495  // round the measurement
496  if (roundToPitch_) {
497  double m = stripZeroPosition_ - v;
498  signed int strip = (int)floor(m / pitchStrips_ + 0.5);
499 
501 
502  if (verbosity_ > 5)
503  ssLog << " | strip=" << strip;
504  }
505 
506  double sigma = pitchStrips_ / sqrt(12.);
507 
508  if (verbosity_ > 5)
509  ssLog << " | m=" << v << ", sigma=" << sigma << std::endl;
510 
511  edm::DetSet<TotemRPRecHit> &hits = out_strip_hits.find_or_insert(detId);
512  hits.push_back(TotemRPRecHit(v, sigma));
513 
514  edm::DetSet<TotemRPRecHit> &hits_per_particle =
515  out_strip_hits_per_particle[in_trk->barcode()].find_or_insert(detId);
516  hits_per_particle.push_back(TotemRPRecHit(v, sigma));
517  }
518 
519  // diamonds
520  if (detId.subdetId() == CTPPSDetId::sdTimingDiamond) {
521  CTPPSDiamondDetId diamondDetId(detIdInt);
522 
523  const auto *dg = geometry.sensor(detIdInt);
524 
525  const auto &diamondDimensions = dg->getDiamondDimensions();
526  const auto x_half_width = diamondDimensions.xHalfWidth;
527  const auto y_half_width = diamondDimensions.yHalfWidth;
528  const auto z_half_width = diamondDimensions.zHalfWidth;
529 
530  const double time_resolution = (diamondDetId.arm() == 0) ? timeResolutionDiamonds45_->Eval(h_glo.x())
531  : timeResolutionDiamonds56_->Eval(h_glo.x());
532 
533  // check acceptance
534  if (h_loc.x() < -x_half_width || h_loc.x() > +x_half_width || h_loc.y() < -y_half_width ||
535  h_loc.y() > +y_half_width)
536  continue;
537 
538  // timing information
539  const double t0 = time_eff + CLHEP::RandGauss::shoot(rndEngine, 0., time_resolution);
540  const double tot = 1.23456;
541  const double ch_t_precis = time_resolution;
542  const int time_slice = 0;
543 
544  // build rec hit
545  const bool multiHit = false;
546 
547  CTPPSDiamondRecHit rc(gl_o.x(),
548  2. * x_half_width,
549  gl_o.y(),
550  2. * y_half_width,
551  gl_o_z,
552  2. * z_half_width,
553  t0,
554  tot,
555  ch_t_precis,
556  time_slice,
557  HPTDCErrorFlags(),
558  multiHit);
559 
560  edm::DetSet<CTPPSDiamondRecHit> &hits = out_diamond_hits.find_or_insert(detId);
561  hits.push_back(rc);
562 
563  edm::DetSet<CTPPSDiamondRecHit> &hits_per_particle =
564  out_diamond_hits_per_particle[in_trk->barcode()].find_or_insert(detId);
565  hits_per_particle.push_back(rc);
566  }
567 
568  // pixels
569  if (detId.subdetId() == CTPPSDetId::sdTrackingPixel) {
570  if (verbosity_) {
571  CTPPSPixelDetId pixelDetId(detIdInt);
572  ssLog << " pixel plane " << pixelDetId.plane() << ": local hit x = " << h_loc.x()
573  << " mm, y = " << h_loc.y() << " mm, z = " << h_loc.z() << " mm" << std::endl;
574  }
575 
576  bool module3By2 = (geometry.sensor(detIdInt)->sensorType() != DDD_CTPPS_PIXELS_SENSOR_TYPE_2x2);
577  if (checkIsHit_ && !CTPPSPixelTopology::isPixelHit(h_loc.x(), h_loc.y(), module3By2))
578  continue;
579 
580  if (roundToPitch_) {
581  h_loc.SetX(pitchPixelsHor_ * floor(h_loc.x() / pitchPixelsHor_ + 0.5));
582  h_loc.SetY(pitchPixelsVer_ * floor(h_loc.y() / pitchPixelsVer_ + 0.5));
583  }
584 
585  if (verbosity_ > 5)
586  ssLog << " hit accepted: m1 = " << h_loc.x() << " mm, m2 = " << h_loc.y() << " mm" << std::endl;
587 
588  const double sigmaHor = pitchPixelsHor_ / sqrt(12.);
589  const double sigmaVer = pitchPixelsVer_ / sqrt(12.);
590 
591  const LocalPoint lp(h_loc.x(), h_loc.y(), h_loc.z());
592  const LocalError le(sigmaHor, 0., sigmaVer);
593 
594  edm::DetSet<CTPPSPixelRecHit> &hits = out_pixel_hits.find_or_insert(detId);
595  hits.push_back(CTPPSPixelRecHit(lp, le));
596 
597  edm::DetSet<CTPPSPixelRecHit> &hits_per_particle =
598  out_pixel_hits_per_particle[in_trk->barcode()].find_or_insert(detId);
599  hits_per_particle.push_back(CTPPSPixelRecHit(lp, le));
600  }
601  }
602  }
603 
604  if (verbosity_)
605  edm::LogInfo("CTPPSDirectProtonSimulation") << ssLog.str();
606 }
607 
608 //----------------------------------------------------------------------------------------------------
609 
CTPPSBeamParameters
Definition: CTPPSBeamParameters.h:22
TotemRPRecHit
Reconstructed hit in TOTEM RP.
Definition: TotemRPRecHit.h:17
edm::DetSet::push_back
void push_back(const T &t)
Definition: DetSet.h:66
edm::DetSetVector< TotemRPRecHit >
CTPPSDirectProtonSimulation::~CTPPSDirectProtonSimulation
~CTPPSDirectProtonSimulation() override
Definition: CTPPSDirectProtonSimulation.cc:63
RPTopology::y_width_
static const double y_width_
Definition: RPTopology.h:60
edm::RandomNumberGenerator::getEngine
virtual CLHEP::HepRandomEngine & getEngine(StreamID const &)=0
Use this engine in event methods.
geometry
ESHandle< TrackerGeometry > geometry
Definition: TkLasBeamFitter.cc:200
CTPPSBeamParameters.h
electrons_cff.bool
bool
Definition: electrons_cff.py:393
CTPPSBeamParametersRcd.h
CTPPSPixelRecHit
Definition: CTPPSPixelRecHit.h:17
CTPPSGeometry
The manager class for TOTEM RP geometry.
Definition: CTPPSGeometry.h:29
LHCInterpolatedOpticalFunctionsSet::Kinematics
proton kinematics description
Definition: LHCInterpolatedOpticalFunctionsSet.h:28
CTPPSDirectProtonSimulation::processProton
void processProton(const HepMC::GenVertex *in_vtx, const HepMC::GenParticle *in_trk, const CTPPSGeometry &geometry, const LHCInfo &lhcInfo, const CTPPSBeamParameters &beamParameters, const LHCInterpolatedOpticalFunctionsSetCollection &opticalFunctions, CLHEP::HepRandomEngine *rndEngine, std::vector< CTPPSLocalTrackLite > &out_tracks, edm::DetSetVector< TotemRPRecHit > &out_strip_hits, edm::DetSetVector< CTPPSPixelRecHit > &out_pixel_hits, edm::DetSetVector< CTPPSDiamondRecHit > &out_diamond_hits, std::map< int, edm::DetSetVector< TotemRPRecHit >> &out_strip_hits_per_particle, std::map< int, edm::DetSetVector< CTPPSPixelRecHit >> &out_pixel_hits_per_particle, std::map< int, edm::DetSetVector< CTPPSDiamondRecHit >> &out_diamond_hits_per_particle) const
Definition: CTPPSDirectProtonSimulation.cc:294
hfClusterShapes_cfi.hits
hits
Definition: hfClusterShapes_cfi.py:5
ESHandle.h
edm::DetSet
Definition: DetSet.h:23
CTPPSDirectProtonSimulation::timeResolutionDiamonds56_
std::unique_ptr< TF1 > timeResolutionDiamonds56_
x-dependent time resolution of diamonds (per rec hit) in ns
Definition: CTPPSDirectProtonSimulation.cc:118
edm::EDGetTokenT< edm::HepMCProduct >
CTPPSDirectProtonSimulation::insensitiveMarginStrips_
double insensitiveMarginStrips_
size of insensitive margin at sensor's edge facing the beam, in mm
Definition: CTPPSDirectProtonSimulation.cc:113
CTPPSDiamondRecHit
Reconstructed hit in diamond detectors.
Definition: CTPPSDiamondRecHit.h:16
edm
HLT enums.
Definition: AlignableModifier.h:19
RandomNumberGenerator.h
digitizers_cfi.strip
strip
Definition: digitizers_cfi.py:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CTPPSBeamParameters::getHalfXangleX56
double getHalfXangleX56() const
Definition: CTPPSBeamParameters.cc:70
geometry
Definition: geometry.py:1
CTPPSPixelDetId.h
hybridSuperClusters_cfi.xi
xi
Definition: hybridSuperClusters_cfi.py:10
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
LHCInfo.h
CTPPSDirectProtonSimulation
Definition: CTPPSDirectProtonSimulation.cc:57
CTPPSBeamParameters::getBeamMom56
double getBeamMom56() const
Definition: CTPPSBeamParameters.cc:56
LHCInfo
Definition: LHCInfo.h:12
EDProducer.h
CTPPSBeamParameters::getHalfXangleX45
double getHalfXangleX45() const
Definition: CTPPSBeamParameters.cc:68
CTPPSLocalTrackLite.h
TotemRPRecHit.h
CTPPSPixelTopology::isPixelHit
static bool isPixelHit(float xLocalCoordinate, float yLocalCoordinate, bool is3x2=true)
Definition: CTPPSPixelTopology.h:39
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
findQualityFiles.v
v
Definition: findQualityFiles.py:179
CTPPSpixelLocalTrackReconstructionInfo::invalid
DDD_CTPPS_PIXELS_SENSOR_TYPE_2x2
const std::string DDD_CTPPS_PIXELS_SENSOR_TYPE_2x2
Definition: CTPPSDDDNames.h:16
year_2016_postTS2_cff.rpId
rpId
Definition: year_2016_postTS2_cff.py:23
tools.TF1
TF1
Definition: tools.py:23
edm::Handle< edm::HepMCProduct >
CTPPSPixelRecHit.h
VeryForwardMisalignedGeometryRecord.h
LHCInterpolatedOpticalFunctionsSetCollection
Definition: LHCInterpolatedOpticalFunctionsSetCollection.h:10
CTPPSPixelTopology.h
CTPPSDetId::sdTrackingStrip
Definition: CTPPSDetId.h:44
CTPPSGeometry.h
MakerMacros.h
HPTDCErrorFlags
Definition: HPTDCErrorFlags.h:15
CTPPSDirectProtonSimulation::roundToPitch_
bool roundToPitch_
Definition: CTPPSDirectProtonSimulation.cc:109
part
part
Definition: HCALResponse.h:20
CTPPSDirectProtonSimulation::stripZeroPosition_
double stripZeroPosition_
internal variable: v position of strip 0, in mm
Definition: CTPPSDirectProtonSimulation.cc:126
edm::EventSetup::get
T get() const
Definition: EventSetup.h:80
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
LHCInfo::crossingAngle
const float crossingAngle() const
Definition: LHCInfo.cc:182
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
RPTopology::last_strip_to_border_dist_
static const double last_strip_to_border_dist_
Definition: RPTopology.h:62
LHCInterpolatedOpticalFunctionsSet::Kinematics::y
double y
Definition: LHCInterpolatedOpticalFunctionsSet.h:31
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
CTPPSDirectProtonSimulation::CTPPSDirectProtonSimulation
CTPPSDirectProtonSimulation(const edm::ParameterSet &)
Definition: CTPPSDirectProtonSimulation.cc:128
Service.h
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
CTPPSDirectProtonSimulation::hepMCToken_
edm::EDGetTokenT< edm::HepMCProduct > hepMCToken_
Definition: CTPPSDirectProtonSimulation.cc:94
CTPPSDirectProtonSimulation::produceRecHits_
bool produceRecHits_
Definition: CTPPSDirectProtonSimulation.cc:98
CTPPSDiamondRecHit.h
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CTPPSDirectProtonSimulation::pitchStrips_
double pitchStrips_
strip pitch in mm
Definition: CTPPSDirectProtonSimulation.cc:112
edm::ESHandle< LHCInfo >
LHCInterpolatedOpticalFunctionsSetCollection.h
CTPPSDetId::sdTimingDiamond
Definition: CTPPSDetId.h:44
CTPPSDirectProtonSimulation::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: CTPPSDirectProtonSimulation.cc:178
LHCInterpolatedOpticalFunctionsSet::Kinematics::x
double x
Definition: LHCInterpolatedOpticalFunctionsSet.h:29
LHCInfoRcd
Definition: LHCInfoRcd.h:24
Point3DBase< float, LocalTag >
CTPPSDetId::sdTrackingPixel
Definition: CTPPSDetId.h:44
tools.TF2
TF2
Definition: tools.py:24
CTPPSDirectProtonSimulation::lhcInfoLabel_
std::string lhcInfoLabel_
input
Definition: CTPPSDirectProtonSimulation.cc:91
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
CTPPSDirectProtonSimulation::pitchPixelsHor_
double pitchPixelsHor_
Definition: CTPPSDirectProtonSimulation.cc:115
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
CTPPSDirectProtonSimulation::verbosity_
unsigned int verbosity_
Definition: CTPPSDirectProtonSimulation.cc:121
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
OpticalFunctionsConfig_cfi.xangle
xangle
Definition: OpticalFunctionsConfig_cfi.py:17
CTPPSDirectProtonSimulation::checkIsHit_
bool checkIsHit_
Definition: CTPPSDirectProtonSimulation.cc:110
CTPPSDetId::arm
uint32_t arm() const
Definition: CTPPSDetId.h:55
CTPPSDirectProtonSimulation::produceHitsRelativeToBeam_
bool produceHitsRelativeToBeam_
Definition: CTPPSDirectProtonSimulation.cc:108
LHCInterpolatedOpticalFunctionsSet::Kinematics::th_y
double th_y
Definition: LHCInterpolatedOpticalFunctionsSet.h:32
CTPPSDiamondDetId.h
CTPPSDiamondDetId
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Definition: CTPPSDiamondDetId.h:24
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
RPTopology::pitch_
static const double pitch_
Definition: RPTopology.h:56
LocalError
Definition: LocalError.h:12
CTPPSDirectProtonSimulation::produceScoringPlaneHits_
bool produceScoringPlaneHits_
flags what output to be produced
Definition: CTPPSDirectProtonSimulation.cc:97
A
CTPPSDetId
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:31
edm::Service< edm::RandomNumberGenerator >
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
CTPPSInterpolatedOpticsRcd.h
RPTopology::IsHit
static bool IsHit(double u, double v, double insensitiveMargin=0)
Definition: RPTopology.cc:28
edm::stream::EDProducer
Definition: EDProducer.h:38
CTPPSPixelDetId::plane
uint32_t plane() const
Definition: CTPPSPixelDetId.h:37
RPTopology::no_of_strips_
static const unsigned short no_of_strips_
Definition: RPTopology.h:58
edm::EventSetup
Definition: EventSetup.h:57
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
CTPPSBeamParameters::getBeamMom45
double getBeamMom45() const
Definition: CTPPSBeamParameters.cc:55
DetSetVector.h
CTPPSPixelDetId
Definition: CTPPSPixelDetId.h:16
get
#define get
CTPPSDirectProtonSimulation::empiricalAperture56_
std::unique_ptr< TF2 > empiricalAperture56_
Definition: CTPPSDirectProtonSimulation.cc:106
CTPPSDirectProtonSimulation::pitchPixelsVer_
double pitchPixelsVer_
Definition: CTPPSDirectProtonSimulation.cc:116
CTPPSBeamParametersRcd
Definition: CTPPSBeamParametersRcd.h:14
CTPPSDirectProtonSimulation::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CTPPSDirectProtonSimulation.cc:212
VeryForwardMisalignedGeometryRecord
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
Definition: VeryForwardMisalignedGeometryRecord.h:23
TtFullHadDaughter::B
static const std::string B
Definition: TtFullHadronicEvent.h:9
MaterialEffects_cfi.A
A
Definition: MaterialEffects_cfi.py:11
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
Frameworkfwd.h
ESWatcher.h
EventSetup.h
RPTopology.h
CTPPSDetId.h
edm::DetSetVector::find_or_insert
reference find_or_insert(det_id_type id)
Definition: DetSetVector.h:234
HepMCProduct
genParticles_cff.map
map
Definition: genParticles_cff.py:11
LHCInterpolatedOpticalFunctionsSet::Kinematics::th_x
double th_x
Definition: LHCInterpolatedOpticalFunctionsSet.h:30
ParameterSet.h
LHCInfoRcd.h
HepMCProduct.h
P
std::pair< OmniClusterRef, TrackingParticleRef > P
Definition: BDHadronTrackMonitoringAnalyzer.cc:202
edm::Event
Definition: Event.h:73
CTPPSDirectProtonSimulation::empiricalAperture45_
std::unique_ptr< TF2 > empiricalAperture45_
Definition: CTPPSDirectProtonSimulation.cc:105
CTPPSDirectProtonSimulation::opticsLabel_
std::string opticsLabel_
Definition: CTPPSDirectProtonSimulation.cc:92
edm::InputTag
Definition: InputTag.h:15
OpticalFunctionsConfig_cfi.opticalFunctions
opticalFunctions
Definition: OpticalFunctionsConfig_cfi.py:16
CTPPSDirectProtonSimulation::useEmpiricalApertures_
bool useEmpiricalApertures_
Definition: CTPPSDirectProtonSimulation.cc:103
CTPPSDirectProtonSimulation::timeResolutionDiamonds45_
std::unique_ptr< TF1 > timeResolutionDiamonds45_
Definition: CTPPSDirectProtonSimulation.cc:118
CTPPSInterpolatedOpticsRcd
Definition: CTPPSInterpolatedOpticsRcd.h:13
CTPPSDirectProtonSimulation::checkApertures_
bool checkApertures_
simulation parameters
Definition: CTPPSDirectProtonSimulation.cc:101
CTPPSGeometry::Vector
DetGeomDesc::Translation Vector
Definition: CTPPSGeometry.h:39