#include <CSCSegAlgoSK.h>
Public Types | |
typedef std::deque< bool > | BoolContainer |
typedef std::vector< const CSCRecHit2D * > | ChamberHitContainer |
typedef std::vector< const CSCRecHit2D * >::const_iterator | ChamberHitContainerCIt |
typedef std::vector< int > | LayerIndex |
Typedefs. More... | |
Public Member Functions | |
std::vector< CSCSegment > | buildSegments (const ChamberHitContainer &rechits) |
CSCSegAlgoSK (const edm::ParameterSet &ps) | |
Constructor. More... | |
std::vector< CSCSegment > | run (const CSCChamber *aChamber, const ChamberHitContainer &rechits) override |
~CSCSegAlgoSK () override | |
Destructor. More... | |
Public Member Functions inherited from CSCSegmentAlgorithm | |
CSCSegmentAlgorithm (const edm::ParameterSet &) | |
Constructor. More... | |
virtual std::vector< CSCSegment > | run (const CSCChamber *chamber, const std::vector< const CSCRecHit2D *> &rechits)=0 |
virtual | ~CSCSegmentAlgorithm () |
Destructor. More... | |
Private Member Functions | |
bool | addHit (const CSCRecHit2D *hit, int layer) |
Utility functions. More... | |
bool | areHitsCloseInGlobalPhi (const CSCRecHit2D *h1, const CSCRecHit2D *h2) const |
bool | areHitsCloseInLocalX (const CSCRecHit2D *h1, const CSCRecHit2D *h2) const |
Utility functions. More... | |
void | compareProtoSegment (const CSCRecHit2D *h, int layer) |
void | dumpHits (const ChamberHitContainer &rechits) const |
void | dumpSegment (const CSCSegment &seg) const |
void | flagHitsAsUsed (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 (const ChamberHitContainer &rechitsInChamber) const |
float | phiAtZ (float z) const |
bool | replaceHit (const CSCRecHit2D *h, int layer) |
void | tryAddingHitsToSegment (const ChamberHitContainer &rechitsInChamber, const BoolContainer &used, const LayerIndex &layerIndex, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2) |
void | updateParameters (void) |
Private Attributes | |
float | chi2Max |
bool | debugInfo |
float | dPhiFineMax |
float | dPhiMax |
float | dRPhiFineMax |
float | dRPhiMax |
int | minLayersApart |
const std::string | myName |
ChamberHitContainer | proto_segment |
CSCSegFit * | sfit_ |
const CSCChamber * | theChamber |
float | wideSeg |
float | windowScale |
This is the original algorithm for building endcap muon track segments out of the rechit's in a CSCChamber. cf. CSCSegmentizerTC.
'SK' = 'Sasha Khanov' = Speed King
A CSCSegment is a RecSegment4D, and is built from CSCRecHit2D objects, each of which is a RecHit2DLocalPos.
This class is used by the CSCSegmentAlgorithm.
Alternative algorithms can be used for the segment building by writing classes like this, and then selecting which one is actually used via the CSCSegmentBuilder.
Original (in FORTRAN): Alexa ndre .Khan ov@c ern.c h
Ported to C++ and improved: Rick. Wilk inson @cer n.ch
Reimplemented in terms of layer index, and bug fix: Tim.C ox@c ern.c h
Ported to CMSSW 2006-04-03: Matte o.Sa ni@ce rn.c h
Factored out segment fitter Tim.C Feb-2015 ox@c ern.c h
Definition at line 35 of file CSCSegAlgoSK.h.
typedef std::deque<bool> CSCSegAlgoSK::BoolContainer |
Definition at line 56 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*> CSCSegAlgoSK::ChamberHitContainer |
Definition at line 48 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoSK::ChamberHitContainerCIt |
Definition at line 49 of file CSCSegAlgoSK.h.
typedef std::vector<int> CSCSegAlgoSK::LayerIndex |
Typedefs.
Definition at line 47 of file CSCSegAlgoSK.h.
|
explicit |
Constructor.
Definition at line 19 of file CSCSegAlgoSK.cc.
References chi2Max, debugInfo, dPhiFineMax, dPhiMax, dRPhiFineMax, dRPhiMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), LogDebug, minLayersApart, myName, and wideSeg.
|
inlineoverride |
|
private |
Utility functions.
Definition at line 358 of file CSCSegAlgoSK.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 244 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), dPhiMax, CSCDetId::layer(), CSCChamber::layer(), CSCRecHit2D::localPosition(), LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::phi(), theChamber, GeomDet::toGlobal(), funct::true, and windowScale.
Referenced by buildSegments().
|
private |
Utility functions.
Definition at line 237 of file CSCSegAlgoSK.cc.
References dRPhiMax, CSCRecHit2D::localPosition(), LogDebug, funct::true, windowScale, and x.
Referenced by buildSegments().
std::vector< CSCSegment > CSCSegAlgoSK::buildSegments | ( | const ChamberHitContainer & | rechits | ) |
Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
Definition at line 47 of file CSCSegAlgoSK.cc.
References funct::abs(), addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), CSCChamberSpecs::chamberTypeName(), CSCSegFit::chi2(), CSCSegFit::covarianceMatrix(), debugInfo, dumpSegment(), flagHitsAsUsed(), CSCSegFit::hits(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, cuy::ib, CSCSegFit::intercept(), isSegmentGood(), CSCChamber::layer(), CSCSegFit::localdir(), CSCRecHit2D::localPosition(), LogDebug, minLayersApart, myName, GeomDet::position(), proto_segment, groupFilesInBlocks::reverse, sfit_, CSCChamber::specs(), groupFilesInBlocks::temp, theChamber, GeomDet::toGlobal(), tryAddingHitsToSegment(), wideSeg, windowScale, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run().
|
private |
Definition at line 407 of file CSCSegAlgoSK.cc.
References CSCSegFit::chi2(), h, nano_mu_digi_cff::layer, LogDebug, convertSQLiteXML::ok, replaceHit(), and sfit_.
Referenced by tryAddingHitsToSegment().
|
private |
Dump position and phi of each rechit in chamber after sort in z
Definition at line 313 of file CSCSegAlgoSK.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, CSCChamber::layer(), PV3DBase< T, PVType, FrameType >::phi(), Geom::Phi< T1, Range >::phi(), theChamber, and GeomDet::toGlobal().
|
private |
Definition at line 453 of file CSCSegAlgoSK.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().
|
private |
Flag hits on segment as used
Definition at line 345 of file CSCSegAlgoSK.cc.
References cuy::ib, and proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 383 of file CSCSegAlgoSK.cc.
References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, and proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 429 of file CSCSegAlgoSK.cc.
References addHit(), CSCSegFit::chi2(), chi2Max, h, nano_mu_digi_cff::layer, LogDebug, CSCSegFit::ndof(), convertSQLiteXML::ok, and sfit_.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 263 of file CSCSegAlgoSK.cc.
References dPhiFineMax, dRPhiFineMax, h, trackingPlots::hp, CSCChamber::layer(), LogDebug, M_PI, phiAtZ(), theChamber, GeomDet::toGlobal(), funct::true, and windowScale.
Referenced by tryAddingHitsToSegment().
|
private |
Return true if segment is 'good'. In this algorithm, 'good' means has sufficient hits
Definition at line 328 of file CSCSegAlgoSK.cc.
References convertSQLiteXML::ok, proto_segment, and windowScale.
Referenced by buildSegments().
|
private |
Definition at line 291 of file CSCSegAlgoSK.cc.
References f, runTauDisplay::gp, CSCSegFit::intercept(), CSCChamber::layer(), CSCSegFit::localdir(), LogTrace, M_PI, phi, proto_segment, sfit_, theChamber, GeomDet::toGlobal(), x, y, and z.
Referenced by isHitNearSegment().
|
private |
Definition at line 394 of file CSCSegAlgoSK.cc.
References addHit(), h, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, nano_mu_digi_cff::layer, and proto_segment.
Referenced by compareProtoSegment().
|
override |
Here we must implement the algorithm
Definition at line 42 of file CSCSegAlgoSK.cc.
References buildSegments(), and theChamber.
|
private |
Try adding non-used hits to segment
Definition at line 196 of file CSCSegAlgoSK.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, theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Definition at line 376 of file CSCSegAlgoSK.cc.
References CSCSegFit::fit(), proto_segment, sfit_, and theChamber.
Referenced by addHit().
|
private |
Definition at line 129 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and increaseProtoSegment().
|
private |
Definition at line 132 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 128 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 126 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), and CSCSegAlgoSK().
|
private |
Definition at line 127 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 125 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInLocalX(), and CSCSegAlgoSK().
|
private |
Definition at line 131 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 122 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 121 of file CSCSegAlgoSK.h.
Referenced by addHit(), buildSegments(), flagHitsAsUsed(), hasHitOnLayer(), isSegmentGood(), phiAtZ(), replaceHit(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 134 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), increaseProtoSegment(), phiAtZ(), and updateParameters().
|
private |
Definition at line 120 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), dumpHits(), dumpSegment(), isHitNearSegment(), phiAtZ(), run(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 130 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 124 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), buildSegments(), isHitNearSegment(), and isSegmentGood().