|
|
Go to the documentation of this file.
72 std::vector<CSCSegment> segments_temp;
76 std::vector<CSCSegment> testSegments;
79 for (std::vector<ChamberHitContainer>::iterator subrechits = clusteredHits.begin();
80 subrechits != clusteredHits.end();
85 segments_temp.insert(segments_temp.end(), segs.begin(), segs.end());
90 segments_temp.insert(segments_temp.end(), segs.begin(), segs.end());
112 std::vector<CSCSegment> segmentInChamber;
113 segmentInChamber.clear();
115 unsigned nHitInChamber =
rechits.size();
122 if (nHitInChamber < 3)
123 return segmentInChamber;
128 size_t old_layer = 0;
129 for (
size_t i = 0;
i < nHitInChamber; ++
i) {
130 size_t this_layer =
rechits[
i]->cscDetId().layer();
132 layerIndex[
i] = this_layer;
134 if (this_layer != old_layer) {
135 old_layer = this_layer;
144 return segmentInChamber;
151 reverse(layerIndex.begin(), layerIndex.end());
154 }
else if (z1 < 0.) {
156 reverse(layerIndex.begin(), layerIndex.end());
172 return segmentInChamber;
174 segmentInChamber.push_back(segShower);
179 return segmentInChamber;
197 int layer1 = layerIndex[
i1 -
ib];
207 int layer2 = layerIndex[
i2 -
ib];
220 float dz = gp2.
z() - gp1.
z();
221 float slope_u = (lp2.
x() - lp1.
x()) /
dz;
222 float slope_v = (lp2.
y() - lp1.
y()) /
dz;
264 segmentInChamber.push_back(
temp);
270 return segmentInChamber;
272 if (segmentInChamber.size() > 4)
273 return segmentInChamber;
281 return segmentInChamber;
320 int layer = layerIndex[
i -
ib];
321 int layer1 = layerIndex[
i1 -
ib];
322 int layer2 = layerIndex[
i2 -
ib];
355 if (layer != layer1 && layer != layer2)
372 int layer = (*i)->cscDetId().layer();
386 float Hphi = Hgp.
phi();
397 float Sphi = Sgp.
phi();
400 float R =
sqrt(Sgp.
x() * Sgp.
x() + Sgp.
y() * Sgp.
y());
471 if ((*it)->cscDetId().layer() == layer)
488 ChamberHitContainer::iterator it;
490 if ((*it)->cscDetId().layer() == layer) {
530 for (iu =
ib; iu != rechitsInChamber.end(); ++iu) {
541 for (iu =
ib; iu != rechitsInChamber.end(); ++iu) {
556 float maxResidual = 0.;
557 float sumResidual = 0.;
562 ChamberHitContainer::const_iterator ih;
572 sumResidual += residual;
574 if (residual > maxResidual) {
575 maxResidual = residual;
581 float corrAvgResidual = (sumResidual - maxResidual) / (nHits - 1);
594 newProtoSegment.push_back(*ih);
600 for (ih = newProtoSegment.begin(); ih != newProtoSegment.end(); ++ih) {
615 <<
"\ntime = " << seg.
time();
const std::vector< CSCRecHit2D > & specificRecHits() const
const Surface::PositionType & position() const
The position (origin of the R.F.)
std::deque< bool > BoolContainer
std::vector< const CSCRecHit2D * > ChamberHitContainer
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
CSCSetOfHits hits(void) const
AlgebraicSymMatrix covarianceMatrix(void)
bool addHit(const CSCRecHit2D *hit, int layer)
LocalVector localdir() const
T getUntrackedParameter(std::string const &, T const &) const
void compareProtoSegment(const CSCRecHit2D *h, int layer)
CSCSegment showerSeg(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
std::vector< CSCSegment > run(const CSCChamber *aChamber, const ChamberHitContainer &rechits) override
float Rdev(float x, float y, float z) const
const CSCChamber * theChamber
std::vector< CSCSegment > buildSegments(const ChamberHitContainer &rechits)
CSCSegAlgoShowering * showering_
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
CSCSegAlgoDF(const edm::ParameterSet &ps)
Constructor.
void updateParameters(void)
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
void dumpSegment(const CSCSegment &seg) const
ChamberHitContainer protoSegment
void tryAddingHitsToSegment(const ChamberHitContainer &rechitsInChamber, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2, const LayerIndex &layerIndex)
Utility functions.
int nHitsPerClusterIsShower
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
LocalPoint localPosition() const override
CSCSegAlgoPreClustering * preCluster_
LocalVector localDirection() const override
Local direction.
LocalError localDirectionError() const override
Error on the local direction.
float yfit(float z) const
bool isHitNearSegment(const CSCRecHit2D *h) const
int minHitsForPreClustering
void flagHitsAsUsed(const ChamberHitContainer &rechitsInChamber)
void pruneFromResidual(void)
ChamberHitContainer closeHits
Log< level::Info, true > LogVerbatim
std::vector< std::vector< const CSCRecHit2D * > > clusterHits(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
clusterize
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
T getParameter(std::string const &) const
double chi2() const override
Chi2 of the segment fit.
bool hasHitOnLayer(int layer) const
CSCDetId id() const
Get the (concrete) DetId.
std::vector< const CSCRecHit2D * >::const_iterator ChamberHitContainerCIt
LocalPoint localPosition() const override
std::vector< int > LayerIndex
Typedefs.
~CSCSegAlgoDF() override
Destructor.
Geom::Phi< T > phi() const
LocalError localPositionError() const override
float xfit(float z) const
LocalPoint intercept() const