#include <CSCSegAlgoRU.h>
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 ChamberHitContainer &rechits) |
CSCSegAlgoRU (const edm::ParameterSet &ps) | |
Constructor. More... | |
std::vector< CSCSegment > | run (const CSCChamber *aChamber, const ChamberHitContainer &rechits) |
virtual | ~CSCSegAlgoRU () |
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 | areHitsCloseInR (const CSCRecHit2D *h1, const CSCRecHit2D *h2) const |
Utility functions. More... | |
void | baseline (int n_seg_min) |
void | compareProtoSegment (const CSCRecHit2D *h, int layer) |
float | fit_r_phi (SVector6 points, int layer) const |
float | fitX (SVector6 points, SVector6 errors, int ir, int ir2, float &chi2_str) |
void | flagHitsAsUsed (const ChamberHitContainer &rechitsInChamber, BoolContainer &used) const |
bool | hasHitOnLayer (int layer) const |
void | increaseProtoSegment (const CSCRecHit2D *h, int layer, int chi2_factor) |
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 | chi2_str_ |
int | chi2D_iadd |
float | chi2Max |
float | chi2Norm_2D_ |
bool | debugInfo |
bool | doCollisions |
float | dPhiIntMax |
float | dPhiMax |
float | dRIntMax |
float | dRMax |
int | minLayersApart |
const std::string | myName |
ChamberHitContainer | proto_segment |
std::unique_ptr< CSCSegFit > | sfit_ |
int | strip_iadd |
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 '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, edm::ParameterSet::getParameter(), LogDebug, minLayersApart, myName, and wideSeg.
|
inlinevirtual |
Destructor.
Definition at line 68 of file CSCSegAlgoRU.h.
References addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInR(), baseline(), buildSegments(), CSCSegmentAlgorithmRU_cfi::chi2_str, compareProtoSegment(), fit_r_phi(), fitX(), flagHitsAsUsed(), hasHitOnLayer(), increaseProtoSegment(), isHitNearSegment(), isSegmentGood(), phiAtZ(), TrackInfoProducer_cfi::rechits, replaceHit(), run(), tryAddingHitsToSegment(), updateParameters(), and z.
|
private |
Utility functions.
Definition at line 516 of file CSCSegAlgoRU.cc.
References proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), replaceHit(), and ~CSCSegAlgoRU().
|
private |
Definition at line 395 of file CSCSegAlgoRU.cc.
References PV3DBase< T, PVType, FrameType >::barePhi(), CSCRecHit2D::cscDetId(), MuonCkfTrajectoryBuilder_cfi::deltaPhi, dPhiMax, CSCRecHit2D::errorWithinStrip(), CSCDetId::iChamberType(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), strip_iadd, theChamber, and GeomDet::toGlobal().
Referenced by buildSegments(), and ~CSCSegAlgoRU().
|
private |
Utility functions.
Definition at line 355 of file CSCSegAlgoRU.cc.
References CSCRecHit2D::cscDetId(), doCollisions, dRMax, CSCRecHit2D::hitWire(), CSCDetId::iChamberType(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), PV3DBase< T, PVType, FrameType >::perp(), theChamber, GeomDet::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by buildSegments(), and ~CSCSegAlgoRU().
|
private |
(nhits-2)
(nhits-3)
Definition at line 556 of file CSCSegAlgoRU.cc.
References CSCRecHit2D::channels(), CSCSegmentAlgorithmRU_cfi::chi2_str, chi2_str_, chi2D_iadd, CSCRecHit2D::cscDetId(), fitX(), mps_fire::i, init_size, gen::k, kLayer(), CSCDetId::layer(), min(), nhits, CSCRecHit2D::nStrips(), proto_segment, CSCDetId::ring(), slope, CSCDetId::station(), and z.
Referenced by buildSegments(), and ~CSCSegAlgoRU().
std::vector< CSCSegment > CSCSegAlgoRU::buildSegments | ( | const ChamberHitContainer & | rechits | ) |
Build track segments in this chamber (this is where the actual segment-building algorithm hides.)
Definition at line 60 of file CSCSegAlgoRU.cc.
References funct::abs(), addHit(), areHitsCloseInGlobalPhi(), areHitsCloseInR(), baseline(), CSCRecHit2D::channels(), chi2_str_, chi2D_iadd, chi2Max, chi2Norm_2D_, CSCRecHit2D::cscDetId(), doCollisions, dPhiIntMax, dPhiMax, dRIntMax, dRMax, flagHitsAsUsed(), CSCRecHit2D::hitWire(), mps_fire::i, cuy::ib, isSegmentGood(), gen::k, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::nStrips(), GeomDet::position(), proto_segment, TrackInfoProducer_cfi::rechits, groupFilesInBlocks::reverse, sfit_, strip_iadd, groupFilesInBlocks::temp, theChamber, tryAddingHitsToSegment(), updateParameters(), wideSeg, windowScale, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run(), and ~CSCSegAlgoRU().
|
private |
Definition at line 787 of file CSCSegAlgoRU.cc.
References eostools::move(), convertSQLiteXML::ok, proto_segment, replaceHit(), sfit_, and theChamber.
Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoRU().
|
private |
Definition at line 537 of file CSCSegAlgoRU.cc.
References delta, mps_fire::i, and slope.
Referenced by isHitNearSegment(), and ~CSCSegAlgoRU().
|
private |
Definition at line 735 of file CSCSegAlgoRU.cc.
References delta, benchmark_cfg::errors, mps_fire::i, S(), and slope.
Referenced by baseline(), and ~CSCSegAlgoRU().
|
private |
Flag hits on segment as used
Definition at line 503 of file CSCSegAlgoRU.cc.
References cuy::ib, and proto_segment.
Referenced by buildSegments(), and ~CSCSegAlgoRU().
|
private |
Definition at line 766 of file CSCSegAlgoRU.cc.
References proto_segment.
Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoRU().
|
private |
Definition at line 803 of file CSCSegAlgoRU.cc.
References addHit(), chi2Max, eostools::move(), convertSQLiteXML::ok, proto_segment, sfit_, and theChamber.
Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoRU().
|
private |
Definition at line 411 of file CSCSegAlgoRU.cc.
References CSCRecHit2D::cscDetId(), dPhiIntMax, runTauDisplay::dr, dRIntMax, 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(), proto_segment, dttmaxenums::R, strip_iadd, theChamber, GeomDet::toGlobal(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by tryAddingHitsToSegment(), and ~CSCSegAlgoRU().
|
private |
Return true if segment is 'good'. In this algorithm, 'good' means has sufficient hits
Definition at line 490 of file CSCSegAlgoRU.cc.
References convertSQLiteXML::ok, proto_segment, and windowScale.
Referenced by buildSegments(), and ~CSCSegAlgoRU().
|
private |
Always enforce direction of segment to point from IP outwards (Incorrect for particles not coming from IP, of course.)
Definition at line 477 of file CSCSegAlgoRU.cc.
References f, runTauDisplay::gp, CSCChamber::layer(), M_PI, phi, proto_segment, sfit_, theChamber, GeomDet::toGlobal(), x, PV3DBase< T, PVType, FrameType >::x(), y, PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by isHitNearSegment(), and ~CSCSegAlgoRU().
|
private |
Definition at line 775 of file CSCSegAlgoRU.cc.
References addHit(), and proto_segment.
Referenced by compareProtoSegment(), and ~CSCSegAlgoRU().
std::vector< CSCSegment > CSCSegAlgoRU::run | ( | const CSCChamber * | aChamber, |
const ChamberHitContainer & | rechits | ||
) |
Here we must implement the algorithm
Definition at line 55 of file CSCSegAlgoRU.cc.
References buildSegments(), and theChamber.
Referenced by ~CSCSegAlgoRU().
|
private |
Try adding non-used hits to segment
Definition at line 322 of file CSCSegAlgoRU.cc.
References chi2D_iadd, compareProtoSegment(), hasHitOnLayer(), mps_fire::i, cuy::ib, increaseProtoSegment(), isHitNearSegment(), and proto_segment.
Referenced by buildSegments(), and ~CSCSegAlgoRU().
|
private |
Definition at line 530 of file CSCSegAlgoRU.cc.
References proto_segment, sfit_, and theChamber.
Referenced by addHit(), buildSegments(), and ~CSCSegAlgoRU().
|
private |
Definition at line 147 of file CSCSegAlgoRU.h.
Referenced by baseline(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 139 of file CSCSegAlgoRU.h.
Referenced by baseline(), buildSegments(), and tryAddingHitsToSegment().
|
private |
Definition at line 146 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and increaseProtoSegment().
|
private |
Definition at line 148 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 151 of file CSCSegAlgoRU.h.
|
private |
Definition at line 141 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInR(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 145 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and isHitNearSegment().
|
private |
Definition at line 143 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 144 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and isHitNearSegment().
|
private |
Definition at line 142 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInR(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 150 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 132 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 131 of file CSCSegAlgoRU.h.
Referenced by addHit(), baseline(), buildSegments(), compareProtoSegment(), flagHitsAsUsed(), hasHitOnLayer(), increaseProtoSegment(), isHitNearSegment(), isSegmentGood(), phiAtZ(), replaceHit(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 153 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), compareProtoSegment(), increaseProtoSegment(), phiAtZ(), and updateParameters().
|
private |
Definition at line 140 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), and isHitNearSegment().
|
private |
Definition at line 130 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), areHitsCloseInR(), buildSegments(), compareProtoSegment(), increaseProtoSegment(), isHitNearSegment(), phiAtZ(), run(), and updateParameters().
|
private |
Definition at line 134 of file CSCSegAlgoRU.h.
|
private |
Definition at line 136 of file CSCSegAlgoRU.h.
|
private |
Definition at line 135 of file CSCSegAlgoRU.h.
|
private |
Definition at line 137 of file CSCSegAlgoRU.h.
|
private |
Definition at line 137 of file CSCSegAlgoRU.h.
|
private |
Definition at line 149 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 138 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and isSegmentGood().