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

◆ BoolContainer

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

Definition at line 46 of file CSCSegAlgoTC.h.

◆ ChamberHitContainer

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

Definition at line 38 of file CSCSegAlgoTC.h.

◆ ChamberHitContainerCIt

typedef ChamberHitContainer::const_iterator CSCSegAlgoTC::ChamberHitContainerCIt

Definition at line 39 of file CSCSegAlgoTC.h.

◆ LayerIndex

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

Typedefs.

Definition at line 37 of file CSCSegAlgoTC.h.

Constructor & Destructor Documentation

◆ CSCSegAlgoTC()

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  debugInfo = ps.getUntrackedParameter<bool>("verboseInfo");
29 
30  dRPhiMax = ps.getParameter<double>("dRPhiMax");
31  dPhiMax = ps.getParameter<double>("dPhiMax");
32  dRPhiFineMax = ps.getParameter<double>("dRPhiFineMax");
33  dPhiFineMax = ps.getParameter<double>("dPhiFineMax");
34  chi2Max = ps.getParameter<double>("chi2Max");
35  chi2ndfProbMin = ps.getParameter<double>("chi2ndfProbMin");
36  minLayersApart = ps.getParameter<int>("minLayersApart");
37  SegmentSorting = ps.getParameter<int>("SegmentSorting");
38 
39  LogDebug("CSC") << myName << " has algorithm cuts set to: \n"
40  << "--------------------------------------------------------------------\n"
41  << "dRPhiMax = " << dRPhiMax << '\n'
42  << "dPhiMax = " << dPhiMax << '\n'
43  << "dRPhiFineMax = " << dRPhiFineMax << '\n'
44  << "dPhiFineMax = " << dPhiFineMax << '\n'
45  << "chi2Max = " << chi2Max << '\n'
46  << "chi2ndfProbMin = " << chi2ndfProbMin << '\n'
47  << "minLayersApart = " << minLayersApart << '\n'
48  << "SegmentSorting = " << SegmentSorting << std::endl;
49 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const std::string myName
Definition: CSCSegAlgoTC.h:191
CSCSegmentAlgorithm(const edm::ParameterSet &)
Constructor.
T getUntrackedParameter(std::string const &, T const &) const
float dRPhiFineMax
Definition: CSCSegAlgoTC.h:161
float chi2ndfProbMin
Definition: CSCSegAlgoTC.h:156
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:144
#define LogDebug(id)
float dPhiFineMax
Definition: CSCSegAlgoTC.h:166

◆ ~CSCSegAlgoTC()

CSCSegAlgoTC::~CSCSegAlgoTC ( )
inlineoverride

Destructor.

Definition at line 51 of file CSCSegAlgoTC.h.

51 {};

Member Function Documentation

◆ addHit()

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

Utility functions.

Definition at line 248 of file CSCSegAlgoTC.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, convertSQLiteXML::ok, proto_segment, and updateParameters().

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

248  {
249  // Return true if hit was added successfully
250  // (and then parameters are updated).
251  // Return false if there is already a hit on the same layer, or insert failed.
252 
253  bool ok = true;
254  ChamberHitContainer::const_iterator it;
255 
256  for (it = proto_segment.begin(); it != proto_segment.end(); it++)
257  if (((*it)->cscDetId().layer() == layer) && (aHit != *it))
258  return false;
259 
260  if (ok) {
261  proto_segment.push_back(aHit);
263  }
264  return ok;
265 }
void updateParameters(void)
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:141

◆ areHitsCloseInGlobalPhi()

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 350 of file CSCSegAlgoTC.cc.

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

Referenced by buildSegments().

350  {
351  const CSCLayer* l1 = theChamber->layer(h1->cscDetId().layer());
352  GlobalPoint gp1 = l1->toGlobal(h1->localPosition());
353  const CSCLayer* l2 = theChamber->layer(h2->cscDetId().layer());
354  GlobalPoint gp2 = l2->toGlobal(h2->localPosition());
355 
356  float h1p = gp1.phi();
357  float h2p = gp2.phi();
358  float dphi12 = h1p - h2p;
359 
360  // Into range [-pi, pi) (phi() returns values in this range)
361  if (dphi12 < -M_PI)
362  dphi12 += 2. * M_PI;
363  if (dphi12 > M_PI)
364  dphi12 -= 2. * M_PI;
365  LogDebug("CSC") << " Hits at global phi= " << h1p << ", " << h2p << " have separation= " << dphi12;
366  return (fabs(dphi12) < dPhiMax) ? true : false; // +v
367 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
CSCDetId cscDetId() const
Definition: CSCRecHit2D.h:58
int layer() const
Definition: CSCDetId.h:56
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:56
#define LogDebug(id)

◆ areHitsCloseInLocalX()

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 343 of file CSCSegAlgoTC.cc.

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

Referenced by buildSegments().

343  {
344  float deltaX = (h1->localPosition() - h2->localPosition()).x();
345  LogDebug("CSC") << " Hits at local x= " << h1->localPosition().x() << ", " << h2->localPosition().x()
346  << " have separation= " << deltaX;
347  return (fabs(deltaX) < (dRPhiMax)) ? true : false; // +v
348 }
LocalPoint localPosition() const override
Definition: CSCRecHit2D.h:56
#define LogDebug(id)

◆ buildSegments()

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 57 of file CSCSegAlgoTC.cc.

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

Referenced by run().

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

◆ compareProtoSegment()

void CSCSegAlgoTC::compareProtoSegment ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 302 of file CSCSegAlgoTC.cc.

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

Referenced by tryAddingHitsToSegment().

302  {
303  // Save copy of current fit
304  CSCSegFit* oldfit = new CSCSegFit(*sfit_);
305 
306  bool ok = replaceHit(h, layer); // possible new fit
307 
308  if (ok) {
309  LogDebug("CSC") << " hit in same layer as a hit on segment; try replacing old one..."
310  << " chi2 new: " << sfit_->chi2() << " old: " << oldfit->chi2() << "\n";
311  }
312 
313  if (ok && (sfit_->chi2() < oldfit->chi2())) {
314  LogDebug("CSC") << " segment with replaced hit is better.\n";
315  delete oldfit; // new fit is better
316  } else {
317  delete sfit_; // new fit is worse
318  sfit_ = oldfit; // restore original fit
319  }
320 }
double chi2(void) const
Definition: CSCSegFit.h:82
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:144
bool replaceHit(const CSCRecHit2D *h, int layer)
#define LogDebug(id)

◆ dumpHits()

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 408 of file CSCSegAlgoTC.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, CSCChamber::layer(), LogDebug, PV3DBase< T, PVType, FrameType >::phi(), Geom::Phi< T1, Range >::phi(), HI_PhotonSkim_cff::rechits, theChamber, and GeomDet::toGlobal().

408  {
409  // Dump positions of RecHit's in each CSCChamber
411 
412  for (it = rechits.begin(); it != rechits.end(); it++) {
413  const CSCLayer* l1 = theChamber->layer((*it)->cscDetId().layer());
414  GlobalPoint gp1 = l1->toGlobal((*it)->localPosition());
415 
416  LogDebug("CSC") << "Global pos.: " << gp1 << ", phi: " << gp1.phi()
417  << ". Local position: " << (*it)->localPosition() << ", phi: " << (*it)->localPosition().phi()
418  << ". Layer: " << (*it)->cscDetId().layer() << "\n";
419  }
420 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
T1 phi() const
Definition: Phi.h:78
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:39
#define LogDebug(id)

◆ dumpSegment()

void CSCSegAlgoTC::dumpSegment ( const CSCSegment seg) const
private

Definition at line 558 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().

558  {
559  edm::LogVerbatim("CSCSegment") << "CSCSegment in " << theChamber->id() << "\nlocal position = " << seg.localPosition()
560  << "\nerror = " << seg.localPositionError()
561  << "\nlocal direction = " << seg.localDirection()
562  << "\nerror =" << seg.localDirectionError() << "\ncovariance matrix"
563  << seg.parametersError() << "chi2/ndf = " << seg.chi2() << "/"
564  << seg.degreesOfFreedom() << "\n#rechits = " << seg.specificRecHits().size()
565  << "\ntime = " << seg.time();
566 }
Log< level::Info, true > LogVerbatim
float time() const
Definition: CSCSegment.cc:144
LocalPoint localPosition() const override
Definition: CSCSegment.h:39
double chi2() const override
Chi2 of the segment fit.
Definition: CSCSegment.h:58
LocalVector localDirection() const override
Local direction.
Definition: CSCSegment.h:42
int degreesOfFreedom() const override
Degrees of freedom of the segment fit.
Definition: CSCSegment.h:62
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
LocalError localDirectionError() const override
Error on the local direction.
Definition: CSCSegment.cc:52
AlgebraicSymMatrix parametersError() const override
Covariance matrix of parameters()
Definition: CSCSegment.h:49
const std::vector< CSCRecHit2D > & specificRecHits() const
Definition: CSCSegment.h:66
LocalError localPositionError() const override
Definition: CSCSegment.cc:48
CSCDetId id() const
Get the (concrete) DetId.
Definition: CSCChamber.h:34

◆ flagHitsAsUsed()

void CSCSegAlgoTC::flagHitsAsUsed ( std::vector< CSCSegFit *>::iterator  is,
const ChamberHitContainer rechitsInChamber,
BoolContainer used 
) const
private

Flag hits on segment as used

Definition at line 471 of file CSCSegAlgoTC.cc.

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

Referenced by pruneTheSegments().

473  {
474  // Flag hits on segment as used
475 
476  ChamberHitContainerCIt ib = rechitsInChamber.begin();
477  ChamberHitContainer hits = (*seg)->hits();
478 
479  for (size_t ish = 0; ish < hits.size(); ++ish) {
480  for (ChamberHitContainerCIt iu = ib; iu != rechitsInChamber.end(); ++iu)
481  if (hits[ish] == (*iu))
482  used[iu - ib] = true;
483  }
484 }
std::vector< const CSCRecHit2D * > ChamberHitContainer
Definition: CSCSegAlgoTC.h:38
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:39
ib
Definition: cuy.py:661

◆ hasHitOnLayer()

bool CSCSegAlgoTC::hasHitOnLayer ( int  layer) const
private

Definition at line 397 of file CSCSegAlgoTC.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, and proto_segment.

Referenced by tryAddingHitsToSegment().

397  {
398  // Is there is already a hit on this layer?
400 
401  for (it = proto_segment.begin(); it != proto_segment.end(); it++)
402  if ((*it)->cscDetId().layer() == layer)
403  return true;
404 
405  return false;
406 }
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:141
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:39

◆ increaseProtoSegment()

void CSCSegAlgoTC::increaseProtoSegment ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 322 of file CSCSegAlgoTC.cc.

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

Referenced by tryAddingHitsToSegment().

322  {
323  // save copy of input fit
324  CSCSegFit* oldfit = new CSCSegFit(*sfit_);
325 
326  bool ok = addHit(h, layer); // possible new fit
327 
328  if (ok) {
329  LogDebug("CSC") << " hit in new layer: added to segment, new chi2: " << sfit_->chi2() << "\n";
330  }
331 
332  // int ndf = 2*proto_segment.size() - 4;
333 
334  if (ok && ((sfit_->chi2() <= 0) || (sfit_->chi2() / sfit_->ndof() < chi2Max))) {
335  LogDebug("CSC") << " segment with added hit is good.\n";
336  delete oldfit; // new fit is better
337  } else {
338  delete sfit_; // new fit is worse
339  sfit_ = oldfit; // restore original fit
340  }
341 }
double chi2(void) const
Definition: CSCSegFit.h:82
int ndof(void) const
Definition: CSCSegFit.h:83
bool addHit(const CSCRecHit2D *aHit, int layer)
Utility functions.
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:144
#define LogDebug(id)

◆ isHitNearSegment()

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 369 of file CSCSegAlgoTC.cc.

References dPhiFineMax, dRPhiFineMax, h, trackingPlots::hp, CSCChamber::layer(), LogDebug, M_PI, phiAtZ(), theChamber, GeomDet::toGlobal(), and funct::true.

Referenced by tryAddingHitsToSegment().

369  {
370  // Is hit near segment?
371  // Requires deltaphi and rxy*deltaphi within ranges specified
372  // in orcarc, or by default, where rxy=sqrt(x**2+y**2) of hit itself.
373  // Note that to make intuitive cuts on delta(phi) one must work in
374  // phi range (-pi, +pi] not [0, 2pi
375 
376  const CSCLayer* l1 = theChamber->layer(h->cscDetId().layer());
377  GlobalPoint hp = l1->toGlobal(h->localPosition());
378 
379  float hphi = hp.phi(); // in (-pi, +pi]
380  if (hphi < 0.)
381  hphi += 2. * M_PI; // into range [0, 2pi)
382  float sphi = phiAtZ(hp.z()); // in [0, 2*pi)
383  float phidif = sphi - hphi;
384  if (phidif < 0.)
385  phidif += 2. * M_PI; // into range [0, 2pi)
386  if (phidif > M_PI)
387  phidif -= 2. * M_PI; // into range (-pi, pi]
388 
389  float dRPhi = fabs(phidif) * hp.perp();
390  LogDebug("CSC") << " is hit at phi_h= " << hphi << " near segment phi_seg= " << sphi << "? is " << dRPhi << "<"
391  << dRPhiFineMax << " ? "
392  << " and is |" << phidif << "|<" << dPhiFineMax << " ?";
393 
394  return ((dRPhi < dRPhiFineMax) && (fabs(phidif) < dPhiFineMax)) ? true : false; // +v
395 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
float dRPhiFineMax
Definition: CSCSegAlgoTC.h:161
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
float phiAtZ(float z) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
#define LogDebug(id)
float dPhiFineMax
Definition: CSCSegAlgoTC.h:166

◆ isSegmentGood()

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 422 of file CSCSegAlgoTC.cc.

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

Referenced by pruneTheSegments().

424  {
425  // Apply any selection cuts to segment
426 
427  // 1) Require a minimum no. of hits
428  // (@@ THESE VALUES SHOULD BECOME PARAMETERS?)
429 
430  // 2) Ensure no hits on segment are already assigned to another segment
431  // (typically of higher quality)
432 
433  size_t iadd = (rechitsInChamber.size() > 20) ? 1 : 0;
434 
435  size_t nhits = (*seg)->nhits();
436 
437  if (nhits < 3 + iadd)
438  return false;
439 
440  // Additional part of alternative segment selection scheme: reject
441  // segments with a chi2 probability of less than chi2ndfProbMin. Relies on list
442  // being sorted with "SegmentSorting == 2", that is first by nrechits and then
443  // by chi2prob in subgroups of same no. of rechits.
444 
445  if (SegmentSorting == 2) {
446  double chi2t = (*seg)->chi2();
447  double ndoft = 2 * nhits - 4;
448  if (chi2t > 0 && ndoft > 0) {
449  if (ChiSquaredProbability(chi2t, ndoft) < chi2ndfProbMin) {
450  return false;
451  }
452  } else {
453  return false;
454  }
455  }
456 
457  ChamberHitContainer hits_ = (*seg)->hits();
458 
459  for (size_t ish = 0; ish < nhits; ++ish) {
460  ChamberHitContainerCIt ib = rechitsInChamber.begin();
461 
462  for (ChamberHitContainerCIt ic = ib; ic != rechitsInChamber.end(); ++ic) {
463  if ((hits_[ish] == (*ic)) && used[ic - ib])
464  return false;
465  }
466  }
467 
468  return true;
469 }
float ChiSquaredProbability(double chiSquared, double nrDOF)
float chi2ndfProbMin
Definition: CSCSegAlgoTC.h:156
std::vector< const CSCRecHit2D * > ChamberHitContainer
Definition: CSCSegAlgoTC.h:38
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:39
ib
Definition: cuy.py:661

◆ phiAtZ()

float CSCSegAlgoTC::phiAtZ ( float  z) const
private

Definition at line 287 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(), z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by isHitNearSegment().

287  {
288  // Returns a phi in [ 0, 2*pi )
289  const CSCLayer* l1 = theChamber->layer(1);
291  GlobalVector gv = l1->toGlobal(sfit_->localdir());
292 
293  float x = gp.x() + (gv.x() / gv.z()) * (z - gp.z());
294  float y = gp.y() + (gv.y() / gv.z()) * (z - gp.z());
295  float phi = atan2(y, x);
296  if (phi < 0.f)
297  phi += 2. * M_PI;
298 
299  return phi;
300 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
T z() const
Definition: PV3DBase.h:61
LocalPoint intercept() const
Definition: CSCSegFit.h:84
T x() const
Definition: PV3DBase.h:59
T y() const
Definition: PV3DBase.h:60
double f[11][100]
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
#define M_PI
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
LocalVector localdir() const
Definition: CSCSegFit.h:85
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:144

◆ pruneTheSegments()

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 486 of file CSCSegAlgoTC.cc.

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

Referenced by buildSegments().

486  {
487  // Sort the segment store according to segment 'quality' (chi2/#hits ?) and
488  // remove any segments which contain hits assigned to higher-quality segments.
489 
490  if (candidates.empty())
491  return;
492 
493  // Initialize flags that a given hit has been allocated to a segment
494  BoolContainer used(rechitsInChamber.size(), false);
495 
496  // Sort by chi2/#hits
497  segmentSort();
498 
499  // Select best quality segments, requiring hits are assigned to just one segment
500  // Want to erase the bad segments, so the iterator must be incremented
501  // inside the loop, and only when the erase is not called
502 
503  std::vector<CSCSegFit*>::iterator is;
504 
505  for (is = candidates.begin(); is != candidates.end();) {
506  bool goodSegment = isSegmentGood(is, rechitsInChamber, used);
507 
508  if (goodSegment) {
509  LogDebug("CSC") << "Accepting segment: ";
510  flagHitsAsUsed(is, rechitsInChamber, used);
511  ++is;
512  } else {
513  LogDebug("CSC") << "Rejecting segment: ";
514  delete *is; // delete the CSCSegFit*
515  is = candidates.erase(is); // erase the element in container
516  }
517  }
518 }
std::deque< bool > BoolContainer
Definition: CSCSegAlgoTC.h:46
void flagHitsAsUsed(std::vector< CSCSegFit *>::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
std::vector< CSCSegFit * > candidates
Definition: CSCSegAlgoTC.h:147
bool isSegmentGood(std::vector< CSCSegFit *>::iterator is, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const
#define LogDebug(id)
void segmentSort(void)

◆ replaceHit()

bool CSCSegAlgoTC::replaceHit ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 267 of file CSCSegAlgoTC.cc.

References addHit(), h, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, and proto_segment.

Referenced by compareProtoSegment().

267  {
268  // replace a hit from a layer
269  ChamberHitContainer::iterator it;
270  for (it = proto_segment.begin(); it != proto_segment.end();) {
271  if ((*it)->cscDetId().layer() == layer)
272  it = proto_segment.erase(it);
273  else
274  ++it;
275  }
276 
277  return addHit(h, layer);
278 }
bool addHit(const CSCRecHit2D *aHit, int layer)
Utility functions.
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:141
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4

◆ run()

std::vector< CSCSegment > CSCSegAlgoTC::run ( const CSCChamber aChamber,
const ChamberHitContainer rechits 
)
override

Here we must implement the algorithm

Definition at line 51 of file CSCSegAlgoTC.cc.

References buildSegments(), HI_PhotonSkim_cff::rechits, and theChamber.

51  {
52  theChamber = aChamber;
53 
54  return buildSegments(rechits);
55 }
std::vector< CSCSegment > buildSegments(const ChamberHitContainer &rechits)
Definition: CSCSegAlgoTC.cc:57
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139

◆ segmentSort()

void CSCSegAlgoTC::segmentSort ( void  )
private

Sort criterion for segment quality, for use in pruneTheSegments.

Definition at line 520 of file CSCSegAlgoTC.cc.

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

Referenced by pruneTheSegments().

520  {
521  // The segment collection is sorted according to e.g. chi2/#hits
522 
523  for (size_t i = 0; i < candidates.size() - 1; ++i) {
524  for (size_t j = i + 1; j < candidates.size(); ++j) {
525  size_t ni = (candidates[i]->hits()).size();
526  size_t nj = (candidates[j]->hits()).size();
527 
528  // Sort criterion: first sort by no. of rechits, then in groups of rechits by chi2prob
529  if (SegmentSorting == 2) {
530  if (nj > ni) { // sort by no. of rechits
532  candidates[j] = candidates[i];
533  candidates[i] = temp;
534  }
535  // sort by chi2 probability in subgroups with equal nr of rechits
536  // if(chi2s[i] != 0. && 2*n2-4 > 0 ) {
537  if (candidates[i]->chi2() > 0 && candidates[i]->ndof() > 0) {
538  if (nj == ni && (ChiSquaredProbability(candidates[i]->chi2(), (double)(candidates[i]->ndof())) <
539  ChiSquaredProbability(candidates[j]->chi2(), (double)(candidates[j]->ndof())))) {
541  candidates[j] = candidates[i];
542  candidates[i] = temp;
543  }
544  }
545  } else if (SegmentSorting == 1) {
546  if ((candidates[i]->chi2() / ni) > (candidates[j]->chi2() / nj)) {
548  candidates[j] = candidates[i];
549  candidates[i] = temp;
550  }
551  } else {
552  LogDebug("CSC") << "No valid segment sorting specified. Algorithm misconfigured! \n";
553  }
554  }
555  }
556 }
size
Write out results.
float ChiSquaredProbability(double chiSquared, double nrDOF)
std::vector< CSCSegFit * > candidates
Definition: CSCSegAlgoTC.h:147
#define LogDebug(id)

◆ tryAddingHitsToSegment()

void CSCSegAlgoTC::tryAddingHitsToSegment ( const ChamberHitContainer rechits,
const ChamberHitContainerCIt  i1,
const ChamberHitContainerCIt  i2 
)
private

Try adding non-used hits to segment

Definition at line 207 of file CSCSegAlgoTC.cc.

References compareProtoSegment(), h, hasHitOnLayer(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, cuy::ib, increaseProtoSegment(), isHitNearSegment(), nano_mu_digi_cff::layer, CSCChamber::layer(), LogDebug, proto_segment, HI_PhotonSkim_cff::rechits, theChamber, and GeomDet::toGlobal().

Referenced by buildSegments().

209  {
210  // Iterate over the layers with hits in the chamber
211  // Skip the layers containing the segment endpoints
212  // Test each hit on the other layers to see if it is near the segment
213  // If it is, see whether there is already a hit on the segment from the same layer
214  // - if so, and there are more than 2 hits on the segment, copy the segment,
215  // replace the old hit with the new hit. If the new segment chi2 is better
216  // then replace the original segment with the new one (by swap)
217  // - if not, copy the segment, add the hit. If the new chi2/dof is still satisfactory
218  // then replace the original segment with the new one (by swap)
219 
221  ChamberHitContainerCIt ie = rechits.end();
222 
223  for (ChamberHitContainerCIt i = ib; i != ie; ++i) {
224  if (i == i1 || i == i2)
225  continue;
226 
227  int layer = (*i)->cscDetId().layer();
228  const CSCRecHit2D* h = *i;
229 
230  if (isHitNearSegment(h)) {
231  const CSCLayer* l1 = theChamber->layer(h->cscDetId().layer());
232  GlobalPoint gp1 = l1->toGlobal(h->localPosition());
233  LogDebug("CSC") << " hit at global " << gp1 << " is near segment\n.";
234 
235  if (hasHitOnLayer(layer)) {
236  if (proto_segment.size() <= 2) {
237  LogDebug("CSC") << " " << proto_segment.size() << " hits on segment...skip hit on same layer.\n";
238  continue;
239  }
240 
242  } else
244  } // h & seg close
245  } // i
246 }
const CSCLayer * layer(CSCDetId id) const
Return the layer corresponding to the given id.
Definition: CSCChamber.cc:30
bool hasHitOnLayer(int layer) const
void compareProtoSegment(const CSCRecHit2D *h, int layer)
bool isHitNearSegment(const CSCRecHit2D *h) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:49
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:141
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
ChamberHitContainer::const_iterator ChamberHitContainerCIt
Definition: CSCSegAlgoTC.h:39
void increaseProtoSegment(const CSCRecHit2D *h, int layer)
ib
Definition: cuy.py:661
#define LogDebug(id)

◆ updateParameters()

void CSCSegAlgoTC::updateParameters ( void  )
private

Definition at line 280 of file CSCSegAlgoTC.cc.

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

Referenced by addHit().

280  {
281  //@@ DO NOT DELETE EXISTING FIT SINCE WE SAVE IT!!
282  // delete sfit_;
284  sfit_->fit();
285 }
void fit(void)
Definition: CSCSegFit.cc:13
const CSCChamber * theChamber
Member variables.
Definition: CSCSegAlgoTC.h:139
ChamberHitContainer proto_segment
Definition: CSCSegAlgoTC.h:141
CSCSegFit * sfit_
Definition: CSCSegAlgoTC.h:144

Member Data Documentation

◆ candidates

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

Definition at line 147 of file CSCSegAlgoTC.h.

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

◆ chi2Max

float CSCSegAlgoTC::chi2Max
private

max segment chi squared

Definition at line 151 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and increaseProtoSegment().

◆ chi2ndfProbMin

float CSCSegAlgoTC::chi2ndfProbMin
private

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

Definition at line 156 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isSegmentGood().

◆ debugInfo

bool CSCSegAlgoTC::debugInfo
private

Definition at line 192 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

◆ dPhiFineMax

float CSCSegAlgoTC::dPhiFineMax
private

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

Definition at line 166 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isHitNearSegment().

◆ dPhiMax

float CSCSegAlgoTC::dPhiMax
private

max distance in global phi between hits in one segment

Definition at line 175 of file CSCSegAlgoTC.h.

Referenced by areHitsCloseInGlobalPhi(), and CSCSegAlgoTC().

◆ dRPhiFineMax

float CSCSegAlgoTC::dRPhiFineMax
private

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

Definition at line 161 of file CSCSegAlgoTC.h.

Referenced by CSCSegAlgoTC(), and isHitNearSegment().

◆ dRPhiMax

float CSCSegAlgoTC::dRPhiMax
private

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

Definition at line 171 of file CSCSegAlgoTC.h.

Referenced by areHitsCloseInLocalX(), and CSCSegAlgoTC().

◆ minLayersApart

int CSCSegAlgoTC::minLayersApart
private

Require end-points of segment are at least minLayersApart

Definition at line 179 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

◆ myName

const std::string CSCSegAlgoTC::myName
private

Name of this class

Definition at line 191 of file CSCSegAlgoTC.h.

Referenced by buildSegments(), and CSCSegAlgoTC().

◆ proto_segment

ChamberHitContainer CSCSegAlgoTC::proto_segment
private

◆ SegmentSorting

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 187 of file CSCSegAlgoTC.h.

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

◆ sfit_

CSCSegFit* CSCSegAlgoTC::sfit_
private

◆ theChamber

const CSCChamber* CSCSegAlgoTC::theChamber
private