CMS 3D CMS Logo

CTPPSFastTrackingProducer.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FastSimulation/CTPPSFastTrackingProducer
4 // Class: CTPPSFastTrackingProducer
5 //
13 //
14 // Original Author: Sandro Fonseca De Souza
15 // Created: Thu, 29 Sep 2016 16:13:41 GMT
16 //
17 //
18 
19 #include <memory>
20 
40 
41 #include "TLorentzVector.h"
42 
43 // hector includes
44 #include "H_Parameters.h"
45 #include "H_BeamLine.h"
46 #include "H_RecRPObject.h"
47 #include "H_BeamParticle.h"
48 
50 public:
52 
53 private:
54  void produce(edm::Event&, const edm::EventSetup&) override;
55 
56  // ----------member data ---------------------------
57 
58  typedef std::vector<CTPPSFastRecHit> CTPPSFastRecHitContainer;
61  void FastReco(int Direction, H_RecRPObject* station);
62  void Reconstruction();
63  void ReconstructArm(
64  H_RecRPObject* pps_station, double x1, double y1, double x2, double y2, double& tx, double& ty, double& eloss);
65  void MatchCellId(int cellId, std::vector<int> vrecCellId, std::vector<double> vrecTof, bool& match, double& recTof);
66  bool SearchTrack(int,
67  int,
68  int Direction,
69  double& xi,
70  double& t,
71  double& partP,
72  double& pt,
73  double& thx,
74  double& thy,
75  double& x0,
76  double& y0,
77  double& xt,
78  double& yt,
79  double& X1d,
80  double& Y1d,
81  double& X2d,
82  double& Y2d);
83  void TrackerStationClear();
85  void ProjectToToF(const double x1, const double y1, const double x2, const double y2, double& xt, double& yt) {
86  xt = ((fz_timing - fz_tracker2) * (x2 - x1) / (fz_tracker2 - fz_tracker1)) + x2;
87  yt = ((fz_timing - fz_tracker2) * (y2 - y1) / (fz_tracker2 - fz_tracker1)) + y2;
88  };
89  // Hector objects
90  bool SetBeamLine();
91 
92  std::unique_ptr<H_BeamLine> m_beamlineCTPPS1;
93  std::unique_ptr<H_BeamLine> m_beamlineCTPPS2;
94  std::unique_ptr<H_RecRPObject> pps_stationF;
95  std::unique_ptr<H_RecRPObject> pps_stationB;
96 
99 
100  // Defaults
101  double lengthctpps;
103  double fBeamEnergy;
109  std::unique_ptr<CTPPSTrkStation> TrkStation_F; // auxiliary object with the tracker geometry
110  std::unique_ptr<CTPPSTrkStation> TrkStation_B;
111  std::unique_ptr<CTPPSTrkDetector> det1F;
112  std::unique_ptr<CTPPSTrkDetector> det1B;
113  std::unique_ptr<CTPPSTrkDetector> det2F;
114  std::unique_ptr<CTPPSTrkDetector> det2B;
115  std::unique_ptr<CTPPSToFDetector> detToF_F;
116  std::unique_ptr<CTPPSToFDetector> detToF_B;
117 
118  std::vector<CTPPSFastTrack> theCTPPSFastTrack;
119 
121 
122  std::vector<int> recCellId_F, recCellId_B;
123  std::vector<double> recTof_F, recTof_B;
124 
127  std::vector<double> fToFCellWidth;
131 };
133 // constructors and destructor
134 //
136  : m_verbosity(false), fBeamMomentum(0.), fCrossAngleCorr(false), fCrossingAngleBeam1(0.), fCrossingAngleBeam2(0.) {
137  //register your products
138  produces<edm::CTPPSFastTrackContainer>("CTPPSFastTrack");
139  using namespace edm;
140  _recHitToken = consumes<CTPPSFastRecHitContainer>(iConfig.getParameter<edm::InputTag>("recHitTag"));
141  m_verbosity = iConfig.getParameter<bool>("Verbosity");
142  // User definitons
143 
144  // Read beam parameters needed for Hector reconstruction
145  lengthctpps = iConfig.getParameter<double>("BeamLineLengthCTPPS");
146  beam1filename = iConfig.getParameter<string>("Beam1");
147  beam2filename = iConfig.getParameter<string>("Beam2");
148  fBeamEnergy = iConfig.getParameter<double>("BeamEnergy"); // beam energy in GeV
150  fCrossingAngleBeam1 = iConfig.getParameter<double>("CrossingAngleBeam1");
151  fCrossingAngleBeam2 = iConfig.getParameter<double>("CrossingAngleBeam2");
152 
153  if (fCrossingAngleBeam1 != 0 || fCrossingAngleBeam2 != 0)
154  fCrossAngleCorr = true;
155  //Read detectors positions and parameters
156 
157  fz_tracker1 = iConfig.getParameter<double>("Z_Tracker1");
158  fz_tracker2 = iConfig.getParameter<double>("Z_Tracker2");
159  fz_timing = iConfig.getParameter<double>("Z_Timing");
160  //
161  fTrackerWidth = iConfig.getParameter<double>("TrackerWidth");
162  fTrackerHeight = iConfig.getParameter<double>("TrackerHeight");
163  fTrackerInsertion = iConfig.getParameter<double>("TrackerInsertion");
164  fBeamXRMS_Trk1 = iConfig.getParameter<double>("BeamXRMS_Trk1");
165  fBeamXRMS_Trk2 = iConfig.getParameter<double>("BeamXRMS_Trk2");
166  fTrk1XOffset = iConfig.getParameter<double>("Trk1XOffset");
167  fTrk2XOffset = iConfig.getParameter<double>("Trk2XOffset");
168  fToFCellWidth = iConfig.getUntrackedParameter<std::vector<double> >("ToFCellWidth");
169  fToFCellHeight = iConfig.getParameter<double>("ToFCellHeight");
170  fToFPitchX = iConfig.getParameter<double>("ToFPitchX");
171  fToFPitchY = iConfig.getParameter<double>("ToFPitchY");
172  fToFNCellX = iConfig.getParameter<int>("ToFNCellX");
173  fToFNCellY = iConfig.getParameter<int>("ToFNCellY");
174  fToFInsertion = iConfig.getParameter<double>("ToFInsertion");
175  fBeamXRMS_ToF = iConfig.getParameter<double>("BeamXRMS_ToF");
176  fToFXOffset = iConfig.getParameter<double>("ToFXOffset");
177  fTimeSigma = iConfig.getParameter<double>("TimeSigma");
178  fImpParcut = iConfig.getParameter<double>("ImpParcut");
179 
180  if (!SetBeamLine()) {
181  if (m_verbosity)
182  LogDebug("CTPPSFastTrackingProducer") << "CTPPSFastTrackingProducer: WARNING: lengthctpps= " << lengthctpps;
183  return;
184  }
185 
186  // Create a particle to get the beam energy from the beam file
187  // Take care: the z inside the station is in meters
188  //
189  //Tracker Detector Description
190  det1F = std::make_unique<CTPPSTrkDetector>(
192  det2F = std::make_unique<CTPPSTrkDetector>(
194  det1B = std::make_unique<CTPPSTrkDetector>(
196  det2B = std::make_unique<CTPPSTrkDetector>(
198 
199  //Timing Detector Description
200  std::vector<double> vToFCellWidth;
201  vToFCellWidth.reserve(8);
202  for (int i = 0; i < 8; i++) {
203  vToFCellWidth.push_back(fToFCellWidth[i]);
204  }
205  double pos_tof = fToFInsertion * fBeamXRMS_ToF + fToFXOffset;
206  detToF_F = std::make_unique<CTPPSToFDetector>(
207  fToFNCellX, fToFNCellY, vToFCellWidth, fToFCellHeight, fToFPitchX, fToFPitchY, pos_tof, fTimeSigma);
208  detToF_B = std::make_unique<CTPPSToFDetector>(
209  fToFNCellX, fToFNCellY, vToFCellWidth, fToFCellHeight, fToFPitchX, fToFPitchY, pos_tof, fTimeSigma);
210  //
211 }
212 
213 // ------------ method called to produce the data ------------
215  using namespace edm;
218  iEvent.getByToken(_recHitToken, recHits);
219  recCellId_F.clear();
220  recCellId_B.clear();
221  recTof_F.clear();
222  recTof_B.clear();
224  Reconstruction();
226 
227  std::unique_ptr<CTPPSFastTrackContainer> output_tracks(new CTPPSFastTrackContainer);
228  int n = 0;
229  for (std::vector<CTPPSFastTrack>::const_iterator i = theCTPPSFastTrack.begin(); i != theCTPPSFastTrack.end(); i++) {
230  output_tracks->push_back(*i);
231  n += 1;
232  }
233 
234  iEvent.put(std::move(output_tracks), "CTPPSFastTrack");
235 } //end
236 
239  TrkStation_F->first.clear();
240  TrkStation_F->second.clear();
241  TrkStation_B->first.clear();
242  TrkStation_B->second.clear();
243 }
246  det1F->clear();
247  det1B->clear();
248  det2F->clear();
249  det2B->clear();
250  detToF_F->clear();
251  detToF_B->clear();
252 }
253 
256  // DetId codification for PSimHit taken from CTPPSPixel- It will be replaced by CTPPSDetId
257  // 2014314496 -> Tracker1 zPositive
258  // 2014838784 -> Tracker2 zPositive
259  // 2046820352 -> Timing zPositive
260  // 2031091712 -> Tracker1 zNegative
261  // 2031616000 -> Tracker2 zNegative
262  // 2063597568 -> Timing zNegative
263 
264  for (unsigned int irecHits = 0; irecHits < recHits->size(); ++irecHits) {
265  const CTPPSFastRecHit* recHitDet = &(*recHits)[irecHits];
266  unsigned int detlayerId = recHitDet->detUnitId();
267  double x = recHitDet->entryPoint().x();
268  double y = recHitDet->entryPoint().y();
269  double z = recHitDet->entryPoint().z();
270  float tof = recHitDet->tof();
271  if (detlayerId == 2014314496)
272  det1F->AddHit(detlayerId, x, y, z);
273  else if (detlayerId == 2014838784)
274  det2F->AddHit(detlayerId, x, y, z);
275  else if (detlayerId == 2031091712)
276  det1B->AddHit(detlayerId, x, y, z);
277  else if (detlayerId == 2031616000)
278  det2B->AddHit(detlayerId, x, y, z);
279  else if (detlayerId == 2046820352) {
280  detToF_F->AddHit(x, y, tof);
281  recCellId_F.push_back(detToF_F->findCellId(x, y));
282  recTof_F.push_back(tof);
283  } else if (detlayerId == 2063597568) {
284  detToF_B->AddHit(x, y, tof);
285  recCellId_B.push_back(detToF_B->findCellId(x, y));
286  recTof_B.push_back(tof);
287  }
288 
289  } //LOOP TRK
290  //creating Stations
291  TrkStation_F = std::make_unique<CTPPSTrkStation>(*det1F, *det2F);
292  TrkStation_B = std::make_unique<CTPPSTrkStation>(*det1B, *det2B);
293 } // end function
294 
296  theCTPPSFastTrack.clear();
297  int Direction;
298  Direction = 1; //cms positive Z / forward
300  Direction = -1; //cms negative Z / backward
302 } //end Reconstruction
303 
305  int j,
306  int Direction,
307  double& xi,
308  double& t,
309  double& partP,
310  double& pt,
311  double& thx,
312  double& thy,
313  double& x0,
314  double& y0,
315  double& xt,
316  double& yt,
317  double& X1d,
318  double& Y1d,
319  double& X2d,
320  double& Y2d) {
321  // Given 1 hit in Tracker1 and 1 hit in Tracker2 try to make a track with Hector
322  double theta = 0.;
323  xi = 0;
324  t = 0;
325  partP = 0;
326  pt = 0;
327  x0 = 0.;
328  y0 = 0.;
329  xt = 0.;
330  yt = 0.;
331  X1d = 0.;
332  Y1d = 0.;
333  X2d = 0.;
334  Y2d = 0.;
335  CTPPSTrkDetector* det1 = nullptr;
336  CTPPSTrkDetector* det2 = nullptr;
337  H_RecRPObject* station = nullptr;
338  // Separate in forward and backward stations according to direction
339  if (Direction > 0) {
340  det1 = &(TrkStation_F->first);
341  det2 = &(TrkStation_F->second);
342  station = &*pps_stationF;
343  } else {
344  det1 = &(TrkStation_B->first);
345  det2 = &(TrkStation_B->second);
346  station = &*pps_stationB;
347  }
348  if (det1->ppsNHits_ <= i || det2->ppsNHits_ <= j)
349  return false;
350  //
351  double x1 = det1->ppsX_.at(i);
352  double y1 = det1->ppsY_.at(i);
353  double x2 = det2->ppsX_.at(j);
354  double y2 = det2->ppsY_.at(j);
355  double eloss;
356 
357  //thx and thy are returned in microrad
359  station, Direction * x1, y1, Direction * x2, y2, thx, thy, eloss); // Pass the hits in the LHC ref. frame
360  thx *= -Direction; // invert to the CMS ref frame
361 
362  // Protect for unphysical results
363  if (std::isnan(eloss) || std::isinf(eloss) || std::isnan(thx) || std::isinf(thx) || std::isnan(thy) ||
364  std::isinf(thy))
365  return false;
366  //
367 
368  if (m_verbosity)
369  LogDebug("CTPPSFastTrackingProducer::SearchTrack:") << "thx " << thx << " thy " << thy << " eloss " << eloss;
370 
371  // Get the start point of the reconstructed track near the origin made by Hector in the CMS ref. frame
372  x0 = -Direction * station->getX0() * um_to_cm;
373  y0 = station->getY0() * um_to_cm;
374  double ImpPar = sqrt(x0 * x0 + y0 * y0);
375  if (ImpPar > fImpParcut)
376  return false;
377  if (eloss < 0. || eloss > fBeamEnergy)
378  return false;
379  //
380  // Calculate the reconstructed track parameters
381  theta = sqrt(thx * thx + thy * thy) * urad;
382  xi = eloss / fBeamEnergy;
383  double energy = fBeamEnergy * (1. - xi);
385  t = -2. * (PPSTools::ProtonMassSQ - fBeamEnergy * energy + fBeamMomentum * partP * cos(theta));
386  pt = sqrt(pow(partP * thx * urad, 2) + pow(partP * thy * urad, 2));
387  if (xi < 0. || xi > 1. || t < 0. || t > 10. || pt <= 0.) {
388  xi = 0.;
389  t = 0.;
390  partP = 0.;
391  pt = 0.;
392  theta = 0.;
393  x0 = 0.;
394  y0 = 0.;
395  return false; // unphysical values
396  }
397  //Try to include the timing detector in the track
398  ProjectToToF(x1, y1, x2, y2, xt, yt); // the projections is done in the CMS ref frame
399  X1d = x1;
400  Y1d = y1;
401  X2d = x2;
402  Y2d = y2;
403  return true;
404 } //end SearchTrack
405 
407  H_RecRPObject* pps_station, double x1, double y1, double x2, double y2, double& tx, double& ty, double& eloss) {
408  tx = 0.;
409  ty = 0.;
410  eloss = 0.;
411  if (!pps_station)
412  return;
413  x1 *= mm_to_um;
414  x2 *= mm_to_um;
415  y1 *= mm_to_um;
416  y2 *= mm_to_um;
417  pps_station->setPositions(x1, y1, x2, y2);
418  double energy = pps_station->getE(AM); // dummy call needed to calculate some Hector internal parameter
419  if (std::isnan(energy) || std::isinf(energy))
420  return;
421  tx = pps_station->getTXIP(); // change orientation to CMS
422  ty = pps_station->getTYIP();
423  eloss = pps_station->getE();
424 }
425 
427  int cellId, std::vector<int> vrecCellId, std::vector<double> vrecTof, bool& match, double& recTof) {
428  for (unsigned int i = 0; i < vrecCellId.size(); i++) {
429  if (cellId == vrecCellId.at(i)) {
430  match = true;
431  recTof = vrecTof.at(i);
432  continue;
433  }
434  }
435 }
436 
438  double theta = 0.;
439  double xi, t, partP, pt, phi, x0, y0, thx, thy, xt, yt, X1d, Y1d, X2d, Y2d;
440  CTPPSTrkDetector* Trk1 = nullptr;
441  CTPPSTrkDetector* Trk2 = nullptr;
442  double pos_tof = fToFInsertion * fBeamXRMS_ToF + fToFXOffset;
443  int cellId = 0;
444  std::vector<double> vToFCellWidth;
445  vToFCellWidth.reserve(8);
446  for (int i = 0; i < 8; i++) {
447  vToFCellWidth.push_back(fToFCellWidth[i]);
448  }
450  fToFNCellX, fToFNCellY, vToFCellWidth, fToFCellHeight, fToFPitchX, fToFPitchY, pos_tof, fTimeSigma);
451  if (Direction > 0) {
452  Trk1 = &(TrkStation_F->first);
453  Trk2 = &(TrkStation_F->second);
454  } else {
455  Trk1 = &(TrkStation_B->first);
456  Trk2 = &(TrkStation_B->second);
457  }
458  // Make a track from EVERY pair of hits combining Tracker1 and Tracker2.
459  // The tracks may not be independent as 1 hit may belong to more than 1 track.
460  for (int i = 0; i < (int)Trk1->ppsNHits_; i++) {
461  for (int j = 0; j < (int)Trk2->ppsNHits_; j++) {
462  if (SearchTrack(i, j, Direction, xi, t, partP, pt, thx, thy, x0, y0, xt, yt, X1d, Y1d, X2d, Y2d)) {
463  // Check if the hitted timing cell matches the reconstructed track
464  cellId = ToF->findCellId(xt, yt);
465  double recTof = 0.;
466  bool matchCellId = false;
467  if (Direction > 0) {
468  theta = sqrt(thx * thx + thy * thy) * urad;
469  MatchCellId(cellId, recCellId_F, recTof_F, matchCellId, recTof);
470  } else if (Direction < 0) {
471  theta = TMath::Pi() - sqrt(thx * thx + thy * thy) * urad;
472  MatchCellId(cellId, recCellId_B, recTof_B, matchCellId, recTof);
473  }
474  phi = atan2(thy, thx); // at this point, thx is already in the cms ref. frame
475 
476  double px = partP * sin(theta) * cos(phi);
477  double py = partP * sin(theta) * sin(phi);
478  double pz = partP * cos(theta);
479  double e = sqrt(partP * partP + PPSTools::ProtonMassSQ);
480  TLorentzVector p(px, py, pz, e);
481  // Invert the Lorentz boost made to take into account the crossing angle during simulation
482  if (fCrossAngleCorr) {
484  }
485  //Getting the Xi and t (squared four momentum transferred) of the reconstructed track
486  PPSTools::Get_t_and_xi(const_cast<TLorentzVector*>(&p), t, xi, {fBeamMomentum, fBeamEnergy});
487  double pxx = p.Px();
488  double pyy = p.Py();
489  double pzz = p.Pz();
490  math::XYZVector momentum(pxx, pyy, pzz);
491  math::XYZPoint vertex(x0, y0, 0);
492 
493  track.setp(momentum);
495  track.sett(t);
496  track.setxi(xi);
497  track.setx1(X1d);
498  track.sety1(Y1d);
499  track.setx2(X2d);
500  track.sety2(Y2d);
501  if (matchCellId) {
502  track.setcellid(cellId);
503  track.settof(recTof);
504  } else {
505  track.setcellid(0);
506  track.settof(0.);
507  }
508  theCTPPSFastTrack.push_back(track);
509  }
510  }
511  }
512 } //end FastReco
513 
517  if (lengthctpps <= 0)
518  return false;
519  m_beamlineCTPPS1 = std::make_unique<H_BeamLine>(-1, lengthctpps + 0.1); // (direction, length)
520  m_beamlineCTPPS1->fill(b2.fullPath(), 1, "IP5");
521  m_beamlineCTPPS2 = std::make_unique<H_BeamLine>(1, lengthctpps + 0.1); //
522  m_beamlineCTPPS2->fill(b1.fullPath(), 1, "IP5");
523  m_beamlineCTPPS1->offsetElements(120, 0.097);
524  m_beamlineCTPPS2->offsetElements(120, -0.097);
525  pps_stationF = std::make_unique<H_RecRPObject>(fz_tracker1, fz_tracker2, *m_beamlineCTPPS1);
526  pps_stationB = std::make_unique<H_RecRPObject>(fz_tracker1, fz_tracker2, *m_beamlineCTPPS2);
527  return true;
528 }
529 //define this as a plug-in
CTPPSFastTrackingProducer::fTrackerWidth
double fTrackerWidth
Definition: CTPPSFastTrackingProducer.cc:126
CTPPSFastTrackContainer.h
CTPPSFastTrackingProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CTPPSFastTrackingProducer.cc:214
DDAxes::y
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
CTPPSFastTrackingProducer
Definition: CTPPSFastTrackingProducer.cc:49
CTPPSFastTrackingProducer::ProjectToToF
void ProjectToToF(const double x1, const double y1, const double x2, const double y2, double &xt, double &yt)
Definition: CTPPSFastTrackingProducer.cc:85
funct::false
false
Definition: Factorize.h:29
CTPPSTrkDetector::ppsX_
std::vector< double > ppsX_
Definition: CTPPSTrkDetector.h:16
CTPPSFastTrackingProducer::fToFPitchY
double fToFPitchY
Definition: CTPPSFastTrackingProducer.cc:128
CTPPSFastTrackingProducer::m_beamlineCTPPS1
std::unique_ptr< H_BeamLine > m_beamlineCTPPS1
Definition: CTPPSFastTrackingProducer.cc:92
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
CTPPSFastTrackingProducer::fBeamMomentum
double fBeamMomentum
Definition: CTPPSFastTrackingProducer.cc:104
CTPPSFastTrack::setx1
void setx1(float x1)
Definition: CTPPSFastTrack.h:93
CTPPSFastRecHit.h
Vector.h
CTPPSFastTrackingProducer::fBeamXRMS_Trk2
double fBeamXRMS_Trk2
Definition: CTPPSFastTrackingProducer.cc:126
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
edm::EDGetTokenT< CTPPSFastRecHitContainer >
relativeConstraints.station
station
Definition: relativeConstraints.py:67
multPhiCorr_741_25nsDY_cfi.py
py
Definition: multPhiCorr_741_25nsDY_cfi.py:12
edm
HLT enums.
Definition: AlignableModifier.h:19
testProducerWithPsetDescEmpty_cfi.x2
x2
Definition: testProducerWithPsetDescEmpty_cfi.py:28
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
CTPPSFastTrackingProducer::det1B
std::unique_ptr< CTPPSTrkDetector > det1B
Definition: CTPPSFastTrackingProducer.cc:112
CTPPSFastTrackingProducer::recTof_F
std::vector< double > recTof_F
Definition: CTPPSFastTrackingProducer.cc:123
CTPPSFastTrack::setvertex
void setvertex(const Point &vertex)
Definition: CTPPSFastTrack.h:85
CTPPSFastTrack::setp
void setp(const Vector &momentum)
Definition: CTPPSFastTrack.h:83
CTPPSFastTrack::sety2
void sety2(float y2)
Definition: CTPPSFastTrack.h:99
EDProducer.h
PPSUnitConversion.h
CTPPSFastTrack
Definition: CTPPSFastTrack.h:9
CTPPSFastTrackingProducer::det2F
std::unique_ptr< CTPPSTrkDetector > det2F
Definition: CTPPSFastTrackingProducer.cc:113
CTPPSFastTrackingProducer::fTrackerInsertion
double fTrackerInsertion
Definition: CTPPSFastTrackingProducer.cc:126
CTPPSFastTrackingProducer::TrackerStationClear
void TrackerStationClear()
Definition: CTPPSFastTrackingProducer.cc:238
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
CTPPSFastTrackingProducer::fToFNCellX
int fToFNCellX
Definition: CTPPSFastTrackingProducer.cc:129
CTPPSFastTrackingProducer::fToFNCellY
int fToFNCellY
Definition: CTPPSFastTrackingProducer.cc:129
DDAxes::x
CTPPSFastTrackingProducer::fTimeSigma
double fTimeSigma
Definition: CTPPSFastTrackingProducer.cc:130
CTPPSFastTrackingProducer::fCrossingAngleBeam2
double fCrossingAngleBeam2
Definition: CTPPSFastTrackingProducer.cc:107
b2
static constexpr float b2
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
CTPPSFastTrackingProducer::fToFInsertion
double fToFInsertion
Definition: CTPPSFastTrackingProducer.cc:130
edm::Handle
Definition: AssociativeIterator.h:50
CTPPSFastTrack::setx2
void setx2(float x2)
Definition: CTPPSFastTrack.h:97
PPSTools::LorentzBoost
void LorentzBoost(H_BeamParticle &h_p, int dir, const std::string &frame, FullBeamInfo const &bi)
CTPPSToFDetector
Definition: CTPPSToFDetector.h:8
CTPPSFastTrackingProducer::TrackerStationStarting
void TrackerStationStarting()
Definition: CTPPSFastTrackingProducer.cc:245
PPSUtilities.h
CTPPSFastTrackingProducer::fToFCellWidth
std::vector< double > fToFCellWidth
Definition: CTPPSFastTrackingProducer.cc:127
CTPPSFastTrackingProducer::fImpParcut
double fImpParcut
Definition: CTPPSFastTrackingProducer.cc:130
CTPPSFastTrackingProducer::FastReco
void FastReco(int Direction, H_RecRPObject *station)
Definition: CTPPSFastTrackingProducer.cc:437
FileInPath.h
CTPPSTrkDetector.h
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
CTPPSFastRecHitContainer.h
CTPPSFastTrackingProducer::TrkStation_F
std::unique_ptr< CTPPSTrkStation > TrkStation_F
Definition: CTPPSFastTrackingProducer.cc:109
CTPPSFastTrack::setxi
void setxi(float xi)
Definition: CTPPSFastTrack.h:91
um_to_cm
static const double um_to_cm
Definition: PPSUnitConversion.h:12
b1
static constexpr float b1
Definition: L1EGammaCrystalsEmulatorProducer.cc:83
edm::FileInPath
Definition: FileInPath.h:64
MakerMacros.h
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
CTPPSFastTrackingProducer::fToFCellHeight
double fToFCellHeight
Definition: CTPPSFastTrackingProducer.cc:128
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
CTPPSFastTrackingProducer::fTrk1XOffset
double fTrk1XOffset
Definition: CTPPSFastTrackingProducer.cc:126
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
mm_to_um
static const double mm_to_um
Definition: PPSUnitConversion.h:13
CTPPSFastTrackingProducer::detToF_F
std::unique_ptr< CTPPSToFDetector > detToF_F
Definition: CTPPSFastTrackingProducer.cc:115
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
CTPPSFastTrack.h
DDAxes::z
CTPPSFastTrackingProducer::recTof_B
std::vector< double > recTof_B
Definition: CTPPSFastTrackingProducer.cc:123
CTPPSFastTrackingProducer::SetBeamLine
bool SetBeamLine()
Definition: CTPPSFastTrackingProducer.cc:514
CommonMethods.isnan
def isnan(num)
Definition: CommonMethods.py:98
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition: HCALHighEnergyHPDFilter_cfi.py:5
CTPPSFastTrackingProducer::_recHitToken
edm::EDGetTokenT< CTPPSFastRecHitContainer > _recHitToken
Definition: CTPPSFastTrackingProducer.cc:59
CTPPSFastTrackingProducer::beam1filename
std::string beam1filename
Definition: CTPPSFastTrackingProducer.cc:97
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::CTPPSFastTrackContainer
std::vector< CTPPSFastTrack > CTPPSFastTrackContainer
Definition: CTPPSFastTrackContainer.h:11
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
CTPPSFastTrackingProducer::CTPPSFastTrackingProducer
CTPPSFastTrackingProducer(const edm::ParameterSet &)
Definition: CTPPSFastTrackingProducer.cc:135
testProducerWithPsetDescEmpty_cfi.y2
y2
Definition: testProducerWithPsetDescEmpty_cfi.py:30
CTPPSFastTrackingProducer::TrkStation_B
std::unique_ptr< CTPPSTrkStation > TrkStation_B
Definition: CTPPSFastTrackingProducer.cc:110
CTPPSFastTrackingProducer::recCellId_F
std::vector< int > recCellId_F
Definition: CTPPSFastTrackingProducer.cc:122
bphysicsOniaDQM_cfi.vertex
vertex
Definition: bphysicsOniaDQM_cfi.py:7
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Event.h
CTPPSTrkDetector::ppsY_
std::vector< double > ppsY_
Definition: CTPPSTrkDetector.h:17
CTPPSFastTrackingProducer::theCTPPSFastTrack
std::vector< CTPPSFastTrack > theCTPPSFastTrack
Definition: CTPPSFastTrackingProducer.cc:118
CTPPSFastTrackingProducer::fz_tracker2
double fz_tracker2
Definition: CTPPSFastTrackingProducer.cc:125
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
CTPPSFastTrackingProducer::fBeamXRMS_ToF
double fBeamXRMS_ToF
Definition: CTPPSFastTrackingProducer.cc:130
CTPPSFastTrackingProducer::fToFPitchX
double fToFPitchX
Definition: CTPPSFastTrackingProducer.cc:128
math::XYZVector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
Definition: Vector3D.h:31
CTPPSTrkDetector
Definition: CTPPSTrkDetector.h:5
CTPPSFastTrackingProducer::fTrk2XOffset
double fTrk2XOffset
Definition: CTPPSFastTrackingProducer.cc:126
createfilelist.int
int
Definition: createfilelist.py:10
urad
static const double urad
Definition: PPSUnitConversion.h:10
iEvent
int iEvent
Definition: GenABIO.cc:224
CTPPSFastTrackingProducer::det1F
std::unique_ptr< CTPPSTrkDetector > det1F
Definition: CTPPSFastTrackingProducer.cc:111
edm::stream::EDProducer
Definition: EDProducer.h:38
CTPPSFastTrack::settof
void settof(float tof)
Definition: CTPPSFastTrack.h:87
CTPPSFastTrackingProducer::m_beamlineCTPPS2
std::unique_ptr< H_BeamLine > m_beamlineCTPPS2
Definition: CTPPSFastTrackingProducer.cc:93
CTPPSFastTrack::sety1
void sety1(float y1)
Definition: CTPPSFastTrack.h:95
CTPPSFastTrackingProducer::CTPPSFastRecHitContainer
std::vector< CTPPSFastRecHit > CTPPSFastRecHitContainer
Definition: CTPPSFastTrackingProducer.cc:58
edm::EventSetup
Definition: EventSetup.h:58
CTPPSFastTrackingProducer::beam2filename
std::string beam2filename
Definition: CTPPSFastTrackingProducer.cc:98
CTPPSFastTrackingProducer::det2B
std::unique_ptr< CTPPSTrkDetector > det2B
Definition: CTPPSFastTrackingProducer.cc:114
Direction
CTPPSToFDetector::findCellId
int findCellId(double x, double y)
Definition: CTPPSToFDetector.cc:83
CTPPSFastTrackingProducer::track
CTPPSFastTrack track
Definition: CTPPSFastTrackingProducer.cc:120
DDAxes::phi
multPhiCorr_741_25nsDY_cfi.px
px
Definition: multPhiCorr_741_25nsDY_cfi.py:10
CTPPSFastTrackingProducer::ReconstructArm
void ReconstructArm(H_RecRPObject *pps_station, double x1, double y1, double x2, double y2, double &tx, double &ty, double &eloss)
Definition: CTPPSFastTrackingProducer.cc:406
protons_cff.xi
xi
Definition: protons_cff.py:35
CTPPSFastTrack::sett
void sett(float t)
Definition: CTPPSFastTrack.h:89
CTPPSFastTrackingProducer::pps_stationB
std::unique_ptr< H_RecRPObject > pps_stationB
Definition: CTPPSFastTrackingProducer.cc:95
eostools.move
def move(src, dest)
Definition: eostools.py:511
CTPPSFastTrackingProducer::recCellId_B
std::vector< int > recCellId_B
Definition: CTPPSFastTrackingProducer.cc:122
CTPPSFastTrackingProducer::fTrackerHeight
double fTrackerHeight
Definition: CTPPSFastTrackingProducer.cc:126
CTPPSFastTrackingProducer::ReadRecHits
void ReadRecHits(edm::Handle< CTPPSFastRecHitContainer > &)
Definition: CTPPSFastTrackingProducer.cc:255
CTPPSFastTrackingProducer::detToF_B
std::unique_ptr< CTPPSToFDetector > detToF_B
Definition: CTPPSFastTrackingProducer.cc:116
CTPPSTrkDetector::ppsNHits_
int ppsNHits_
Definition: CTPPSTrkDetector.h:15
CTPPSToFDetector.h
CTPPSFastTrackingProducer::fBeamXRMS_Trk1
double fBeamXRMS_Trk1
Definition: CTPPSFastTrackingProducer.cc:126
PPSTools::Get_t_and_xi
void Get_t_and_xi(const TLorentzVector *proton, double &t, double &xi, LimitedBeamInfo const &bi)
Definition: PPSUtilities.cc:72
CTPPSFastTrackingProducer::lengthctpps
double lengthctpps
Definition: CTPPSFastTrackingProducer.cc:101
Point3D.h
CTPPSFastTrackingProducer::m_verbosity
bool m_verbosity
Definition: CTPPSFastTrackingProducer.cc:102
CTPPSFastTrack::setcellid
void setcellid(unsigned int cellid)
Definition: CTPPSFastTrack.h:101
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
CTPPSFastTrackingProducer::fToFXOffset
double fToFXOffset
Definition: CTPPSFastTrackingProducer.cc:130
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
recHitDet
const GeomDet * recHitDet(const TrackingRecHit &hit, const TrackingGeometry *geom)
Definition: ConversionProducer.cc:194
CTPPSFastTrackingProducer::fBeamEnergy
double fBeamEnergy
Definition: CTPPSFastTrackingProducer.cc:103
CTPPSFastTrackingProducer::fz_timing
double fz_timing
Definition: CTPPSFastTrackingProducer.cc:125
ConsumesCollector.h
ParameterSet.h
CTPPSFastTrackingProducer::SearchTrack
bool SearchTrack(int, int, int Direction, double &xi, double &t, double &partP, double &pt, double &thx, double &thy, double &x0, double &y0, double &xt, double &yt, double &X1d, double &Y1d, double &X2d, double &Y2d)
Definition: CTPPSFastTrackingProducer.cc:304
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
CTPPSFastTrackingProducer::MatchCellId
void MatchCellId(int cellId, std::vector< int > vrecCellId, std::vector< double > vrecTof, bool &match, double &recTof)
Definition: CTPPSFastTrackingProducer.cc:426
CTPPSFastTrackingProducer::fCrossingAngleBeam1
double fCrossingAngleBeam1
Definition: CTPPSFastTrackingProducer.cc:106
edm::Event
Definition: Event.h:73
CTPPSFastTrackingProducer::Reconstruction
void Reconstruction()
Definition: CTPPSFastTrackingProducer.cc:295
Vector3D.h
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
PPSTools::ProtonMassSQ
const double ProtonMassSQ
Definition: PPSUtilities.h:31
CTPPSFastRecHit
Definition: CTPPSFastRecHit.h:9
StreamID.h
CTPPSFastTrackingProducer::fCrossAngleCorr
bool fCrossAngleCorr
Definition: CTPPSFastTrackingProducer.cc:105
edm::InputTag
Definition: InputTag.h:15
CTPPSFastTrackingProducer::fz_tracker1
double fz_tracker1
Definition: CTPPSFastTrackingProducer.cc:125
CTPPSFastTrackingProducer::pps_stationF
std::unique_ptr< H_RecRPObject > pps_stationF
Definition: CTPPSFastTrackingProducer.cc:94
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37