|
|
Go to the documentation of this file.
33 bool add1 =
true, add2 =
true;
34 for (vector<const Point *>::const_iterator it =
contents.begin(); it !=
contents.end() && (add1 || add2); ++it) {
35 if ((*it)->hit ==
p1->hit)
38 if ((*it)->hit ==
p2->hit)
59 : chw_a(cw_a / 2.), chw_b(cw_b / 2.),
geometry(nullptr) {}
69 map<unsigned int, GeomData>::iterator it =
geometryMap.find(
id);
78 gd.
s =
d.x() *
c.x() +
d.y() *
c.y();
93 for (
auto &ds :
input) {
94 unsigned int detId = ds.detId();
100 double p =
hit->position() + gd.
s;
101 double z = gd.
z -
z0;
109 printf(
">> FastLineRecognition::getPatterns(z0 = %E)\n",
z0);
110 printf(
">>>>>>>>>>>>>>>>>>>\n");
125 printf(
"\tpoints of the selected cluster: %lu\n",
c.contents.size());
128 for (
auto &pit :
c.contents) {
130 printf(
"\t\t%.1f\n", pit->z);
132 pattern.addHit(pit->detId, *(pit->hit));
138 unsigned int u_points_b = 0;
139 for (vector<Point>::iterator dit =
points.begin(); dit !=
points.end(); ++dit)
142 printf(
"\tusable points before: %u\n", u_points_b);
146 for (vector<const Point *>::iterator
hit =
c.contents.begin();
hit !=
c.contents.end(); ++
hit) {
147 for (vector<Point>::iterator dit =
points.begin(); dit !=
points.end(); ++dit) {
149 if ((*hit)->hit == dit->hit) {
158 unsigned int u_points_a = 0;
159 for (vector<Point>::iterator dit =
points.begin(); dit !=
points.end(); ++dit)
162 printf(
"\tusable points after: %u\n", u_points_a);
167 printf(
"patterns at end: %lu\n", patterns.
size());
168 printf(
"<<<<<<<<<<<<<<<<<<<\n");
178 printf(
"\tFastLineRecognition::getOneLine\n");
187 for (vector<Point>::const_iterator it1 =
points.begin(); it1 !=
points.end(); ++it1) {
191 for (vector<Point>::const_iterator it2 = it1; it2 !=
points.end(); ++it2) {
195 const double &z1 = it1->z;
196 const double &
z2 = it2->z;
201 const double &
p1 = it1->h;
202 const double &
p2 = it2->h;
204 const double &w1 = it1->w;
205 const double &
w2 = it2->w;
208 double a = (
p2 -
p1) / (
z2 - z1);
209 double b =
p1 - z1 *
a;
213 printf(
"\t\t\tz: 1=%+5.1f, 2=%+5.1f | U/V: 1=%+6.3f, 2=%+6.3f | a=%+6.3f rad, b=%+6.3f mm, w=%.1f\n",
224 bool newCluster =
true;
225 for (
unsigned int k = 0;
k <
clusters.size();
k++) {
227 if (
c.S1 < 1. ||
c.Sw <= 0.)
232 printf(
"\t\t\t\ttest cluster %u at a=%+6.3f, b=%+6.3f : %+6.3f, %+6.3f : %i, %i\n",
246 printf(
"\t\t\t\t--> cluster %u\n",
k);
255 printf(
"\t\t\t\t--> new cluster %lu\n",
clusters.size());
264 printf(
"\t\tclusters: %lu\n",
clusters.size());
270 for (
unsigned int k = 0;
k <
clusters.size();
k++) {
283 printf(
"\t\tmw = %.1f, mk = %u\n", mw, mk);
Reconstructed hit in TOTEM RP.
static const double sigma0
the uncertainty of 1-hit cluster, in mm
void push_back(const T &t)
common ppss p3p6s2 common epss epspn46 common const1 w2
double chw_a
cluster half widths in a and b
static const std::string input
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
GeomData getGeomData(unsigned int id)
expects raw detector id
double threshold
weight threshold for accepting pattern candidates (clusters)
FastLineRecognition(double cw_a=0., double cw_b=0.)
cluster of intersection points
double s
sensor's centre projected to its read-out direction
A linear pattern in U or V projection. The intercept b is taken at the middle of a RP: (geometry->Get...
double z
z position of a sensor (wrt. IP)
void add(const Point *p1, const Point *p2, double a, double b, double w)
std::map< unsigned int, GeomData > geometryMap
map: raw detector id --> GeomData
void getPatterns(const edm::DetSetVector< TotemRPRecHit > &input, double _z0, double threshold, edm::DetSet< TotemRPUVPattern > &patterns)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Abs< T >::type abs(const T &t)
bool getOneLine(const std::vector< Point > &points, double threshold, Cluster &result)
Detector ID class for TOTEM Si strip detectors.
DetGeomDesc::Translation Vector