FastSimulation
CTPPSFastGeometry
src
CTPPSTrkDetector.cc
Go to the documentation of this file.
1
#include "
FastSimulation/CTPPSFastGeometry/interface/CTPPSTrkDetector.h
"
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
12
if
(fabs(
x
) >
ppsDetectorWidth_
+
ppsDetectorPosition_
)
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
}
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
detailsBasic3DVector::z
float float float z
Definition:
extBasic3DVector.h:14
DDAxes::x
CTPPSTrkDetector::ppsDetectorPosition_
const double ppsDetectorPosition_
Definition:
CTPPSTrkDetector.h:13
CTPPSTrkDetector.h
CTPPSTrkDetector::ppsDetectorHeight_
const double ppsDetectorHeight_
Definition:
CTPPSTrkDetector.h:12
DDAxes::z
CTPPSTrkDetector::ppsY_
std::vector< double > ppsY_
Definition:
CTPPSTrkDetector.h:17
CTPPSTrkDetector::CTPPSTrkDetector
CTPPSTrkDetector(double detw, double deth, double detin)
Definition:
CTPPSTrkDetector.cc:3
CTPPSTrkDetector::AddHit
void AddHit(unsigned int detID, double x, double y, double z)
Definition:
CTPPSTrkDetector.cc:7
CTPPSTrkDetector::ppsNHits_
int ppsNHits_
Definition:
CTPPSTrkDetector.h:15
genVertex_cff.x
x
Definition:
genVertex_cff.py:13
detailsBasic3DVector::y
float float y
Definition:
extBasic3DVector.h:14
CTPPSTrkDetector::ppsDetId_
std::vector< unsigned int > ppsDetId_
Definition:
CTPPSTrkDetector.h:14
Generated for CMSSW Reference Manual by
1.8.16