#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) |
virtual | ~CSCSegAlgoSK () |
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... | |
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, const BoolContainer &used, const 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 35 of file CSCSegAlgoSK.h.
typedef std::deque<bool> CSCSegAlgoSK::BoolContainer |
Definition at line 58 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*> CSCSegAlgoSK::ChamberHitContainer |
Definition at line 50 of file CSCSegAlgoSK.h.
typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoSK::ChamberHitContainerCIt |
Definition at line 51 of file CSCSegAlgoSK.h.
typedef std::vector<int> CSCSegAlgoSK::LayerIndex |
Typedefs.
Definition at line 49 of file CSCSegAlgoSK.h.
|
explicit |
Constructor.
Definition at line 21 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 375 of file CSCSegAlgoSK.cc.
References proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 258 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 249 of file CSCSegAlgoSK.cc.
References dRPhiMax, CSCRecHit2D::localPosition(), LogDebug, 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 50 of file CSCSegAlgoSK.cc.
References funct::abs(), addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), calculateError(), CSCChamberSpecs::chamberTypeName(), debugInfo, dumpHits(), benchmark_cfg::errors, flagHitsAsUsed(), flipErrors(), i, cuy::ib, isSegmentGood(), CSCChamber::layer(), CSCRecHit2D::localPosition(), LogDebug, minLayersApart, myName, GeomDet::position(), proto_segment, HI_PhotonSkim_cff::rechits, 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 799 of file CSCSegAlgoSK.cc.
References HLT_25ns14e33_v1_cff::A, derivativeMatrix(), query::result, weightMatrix(), and create_public_pileup_plots::weights.
Referenced by buildSegments().
|
private |
Definition at line 699 of file CSCSegAlgoSK.cc.
References LogDebug, convertSQLiteXML::ok, proto_segment, replaceHit(), theChi2, theDirection, and theOrigin.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 752 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 325 of file CSCSegAlgoSK.cc.
References CSCChamber::layer(), Geom::Phi< T >::phi(), PV3DBase< T, PVType, FrameType >::phi(), theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Definition at line 605 of file CSCSegAlgoSK.cc.
References CSCRecHit2D::cscDetId(), AnalysisDataFormats_SUSYBSMObjects::hv, 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 650 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 453 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, findQualityFiles::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 360 of file CSCSegAlgoSK.cc.
References cuy::ib, and proto_segment.
Referenced by buildSegments().
|
private |
|
private |
Definition at line 673 of file CSCSegAlgoSK.cc.
References proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 725 of file CSCSegAlgoSK.cc.
References addHit(), chi2Max, LogDebug, convertSQLiteXML::ok, proto_segment, theChi2, theDirection, and theOrigin.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 279 of file CSCSegAlgoSK.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(), 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 342 of file CSCSegAlgoSK.cc.
References convertSQLiteXML::ok, proto_segment, and windowScale.
Referenced by buildSegments().
|
private |
Definition at line 309 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 685 of file CSCSegAlgoSK.cc.
References addHit(), and proto_segment.
Referenced by compareProtoSegment().
std::vector< CSCSegment > CSCSegAlgoSK::run | ( | const CSCChamber * | aChamber, |
const ChamberHitContainer & | rechits | ||
) |
Here we must implement the algorithm
Definition at line 45 of file CSCSegAlgoSK.cc.
References buildSegments(), and theChamber.
|
private |
Try adding non-used hits to segment
Definition at line 206 of file CSCSegAlgoSK.cc.
References compareProtoSegment(), h, hasHitOnLayer(), i, cuy::ib, increaseProtoSegment(), isHitNearSegment(), CSCChamber::layer(), CSCRecHit2D::localPosition(), LogDebug, proto_segment, theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Definition at line 393 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 777 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 144 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and increaseProtoSegment().
|
private |
Definition at line 147 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 143 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 141 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), and CSCSegAlgoSK().
|
private |
Definition at line 142 of file CSCSegAlgoSK.h.
Referenced by CSCSegAlgoSK(), and isHitNearSegment().
|
private |
Definition at line 140 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInLocalX(), and CSCSegAlgoSK().
|
private |
Definition at line 146 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 133 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 132 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 131 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), derivativeMatrix(), dumpHits(), fillChiSquared(), fillLocalDirection(), fitSlopes(), isHitNearSegment(), phiAtZ(), run(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 135 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillChiSquared(), increaseProtoSegment(), and updateParameters().
|
private |
Definition at line 137 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillLocalDirection(), increaseProtoSegment(), and phiAtZ().
|
private |
Definition at line 136 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), compareProtoSegment(), fillChiSquared(), fillLocalDirection(), fitSlopes(), increaseProtoSegment(), phiAtZ(), and updateParameters().
|
private |
Definition at line 138 of file CSCSegAlgoSK.h.
Referenced by fillChiSquared(), fillLocalDirection(), fitSlopes(), and updateParameters().
|
private |
Definition at line 138 of file CSCSegAlgoSK.h.
Referenced by fillChiSquared(), fillLocalDirection(), fitSlopes(), and updateParameters().
|
private |
Definition at line 145 of file CSCSegAlgoSK.h.
Referenced by buildSegments(), and CSCSegAlgoSK().
|
private |
Definition at line 139 of file CSCSegAlgoSK.h.
Referenced by areHitsCloseInGlobalPhi(), areHitsCloseInLocalX(), buildSegments(), isHitNearSegment(), and isSegmentGood().