CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
CSCSegAlgoDF Class Reference

#include <CSCSegAlgoDF.h>

Inheritance diagram for CSCSegAlgoDF:
CSCSegmentAlgorithm

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< CSCSegmentbuildSegments (const ChamberHitContainer &rechits)
 
 CSCSegAlgoDF (const edm::ParameterSet &ps)
 Constructor. More...
 
std::vector< CSCSegmentrun (const CSCChamber *aChamber, const ChamberHitContainer &rechits)
 
virtual ~CSCSegAlgoDF ()
 Destructor. More...
 
- Public Member Functions inherited from CSCSegmentAlgorithm
 CSCSegmentAlgorithm (const edm::ParameterSet &)
 Constructor. More...
 
virtual std::vector< CSCSegmentrun (const CSCChamber *chamber, const std::vector< const CSCRecHit2D * > &rechits)=0
 
virtual ~CSCSegmentAlgorithm ()
 Destructor. More...
 

Private Member Functions

bool addHit (const CSCRecHit2D *hit, int layer)
 
void compareProtoSegment (const CSCRecHit2D *h, int layer)
 
void dumpSegment (const CSCSegment &seg) const
 
void flagHitsAsUsed (const ChamberHitContainer &rechitsInChamber)
 
bool hasHitOnLayer (int layer) const
 
bool isHitNearSegment (const CSCRecHit2D *h) const
 
void pruneFromResidual (void)
 
void tryAddingHitsToSegment (const ChamberHitContainer &rechitsInChamber, const ChamberHitContainerCIt i1, const ChamberHitContainerCIt i2, const LayerIndex &layerIndex)
 Utility functions. More...
 
void updateParameters (void)
 

Private Attributes

float chi2Max
 
ChamberHitContainer closeHits
 
bool debug
 
double dPhiFineMax
 
double dRPhiFineMax
 
float maxRatioResidual
 
int minHitsForPreClustering
 
int minHitsPerSegment
 
int minLayersApart
 
const std::string myName
 
int nHitsPerClusterIsShower
 
CSCSegAlgoPreClusteringpreCluster_
 
bool preClustering
 
ChamberHitContainer protoSegment
 
bool Pruning
 
ChamberHitContainer secondSeedHits
 
CSCSegFitsfit_
 
CSCSegAlgoShoweringshowering_
 
float tanPhiMax
 
float tanThetaMax
 
const CSCChambertheChamber
 
BoolContainer usedHits
 

Detailed Description

This is a modified version of the SK algorithm for building endcap muon track segments out of the rechit's in a CSCChamber.

A CSCSegment is a RecSegment4D, and is built from CSCRecHit2D objects, each of which is a RecHit2DLocalPos.

This builds segments by first creating proto-segments from at least 3 hits. We intend to try all possible pairs of hits to start segment building. 'All possible' means each hit lies on different layers in the chamber. Once a hit has been assigned to a segment, we don't consider it again, THAT IS, FOR THE FIRST PASS ONLY ! In fact, this is one of the possible flaw with the SK algorithms as it sometimes manages to build segments with the wrong starting points. In the DF algorithm, the endpoints are tested as the best starting points in a 2nd and 3rd loop.

Another difference with the from the SK algorithm is that rechits can be added to proto segments if they fall within n sigmas of the projected track within a given layer. Hence, a cylinder isn't used as in the SK algorimthm, which allows for pseudo 2D hits built from wire or strip only hits to be used in segment reconstruction.

Also, only a certain muonsPerChamberMax maximum number of segments can be produced in the chamber. [Seems to be hardwired rather than using this variable?]

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.

Author
Dominique Fortin - UCR

Definition at line 48 of file CSCSegAlgoDF.h.

Member Typedef Documentation

typedef std::deque<bool> CSCSegAlgoDF::BoolContainer

Definition at line 58 of file CSCSegAlgoDF.h.

typedef std::vector<const CSCRecHit2D*> CSCSegAlgoDF::ChamberHitContainer

Definition at line 56 of file CSCSegAlgoDF.h.

typedef std::vector<const CSCRecHit2D*>::const_iterator CSCSegAlgoDF::ChamberHitContainerCIt

Definition at line 57 of file CSCSegAlgoDF.h.

typedef std::vector<int> CSCSegAlgoDF::LayerIndex

Typedefs.

Definition at line 55 of file CSCSegAlgoDF.h.

Constructor & Destructor Documentation

CSCSegAlgoDF::CSCSegAlgoDF ( const edm::ParameterSet ps)
explicit

Constructor.

Definition at line 35 of file CSCSegAlgoDF.cc.

CSCSegAlgoDF::~CSCSegAlgoDF ( )
virtual

Destructor.

Definition at line 60 of file CSCSegAlgoDF.cc.

Member Function Documentation

bool CSCSegAlgoDF::addHit ( const CSCRecHit2D hit,
int  layer 
)
private

Definition at line 416 of file CSCSegAlgoDF.cc.

std::vector< CSCSegment > CSCSegAlgoDF::buildSegments ( const ChamberHitContainer rechits)

Build track segments in this chamber (this is where the actual segment-building algorithm hides.)

Definition at line 113 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::compareProtoSegment ( const CSCRecHit2D h,
int  layer 
)
private

Definition at line 481 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::dumpSegment ( const CSCSegment seg) const
private

Definition at line 611 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::flagHitsAsUsed ( const ChamberHitContainer rechitsInChamber)
private

Flag hits on segment as used

Definition at line 526 of file CSCSegAlgoDF.cc.

bool CSCSegAlgoDF::hasHitOnLayer ( int  layer) const
private

Definition at line 461 of file CSCSegAlgoDF.cc.

bool CSCSegAlgoDF::isHitNearSegment ( const CSCRecHit2D h) const
private

Definition at line 378 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::pruneFromResidual ( void  )
private

Prune bad segment from the worse hit based on residuals

Definition at line 551 of file CSCSegAlgoDF.cc.

std::vector< CSCSegment > CSCSegAlgoDF::run ( const CSCChamber aChamber,
const ChamberHitContainer rechits 
)

Here we must implement the algorithm

Definition at line 69 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::tryAddingHitsToSegment ( const ChamberHitContainer rechitsInChamber,
const ChamberHitContainerCIt  i1,
const ChamberHitContainerCIt  i2,
const LayerIndex layerIndex 
)
private

Utility functions.

Try adding non-used hits to segment
Skip the layers containing the segment endpoints on first 2 passes, but then
try hits on layer containing the segment starting points on 2nd and/or 3rd pass
if segment has >2 hits. Test each hit on the other layers to see if it is near
the segment using rechit error matrix.
If it is, see whether there is already a hit on the segment from the same layer

  • if so, and there are more than 2 hits on the segment, copy the segment,
    replace the old hit with the new hit. If the new segment chi2 is better
    then replace the original segment with the new one
  • if not, copy the segment, add the hit if it's within a certain range.

Definition at line 286 of file CSCSegAlgoDF.cc.

void CSCSegAlgoDF::updateParameters ( void  )
private

Definition at line 442 of file CSCSegAlgoDF.cc.

Member Data Documentation

float CSCSegAlgoDF::chi2Max
private

Definition at line 140 of file CSCSegAlgoDF.h.

ChamberHitContainer CSCSegAlgoDF::closeHits
private

Definition at line 120 of file CSCSegAlgoDF.h.

bool CSCSegAlgoDF::debug
private

Definition at line 126 of file CSCSegAlgoDF.h.

double CSCSegAlgoDF::dPhiFineMax
private

Definition at line 137 of file CSCSegAlgoDF.h.

double CSCSegAlgoDF::dRPhiFineMax
private

Definition at line 136 of file CSCSegAlgoDF.h.

float CSCSegAlgoDF::maxRatioResidual
private

Definition at line 141 of file CSCSegAlgoDF.h.

int CSCSegAlgoDF::minHitsForPreClustering
private

Definition at line 128 of file CSCSegAlgoDF.h.

int CSCSegAlgoDF::minHitsPerSegment
private

Definition at line 134 of file CSCSegAlgoDF.h.

int CSCSegAlgoDF::minLayersApart
private

Definition at line 131 of file CSCSegAlgoDF.h.

const std::string CSCSegAlgoDF::myName
private

Definition at line 116 of file CSCSegAlgoDF.h.

int CSCSegAlgoDF::nHitsPerClusterIsShower
private

Definition at line 132 of file CSCSegAlgoDF.h.

CSCSegAlgoPreClustering* CSCSegAlgoDF::preCluster_
private

Definition at line 143 of file CSCSegAlgoDF.h.

bool CSCSegAlgoDF::preClustering
private

Definition at line 127 of file CSCSegAlgoDF.h.

ChamberHitContainer CSCSegAlgoDF::protoSegment
private

Definition at line 122 of file CSCSegAlgoDF.h.

bool CSCSegAlgoDF::Pruning
private

Definition at line 130 of file CSCSegAlgoDF.h.

ChamberHitContainer CSCSegAlgoDF::secondSeedHits
private

Definition at line 123 of file CSCSegAlgoDF.h.

CSCSegFit* CSCSegAlgoDF::sfit_
private

Definition at line 145 of file CSCSegAlgoDF.h.

CSCSegAlgoShowering* CSCSegAlgoDF::showering_
private

Definition at line 144 of file CSCSegAlgoDF.h.

float CSCSegAlgoDF::tanPhiMax
private

Definition at line 138 of file CSCSegAlgoDF.h.

float CSCSegAlgoDF::tanThetaMax
private

Definition at line 139 of file CSCSegAlgoDF.h.

const CSCChamber* CSCSegAlgoDF::theChamber
private

Definition at line 117 of file CSCSegAlgoDF.h.

BoolContainer CSCSegAlgoDF::usedHits
private

Definition at line 118 of file CSCSegAlgoDF.h.