31 : corners_(corners),
dir_(aVector), number_(
number), survivalProbability_(1.), center_(0., 0.), epsilon_(0.001) {
33 if (corners.size() != 4) {
34 std::cout <<
" Try to construct a quadrilateral with " << corners.size() <<
" points ! " << std::endl;
39 for (
unsigned ic = 0; ic < 4; ++ic) {
40 dir_[ic] = (corners[(ic + 1) % 4] - corners[ic]).unit();
52 const std::vector<XYZPoint>& corners,
56 : corners_(aVector),
dir_(aVector), number_(
number), survivalProbability_(1.), center_(0., 0.), epsilon_(0.001) {
58 if (corners.size() != 4) {
59 std::cout <<
" Try to construct a quadrilateral with " << corners.size() <<
" points ! " << std::endl;
63 double sign = (onEcal == 1) ? -1. : 1.;
74 for (
unsigned ic = 0; ic < 4; ++ic) {
81 for (
unsigned ic = 0; ic < 4; ++ic) {
94 unsigned number,
const std::vector<XYZPoint>& corners,
const Transform3D& trans,
double scaf,
bool bothdirections)
98 survivalProbability_(1.),
101 yscalefactor_(scaf) {
103 if (corners.size() != 4) {
104 std::cout <<
" Try to construct a quadrilateral with " << corners.size() <<
" points ! " << std::endl;
113 for (
unsigned ic = 0; ic < 4; ++ic) {
120 for (
unsigned ic = 0; ic < 4; ++ic) {
135 CLHEP::Hep2Vector pv0(ppoint -
corners_[0]);
136 CLHEP::Hep2Vector pv2(ppoint -
corners_[2]);
137 CLHEP::Hep2Vector n1(pv0 - (pv0 *
dir_[0]) *
dir_[0]);
138 CLHEP::Hep2Vector n2(pv2 - (pv2 *
dir_[2]) *
dir_[2]);
143 bool inside1(
r1 <= 0.);
160 CLHEP::Hep2Vector pv1(ppoint -
corners_[1]);
161 CLHEP::Hep2Vector pv3(ppoint -
corners_[3]);
162 CLHEP::Hep2Vector n3(pv1 - (pv1 *
dir_[1]) *
dir_[1]);
163 CLHEP::Hep2Vector n4(pv3 - (pv3 *
dir_[3]) *
dir_[3]);
168 bool inside2(
r2 <= 0.);
239 std::cout <<
" Serious problem in CrystalPad ! " <<
dir << std::endl;
249 for (
unsigned ic = 0; ic < 4; ++ic) {
263 center_ = CLHEP::Hep2Vector(0., 0.);
264 for (
unsigned ic = 0; ic < 4; ++ic)
270 for (
unsigned ic = 0; ic < 4; ++ic)
275 ost <<
" Number " << quad.
getNumber() << std::endl;
double survivalProbability_
ROOT::Math::Rotation3D rotation_
ROOT::Math::Transform3DPJ::Point Point
void extrems(double &xmin, double &xmax, double &ymin, double &ymax) const
xmin xmax, ymin ymax of the quad
void resetCorners()
Rescale the Quad to allow for some inaccuracy ...
std::ostream & operator<<(std::ostream &ost, CrystalPad &quad)
CLHEP::Hep2Vector & edge(unsigned iside, int n)
access to the corners in direction iside; n=0,1
CrystalPad & operator=(const CrystalPad &rhs)
static std::vector< CLHEP::Hep2Vector > aVector
ROOT::Math::Transform3DPJ Transform3D
std::vector< double > vec1
std::vector< CLHEP::Hep2Vector > dir_
math::XYZVector XYZVector
bool inside(const CLHEP::Hep2Vector &point, bool debug=false) const
Check that the point (in the local frame) is inside the crystal.
std::vector< CLHEP::Hep2Vector > corners_
CLHEP::Hep2Vector center_
Structure Point Contains parameters of Gaussian fits to DMRs.
void getDrawingCoordinates(std::vector< float > &x, std::vector< float > &y) const
for graphic debugging
unsigned getNumber() const
access to the number
CaloDirection
Codes the local directions in the cell lattice.