#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 =1 |
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 =1 |
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 59 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 21 of file CSCSegAlgoRU.cc.
References chi2_str_, chi2Max, chi2Norm_2D_, doCollisions, dPhiIntMax, dPhiMax, dRIntMax, dRMax, edm::ParameterSet::getParameter(), LogDebug, minLayersApart, myName, and wideSeg.
|
inlinevirtual |
|
private |
Utility functions.
Definition at line 591 of file CSCSegAlgoRU.cc.
References proto_segment, and updateParameters().
Referenced by buildSegments(), increaseProtoSegment(), and replaceHit().
|
private |
Definition at line 444 of file CSCSegAlgoRU.cc.
References PV3DBase< T, PVType, FrameType >::barePhi(), CSCRecHit2D::cscDetId(), SiPixelRawToDigiRegional_cfi::deltaPhi, dPhiMax, CSCRecHit2D::errorWithinStrip(), CSCDetId::iChamberType(), CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::localPosition(), strip_iadd, theChamber, and GeomDet::toGlobal().
Referenced by buildSegments().
|
private |
Utility functions.
Definition at line 402 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().
|
private |
Definition at line 635 of file CSCSegAlgoRU.cc.
References CSCRecHit2D::channels(), chi2_str_, chi2D_iadd, CSCRecHit2D::cscDetId(), fitX(), i, init_size, relval_2017::k, kLayer(), CSCDetId::layer(), min(), nhits, CSCRecHit2D::nStrips(), proto_segment, CSCDetId::ring(), slope, CSCDetId::station(), and z.
Referenced by buildSegments().
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 62 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(), i, cuy::ib, isSegmentGood(), j, relval_2017::k, CSCChamber::layer(), CSCDetId::layer(), CSCRecHit2D::nStrips(), GeomDet::position(), proto_segment, HI_PhotonSkim_cff::rechits, sfit_, strip_iadd, groupFilesInBlocks::temp, theChamber, tryAddingHitsToSegment(), updateParameters(), wideSeg, windowScale, and PV3DBase< T, PVType, FrameType >::z().
Referenced by run().
|
private |
Definition at line 893 of file CSCSegAlgoRU.cc.
References eostools::move(), convertSQLiteXML::ok, proto_segment, replaceHit(), sfit_, and theChamber.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 615 of file CSCSegAlgoRU.cc.
References delta, i, and slope.
Referenced by isHitNearSegment().
|
private |
Definition at line 830 of file CSCSegAlgoRU.cc.
References delta, benchmark_cfg::errors, i, S(), and slope.
Referenced by baseline().
|
private |
Flag hits on segment as used
Definition at line 576 of file CSCSegAlgoRU.cc.
References cuy::ib, and proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 867 of file CSCSegAlgoRU.cc.
References proto_segment.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 906 of file CSCSegAlgoRU.cc.
References addHit(), chi2Max, eostools::move(), convertSQLiteXML::ok, proto_segment, sfit_, and theChamber.
Referenced by tryAddingHitsToSegment().
|
private |
Definition at line 466 of file CSCSegAlgoRU.cc.
References CSCRecHit2D::cscDetId(), dPhiIntMax, runTauDisplay::dr, dRIntMax, CSCRecHit2D::errorWithinStrip(), fit_r_phi(), CSCRecHit2D::hitWire(), AnalysisDataFormats_SUSYBSMObjects::hp, CSCDetId::iChamberType(), cmsLHEtoEOSManager::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().
|
private |
Return true if segment is 'good'. In this algorithm, 'good' means has sufficient hits
Definition at line 559 of file CSCSegAlgoRU.cc.
References convertSQLiteXML::ok, proto_segment, and 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 542 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().
|
private |
Definition at line 879 of file CSCSegAlgoRU.cc.
References addHit(), and proto_segment.
Referenced by compareProtoSegment().
std::vector< CSCSegment > CSCSegAlgoRU::run | ( | const CSCChamber * | aChamber, |
const ChamberHitContainer & | rechits | ||
) |
Here we must implement the algorithm
Definition at line 57 of file CSCSegAlgoRU.cc.
References buildSegments(), and theChamber.
|
private |
Try adding non-used hits to segment
Definition at line 357 of file CSCSegAlgoRU.cc.
References chi2D_iadd, compareProtoSegment(), h, hasHitOnLayer(), i, cuy::ib, increaseProtoSegment(), isHitNearSegment(), and proto_segment.
Referenced by buildSegments().
|
private |
Definition at line 609 of file CSCSegAlgoRU.cc.
References proto_segment, sfit_, and theChamber.
Referenced by addHit(), and buildSegments().
|
private |
Definition at line 143 of file CSCSegAlgoRU.h.
Referenced by baseline(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 135 of file CSCSegAlgoRU.h.
Referenced by baseline(), buildSegments(), and tryAddingHitsToSegment().
|
private |
Definition at line 142 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and increaseProtoSegment().
|
private |
Definition at line 144 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 147 of file CSCSegAlgoRU.h.
|
private |
Definition at line 137 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInR(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 141 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and isHitNearSegment().
|
private |
Definition at line 139 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 140 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), CSCSegAlgoRU(), and isHitNearSegment().
|
private |
Definition at line 138 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInR(), buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 146 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 128 of file CSCSegAlgoRU.h.
Referenced by CSCSegAlgoRU().
|
private |
Definition at line 127 of file CSCSegAlgoRU.h.
Referenced by addHit(), baseline(), buildSegments(), compareProtoSegment(), flagHitsAsUsed(), hasHitOnLayer(), increaseProtoSegment(), isHitNearSegment(), isSegmentGood(), phiAtZ(), replaceHit(), tryAddingHitsToSegment(), and updateParameters().
|
private |
Definition at line 149 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), compareProtoSegment(), increaseProtoSegment(), phiAtZ(), and updateParameters().
|
private |
Definition at line 136 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), buildSegments(), and isHitNearSegment().
|
private |
Definition at line 126 of file CSCSegAlgoRU.h.
Referenced by areHitsCloseInGlobalPhi(), areHitsCloseInR(), buildSegments(), compareProtoSegment(), increaseProtoSegment(), isHitNearSegment(), phiAtZ(), run(), and updateParameters().
|
private |
Definition at line 130 of file CSCSegAlgoRU.h.
|
private |
Definition at line 132 of file CSCSegAlgoRU.h.
|
private |
Definition at line 131 of file CSCSegAlgoRU.h.
|
private |
Definition at line 133 of file CSCSegAlgoRU.h.
|
private |
Definition at line 133 of file CSCSegAlgoRU.h.
|
private |
Definition at line 145 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and CSCSegAlgoRU().
|
private |
Definition at line 134 of file CSCSegAlgoRU.h.
Referenced by buildSegments(), and isSegmentGood().