#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 35 of file CSCSegAlgoRU.h.
typedef std::vector<bool> CSCSegAlgoRU::BoolContainer |
Definition at line 59 of file CSCSegAlgoRU.h.
typedef std::vector<const CSCRecHit2D*> CSCSegAlgoRU::ChamberHitContainer |
Definition at line 51 of file CSCSegAlgoRU.h.
typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoRU::ChamberHitContainerCIt |
Definition at line 52 of file CSCSegAlgoRU.h.
typedef std::vector<int> CSCSegAlgoRU::LayerIndex |
Definition at line 50 of file CSCSegAlgoRU.h.
typedef ROOT::Math::SVector<double, 6> CSCSegAlgoRU::SVector6 |
Typedefs.
Definition at line 48 of file CSCSegAlgoRU.h.
|
explicit |
Constructor.
Definition at line 22 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 |
|
private |
Utility functions.
Definition at line 608 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 444 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, PV3DBase< T, PVType, FrameType >::barePhi(), CSCRecHit2D::cscDetId(), SiPixelRawToDigiRegional_cfi::deltaPhi, CSCSegAlgoRU::AlgoState::dPhiMax, CSCRecHit2D::errorWithinStrip(), CSCDetId::iChamberType(), CSCDetId::layer(), CSCChamber::layer(), CSCRecHit2D::localPosition(), CSCSegAlgoRU::AlgoState::strip_iadd, GeomDet::toGlobal(), and funct::true.
Referenced by buildSegments().
|
private |
Utility functions.
Definition at line 397 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, CSCRecHit2D::cscDetId(), CSCSegAlgoRU::AlgoState::doCollisions, CSCSegAlgoRU::AlgoState::dRMax, CSCSegAlgoRU::AlgoState::enlarge, CSCRecHit2D::hitWire(), CSCDetId::iChamberType(), CSCDetId::layer(), CSCChamber::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 649 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, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, dqmdumpme::k, kLayer(), CSCDetId::layer(), min(), nhits, CSCRecHit2D::nStrips(), CSCSegAlgoRU::AlgoState::proto_segment, CSCDetId::ring(), slope, CSCDetId::station(), z, and testProducerWithPsetDescEmpty_cfi::z2.
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 57 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, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, cuy::ib, isSegmentGood(), dqmiolumiharvest::j, dqmdumpme::k, CSCDetId::layer(), CSCChamber::layer(), CSCRecHit2D::nStrips(), GeomDet::position(), HI_PhotonSkim_cff::rechits, groupFilesInBlocks::reverse, groupFilesInBlocks::temp, tryAddingHitsToSegment(), updateParameters(), wideSeg, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run().
|
private |
Definition at line 899 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 629 of file CSCSegAlgoRU.cc.
References dumpMFGeometry_cfg::delta, mps_fire::i, HLT_FULL_cff::points, and slope.
Referenced by isHitNearSegment().
|
private |
Definition at line 844 of file CSCSegAlgoRU.cc.
References CSCSegmentAlgorithmRU_cfi::chi2_str, dumpMFGeometry_cfg::delta, debug_messages_cfi::errors, mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, HLT_FULL_cff::points, and slope.
Referenced by baseline().
|
private |
Flag hits on segment as used
Definition at line 594 of file CSCSegAlgoRU.cc.
References cuy::ib, and CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 878 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 915 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 472 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::aChamber, CSCSegAlgoRU::AlgoState::dPhiIntMax, flavorHistoryFilter_cfi::dr, CSCSegAlgoRU::AlgoState::dRIntMax, CSCSegAlgoRU::AlgoState::enlarge, fit_r_phi(), trackingPlots::hp, cmsLHEtoEOSManager::l, CSCChamber::layer(), M_PI, PV3DBase< T, PVType, FrameType >::perp(), phiAtZ(), CSCSegAlgoRU::AlgoState::proto_segment, dttmaxenums::R, CSCSegAlgoRU::AlgoState::strip_iadd, GeomDet::toGlobal(), and funct::true.
Referenced by tryAddingHitsToSegment().
|
private |
Return true if segment is 'good'. In this algorithm, 'good' means has sufficient hits
Definition at line 577 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 562 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(), z, and PV3DBase< T, PVType, FrameType >::z().
Referenced by isHitNearSegment().
|
private |
Definition at line 887 of file CSCSegAlgoRU.cc.
References addHit(), and CSCSegAlgoRU::AlgoState::proto_segment.
Referenced by compareProtoSegment().
|
inlineoverride |
Here we must implement the algorithm
Definition at line 77 of file CSCSegAlgoRU.h.
References buildSegments(), and HI_PhotonSkim_cff::rechits.
|
private |
Try adding non-used hits to segment
Definition at line 359 of file CSCSegAlgoRU.cc.
References CSCSegAlgoRU::AlgoState::chi2D_iadd, compareProtoSegment(), hasHitOnLayer(), mps_fire::i, testProducerWithPsetDescEmpty_cfi::i1, testProducerWithPsetDescEmpty_cfi::i2, cuy::ib, increaseProtoSegment(), isHitNearSegment(), CSCSegAlgoRU::AlgoState::proto_segment, and HI_PhotonSkim_cff::rechits.
Referenced by buildSegments().
|
private |
Definition at line 622 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 160 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 161 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 164 of file CSCSegAlgoRU.h.
|
private |
Definition at line 154 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 157 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 155 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 165 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 163 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 148 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 150 of file CSCSegAlgoRU.h.
|
private |
Definition at line 152 of file CSCSegAlgoRU.h.
|
private |
Definition at line 151 of file CSCSegAlgoRU.h.
|
private |
Definition at line 153 of file CSCSegAlgoRU.h.
|
private |
Definition at line 153 of file CSCSegAlgoRU.h.
|
private |
Definition at line 162 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().