CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
CTPPSTrkDetector Class Reference

#include <CTPPSTrkDetector.h>

Public Member Functions

void AddHit (unsigned int detID, double x, double y, double z)
 
void clear ()
 
 CTPPSTrkDetector (double detw, double deth, double detin)
 
virtual ~CTPPSTrkDetector ()
 

Public Attributes

const double ppsDetectorHeight_
 
const double ppsDetectorPosition_
 
const double ppsDetectorWidth_
 
std::vector< unsigned int > ppsDetId_
 
int ppsNHits_
 
std::vector< double > ppsX_
 
std::vector< double > ppsY_
 
std::vector< double > ppsZ_
 

Detailed Description

Definition at line 5 of file CTPPSTrkDetector.h.

Constructor & Destructor Documentation

◆ CTPPSTrkDetector()

CTPPSTrkDetector::CTPPSTrkDetector ( double  detw,
double  deth,
double  detin 
)

Definition at line 3 of file CTPPSTrkDetector.cc.

5  clear();
6 }

References clear().

◆ ~CTPPSTrkDetector()

virtual CTPPSTrkDetector::~CTPPSTrkDetector ( )
inlinevirtual

Definition at line 8 of file CTPPSTrkDetector.h.

8 {};

Member Function Documentation

◆ AddHit()

void CTPPSTrkDetector::AddHit ( unsigned int  detID,
double  x,
double  y,
double  z 
)

Definition at line 7 of file CTPPSTrkDetector.cc.

7  {
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 }

References ppsDetectorHeight_, ppsDetectorPosition_, ppsDetectorWidth_, ppsDetId_, ppsNHits_, ppsX_, ppsY_, ppsZ_, x, y, and z.

◆ clear()

void CTPPSTrkDetector::clear ( void  )
inline

Definition at line 19 of file CTPPSTrkDetector.h.

19  {
20  ppsDetId_.clear();
21  ppsNHits_ = 0;
22  ppsX_.clear();
23  ppsY_.clear();
24  ppsZ_.clear();
25  };

References ppsDetId_, ppsNHits_, ppsX_, ppsY_, and ppsZ_.

Referenced by CTPPSTrkDetector().

Member Data Documentation

◆ ppsDetectorHeight_

const double CTPPSTrkDetector::ppsDetectorHeight_

Definition at line 12 of file CTPPSTrkDetector.h.

Referenced by AddHit().

◆ ppsDetectorPosition_

const double CTPPSTrkDetector::ppsDetectorPosition_

Definition at line 13 of file CTPPSTrkDetector.h.

Referenced by AddHit().

◆ ppsDetectorWidth_

const double CTPPSTrkDetector::ppsDetectorWidth_

Definition at line 8 of file CTPPSTrkDetector.h.

Referenced by AddHit().

◆ ppsDetId_

std::vector<unsigned int> CTPPSTrkDetector::ppsDetId_

Definition at line 14 of file CTPPSTrkDetector.h.

Referenced by AddHit(), and clear().

◆ ppsNHits_

int CTPPSTrkDetector::ppsNHits_

◆ ppsX_

std::vector<double> CTPPSTrkDetector::ppsX_

Definition at line 16 of file CTPPSTrkDetector.h.

Referenced by AddHit(), clear(), and CTPPSFastTrackingProducer::SearchTrack().

◆ ppsY_

std::vector<double> CTPPSTrkDetector::ppsY_

Definition at line 17 of file CTPPSTrkDetector.h.

Referenced by AddHit(), clear(), and CTPPSFastTrackingProducer::SearchTrack().

◆ ppsZ_

std::vector<double> CTPPSTrkDetector::ppsZ_

Definition at line 18 of file CTPPSTrkDetector.h.

Referenced by AddHit(), and clear().

DDAxes::y
CTPPSTrkDetector::ppsX_
std::vector< double > ppsX_
Definition: CTPPSTrkDetector.h:16
CTPPSTrkDetector::ppsZ_
std::vector< double > ppsZ_
Definition: CTPPSTrkDetector.h:18
CTPPSTrkDetector::clear
void clear()
Definition: CTPPSTrkDetector.h:19
CTPPSTrkDetector::ppsDetectorWidth_
const double ppsDetectorWidth_
Definition: CTPPSTrkDetector.h:8
DDAxes::x
CTPPSTrkDetector::ppsDetectorPosition_
const double ppsDetectorPosition_
Definition: CTPPSTrkDetector.h:13
CTPPSTrkDetector::ppsDetectorHeight_
const double ppsDetectorHeight_
Definition: CTPPSTrkDetector.h:12
DDAxes::z
CTPPSTrkDetector::ppsY_
std::vector< double > ppsY_
Definition: CTPPSTrkDetector.h:17
CTPPSTrkDetector::ppsNHits_
int ppsNHits_
Definition: CTPPSTrkDetector.h:15
CTPPSTrkDetector::ppsDetId_
std::vector< unsigned int > ppsDetId_
Definition: CTPPSTrkDetector.h:14