36 const double epsilon = 0.15;
38 double distanceToFirstEndPlane, distanceToSecondEndPlane;
42 if (
common()->muonChamberProjectionHelper()
45 distanceToFirstEndPlane, distanceToSecondEndPlane, radius )) {
46 if (fabs(distanceToFirstEndPlane-distanceToSecondEndPlane)>0.1*epsilon)
47 std::cout <<
"PRDHandle_MDT: Warning tube is not centered in chamber! We should translate the prd object appropriately (todo)."<<std::endl;
48 halflength = std::max(distanceToFirstEndPlane,distanceToSecondEndPlane)+epsilon;
50 std::cout <<
"PRDHandle_MDT: Couldn't retrieve data for projections to chamber end planes."<<std::endl;
56 halflength += 56.0 + epsilon;
63 shape_detailed = shape_simple;
68 VP1Msg::message(
"Warning: MDT has additional elements in rdoList: NOT IMPLEMENTED");
84 return QStringList(
"Null PRD");
87 return QStringList(
"Null PRD");
89 std::ostringstream os;
92 os <<
"MdtPrepData with Identifier ["<<
id.get_compact() ;
94 os <<
"]\n at global position = [" <<
m_driftcircle->globalPosition()<<
"], local position = ["<<
m_driftcircle->localPosition()<<
"].";
95 os <<
"\nDrift radius = "<<
m_driftcircle->localPosition()[0]<<
" CLHEP::mm. ";
98 std::string status(
"Status: ");
115 status+=
"Drift Time";
118 status+=
"Before Spectrum";
121 status+=
"After Spectrum";
124 status+=QString((
" Unknown with value = "+std::to_string(
m_driftcircle->status())).c_str());
std::string print_to_string(Identifier id, const IdContext *context=0) const
or provide the printout in string form
SoNode * getShapeNode_DriftTube(double halfLength, double radius)
static Amg::Vector3D & applyTransformToVector(const Amg::Transform3D &m, Amg::Vector3D &v)
int getEtaIndex() const
a la AMDB
int getPhiIndex() const
a la AMDB
Class to represent measurements from the Monitored Drift Tubes.
Amg::Transform3D getTransform_CLHEP() const
PRDHandleBase(PRDCollHandleBase *)
PRDSysCommonData * common() const
PRDCollHandleBase * collHandle() const
const Muon::MdtPrepData * m_driftcircle
void buildShapes(SoNode *&shape_simple, SoNode *&shape_detailed)
GeoPVConstLink parentMuonChamberPV() const
PRDHandle_MDT(PRDCollHandle_MDT *, const Muon::MdtPrepData *)
QString driftCircleStatus() const
QStringList clicked() const
HitsSoNodeManager * nodeManager() const
Bounds for a cylindrical Surface.
double halflengthZ() const
This method returns the halflengthZ.
static const MdtIdHelper * mdtIDHelper()
static void message(const QString &, IVP1System *sys=0)
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
@ MdtStatusAfterSpectrum
The tube produced a hit that is inconsistent with the drift time spectrum, the drift time is larger t...
@ MdtStatusBeforeSpectrum
The tube produced a hit that is inconsistent with the drift time spectrum, the drift time is smaller ...
@ MdtStatusMasked
A hit during a previous bunch crossing occured which rendered the tube dead for this bunch crossing.
@ MdtStatusDriftTime
The tube produced a vaild measurement.