CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CSCSegAlgoTC Class Reference

#include <CSCSegAlgoTC.h>

Inheritance diagram for CSCSegAlgoTC:
CSCSegmentAlgorithm

Public Types

typedef std::deque< bool > BoolContainer
 
typedef std::vector< const CSCRecHit2D * > ChamberHitContainer
 
typedef ChamberHitContainer::const_iterator ChamberHitContainerCIt
 
typedef std::vector< int > LayerIndex
 Typedefs. More...
 

Public Member Functions

std::vector< CSCSegmentbuildSegments (const ChamberHitContainer &rechits)
 
 CSCSegAlgoTC (const edm::ParameterSet &ps)
 Constructor. More...
 
std::vector< CSCSegmentrun (const CSCChamber *aChamber, const ChamberHitContainer &rechits) override
 
 ~CSCSegAlgoTC () override
 Destructor. More...
 
- Public Member Functions inherited from CSCSegmentAlgorithm
 CSCSegmentAlgorithm (const edm::ParameterSet &)
 Constructor. More...
 
virtual std::vector< CSCSegmentrun (const CSCChamber *chamber, const std::vector< const CSCRecHit2D * > &rechits)=0
 
virtual ~CSCSegmentAlgorithm ()
 Destructor. More...
 

Private Member Functions

bool addHit (const CSCRecHit2D *aHit, int layer)
 Utility functions. More...
 
bool areHitsCloseInGlobalPhi (const CSCRecHit2D *h1, const CSCRecHit2D *h2) const
 
bool areHitsCloseInLocalX (const CSCRecHit2D *h1, const CSCRecHit2D *h2) const
 
void compareProtoSegment (const CSCRecHit2D *h, int layer)
 
void dumpHits (const ChamberHitContainer &rechits) const
 
void dumpSegment (const CSCSegment &seg) const
 
void flagHitsAsUsed (std::vector< CSCSegFit * >::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
 
bool hasHitOnLayer (int layer) const
 
void increaseProtoSegment (const CSCRecHit2D *h, int layer)
 
bool isHitNearSegment (const CSCRecHit2D *h) const
 
bool isSegmentGood (std::vector< CSCSegFit * >::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
 
float phiAtZ (float z) const
 
void pruneTheSegments (const ChamberHitContainer &rechitsInChamber)
 
bool replaceHit (const CSCRecHit2D *h, int layer)
 
void segmentSort (void)
 
void tryAddingHitsToSegment (const ChamberHitContainer &rechits, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2)
 
void updateParameters (void)
 

Private Attributes

std::vector< CSCSegFit * > candidates
 
float chi2Max
 
float chi2ndfProbMin
 
bool debugInfo
 
float dPhiFineMax
 
float dPhiMax
 
float dRPhiFineMax
 
float dRPhiMax
 
int minLayersApart
 
const std::string myName
 
ChamberHitContainer proto_segment
 
int SegmentSorting
 
CSCSegFitsfit_
 
const CSCChambertheChamber
 Member variables. More...
 

Detailed Description

This is an alternative algorithm for building endcap muon track segments out of the rechit's in a CSCChamber. cf. CSCSegmentizerSK.
'TC' = 'Tim Cox' = Try (all) Combinations

A CSCSegment isa BasicRecHit4D, and is built from CSCRhit objects, each of which isa BasicRecHit2D.

This class is used by the CSCSegmentRecDet.
Alternative algorithms can be used for the segment building by writing classes like this, and then selecting which one is actually used via the CSCSegmentizerBuilder in CSCDetector.

Ported to CMSSW 2006-04-03: Matte.nosp@m.o.Sa.nosp@m.ni@ce.nosp@m.rn.c.nosp@m.h

Replaced least-squares fit by CSCSegFit - Feb 2015

Definition at line 34 of file CSCSegAlgoTC.h.

Member Typedef Documentation

typedef std::deque<bool> CSCSegAlgoTC::BoolContainer

Definition at line 47 of file CSCSegAlgoTC.h.

typedef std::vector<const CSCRecHit2D*> CSCSegAlgoTC::ChamberHitContainer

Definition at line 39 of file CSCSegAlgoTC.h.

typedef ChamberHitContainer::const_iterator CSCSegAlgoTC::ChamberHitContainerCIt

Definition at line 40 of file CSCSegAlgoTC.h.

typedef std::vector<int> CSCSegAlgoTC::LayerIndex

Typedefs.

Definition at line 38 of file CSCSegAlgoTC.h.

Constructor & Destructor Documentation

CSCSegAlgoTC::CSCSegAlgoTC ( const edm::ParameterSet ps)
explicit

Constructor.

Definition at line 26 of file CSCSegAlgoTC.cc.

References chi2Max, chi2ndfProbMin, debugInfo, dPhiFineMax, dPhiMax, dRPhiFineMax, dRPhiMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), LogDebug, minLayersApart, myName, and SegmentSorting.

27  : CSCSegmentAlgorithm(ps), sfit_(nullptr), myName("CSCSegAlgoTC") {
28 
29  debugInfo = ps.getUntrackedParameter<bool>("verboseInfo");
30 
31  dRPhiMax = ps.getParameter<double>("dRPhiMax");
32  dPhiMax = ps.getParameter<double>("dPhiMax");
33  dRPhiFineMax = ps.getParameter<double>("dRPhiFineMax");
34  dPhiFineMax = ps.getParameter<double>("dPhiFineMax");
35  chi2Max = ps.getParameter<double>("chi2Max");
36  chi2ndfProbMin = ps.getParameter<double>("chi2ndfProbMin");
37  minLayersApart = ps.getParameter<int>("minLayersApart");
38  SegmentSorting = ps.getParameter<int>("SegmentSorting");
39 
40  LogDebug("CSC") << myName << " has algorithm cuts set to: \n"
41  << "--------------------------------------------------------------------\n"
42  << "dRPhiMax = " << dRPhiMax << '\n'
43  << "dPhiMax = " << dPhiMax << '\n'
44  << "dRPhiFineMax = " << dRPhiFineMax << '\n'
45  << "dPhiFineMax = " << dPhiFineMax << '\n'
46  << "chi2Max = " << chi2Max << '\n'
47  << "chi2ndfProbMin = " << chi2ndfProbMin << '\n'
48  << "minLayersApart = " << minLayersApart << '\n'
49  << "SegmentSorting = " << SegmentSorting << std::endl;
50 }
#define LogDebug(id)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string myName
Definition: CSCSegAlgoTC.h:192
CSCSegmentAlgorithm(const edm::ParameterSet &)
Constructor.
float dRPhiFineMax
Definition: CSCSegAlgoTC.h:162
float chi2ndfProbMin
Definition: CSCSegAlgoTC.h:157
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145
float dPhiFineMax
Definition: CSCSegAlgoTC.h:167
CSCSegAlgoTC::~CSCSegAlgoTC ( )
inlineoverride

Member Function Documentation

bool CSCSegAlgoTC::addHit ( const CSCRecHit2D aHit,
int  layer 
)
private

Utility functions.

Definition at line 259 of file CSCSegAlgoTC.cc.

References convertSQLiteXML::ok, proto_segment, and updateParameters().

Referenced by buildSegments(), increaseProtoSegment(), replaceHit(), and ~CSCSegAlgoTC().

259  {
260 
261  // Return true if hit was added successfully
262  // (and then parameters are updated).
263  // Return false if there is already a hit on the same layer, or insert failed.
264 
265  bool ok = true;
266  ChamberHitContainer::const_iterator it;
267 
268  for(it = proto_segment.begin(); it != proto_segment.end(); it++)
269  if (((*it)->cscDetId().layer() == layer) && (aHit != *it))
270  return false;
271 
272  if (ok) {
273  proto_segment.push_back(aHit);
275  }
276  return ok;
277 }
void updateParameters(void)
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
bool CSCSegAlgoTC::areHitsCloseInGlobalPhi ( const CSCRecHit2D h1,
const CSCRecHit2D h2 
) const
private

Return true if the difference in (global) phi of two hits is < dPhiMax

Definition at line 372 of file CSCSegAlgoTC.cc.

References CSCRecHit2D::cscDetId(), dPhiMax, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::phi(), theChamber, and GeomDet::toGlobal().

Referenced by buildSegments(), and ~CSCSegAlgoTC().

372  {
373 
374  const CSCLayer* l1 = theChamber->layer(h1->cscDetId().layer());
375  GlobalPoint gp1 = l1->toGlobal(h1->localPosition());
376  const CSCLayer* l2 = theChamber->layer(h2->cscDetId().layer());
377  GlobalPoint gp2 = l2->toGlobal(h2->localPosition());
378 
379  float h1p = gp1.phi();
380  float h2p = gp2.phi();
381  float dphi12 = h1p - h2p;
382 
383  // Into range [-pi, pi) (phi() returns values in this range)
384  if (dphi12 < -M_PI)
385  dphi12 += 2.*M_PI;
386  if (dphi12 > M_PI)
387  dphi12 -= 2.*M_PI;
388  LogDebug("CSC") << " Hits at global phi= " << h1p << ", "
389  << h2p << " have separation= " << dphi12;
390  return (fabs(dphi12) < dPhiMax)? true:false; // +v
391 }
#define LogDebug(id)
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
int layer() const
Definition: CSCDetId.h:61
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
bool CSCSegAlgoTC::areHitsCloseInLocalX ( const CSCRecHit2D h1,
const CSCRecHit2D h2 
) const
private

Return true if the difference in (local) x of two hits is < dRPhiMax

Definition at line 365 of file CSCSegAlgoTC.cc.

References dRPhiMax, CSCRecHit2D::localPosition(), LogDebug, and x.

Referenced by buildSegments(), and ~CSCSegAlgoTC().

365  {
366  float deltaX = (h1->localPosition()-h2->localPosition()).x();
367  LogDebug("CSC") << " Hits at local x= " << h1->localPosition().x() << ", "
368  << h2->localPosition().x() << " have separation= " << deltaX;
369  return (fabs(deltaX) < (dRPhiMax))? true:false; // +v
370 }
#define LogDebug(id)
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
std::vector< CSCSegment > CSCSegAlgoTC::buildSegments ( const ChamberHitContainer rechits)

Build track segments in this chamber (this is where the actual segment-building algorithm hides.)

Definition at line 58 of file CSCSegAlgoTC.cc.

References funct::abs(), addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), candidates, CSCSegFit::chi2(), CSCSegFit::covarianceMatrix(), CSCRecHit2D::cscDetId(), debugInfo, dumpSegment(), CSCSegFit::hits(), mps_fire::i, cuy::ib, CSCSegFit::intercept(), CSCChamber::layer(), CSCDetId::layer(), CSCSegFit::localdir(), CSCRecHit2D::localPosition(), LogDebug, minLayersApart, myName, GeomDet::position(), proto_segment, pruneTheSegments(), TrackInfoProducer_cfi::rechits, groupFilesInBlocks::reverse, sfit_, groupFilesInBlocks::temp, theChamber, GeomDet::toGlobal(), tryAddingHitsToSegment(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by run(), and ~CSCSegAlgoTC().

58  {
59 
60  // ChamberHitContainer rechits = urechits;
61  ChamberHitContainer rechits(urechits);
62 
63  // edm::LogVerbatim("CSCSegment") << "[CSCSegAlgoTC::buildSegments] start building segments in " << theChamber->id();
64  // edm::LogVerbatim("CSCSegment") << "[CSCSegAlgoTC::buildSegments] size of rechit container = " << rechits.size();
65 
66  if (rechits.size() < 2) {
67  LogDebug("CSC") << myName << ": " << rechits.size() <<
68  " hit(s) in chamber is not enough to build a segment.\n";
69  return std::vector<CSCSegment>();
70  }
71 
72  LayerIndex layerIndex(rechits.size());
73 
74  for ( size_t i = 0; i < rechits.size(); ++i ) {
75  short ilay = rechits[i]->cscDetId().layer();
76  layerIndex[i] = ilay;
77  // edm::LogVerbatim("CSCSegment") << "layerIndex[" << i << "] should be " << rechits[i]->cscDetId().layer();
78  // edm::LogVerbatim("CSCSegment") << "layerIndex[" << i << "] actually is " << layerIndex[i];
79  }
80 
81  double z1 = theChamber->layer(1)->position().z();
82  double z6 = theChamber->layer(6)->position().z();
83 
84  if ( z1 > 0. ) {
85  if ( z1 > z6 ) {
86  reverse(layerIndex.begin(), layerIndex.end());
87  reverse(rechits.begin(), rechits.end());
88  }
89  }
90  else if ( z1 < 0. ) {
91  if ( z1 < z6 ) {
92  reverse(layerIndex.begin(), layerIndex.end());
93  reverse(rechits.begin(), rechits.end());
94  }
95  }
96 
97  // Dump rechits after sorting?
98  // if (debugInfo) dumpHits(rechits);
99 
100  // if (rechits.size() < 2) {
101  // LogDebug("CSC") << myName << ": " << rechits.size() <<
102  // " hit(s) in chamber is not enough to build a segment.\n";
103  // return std::vector<CSCSegment>();
104  // }
105 
106  // We have at least 2 hits. We intend to try all possible pairs of hits to start
107  // segment building. 'All possible' means each hit lies on different layers in the chamber.
108  // For now we don't care whether a hit has already been allocated to another segment;
109  // we'll sort that out after building all possible segments.
110 
111  // Choose first hit (as close to IP as possible) h1 and
112  // second hit (as far from IP as possible) h2
113  // To do this we iterate over hits in the chamber by layer - pick two layers.
114  // @@ Require the two layers are at least 3 layers apart. May need tuning?
115  // Then we iterate over hits within each of these layers and pick h1 and h2 from these.
116  // If they are 'close enough' we build an empty segment.
117  // Then try adding hits to this segment.
118 
119  // Define buffer for segments we build (at the end we'll sort them somehow, and remove
120  // those which share hits with better-quality segments.
121 
122 
123  std::vector<CSCSegment> segments;
124 
125  sfit_ = nullptr;
126 
128  ChamberHitContainerCIt ie = rechits.end();
129 
130  for (ChamberHitContainerCIt i1 = ib; i1 != ie; ++i1) {
131 
132  int layer1 = layerIndex[i1-ib];
133 
134  const CSCRecHit2D* h1 = *i1;
135 
136  for (ChamberHitContainerCIt i2 = ie-1; i2 != i1; --i2) {
137 
138  int layer2 = layerIndex[i2-ib];
139 
140  if (abs(layer2 - layer1) < minLayersApart)
141  break;
142 
143  const CSCRecHit2D* h2 = *i2;
144 
145  if (areHitsCloseInLocalX(h1, h2) && areHitsCloseInGlobalPhi(h1, h2)) {
146 
147  proto_segment.clear();
148 
149  const CSCLayer* l1 = theChamber->layer(h1->cscDetId().layer());
150  GlobalPoint gp1 = l1->toGlobal(h1->localPosition());
151  const CSCLayer* l2 = theChamber->layer(h2->cscDetId().layer());
152  GlobalPoint gp2 = l2->toGlobal(h2->localPosition());
153  LogDebug("CSCSegment") << "start new segment from hits " << "h1: " << gp1 << " - h2: " << gp2 << "\n";
154  // edm::LogVerbatim("CSCSegment") << "start new segment from hits " << "h1: " << gp1 << " - h2: " << gp2;
155  // edm::LogVerbatim("CSCSegment") << "on layers " << layer1 << " and " << layer2;
156 
157  if ( !addHit(h1, layer1) ) {
158  LogDebug("CSCSegment") << " failed to add hit h1\n";
159  continue;
160  }
161 
162  if ( !addHit(h2, layer2) ) {
163  LogDebug("CSCSegment") << " failed to add hit h2\n";
164  continue;
165  }
166 
167  if ( sfit_ ) tryAddingHitsToSegment(rechits, i1, i2); // can only add hits if there's a segment
168 
169  // if a segment has been found push back it into the segment collection
170  if (proto_segment.empty()) {
171  LogDebug("CSCSegment") << "No segment found.\n";
172  // edm::LogVerbatim("CSCSegment") << "No segment found.";
173  }
174  else {
175  //@@ THIS IS GOING TO BE TRICKY - CREATING MANY FITS ON HEAP
176  //@@ BUT MEMBER VARIABLE JUST POINTS TO MOST RECENT ONE
177  candidates.push_back( sfit_ ); // store the current fit
178  LogDebug("CSCSegment") << "Found a segment.\n";
179  // edm::LogVerbatim("CSCSegment") << "Found a segment.";
180  }
181  }
182  }
183  }
184 
185  // edm::LogVerbatim("CSCSegment") << "[CSCSegAlgoTC::buildSegments] no. of candidates before pruning = " << candidates.size();
186 
187  // We've built all possible segments. Now pick the best, non-overlapping subset.
189 
190  // Create CSCSegments for the surviving candidates
191  for(unsigned int i = 0; i < candidates.size(); ++i ) {
192  CSCSegFit*sfit = candidates[i];
193  // edm::LogVerbatim("CSCSegment") << "candidate fit " << i+1 << " of " << candidates.size() << " is at " << sfit;
194  // if ( !sfit ) {
195  // edm::LogVerbatim("CSCSegment") << "stored a null pointer for element " << i+1 << " of " << candidates.size();
196  // continue;
197  // }
198  CSCSegment temp(sfit->hits(), sfit->intercept(), sfit->localdir(),
199  sfit->covarianceMatrix(), sfit->chi2() );
200  delete sfit;
201  segments.push_back(temp);
202  if (debugInfo) dumpSegment( temp );
203  }
204 
205  // reset member variables
206  candidates.clear();
207  sfit_ = nullptr;
208 
209  // edm::LogVerbatim("CSCSegment") << "[CSCSegAlgoTC::buildSegments] no. of segments returned = " << segments.size();
210 
211  return segments;
212 }
#define LogDebug(id)
CSCSetOfHits hits(void) const
Definition: CSCSegFit.h:82
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
LocalVector localdir() const
Definition: CSCSegFit.h:88
const std::string myName
Definition: CSCSegAlgoTC.h:192
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
void dumpSegment(const CSCSegment &seg) const
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
int layer() const
Definition: CSCDetId.h:61
bool areHitsCloseInLocalX(const CSCRecHit2D *h1, const CSCRecHit2D *h2) const
const Surface::PositionType & position() const
The position (origin of the R.F.)
Definition: GeomDet.h:48
double chi2(void) const
Definition: CSCSegFit.h:85
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
bool areHitsCloseInGlobalPhi(const CSCRecHit2D *h1, const CSCRecHit2D *h2) const
bool addHit(const CSCRecHit2D *aHit, int layer)
Utility functions.
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
std::vector< CSCSegFit * > candidates
Definition: CSCSegAlgoTC.h:148
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
std::vector< const CSCRecHit2D * > ChamberHitContainer
Definition: CSCSegAlgoTC.h:39
AlgebraicSymMatrix covarianceMatrix(void)
Definition: CSCSegFit.cc:378
void tryAddingHitsToSegment(const ChamberHitContainer &rechits, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2)
LocalPoint intercept() const
Definition: CSCSegFit.h:87
std::vector< int > LayerIndex
Typedefs.
Definition: CSCSegAlgoTC.h:38
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
void pruneTheSegments(const ChamberHitContainer &rechitsInChamber)
ib
Definition: cuy.py:662
void CSCSegAlgoTC::compareProtoSegment ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 319 of file CSCSegAlgoTC.cc.

References CSCSegFit::chi2(), LogDebug, convertSQLiteXML::ok, replaceHit(), and sfit_.

Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoTC().

319  {
320 
321  // Save copy of current fit
322  CSCSegFit* oldfit = new CSCSegFit( *sfit_ );
323 
324  bool ok = replaceHit(h, layer); // possible new fit
325 
326  if (ok) {
327  LogDebug("CSC") << " hit in same layer as a hit on segment; try replacing old one..."
328  << " chi2 new: " << sfit_->chi2() << " old: " << oldfit->chi2() << "\n";
329  }
330 
331  if ( ok && (sfit_->chi2() < oldfit->chi2()) ) {
332  LogDebug("CSC") << " segment with replaced hit is better.\n";
333  delete oldfit; // new fit is better
334  }
335  else {
336  delete sfit_; // new fit is worse
337  sfit_ = oldfit; // restore original fit
338  }
339 }
#define LogDebug(id)
double chi2(void) const
Definition: CSCSegFit.h:85
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145
bool replaceHit(const CSCRecHit2D *h, int layer)
void CSCSegAlgoTC::dumpHits ( const ChamberHitContainer rechits) const
private

Dump global and local coordinate of each rechit in chamber after sort in z

Definition at line 435 of file CSCSegAlgoTC.cc.

References CSCChamber::layer(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), theChamber, and GeomDet::toGlobal().

Referenced by ~CSCSegAlgoTC().

435  {
436 
437  // Dump positions of RecHit's in each CSCChamber
439 
440  for(it=rechits.begin(); it!=rechits.end(); it++) {
441 
442  const CSCLayer* l1 = theChamber->layer((*it)->cscDetId().layer());
443  GlobalPoint gp1 = l1->toGlobal((*it)->localPosition());
444 
445  LogDebug("CSC") << "Global pos.: " << gp1 << ", phi: " << gp1.phi() << ". Local position: "
446  << (*it)->localPosition() << ", phi: "
447  << (*it)->localPosition().phi() << ". Layer: "
448  << (*it)->cscDetId().layer() << "\n";
449  }
450 }
#define LogDebug(id)
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
void CSCSegAlgoTC::dumpSegment ( const CSCSegment seg) const
private

Definition at line 602 of file CSCSegAlgoTC.cc.

References CSCSegment::chi2(), CSCSegment::degreesOfFreedom(), CSCChamber::id(), CSCSegment::localDirection(), CSCSegment::localDirectionError(), CSCSegment::localPosition(), CSCSegment::localPositionError(), CSCSegment::parametersError(), CSCSegment::specificRecHits(), theChamber, and CSCSegment::time().

Referenced by buildSegments(), and ~CSCSegAlgoTC().

602  {
603 
604  edm::LogVerbatim("CSCSegment") << "CSCSegment in " << theChamber->id()
605  << "\nlocal position = " << seg.localPosition()
606  << "\nerror = " << seg.localPositionError()
607  << "\nlocal direction = " << seg.localDirection()
608  << "\nerror =" << seg.localDirectionError()
609  << "\ncovariance matrix"
610  << seg.parametersError()
611  << "chi2/ndf = " << seg.chi2() << "/" << seg.degreesOfFreedom()
612  << "\n#rechits = " << seg.specificRecHits().size()
613  << "\ntime = " << seg.time();
614 }
LocalVector localDirection() const override
Local direction.
Definition: CSCSegment.h:41
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:37
LocalError localDirectionError() const override
Error on the local direction.
Definition: CSCSegment.cc:51
LocalPoint localPosition() const override
Definition: CSCSegment.h:38
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:65
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
double chi2() const override
Chi2 of the segment fit.
Definition: CSCSegment.h:57
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: CSCSegment.h:61
LocalError localPositionError() const override
Definition: CSCSegment.cc:47
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: CSCSegment.h:48
float time() const
Definition: CSCSegment.cc:149
void CSCSegAlgoTC::flagHitsAsUsed ( std::vector< CSCSegFit * >::iterator  is,
const ChamberHitContainer rechitsInChamber,
BoolContainer used 
) const
private

Flag hits on segment as used

Definition at line 506 of file CSCSegAlgoTC.cc.

References hfClusterShapes_cfi::hits, and cuy::ib.

Referenced by pruneTheSegments(), and ~CSCSegAlgoTC().

507  {
508 
509  // Flag hits on segment as used
510 
511  ChamberHitContainerCIt ib = rechitsInChamber.begin();
512  ChamberHitContainer hits = (*seg)->hits();
513 
514  for(size_t ish = 0; ish < hits.size(); ++ish) {
515  for(ChamberHitContainerCIt iu = ib; iu != rechitsInChamber.end(); ++iu)
516  if( hits[ish] == (*iu))
517  used[iu-ib] = true;
518  }
519 }
std::vector< const CSCRecHit2D * > ChamberHitContainer
Definition: CSCSegAlgoTC.h:39
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
ib
Definition: cuy.py:662
bool CSCSegAlgoTC::hasHitOnLayer ( int  layer) const
private

Definition at line 423 of file CSCSegAlgoTC.cc.

References proto_segment.

Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoTC().

423  {
424 
425  // Is there is already a hit on this layer?
427 
428  for(it = proto_segment.begin(); it != proto_segment.end(); it++)
429  if ((*it)->cscDetId().layer() == layer)
430  return true;
431 
432  return false;
433 }
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
void CSCSegAlgoTC::increaseProtoSegment ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 341 of file CSCSegAlgoTC.cc.

References addHit(), CSCSegFit::chi2(), chi2Max, LogDebug, CSCSegFit::ndof(), convertSQLiteXML::ok, and sfit_.

Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoTC().

341  {
342 
343  // save copy of input fit
344  CSCSegFit* oldfit = new CSCSegFit( *sfit_ );
345 
346  bool ok = addHit(h, layer); // possible new fit
347 
348  if (ok) {
349  LogDebug("CSC") << " hit in new layer: added to segment, new chi2: "
350  << sfit_->chi2() << "\n";
351  }
352 
353  // int ndf = 2*proto_segment.size() - 4;
354 
355  if (ok && ((sfit_->chi2() <= 0) || (sfit_->chi2()/sfit_->ndof() < chi2Max))) {
356  LogDebug("CSC") << " segment with added hit is good.\n" ;
357  delete oldfit; // new fit is better
358  }
359  else {
360  delete sfit_; // new fit is worse
361  sfit_ = oldfit; // restore original fit
362  }
363 }
#define LogDebug(id)
double chi2(void) const
Definition: CSCSegFit.h:85
int ndof(void) const
Definition: CSCSegFit.h:86
bool addHit(const CSCRecHit2D *aHit, int layer)
Utility functions.
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145
bool CSCSegAlgoTC::isHitNearSegment ( const CSCRecHit2D h) const
private

Return true if hit is near segment. 'Near' means deltaphi and rxy*deltaphi are within ranges specified by config parameters dPhiFineMax and dRPhiFineMax, where rxy = sqrt(x**2+y**2) of the hit in global coordinates.

Definition at line 393 of file CSCSegAlgoTC.cc.

References CSCRecHit2D::cscDetId(), dPhiFineMax, dRPhiFineMax, AnalysisDataFormats_SUSYBSMObjects::hp, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phiAtZ(), theChamber, GeomDet::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoTC().

393  {
394 
395  // Is hit near segment?
396  // Requires deltaphi and rxy*deltaphi within ranges specified
397  // in orcarc, or by default, where rxy=sqrt(x**2+y**2) of hit itself.
398  // Note that to make intuitive cuts on delta(phi) one must work in
399  // phi range (-pi, +pi] not [0, 2pi
400 
401  const CSCLayer* l1 = theChamber->layer(h->cscDetId().layer());
402  GlobalPoint hp = l1->toGlobal(h->localPosition());
403 
404  float hphi = hp.phi(); // in (-pi, +pi]
405  if (hphi < 0.)
406  hphi += 2.*M_PI; // into range [0, 2pi)
407  float sphi = phiAtZ(hp.z()); // in [0, 2*pi)
408  float phidif = sphi-hphi;
409  if (phidif < 0.)
410  phidif += 2.*M_PI; // into range [0, 2pi)
411  if (phidif > M_PI)
412  phidif -= 2.*M_PI; // into range (-pi, pi]
413 
414  float dRPhi = fabs(phidif)*hp.perp();
415  LogDebug("CSC") << " is hit at phi_h= " << hphi << " near segment phi_seg= " << sphi
416  << "? is " << dRPhi << "<" << dRPhiFineMax << " ? "
417  << " and is |" << phidif << "|<" << dPhiFineMax << " ?";
418 
419  return ((dRPhi < dRPhiFineMax) &&
420  (fabs(phidif) < dPhiFineMax))? true:false; // +v
421 }
#define LogDebug(id)
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
T perp() const
Definition: PV3DBase.h:72
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
int layer() const
Definition: CSCDetId.h:61
float phiAtZ(float z) const
susybsm::HSCParticleRefProd hp
Definition: classes.h:27
T z() const
Definition: PV3DBase.h:64
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
float dRPhiFineMax
Definition: CSCSegAlgoTC.h:162
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
float dPhiFineMax
Definition: CSCSegAlgoTC.h:167
bool CSCSegAlgoTC::isSegmentGood ( std::vector< CSCSegFit * >::iterator  is,
const ChamberHitContainer rechitsInChamber,
BoolContainer used 
) const
private

Return true if segment is good. In this algorithm, this means it shares no hits with any other segment. If "SegmentSort=2" also require a minimal chi2 probability of "chi2ndfProbMin".

Definition at line 454 of file CSCSegAlgoTC.cc.

References chi2ndfProbMin, ChiSquaredProbability(), cuy::ib, nhits, and SegmentSorting.

Referenced by pruneTheSegments(), and ~CSCSegAlgoTC().

455  {
456 
457  // Apply any selection cuts to segment
458 
459  // 1) Require a minimum no. of hits
460  // (@@ THESE VALUES SHOULD BECOME PARAMETERS?)
461 
462  // 2) Ensure no hits on segment are already assigned to another segment
463  // (typically of higher quality)
464 
465  size_t iadd = (rechitsInChamber.size() > 20 )? 1 : 0;
466 
467  size_t nhits = (*seg)->nhits();
468 
469  if (nhits < 3 + iadd)
470  return false;
471 
472  // Additional part of alternative segment selection scheme: reject
473  // segments with a chi2 probability of less than chi2ndfProbMin. Relies on list
474  // being sorted with "SegmentSorting == 2", that is first by nrechits and then
475  // by chi2prob in subgroups of same no. of rechits.
476 
477  if( SegmentSorting == 2 ){
478  double chi2t = (*seg)->chi2();
479  double ndoft = 2*nhits - 4 ;
480  if( chi2t > 0 && ndoft > 0 ) {
481  if ( ChiSquaredProbability(chi2t,ndoft) < chi2ndfProbMin ) {
482  return false;
483  }
484  }
485  else {
486  return false;
487  }
488  }
489 
490  ChamberHitContainer hits_ = (*seg)->hits();
491 
492  for(size_t ish = 0; ish < nhits; ++ish) {
493 
494  ChamberHitContainerCIt ib = rechitsInChamber.begin();
495 
496  for(ChamberHitContainerCIt ic = ib; ic != rechitsInChamber.end(); ++ic) {
497 
498  if((hits_[ish] == (*ic)) && used[ic-ib])
499  return false;
500  }
501  }
502 
503  return true;
504 }
float ChiSquaredProbability(double chiSquared, double nrDOF)
float chi2ndfProbMin
Definition: CSCSegAlgoTC.h:157
std::vector< const CSCRecHit2D * > ChamberHitContainer
Definition: CSCSegAlgoTC.h:39
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
ib
Definition: cuy.py:662
float CSCSegAlgoTC::phiAtZ ( float  z) const
private

Definition at line 303 of file CSCSegAlgoTC.cc.

References f, runTauDisplay::gp, CSCSegFit::intercept(), CSCChamber::layer(), CSCSegFit::localdir(), M_PI, phi, sfit_, theChamber, GeomDet::toGlobal(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by isHitNearSegment(), and ~CSCSegAlgoTC().

303  {
304 
305  // Returns a phi in [ 0, 2*pi )
306  const CSCLayer* l1 = theChamber->layer(1);
308  GlobalVector gv = l1->toGlobal(sfit_->localdir());
309 
310  float x = gp.x() + (gv.x()/gv.z())*(z - gp.z());
311  float y = gp.y() + (gv.y()/gv.z())*(z - gp.z());
312  float phi = atan2(y, x);
313  if (phi < 0.f)
314  phi += 2. * M_PI;
315 
316  return phi ;
317 }
LocalVector localdir() const
Definition: CSCSegFit.h:88
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
T y() const
Definition: PV3DBase.h:63
T z() const
Definition: PV3DBase.h:64
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
double f[11][100]
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
LocalPoint intercept() const
Definition: CSCSegFit.h:87
T x() const
Definition: PV3DBase.h:62
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145
void CSCSegAlgoTC::pruneTheSegments ( const ChamberHitContainer rechitsInChamber)
private

Order segments by quality (chi2/#hits) and select the best, requiring that they have unique hits.

Definition at line 521 of file CSCSegAlgoTC.cc.

References candidates, flagHitsAsUsed(), isSegmentGood(), LogDebug, and segmentSort().

Referenced by buildSegments(), and ~CSCSegAlgoTC().

521  {
522 
523  // Sort the segment store according to segment 'quality' (chi2/#hits ?) and
524  // remove any segments which contain hits assigned to higher-quality segments.
525 
526  if (candidates.empty())
527  return;
528 
529  // Initialize flags that a given hit has been allocated to a segment
530  BoolContainer used(rechitsInChamber.size(), false);
531 
532  // Sort by chi2/#hits
533  segmentSort();
534 
535  // Select best quality segments, requiring hits are assigned to just one segment
536  // Want to erase the bad segments, so the iterator must be incremented
537  // inside the loop, and only when the erase is not called
538 
539  std::vector<CSCSegFit*>::iterator is;
540 
541  for (is = candidates.begin(); is != candidates.end(); ) {
542 
543  bool goodSegment = isSegmentGood(is, rechitsInChamber, used);
544 
545  if (goodSegment) {
546  LogDebug("CSC") << "Accepting segment: ";
547  flagHitsAsUsed(is, rechitsInChamber, used);
548  ++is;
549  }
550  else {
551  LogDebug("CSC") << "Rejecting segment: ";
552  delete *is; // delete the CSCSegFit*
553  is = candidates.erase(is); // erase the element in container
554  }
555  }
556 }
#define LogDebug(id)
std::deque< bool > BoolContainer
Definition: CSCSegAlgoTC.h:47
bool isSegmentGood(std::vector< CSCSegFit * >::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
void flagHitsAsUsed(std::vector< CSCSegFit * >::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
std::vector< CSCSegFit * > candidates
Definition: CSCSegAlgoTC.h:148
void segmentSort(void)
bool CSCSegAlgoTC::replaceHit ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 279 of file CSCSegAlgoTC.cc.

References addHit(), and proto_segment.

Referenced by compareProtoSegment(), and ~CSCSegAlgoTC().

279  {
280 
281  // replace a hit from a layer
282  ChamberHitContainer::iterator it;
283  for (it = proto_segment.begin(); it != proto_segment.end();) {
284  if ((*it)->cscDetId().layer() == layer)
285  it = proto_segment.erase(it);
286  else
287  ++it;
288  }
289 
290  return addHit(h, layer);
291 
292 }
bool addHit(const CSCRecHit2D *aHit, int layer)
Utility functions.
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
std::vector< CSCSegment > CSCSegAlgoTC::run ( const CSCChamber aChamber,
const ChamberHitContainer rechits 
)
override

Here we must implement the algorithm

Definition at line 52 of file CSCSegAlgoTC.cc.

References buildSegments(), and theChamber.

Referenced by ~CSCSegAlgoTC().

52  {
53  theChamber = aChamber;
54 
55  return buildSegments(rechits);
56 }
std::vector< CSCSegment > buildSegments(const ChamberHitContainer &rechits)
Definition: CSCSegAlgoTC.cc:58
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
void CSCSegAlgoTC::segmentSort ( void  )
private

Sort criterion for segment quality, for use in pruneTheSegments.

Definition at line 558 of file CSCSegAlgoTC.cc.

References candidates, vertices_cff::chi2, ChiSquaredProbability(), mps_fire::i, LogDebug, ndof, SegmentSorting, findQualityFiles::size, and groupFilesInBlocks::temp.

Referenced by pruneTheSegments(), and ~CSCSegAlgoTC().

558  {
559 
560  // The segment collection is sorted according to e.g. chi2/#hits
561 
562  for(size_t i=0; i<candidates.size()-1; ++i) {
563  for(size_t j=i+1; j<candidates.size(); ++j) {
564 
565  size_t ni = (candidates[i]->hits()).size();
566  size_t nj = (candidates[j]->hits()).size();
567 
568  // Sort criterion: first sort by no. of rechits, then in groups of rechits by chi2prob
569  if( SegmentSorting == 2 ){
570  if ( nj > ni ) { // sort by no. of rechits
571  CSCSegFit* temp = candidates[j];
572  candidates[j] = candidates[i];
573  candidates[i] = temp;
574  }
575  // sort by chi2 probability in subgroups with equal nr of rechits
576  // if(chi2s[i] != 0. && 2*n2-4 > 0 ) {
577  if( candidates[i]->chi2() > 0 && candidates[i]->ndof() > 0 ) {
578  if( nj == ni &&
579  ( ChiSquaredProbability( candidates[i]->chi2(),(double)(candidates[i]->ndof()) ) <
580  ChiSquaredProbability( candidates[j]->chi2(),(double)(candidates[j]->ndof()) ) )
581  ){
582  CSCSegFit* temp = candidates[j];
583  candidates[j] = candidates[i];
584  candidates[i] = temp;
585  }
586  }
587  }
588  else if( SegmentSorting == 1 ){
589  if ((candidates[i]->chi2()/ni) > (candidates[j]->chi2()/nj)) {
590  CSCSegFit* temp = candidates[j];
591  candidates[j] = candidates[i];
592  candidates[i] = temp;
593  }
594  }
595  else{
596  LogDebug("CSC") << "No valid segment sorting specified. Algorithm misconfigured! \n";
597  }
598  }
599  }
600 }
#define LogDebug(id)
size
Write out results.
float ChiSquaredProbability(double chiSquared, double nrDOF)
std::vector< CSCSegFit * > candidates
Definition: CSCSegAlgoTC.h:148
void CSCSegAlgoTC::tryAddingHitsToSegment ( const ChamberHitContainer rechits,
const ChamberHitContainerCIt  i1,
const ChamberHitContainerCIt  i2 
)
private

Try adding non-used hits to segment

Definition at line 214 of file CSCSegAlgoTC.cc.

References compareProtoSegment(), CSCRecHit2D::cscDetId(), h, hasHitOnLayer(), mps_fire::i, cuy::ib, increaseProtoSegment(), isHitNearSegment(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), LogDebug, proto_segment, theChamber, and GeomDet::toGlobal().

Referenced by buildSegments(), and ~CSCSegAlgoTC().

215  {
216 
217  // Iterate over the layers with hits in the chamber
218  // Skip the layers containing the segment endpoints
219  // Test each hit on the other layers to see if it is near the segment
220  // If it is, see whether there is already a hit on the segment from the same layer
221  // - if so, and there are more than 2 hits on the segment, copy the segment,
222  // replace the old hit with the new hit. If the new segment chi2 is better
223  // then replace the original segment with the new one (by swap)
224  // - if not, copy the segment, add the hit. If the new chi2/dof is still satisfactory
225  // then replace the original segment with the new one (by swap)
226 
228  ChamberHitContainerCIt ie = rechits.end();
229 
230  for (ChamberHitContainerCIt i = ib; i != ie; ++i) {
231 
232  if ( i == i1 || i == i2 )
233  continue;
234 
235  int layer = (*i)->cscDetId().layer();
236  const CSCRecHit2D* h = *i;
237 
238  if (isHitNearSegment(h)) {
239 
240  const CSCLayer* l1 = theChamber->layer(h->cscDetId().layer());
241  GlobalPoint gp1 = l1->toGlobal(h->localPosition());
242  LogDebug("CSC") << " hit at global " << gp1 << " is near segment\n.";
243 
244  if (hasHitOnLayer(layer)) {
245  if (proto_segment.size() <= 2) {
246  LogDebug("CSC") << " " << proto_segment.size()
247  << " hits on segment...skip hit on same layer.\n";
248  continue;
249  }
250 
251  compareProtoSegment(h, layer);
252  }
253  else
254  increaseProtoSegment(h, layer);
255  } // h & seg close
256  } // i
257 }
#define LogDebug(id)
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:52
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:54
void compareProtoSegment(const CSCRecHit2D *h, int layer)
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:50
int layer() const
Definition: CSCDetId.h:61
bool isHitNearSegment(const CSCRecHit2D *h) const
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:39
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
bool hasHitOnLayer(int layer) const
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:40
void increaseProtoSegment(const CSCRecHit2D *h, int layer)
ib
Definition: cuy.py:662
void CSCSegAlgoTC::updateParameters ( void  )
private

Definition at line 294 of file CSCSegAlgoTC.cc.

References CSCSegFit::fit(), proto_segment, sfit_, and theChamber.

Referenced by addHit(), and ~CSCSegAlgoTC().

294  {
295 
296  //@@ DO NOT DELETE EXISTING FIT SINCE WE SAVE IT!!
297  // delete sfit_;
299  sfit_->fit();
300 
301 }
void fit(void)
Definition: CSCSegFit.cc:14
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:140
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:142
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:145

Member Data Documentation

std::vector<CSCSegFit*> CSCSegAlgoTC::candidates
private

Definition at line 148 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), pruneTheSegments(), and segmentSort().

float CSCSegAlgoTC::chi2Max
private

max segment chi squared

Definition at line 152 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and increaseProtoSegment().

float CSCSegAlgoTC::chi2ndfProbMin
private

min segment chi squared probability. Used ONLY if SegmentSorting is chosen to be 2

Definition at line 157 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isSegmentGood().

bool CSCSegAlgoTC::debugInfo
private

Definition at line 193 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

float CSCSegAlgoTC::dPhiFineMax
private

max hit deviation in global phi from the segment axis. Function hitNearSegment requires abs(deltaphi) < dPhiFineMax.

Definition at line 167 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isHitNearSegment().

float CSCSegAlgoTC::dPhiMax
private

max distance in global phi between hits in one segment

Definition at line 176 of file CSCSegAlgoTC.h.

Referenced by areHitsCloseInGlobalPhi(), and CSCSegAlgoTC().

float CSCSegAlgoTC::dRPhiFineMax
private

max hit deviation in r-phi from the segment axis. Function hitNearSegment requires rxy*abs(deltaphi) < dRPhiFineMax.

Definition at line 162 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isHitNearSegment().

float CSCSegAlgoTC::dRPhiMax
private

max distance in local x between hits in one segment @ The name is historical!

Definition at line 172 of file CSCSegAlgoTC.h.

Referenced by areHitsCloseInLocalX(), and CSCSegAlgoTC().

int CSCSegAlgoTC::minLayersApart
private

Require end-points of segment are at least minLayersApart

Definition at line 180 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

const std::string CSCSegAlgoTC::myName
private

Name of this class

Definition at line 192 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

ChamberHitContainer CSCSegAlgoTC::proto_segment
private
int CSCSegAlgoTC::SegmentSorting
private

Select which segment sorting to use (the higher the segment is in the list, the better the segment is supposed to be): if value is ==1: Sort segments by Chi2/(#hits on segment) if value is ==2: Sort segments first by #hits on segment, then by Chi2Probability(Chi2/ndf)

Definition at line 188 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), isSegmentGood(), and segmentSort().

CSCSegFit* CSCSegAlgoTC::sfit_
private
const CSCChamber* CSCSegAlgoTC::theChamber
private