CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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.

References clear().

5  clear();
6 }
const double ppsDetectorPosition_
const double ppsDetectorHeight_
const double ppsDetectorWidth_

◆ ~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.

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

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 }
const double ppsDetectorPosition_
std::vector< double > ppsX_
std::vector< unsigned int > ppsDetId_
const double ppsDetectorHeight_
std::vector< double > ppsZ_
std::vector< double > ppsY_
const double ppsDetectorWidth_

◆ clear()

void CTPPSTrkDetector::clear ( void  )
inline

Definition at line 19 of file CTPPSTrkDetector.h.

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

Referenced by CTPPSTrkDetector().

19  {
20  ppsDetId_.clear();
21  ppsNHits_ = 0;
22  ppsX_.clear();
23  ppsY_.clear();
24  ppsZ_.clear();
25  };
std::vector< double > ppsX_
std::vector< unsigned int > ppsDetId_
std::vector< double > ppsZ_
std::vector< double > ppsY_

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().