#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 (ChamberHitContainer rechits) |
CSCSegAlgoSK (const edm::ParameterSet &ps) | |
Constructor. More... | |
std::vector< CSCSegment > | run (const CSCChamber *aChamber, ChamberHitContainer rechits) |
virtual | ~CSCSegAlgoSK () |
Destructor. More... | |
Public Member Functions inherited from CSCSegmentAlgorithm | |
CSCSegmentAlgorithm (const edm::ParameterSet &) | |
Constructor. More... | |
virtual std::vector< CSCSegment > | run (const CSCChamber *chamber, 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... | |
AlgebraicSymMatrix | calculateError (void) const |
void | compareProtoSegment (const CSCRecHit2D *h, int layer) |
CLHEP::HepMatrix | derivativeMatrix (void) const |
void | dumpHits (const ChamberHitContainer &rechits) const |
void | fillChiSquared (void) |
void | fillLocalDirection (void) |
void | fitSlopes (void) |
void | flagHitsAsUsed (const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const |
void | flipErrors (AlgebraicSymMatrix &) 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, BoolContainer used, LayerIndex layerIndex, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2) |
void | updateParameters (void) |
AlgebraicSymMatrix | weightMatrix (void) const |
Private Attributes | |
float | chi2Max |
bool | debugInfo |
float | dPhiFineMax |
float | dPhiMax |
float | dRPhiFineMax |
float | dRPhiMax |
int | minLayersApart |
const std::string | myName |
ChamberHitContainer | proto_segment |
const CSCChamber * | theChamber |
double | theChi2 |
LocalVector | theDirection |
LocalPoint | theOrigin |
float | uz |
float | vz |
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
Definition at line 37 of file CSCSegAlgoSK.h.
typedef std::deque<bool> CSCSegAlgoSK::BoolContainer |
Definition at line 60 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*> CSCSegAlgoSK::ChamberHitContainer |
Definition at line 52 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoSK::ChamberHitContainerCIt |
Definition at line 53 of file CSCSegAlgoSK.h.
typedef std::vector<int> CSCSegAlgoSK::LayerIndex |
Typedefs.
Definition at line 51 of file CSCSegAlgoSK.h.
|
explicit |
Constructor.
Definition at line 23 of file CSCSegAlgoSK.cc.
References chi2Max, debugInfo, dPhiFineMax, dPhiMax, dRPhiFineMax, dRPhiMax, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), LogDebug, minLayersApart, myName, and wideSeg.
|
inlinevirtual |
|
private |
Utility functions.
Definition at line 377 of file CSCSegAlgoSK.cc.
References proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 260 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), dPhiMax, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::phi(), theChamber, GeomDet::toGlobal(), and windowScale.
Referenced by buildSegments().
|
private |
Utility functions.
Definition at line 251 of file CSCSegAlgoSK.cc.
References dRPhiMax, CSCRecHit2D::localPosition(), LogDebug, windowScale, x, and PV3DBase< T, PVType, FrameType >::x().
Referenced by buildSegments().
std::vector< CSCSegment > CSCSegAlgoSK::buildSegments | ( | ChamberHitContainer | rechits | ) |
Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
Definition at line 52 of file CSCSegAlgoSK.cc.
References abs, addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), calculateError(), CSCChamberSpecs::chamberTypeName(), debugInfo, dumpHits(), benchmark_cfg::errors, flagHitsAsUsed(), flipErrors(), i, isSegmentGood(), CSCChamber::layer(), CSCRecHit2D::localPosition(), LogDebug, minLayersApart, myName, GeomDet::position(), proto_segment, CSCChamber::specs(), groupFilesInBlocks::temp, theChamber, theChi2, theDirection, theOrigin, GeomDet::toGlobal(), tryAddingHitsToSegment(), wideSeg, windowScale, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run().
|
private |
Definition at line 801 of file CSCSegAlgoSK.cc.
References funct::A, derivativeMatrix(), query::result, weightMatrix(), and create_public_pileup_plots::weights.
Referenced by buildSegments().
|
private |
Definition at line 701 of file CSCSegAlgoSK.cc.
References LogDebug, convertSQLiteXML::ok, proto_segment, replaceHit(), theChi2, theDirection, and theOrigin.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 754 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), makeMuonMisalignmentScenario::matrix, proto_segment, theChamber, GeomDet::toGlobal(), GeomDet::toLocal(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().
Referenced by calculateError().
|
private |
Dump position and phi of each rechit in chamber after sort in z
Definition at line 327 of file CSCSegAlgoSK.cc.
References CSCChamber::layer(), PV3DBase< T, PVType, FrameType >::phi(), theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Definition at line 607 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), CSCRecHit2D::localPositionError(), LogDebug, proto_segment, theChamber, theChi2, theOrigin, GeomDet::toGlobal(), GeomDet::toLocal(), uz, vz, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by updateParameters().
|
private |
Always enforce direction of segment to point from IP outwards (Incorrect for particles not coming from IP, of course.)
Definition at line 652 of file CSCSegAlgoSK.cc.
References mathSSE::sqrt(), theChamber, theDirection, theOrigin, GeomDet::toGlobal(), csvLumiCalc::unit, uz, vz, and detailsBasic3DVector::z.
Referenced by updateParameters().
|
private |
Definition at line 455 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), CSCRecHit2D::localPositionError(), LogDebug, AlCaHLTBitMon_ParallelJobs::p, proto_segment, theChamber, theOrigin, GeomDet::toGlobal(), GeomDet::toLocal(), uz, v, vz, PV3DBase< T, PVType, FrameType >::x(), LocalError::xx(), LocalError::xy(), PV3DBase< T, PVType, FrameType >::y(), LocalError::yy(), detailsBasic3DVector::z, and PV3DBase< T, PVType, FrameType >::z().
Referenced by updateParameters().
|
private |
Flag hits on segment as used
Definition at line 362 of file CSCSegAlgoSK.cc.
References proto_segment.
Referenced by buildSegments().
|
private |
|
private |
Definition at line 675 of file CSCSegAlgoSK.cc.
References proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 727 of file CSCSegAlgoSK.cc.
References addHit(), chi2Max, LogDebug, convertSQLiteXML::ok, proto_segment, theChi2, theDirection, and theOrigin.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 281 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), dPhiFineMax, dRPhiFineMax, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), LogDebug, M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phiAtZ(), theChamber, GeomDet::toGlobal(), windowScale, and PV3DBase< T, PVType, FrameType >::z().
Referenced by tryAddingHitsToSegment().
|
private |
Return true if segment is 'good'. In this algorithm, 'good' means has sufficient hits
Definition at line 344 of file CSCSegAlgoSK.cc.
References convertSQLiteXML::ok, proto_segment, and windowScale.
Referenced by buildSegments().
|
private |
Definition at line 311 of file CSCSegAlgoSK.cc.
References f, CSCChamber::layer(), M_PI, phi, proto_segment, theChamber, theDirection, theOrigin, GeomDet::toGlobal(), x, PV3DBase< T, PVType, FrameType >::x(), detailsBasic3DVector::y, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by isHitNearSegment().
|
private |
Definition at line 687 of file CSCSegAlgoSK.cc.
References addHit(), and proto_segment.
Referenced by compareProtoSegment().
std::vector< CSCSegment > CSCSegAlgoSK::run | ( | const CSCChamber * | aChamber, |
ChamberHitContainer | rechits | ||
) |
Here we must implement the algorithm
Definition at line 47 of file CSCSegAlgoSK.cc.
References buildSegments(), and theChamber.
|
private |
Try adding non-used hits to segment
Definition at line 208 of file CSCSegAlgoSK.cc.
References compareProtoSegment(), h, hasHitOnLayer(), i, increaseProtoSegment(), isHitNearSegment(), CSCChamber::layer(), CSCRecHit2D::localPosition(), LogDebug, proto_segment, theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Definition at line 395 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), fillChiSquared(), fillLocalDirection(), fitSlopes(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), proto_segment, theChamber, theChi2, theOrigin, GeomDet::toGlobal(), GeomDet::toLocal(), uz, vz, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by addHit().
|
private |
Definition at line 779 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::localPositionError(), makeMuonMisalignmentScenario::matrix, proto_segment, LocalError::xx(), LocalError::xy(), and LocalError::yy().
Referenced by calculateError().
|
private |
Definition at line 146 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and increaseProtoSegment().
|
private |
Definition at line 149 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 145 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 143 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), and CSCSegAlgoSK().
|
private |
Definition at line 144 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 142 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInLocalX(), and CSCSegAlgoSK().
|
private |
Definition at line 148 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 135 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 134 of file CSCSegAlgoSK.h.
Referenced by addHit(), buildSegments(), compareProtoSegment(), derivativeMatrix(), fillChiSquared(), fitSlopes(), flagHitsAsUsed(), hasHitOnLayer(), increaseProtoSegment(), isSegmentGood(), phiAtZ(), replaceHit(), tryAddingHitsToSegment(), updateParameters(), and weightMatrix().
|
private |
Definition at line 133 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), derivativeMatrix(), dumpHits(), fillChiSquared(), fillLocalDirection(), fitSlopes(), isHitNearSegment(), phiAtZ(), run(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 137 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillChiSquared(), increaseProtoSegment(), and updateParameters().
|
private |
Definition at line 139 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillLocalDirection(), increaseProtoSegment(), and phiAtZ().
|
private |
Definition at line 138 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillChiSquared(), fillLocalDirection(), fitSlopes(), increaseProtoSegment(), phiAtZ(), and updateParameters().
|
private |
Definition at line 140 of file CSCSegAlgoSK.h.
Referenced by fillChiSquared(), fillLocalDirection(), fitSlopes(), and updateParameters().
|
private |
Definition at line 140 of file CSCSegAlgoSK.h.
Referenced by fillChiSquared(), fillLocalDirection(), fitSlopes(), and updateParameters().
|
private |
Definition at line 147 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 141 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), buildSegments(), isHitNearSegment(), and isSegmentGood().