CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes

MeasurementByLayerGrouper Class Reference

#include <MeasurementByLayerGrouper.h>

List of all members.

Public Member Functions

 MeasurementByLayerGrouper (const GeometricSearchTracker *search=0)
std::vector< std::pair< const
DetLayer *, std::vector< TM > > > 
operator() (const std::vector< TM > &) const

Private Types

typedef TrajectoryMeasurement TM

Private Member Functions

const DetLayergetDetLayer (const TM &tm) const

Private Attributes

const GeometricSearchTrackertheGeomSearch

Detailed Description

Definition at line 13 of file MeasurementByLayerGrouper.h.


Member Typedef Documentation

Definition at line 17 of file MeasurementByLayerGrouper.h.


Constructor & Destructor Documentation

MeasurementByLayerGrouper::MeasurementByLayerGrouper ( const GeometricSearchTracker search = 0) [inline, explicit]

Definition at line 24 of file MeasurementByLayerGrouper.h.

:theGeomSearch(search){};

Member Function Documentation

const DetLayer * MeasurementByLayerGrouper::getDetLayer ( const TM tm) const [private]

Definition at line 53 of file MeasurementByLayerGrouper.cc.

References Exception, TrajectoryMeasurement::layer(), LogDebug, and TrajectoryMeasurement::recHit().

                                                                         {
        // if the DetLayer is set in the TM...  
        if (tm.layer()) return tm.layer();

        //if it corresponds to an invalid hit with no geomdet associated
        //we can't retrieve the  DetLayer
        //because unfortunately the detlayer is not set in these cases
        //returns 0 for the moment
        //to be revisited
        
        if (tm.recHit()->det()==0){
          LogDebug("MeasurementByLayerGrouper") <<"This hit has no geomdet associated skipping... ";
                return 0;
        }

        //now the cases in which the detid is set

        if (!theGeomSearch) {
                throw cms::Exception("MeasurementByLayerGrouper") << "Impossible to retrieve the det layer because it's not set in the TM and the pointer to the GeometricSearchTracker is 0 ";
                return 0;       
        }

        return theGeomSearch->detLayer(tm.recHit()->det()->geographicalId());
}
std::vector<std::pair<const DetLayer*, std::vector<TM> > > MeasurementByLayerGrouper::operator() ( const std::vector< TM > &  ) const

Member Data Documentation

Definition at line 18 of file MeasurementByLayerGrouper.h.