#include <CSCSegAlgoRU.h>
Classes | |
struct | AlgoState |
Public Types | |
typedef std::vector< bool > | BoolContainer |
typedef std::vector< const CSCRecHit2D * > | ChamberHitContainer |
typedef std::vector< const CSCRecHit2D * >::const_iterator | ChamberHitContainerCIt |
typedef std::vector< int > | LayerIndex |
typedef ROOT::Math::SVector< double, 6 > | SVector6 |
Typedefs. More... | |
Public Member Functions | |
std::vector< CSCSegment > | buildSegments (const CSCChamber *aChamber, const ChamberHitContainer &rechits) const |
CSCSegAlgoRU (const edm::ParameterSet &ps) | |
Constructor. More... | |
std::vector< CSCSegment > | run (const CSCChamber *aChamber, const ChamberHitContainer &rechits) override |
~CSCSegAlgoRU () 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 (AlgoState &aState, const CSCRecHit2D *hit, int layer) const |
Utility functions. More... | |
bool | areHitsCloseInGlobalPhi (const AlgoState &aState, const CSCRecHit2D *h1, const CSCRecHit2D *h2) const |
bool | areHitsCloseInR (const AlgoState &aState, const CSCRecHit2D *h1, const CSCRecHit2D *h2) const |
Utility functions. More... | |
void | baseline (AlgoState &aState, int n_seg_min) const |
void | compareProtoSegment (AlgoState &aState, const CSCRecHit2D *h, int layer) const |
float | fit_r_phi (const AlgoState &aState, const SVector6 &points, int layer) const |
float | fitX (const AlgoState &aState, SVector6 points, SVector6 errors, int ir, int ir2, float &chi2_str) const |
void | flagHitsAsUsed (const AlgoState &aState, const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const |
bool | hasHitOnLayer (const AlgoState &aState, int layer) const |
void | increaseProtoSegment (AlgoState &aState, const CSCRecHit2D *h, int layer, int chi2_factor) const |
bool | isHitNearSegment (const AlgoState &aState, const CSCRecHit2D *h) const |
bool | isSegmentGood (const AlgoState &aState, const ChamberHitContainer &rechitsInChamber) const |
float | phiAtZ (const AlgoState &aState, float z) const |
bool | replaceHit (AlgoState &aState, const CSCRecHit2D *h, int layer) const |
void | tryAddingHitsToSegment (AlgoState &aState, const ChamberHitContainer &rechitsInChamber, const BoolContainer &used, const LayerIndex &layerIndex, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2) const |
void | updateParameters (AlgoState &aState) const |
Private Attributes | |
float | chi2_str_ |
float | chi2Max |
float | chi2Norm_2D_ |
bool | debugInfo |
bool | doCollisions |
float | dPhiIntMax |
float | dPhiMax |
float | dRIntMax |
float | dRMax |
bool | enlarge |
int | minLayersApart |
const std::string | myName |
double | theChi2 |
LocalVector | theDirection |
LocalPoint | theOrigin |
float | uz |
float | vz |
float | wideSeg |
This is the original algorithm for building endcap muon track segments out of the rechit's in a CSCChamber 'RU' = 'RUssia' = Road Usage
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.
developed and implemented by Vladimir Palichik Vladi and Nikolay Voytishin mir. Paltc hik@ cern. chnikol ay.v oytis hin@ cern. ch
Definition at line 36 of file CSCSegAlgoRU.h.
typedef std::vector<bool> CSCSegAlgoRU::BoolContainer |
Definition at line 63 of file CSCSegAlgoRU.h.
typedef std::vector<const CSCRecHit2D*> CSCSegAlgoRU::ChamberHitContainer |
Definition at line 55 of file CSCSegAlgoRU.h.
typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoRU::ChamberHitContainerCIt |
Definition at line 56 of file CSCSegAlgoRU.h.
typedef std::vector<int> CSCSegAlgoRU::LayerIndex |
Definition at line 54 of file CSCSegAlgoRU.h.
typedef ROOT::Math::SVector<double,6> CSCSegAlgoRU::SVector6 |
Typedefs.
Definition at line 52 of file CSCSegAlgoRU.h.
|
explicit |
Constructor.
Definition at line 20 of file CSCSegAlgoRU.cc.
References chi2_str_, chi2Max, chi2Norm_2D_, doCollisions, dPhiIntMax, dPhiMax, dRIntMax, dRMax, enlarge, edm::ParameterSet::getParameter(), LogDebug, minLayersApart, myName, and wideSeg.
|
inlineoverride |
Destructor.
Definition at line 68 of file CSCSegAlgoRU.h.
References buildSegments(), and TrackInfoProducer_cfi::rechits.
|
private |
Utility functions.
Definition at line 547 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 414 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, PV3DBase< T, PVType, FrameType >::barePhi(), CSCRecHit2D::cscDetId(), hiPixelPairStep_cff::deltaPhi, CSCSegAlgoRU::AlgoState::dPhiMax, CSCRecHit2D::errorWithinStrip(), CSCDetId::iChamberType(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), CSCSegAlgoRU::AlgoState::strip_iadd, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Utility functions.
Definition at line 370 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, CSCRecHit2D::cscDetId(), CSCSegAlgoRU::AlgoState::doCollisions, CSCSegAlgoRU::AlgoState::dRMax, CSCSegAlgoRU::AlgoState::enlarge, CSCRecHit2D::hitWire(), CSCDetId::iChamberType(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), PV3DBase< T, PVType, FrameType >::perp(), CSCSegAlgoRU::AlgoState::strip_iadd, GeomDet::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by buildSegments().
|
private |
(nhits-2)
(nhits-3)
Definition at line 587 of file CSCSegAlgoRU.cc.
References edmScanValgrind::buffer, CSCRecHit2D::channels(), CSCSegmentAlgorithmRU_cfi::chi2_str, CSCSegAlgoRU::AlgoState::chi2_str_, CSCSegAlgoRU::AlgoState::chi2D_iadd, CSCRecHit2D::cscDetId(), fitX(), mps_fire::i, init_size, gen::k, kLayer(), CSCDetId::layer(), min(), nhits, CSCRecHit2D::nStrips(), CSCSegAlgoRU::AlgoState::proto_segment, CSCDetId::ring(), slope, CSCDetId::station(), and z.
Referenced by buildSegments().
std::vector< CSCSegment > CSCSegAlgoRU::buildSegments | ( | const CSCChamber * | aChamber, |
const ChamberHitContainer & | rechits | ||
) | const |
Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
Definition at line 56 of file CSCSegAlgoRU.cc.
References funct::abs(), CSCSegAlgoRU::AlgoState::aChamber, addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInR(), baseline(), CSCRecHit2D::channels(), chi2_str_, chi2Max, chi2Norm_2D_, CSCRecHit2D::cscDetId(), doCollisions, dPhiIntMax, dPhiMax, dRIntMax, dRMax, enlarge, flagHitsAsUsed(), CSCRecHit2D::hitWire(), mps_fire::i, cuy::ib, isSegmentGood(), gen::k, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::nStrips(), GeomDet::position(), TrackInfoProducer_cfi::rechits, groupFilesInBlocks::reverse, groupFilesInBlocks::temp, tryAddingHitsToSegment(), updateParameters(), wideSeg, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run(), and ~CSCSegAlgoRU().
|
private |
Definition at line 817 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, eostools::move(), convertSQLiteXML::ok, CSCSegAlgoRU::AlgoState::proto_segment, replaceHit(), and CSCSegAlgoRU::AlgoState::sfit.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 568 of file CSCSegAlgoRU.cc.
References delta, mps_fire::i, hiPixelPairStep_cff::points, and slope.
Referenced by isHitNearSegment().
|
private |
Definition at line 765 of file CSCSegAlgoRU.cc.
References delta, benchmark_cfg::errors, mps_fire::i, hiPixelPairStep_cff::points, and slope.
Referenced by baseline().
|
private |
Flag hits on segment as used
Definition at line 534 of file CSCSegAlgoRU.cc.
References cuy::ib, and CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 796 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 833 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, addHit(), CSCSegAlgoRU::AlgoState::chi2Max, eostools::move(), convertSQLiteXML::ok, CSCSegAlgoRU::AlgoState::proto_segment, and CSCSegAlgoRU::AlgoState::sfit.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 430 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, CSCRecHit2D::cscDetId(), CSCSegAlgoRU::AlgoState::dPhiIntMax, runTauDisplay::dr, CSCSegAlgoRU::AlgoState::dRIntMax, CSCSegAlgoRU::AlgoState::enlarge, CSCRecHit2D::errorWithinStrip(), fit_r_phi(), CSCRecHit2D::hitWire(), AnalysisDataFormats_SUSYBSMObjects::hp, CSCDetId::iChamberType(), checklumidiff::l, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), M_PI, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phiAtZ(), CSCSegAlgoRU::AlgoState::proto_segment, dttmaxenums::R, CSCSegAlgoRU::AlgoState::strip_iadd, GeomDet::toGlobal(), 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 518 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::enlarge, convertSQLiteXML::ok, CSCSegAlgoRU::AlgoState::proto_segment, and CSCSegAlgoRU::AlgoState::windowScale.
Referenced by buildSegments().
|
private |
Always enforce direction of segment to point from IP outwards (Incorrect for particles not coming from IP, of course.)
Definition at line 505 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, f, runTauDisplay::gp, CSCChamber::layer(), M_PI, phi, CSCSegAlgoRU::AlgoState::proto_segment, CSCSegAlgoRU::AlgoState::sfit, GeomDet::toGlobal(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by isHitNearSegment().
|
private |
Definition at line 805 of file CSCSegAlgoRU.cc.
References addHit(), and CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by compareProtoSegment().
|
inlineoverride |
Here we must implement the algorithm
Definition at line 81 of file CSCSegAlgoRU.h.
References buildSegments().
|
private |
Try adding non-used hits to segment
Definition at line 337 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::chi2D_iadd, compareProtoSegment(), h, hasHitOnLayer(), mps_fire::i, cuy::ib, increaseProtoSegment(), isHitNearSegment(), and CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 561 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, CSCSegAlgoRU::AlgoState::proto_segment, and CSCSegAlgoRU::AlgoState::sfit.
Referenced by addHit(), and buildSegments().
|
private |
Definition at line 161 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 160 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 162 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 165 of file CSCSegAlgoRU.h.
|
private |
Definition at line 155 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 159 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 157 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 158 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 156 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 166 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 164 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 148 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 151 of file CSCSegAlgoRU.h.
|
private |
Definition at line 153 of file CSCSegAlgoRU.h.
|
private |
Definition at line 152 of file CSCSegAlgoRU.h.
|
private |
Definition at line 154 of file CSCSegAlgoRU.h.
|
private |
Definition at line 154 of file CSCSegAlgoRU.h.
|
private |
Definition at line 163 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().