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;