CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

MuonSeedFinder Class Reference

#include <MuonSeedFinder.h>

Inheritance diagram for MuonSeedFinder:
MuonSeedVFinder

List of all members.

Public Member Functions

 MuonSeedFinder (const edm::ParameterSet &pset)
 Constructor.
void seeds (const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, std::vector< TrajectorySeed > &result)
virtual void setBField (const MagneticField *field)
virtual ~MuonSeedFinder ()
 Destructor.

Private Member Functions

void analyze () const
float computePt (MuonTransientTrackingRecHit::ConstMuonRecHitPointer muon, const MagneticField *field) const

Private Attributes

MuonDTSeedFromRecHits theBarrel
MuonCSCSeedFromRecHits theEndcap
const MagneticFieldtheField
float theMinMomentum
MuonOverlapSeedFromRecHits theOverlap

Detailed Description

Uses SteppingHelixPropagator

Author:
A. Vitelli - INFN Torino
porting R. Bellan - INFN Torino
Date:
2010/08/10 20:08:06
Revision:
1.12

Uses SteppingHelixPropagator

Author:
R. Wilkinson
Date:
2010/08/10 20:05:22
Revision:
1.3

Definition at line 24 of file MuonSeedFinder.h.


Constructor & Destructor Documentation

MuonSeedFinder::MuonSeedFinder ( const edm::ParameterSet pset)

Constructor.

Definition at line 21 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::setPtExtractor(), theBarrel, theEndcap, theMinMomentum, theOverlap, and MuonSeedVFinder::thePtExtractor.

                                                          :
  theBarrel(),
  theOverlap(),
  theEndcap()
{
  
  // FIXME put it in a pSet
  // theMinMomentum = pset.getParameter<double>("EndCapSeedMinPt");  //3.0
  theMinMomentum = 3.0;
  thePtExtractor = new MuonSeedPtExtractor(pset);
  theBarrel.setPtExtractor(thePtExtractor);
  theOverlap.setPtExtractor(thePtExtractor);
  theEndcap.setPtExtractor(thePtExtractor);

}
virtual MuonSeedFinder::~MuonSeedFinder ( ) [inline, virtual]

Destructor.

Definition at line 31 of file MuonSeedFinder.h.

References MuonSeedVFinder::thePtExtractor.

{delete thePtExtractor;}

Member Function Documentation

void MuonSeedFinder::analyze ( ) const [private]
float MuonSeedFinder::computePt ( MuonTransientTrackingRecHit::ConstMuonRecHitPointer  muon,
const MagneticField field 
) const [private]
void MuonSeedFinder::seeds ( const MuonTransientTrackingRecHit::MuonRecHitContainer hits,
std::vector< TrajectorySeed > &  result 
) [virtual]

Implements MuonSeedVFinder.

Definition at line 47 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::add(), MuonSeedFromRecHits::clear(), MuonSeedFromRecHits::firstRecHit(), LogDebug, LogTrace, metname, MuonDTSeedFromRecHits::seed(), MuonCSCSeedFromRecHits::seed(), MuonOverlapSeedFromRecHits::seeds(), theBarrel, theEndcap, and theOverlap.

{
  const std::string metname = "Muon|RecoMuon|MuonSeedFinder";

  //  MuonDumper debug;

  int num_bar = 0;
  for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
    if ( (*iter)->isDT() ) {
      theBarrel.add(*iter);
      theOverlap.add(*iter);
      num_bar++;
    }
  }

  int num_endcap = 0;
  for ( MuonRecHitContainer::const_iterator iter = hits.begin(); iter!= hits.end(); iter++ ){
    if ( (*iter)->isCSC() )
    {
//std::cout << **iter << std::endl;
      theEndcap.add(*iter);
      theOverlap.add(*iter);
      ++num_endcap;
    }
  }

  // don't do dim-2 seeds in the overlap
  if ( num_bar >1 || (num_bar==1 && (num_endcap==0 || theBarrel.firstRecHit()->dimension() == 4))) {
    LogDebug(metname)
      << "Barrel Seeds " << num_bar << endl;
    result.push_back(theBarrel.seed());

  }

  if(num_endcap > 1 || (num_endcap==1 && num_bar==0))
  {
    LogDebug(metname)
      << "Endcap Seeds " << num_endcap << endl;
    result.push_back(theEndcap.seed());
  }

  if(num_bar > 0 && num_endcap > 0)
  {
    LogTrace(metname) << "Overlap Seed" << endl;
    std::vector<TrajectorySeed> overlapSeeds = theOverlap.seeds();
    result.insert(result.end(), overlapSeeds.begin(), overlapSeeds.end());
  }

  theBarrel.clear();
  theOverlap.clear();
  theEndcap.clear();


}
void MuonSeedFinder::setBField ( const MagneticField field) [virtual]

Implements MuonSeedVFinder.

Definition at line 38 of file MuonSeedFinder.cc.

References MuonSeedFromRecHits::setBField(), theBarrel, theEndcap, theField, and theOverlap.

{
  theField = field;
  theBarrel.setBField(field);
  theOverlap.setBField(field);
  theEndcap.setBField(field);
}

Member Data Documentation

Definition at line 50 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().

Definition at line 52 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().

Definition at line 48 of file MuonSeedFinder.h.

Referenced by setBField().

Definition at line 47 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder().

Definition at line 51 of file MuonSeedFinder.h.

Referenced by MuonSeedFinder(), seeds(), and setBField().