29 : mGeometryTransformer(geoTrans),
30 mTanTheta(
std::tan((90. - geoparams::BeamAngle) *
std::atan(1) / 45.)),
31 mCosTheta(
std::cos(geoparams::BeamAngle *
std::atan(1) / 45.))
50Cluster HitFinder::getIntersect(
const Track& track,
int deId)
const
56 localTrack.setPosition(localPoint.x(), localPoint.y(), localPoint.z());
57 localTrack.setDirection(localDirection.x() / localDirection.z(), localDirection.y() / localDirection.z(), 1.);
59 localTrack.propagateToZ(0);
62 cluster.xCoor = localTrack.getPositionX();
63 cluster.yCoor = localTrack.getPositionY();
68int HitFinder::guessRPC(
double yPos,
int chamber)
const
76 std::vector<int> deIdList;
78 double xPos = defPos.x();
80 double yPos = defPos.y() / mCosTheta;
82 double positions[3] = {yPos, yPos - yErr, yPos + yErr};
84 for (
int ipos = 0; ipos < 3; ++ipos) {
85 int rpc = guessRPC(positions[ipos], chamber);
86 if (rpc < 0 || rpc > 8) {
91 }
else if (rpc == centerRpc) {
96 if (xPos - xErr < 0) {
101 if (xPos + xErr > 0) {
113 std::vector<int> deIdList =
getFiredDE(track, chamber);
115 std::vector<Cluster> points;
116 for (
auto& deId : deIdList) {
117 Cluster cl = getIntersect(track, deId);
127 if (withUncertainties) {
128 addUncertainty(cl, track);
130 points.emplace_back(cl);
137void HitFinder::addUncertainty(
Cluster& cl,
Track track)
const
Useful detector parameters for MID.
Useful geometrical parameters for MID.
HMPID cluster implementation.
std::vector< int > getFiredDE(const Track &track, int chamber) const
std::vector< Cluster > getLocalPositions(const Track &track, int chamber, bool withUncertainties=false) const
HitFinder(const GeometryTransformer &geoTrans)
This class defines the MID track.
float getDirectionY() const
Gets the track y direction.
bool propagateToZ(float zPosition)
float getDirectionX() const
Gets the track x direction.
@ VarX
Variance on X position.
@ VarY
Variance on Y position.
float getDirectionZ() const
Gets the track z direction.
float getPositionY() const
Gets the track y position.
float getCovarianceParameter(CovarianceParamIndex covParam) const
returns the covariance parameter covParam
float getPositionX() const
Gets the track x position.
float getPositionZ() const
Gets the track z position.
int getDEId(bool isRight, int chamber, int rpc)
constexpr std::array< const double, 4 > DefaultChamberZ
Array of default z position of the chamber.
double getRPCHalfHeight(int chamber)
double getRPCHalfLength(int chamber, int rpc)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Defining DataPointCompositeObject explicitly as copiable.
cluster structure for MID
float yErr
Cluster resolution along y.
float xErr
Cluster resolution along x.
uint8_t deId
Detection element ID.