CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CTPPSTrkDetector.cc
Go to the documentation of this file.
2 #include <cmath>
3 CTPPSTrkDetector::CTPPSTrkDetector(double detw, double deth, double detin)
4  : ppsDetectorWidth_(detw), ppsDetectorHeight_(deth), ppsDetectorPosition_(detin) {
5  clear();
6 }
7 void CTPPSTrkDetector::AddHit(unsigned int detID, double x, double y, double z) {
8  // Detector is in the negative side, but DetectorPosition is a positive number
9  // if (detID >0);
10  if (x > 0)
11  return; // The detector is on the negative side
13  return; // hit beyond detector area (W)
14  if (fabs(x) < ppsDetectorPosition_)
15  return; // hit falls below detector area
16  if (fabs(y) > ppsDetectorHeight_ * 0.5)
17  return; // hit falls beyond detector area (H)
18  ppsDetId_.push_back(detID);
19  ppsX_.push_back(x);
20  ppsY_.push_back(y);
21  ppsZ_.push_back(z);
22  ppsNHits_++;
23 }
const double ppsDetectorPosition_
std::vector< double > ppsX_
float float float z
std::vector< unsigned int > ppsDetId_
uint16_t const *__restrict__ x
Definition: gpuClustering.h:39
const double ppsDetectorHeight_
std::vector< double > ppsZ_
void AddHit(unsigned int detID, double x, double y, double z)
std::vector< double > ppsY_
const double ppsDetectorWidth_
CTPPSTrkDetector(double detw, double deth, double detin)