CMS 3D CMS Logo

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) {clear();}
5 void CTPPSTrkDetector::AddHit(unsigned int detID,double x, double y, double z)
6 {
7 // Detector is in the negative side, but DetectorPosition is a positive number
8  // if (detID >0);
9  if (x>0) return; // The detector is on the negative side
10  if (fabs(x)>ppsDetectorWidth_+ppsDetectorPosition_) return; // hit beyond detector area (W)
11  if (fabs(x)<ppsDetectorPosition_) return; // hit falls below detector area
12  if (fabs(y)>ppsDetectorHeight_*0.5) return; // hit falls beyond detector area (H)
13  ppsDetId_.push_back(detID);ppsX_.push_back(x);ppsY_.push_back(y);ppsZ_.push_back(z);
14  ppsNHits_++;
15 }
const double ppsDetectorPosition_
std::vector< double > ppsX_
std::vector< unsigned int > ppsDetId_
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)