CMS 3D CMS Logo

CosmicMuonSeedGenerator Class Reference

SeedGenerator for Cosmic Muon. More...

#include <RecoMuon/MuonSeedGenerator/src/CosmicMuonSeedGenerator.h>

Inheritance diagram for CosmicMuonSeedGenerator:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

 CosmicMuonSeedGenerator (const edm::ParameterSet &)
 Constructor.
virtual void produce (edm::Event &, const edm::EventSetup &)
 reconstruct muon's seeds
virtual ~CosmicMuonSeedGenerator ()
 Destructor.

Private Types

typedef std::vector
< MuonRecHitPair
MuonRecHitPairVector

Private Member Functions

bool areCorrelated (const MuonTransientTrackingRecHit::MuonRecHitPointer &, const MuonTransientTrackingRecHit::MuonRecHitPointer &) const
 check if two rechits are correlated
bool checkQuality (const MuonTransientTrackingRecHit::MuonRecHitPointer &) const
 determine if a MuonTransientTrackingRecHit is qualified to build seed
std::vector< TrajectorySeedcreateSeed (const MuonRecHitPair &, const edm::EventSetup &) const
 create TrajectorySeed from MuonRecHitPair
std::vector< TrajectorySeedcreateSeed (const MuonTransientTrackingRecHit::MuonRecHitPointer &, const edm::EventSetup &) const
 create TrajectorySeed from MuonTransientTrackingRecHit
void createSeeds (TrajectorySeedCollection &results, const CosmicMuonSeedGenerator::MuonRecHitPairVector &hits, const edm::EventSetup &eSetup) const
void createSeeds (TrajectorySeedCollection &results, const MuonTransientTrackingRecHit::MuonRecHitContainer &hits, const edm::EventSetup &eSetup) const
 generate TrajectorySeeds and put them into results
bool leftIsBetter (const MuonTransientTrackingRecHit::MuonRecHitPointer &, const MuonTransientTrackingRecHit::MuonRecHitPointer &) const
 compare quality of two rechits
std::vector< MuonRecHitPairmakeSegPairs (const MuonTransientTrackingRecHit::MuonRecHitContainer &, const MuonTransientTrackingRecHit::MuonRecHitContainer &, std::string) const
MuonTransientTrackingRecHit::MuonRecHitContainer selectSegments (const MuonTransientTrackingRecHit::MuonRecHitContainer &) const
 select seed candidates from Segments in Event
TrajectorySeed tsosToSeed (const TrajectoryStateOnSurface &, uint32_t) const

Private Attributes

edm::InputTag theCSCRecSegmentLabel
 the name of the CSC rec hits collection
edm::InputTag theDTRecSegmentLabel
 the name of the DT rec hits collection
bool theEnableCSCFlag
 enable CSCSegment Flag
bool theEnableDTFlag
 enable DT Segment Flag
edm::ESHandle< MagneticFieldtheField
double theMaxCSCChi2
double theMaxDTChi2
 the maximum chi2 required for dt and csc rechits
unsigned int theMaxSeeds
 the maximum number of Seeds
edm::ESHandle
< MuonDetLayerGeometry
theMuonLayers
std::map< std::string, float > theParameters
TrajectoryStateTransformtheTSTransform

Classes

struct  DecreasingGlobalY
struct  MuonRecHitPair


Detailed Description

SeedGenerator for Cosmic Muon.

Date
2009/01/05 03:53:06
Revision
1.12.4.1
Author:
Chang Liu - Purdue University

Definition at line 27 of file CosmicMuonSeedGenerator.h.


Member Typedef Documentation

typedef std::vector<MuonRecHitPair> CosmicMuonSeedGenerator::MuonRecHitPairVector [private]

Definition at line 51 of file CosmicMuonSeedGenerator.h.


Constructor & Destructor Documentation

CosmicMuonSeedGenerator::CosmicMuonSeedGenerator ( const edm::ParameterSet pset  ) 

Constructor.

Definition at line 51 of file CosmicMuonSeedGenerator.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), theCSCRecSegmentLabel, theDTRecSegmentLabel, theEnableCSCFlag, theEnableDTFlag, theMaxCSCChi2, theMaxDTChi2, theMaxSeeds, theParameters, and theTSTransform.

00051                                                                            {
00052   produces<TrajectorySeedCollection>(); 
00053   
00054   // enable the DT chamber
00055   theEnableDTFlag = pset.getUntrackedParameter<bool>("EnableDTMeasurement",true);
00056   // enable the CSC chamber
00057   theEnableCSCFlag = pset.getUntrackedParameter<bool>("EnableCSCMeasurement",true);
00058 
00059   if(theEnableDTFlag)
00060     theDTRecSegmentLabel = pset.getUntrackedParameter<InputTag>("DTRecSegmentLabel");
00061 
00062   if(theEnableCSCFlag)
00063     theCSCRecSegmentLabel = pset.getUntrackedParameter<InputTag>("CSCRecSegmentLabel");
00064 
00065   // the maximum number of TrajectorySeed
00066   theMaxSeeds = pset.getParameter<int>("MaxSeeds");
00067 
00068   theMaxDTChi2 = pset.getParameter<double>("MaxDTChi2");
00069   theMaxCSCChi2 = pset.getParameter<double>("MaxCSCChi2");
00070 
00071   theTSTransform = new TrajectoryStateTransform();
00072 
00073   // pre-determined parameters for seed pt calculation ( pt * dphi )
00074   theParameters["topmb41"] = 0.87;
00075   theParameters["bottommb41"] = 1.2;
00076   theParameters["topmb42"] = 0.67;
00077   theParameters["bottommb42"] = 0.98;
00078   theParameters["topmb43"] = 0.34;
00079   theParameters["bottommb43"] = 0.58;
00080   theParameters["topmb31"] = 0.54;
00081   theParameters["bottommb31"] = 0.77;
00082   theParameters["topmb32"] = 0.35;
00083   theParameters["bottommb32"] = 0.55;
00084   theParameters["topmb21"] = 0.21;
00085   theParameters["bottommb21"] = 0.31;
00086 
00087 }

CosmicMuonSeedGenerator::~CosmicMuonSeedGenerator (  )  [virtual]

Destructor.

Definition at line 90 of file CosmicMuonSeedGenerator.cc.

References theTSTransform.

00090                                                  {
00091   delete theTSTransform;
00092 }


Member Function Documentation

bool CosmicMuonSeedGenerator::areCorrelated ( const MuonTransientTrackingRecHit::MuonRecHitPointer lhs,
const MuonTransientTrackingRecHit::MuonRecHitPointer rhs 
) const [private]

check if two rechits are correlated

Definition at line 371 of file CosmicMuonSeedGenerator.cc.

References PV3DBase< T, PVType, FrameType >::eta(), PV3DBase< T, PVType, FrameType >::mag(), PV3DBase< T, PVType, FrameType >::phi(), and PV3DBase< T, PVType, FrameType >::theta().

00371                                                                                                             {
00372   bool result = false;
00373 
00374   GlobalVector dir1 = lhs->globalDirection();
00375   GlobalPoint pos1 = lhs->globalPosition();
00376   GlobalVector dir2 = rhs->globalDirection();
00377   GlobalPoint pos2 = rhs->globalPosition();
00378 
00379   GlobalVector dis = pos2 - pos1;
00380 
00381   if ( (deltaR<double>(dir1.eta(), dir1.phi(), dir2.eta(), dir2.phi()) < 0.1 || deltaR<double>(dir1.eta(), dir1.phi(), -dir2.eta(), -dir2.phi()) < 0.1 ) 
00382         && dis.mag() < 5.0 )
00383      result = true;
00384 
00385   if ( (deltaR<double>(dir1.eta(), dir1.phi(), dir2.eta(), dir2.phi()) < 0.1 || deltaR<double>(dir1.eta(), dir1.phi(), -dir2.eta(), -dir2.phi()) < 0.1 ) &&
00386        (deltaR<double>(dir1.eta(), dir1.phi(), dis.eta(), dis.phi()) < 0.1 || deltaR<double>(dir2.eta(), dir2.phi(), dis.eta(), dis.phi()) < 0.1 ) )
00387      result = true;
00388 
00389   if ( fabs(dir1.eta()) > 4.0 || fabs(dir2.eta()) > 4.0 ) {
00390      if ( (fabs(dir1.theta() - dir2.theta()) < 0.07 ||
00391            fabs(dir1.theta() + dir2.theta()) > 3.07 ) && 
00392           (fabs(dir1.theta() - dis.theta()) < 0.07 || 
00393            fabs(dir1.theta() - dis.theta()) < 0.07 ||
00394            fabs(dir1.theta() + dis.theta()) > 3.07 ||
00395            fabs(dir1.theta() + dis.theta()) > 3.07 ) )
00396 
00397      result = true;
00398   }
00399 
00400   return result;
00401 }

bool CosmicMuonSeedGenerator::checkQuality ( const MuonTransientTrackingRecHit::MuonRecHitPointer hit  )  const [private]

determine if a MuonTransientTrackingRecHit is qualified to build seed

Definition at line 209 of file CosmicMuonSeedGenerator.cc.

References category, LogTrace, theMaxCSCChi2, and theMaxDTChi2.

00209                                                                              {
00210 
00211   const std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00212 
00213   // only use 4D segments
00214   if ( !hit->isValid() ) return false;
00215 
00216   if (hit->dimension() < 4) {
00217     LogTrace(category)<<"dim < 4";
00218     return false;
00219   }
00220 
00221   if (hit->isDT() && ( hit->chi2()> theMaxDTChi2 )) {
00222     LogTrace(category)<<"DT chi2 too large";
00223     return false;
00224   }
00225   else if (hit->isCSC() &&( hit->chi2()> theMaxCSCChi2 ) ) {
00226     LogTrace(category)<<"CSC chi2 too large";
00227      return false;
00228   }
00229   return true;
00230 
00231 } 

std::vector< TrajectorySeed > CosmicMuonSeedGenerator::createSeed ( const MuonRecHitPair hitpair,
const edm::EventSetup eSetup 
) const [private]

create TrajectorySeed from MuonRecHitPair

Definition at line 442 of file CosmicMuonSeedGenerator.cc.

References MuonSubdetId::CSC, deltaPhi(), pat::helper::ParametrizationHelper::dimension(), MuonSubdetId::DT, MuonPatternRecoDumper::dumpMuonId(), e, error, CosmicMuonSeedGenerator::MuonRecHitPair::first, LogTrace, CosmicMuonSeedGenerator::MuonRecHitPair::second, t, theField, theParameters, tsosToSeed(), and CosmicMuonSeedGenerator::MuonRecHitPair::type.

00443                                                                             {
00444    std::vector<TrajectorySeed> result; 
00445 
00446   const std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00447 
00448   MuonPatternRecoDumper dumper;
00449   
00450   float dphi = deltaPhi((hitpair.first)->globalDirection().phi(), (hitpair.second)->globalDirection().phi());
00451 
00452   LogTrace(category)<<"hitpair.type "<<hitpair.type; 
00453 
00454   map<string, float>::const_iterator iterPar = theParameters.find(hitpair.type);
00455   if ( iterPar == theParameters.end() ) {
00456        return result;
00457   }
00458 
00459   // set the pt and charge by dphi
00460   int charge = (dphi > 0) ? -1 : 1;
00461 
00462   double pt = 999.0;
00463   float paraC = (iterPar->second);
00464 
00465   if (fabs(dphi) > 1e-5) {
00466     pt = paraC/fabs(dphi); 
00467   }
00468 
00469   if (pt < 10.0 ) { return result; } //still use the old strategy for low pt
00470 
00471   AlgebraicVector t(4);
00472   AlgebraicSymMatrix mat(5,0) ;
00473 
00474   MuonTransientTrackingRecHit::MuonRecHitPointer hit = hitpair.first;
00475   if ( hit->dimension() < (hitpair.second)->dimension() ) hit = hitpair.second;
00476 
00477   // Fill the LocalTrajectoryParameters
00478   LocalPoint segPos=hit->localPosition();
00479   
00480   GlobalVector polar(GlobalVector::Spherical(hit->globalDirection().theta(),
00481                                              hit->globalDirection().phi(),
00482                                              1.));
00483   // Force all track downward for cosmic, not beam-halo
00484   if (hit->geographicalId().subdetId() == MuonSubdetId::DT && fabs(hit->globalDirection().eta()) < 4.0 && hit->globalDirection().phi() > 0 ) 
00485     polar = - polar;
00486 
00487   if (hit->geographicalId().subdetId() == MuonSubdetId::CSC && fabs(hit->globalDirection().eta()) > 2.3 ) {
00488     polar = - polar;
00489   }
00490 
00491   polar *=fabs(pt)/polar.perp();
00492 
00493   LocalVector segDir =hit->det()->toLocal(polar);
00494 
00495   LocalTrajectoryParameters param(segPos,segDir, charge);
00496 
00497   mat = hit->parametersError().similarityT( hit->projectionMatrix() );
00498   
00499   float p_err = 0.004/paraC;
00500   if (pt < 10.01) p_err = 0.1; 
00501   mat[0][0]= p_err;
00502   
00503   LocalTrajectoryError error(mat);
00504   
00505   // Create the TrajectoryStateOnSurface
00506   TrajectoryStateOnSurface tsos(param, error, hit->det()->surface(), &*theField);
00507 
00508   LogTrace(category)<<"Trajectory State on Surface of Seed";
00509   LogTrace(category)<<"mom: "<<tsos.globalMomentum()<<" phi: "<<tsos.globalMomentum().phi();
00510   LogTrace(category)<<"pos: " << tsos.globalPosition(); 
00511   LogTrace(category) << "The RecSegment relies on: ";
00512   LogTrace(category) << dumper.dumpMuonId(hit->geographicalId());
00513 
00514   result.push_back( tsosToSeed(tsos, hit->geographicalId().rawId()) );
00515 
00516    return result;
00517 }

std::vector< TrajectorySeed > CosmicMuonSeedGenerator::createSeed ( const MuonTransientTrackingRecHit::MuonRecHitPointer hit,
const edm::EventSetup eSetup 
) const [private]

create TrajectorySeed from MuonTransientTrackingRecHit

Definition at line 310 of file CosmicMuonSeedGenerator.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, MuonPatternRecoDumper::dumpMuonId(), error, LogTrace, t, theField, and tsosToSeed().

Referenced by createSeeds().

00310                                                                                                                              {
00311 
00312   std::vector<TrajectorySeed> result;
00313 
00314   const std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00315 
00316   MuonPatternRecoDumper dumper;
00317   
00318   // set the pt by hand
00319   double pt = 10.0;
00320 
00321   AlgebraicVector t(4);
00322   AlgebraicSymMatrix mat(5,0) ;
00323 
00324   // Fill the LocalTrajectoryParameters
00325   LocalPoint segPos=hit->localPosition();
00326   
00327   GlobalVector polar(GlobalVector::Spherical(hit->globalDirection().theta(),
00328                                              hit->globalDirection().phi(),
00329                                              1.));
00330   // Force all track downward for cosmic, not beam-halo
00331   if (hit->geographicalId().subdetId() == MuonSubdetId::DT && fabs(hit->globalDirection().eta()) < 4.0 && hit->globalDirection().phi() > 0 ) 
00332     polar = - polar;
00333 
00334   if (hit->geographicalId().subdetId() == MuonSubdetId::CSC && fabs(hit->globalDirection().eta()) > 2.3 ) {
00335     polar = - polar;
00336   }
00337 
00338   polar *=fabs(pt)/polar.perp();
00339 
00340   LocalVector segDir =hit->det()->toLocal(polar);
00341 
00342   int charge= 1;
00343   LocalTrajectoryParameters param(segPos,segDir, charge);
00344 
00345   charge= -1;
00346   LocalTrajectoryParameters param2(segPos,segDir, charge);
00347 
00348   mat = hit->parametersError().similarityT( hit->projectionMatrix() );
00349   
00350   float p_err = 0.2;
00351   mat[0][0]= p_err;
00352   
00353   LocalTrajectoryError error(mat);
00354   
00355   // Create the TrajectoryStateOnSurface
00356   TrajectoryStateOnSurface tsos(param, error, hit->det()->surface(), &*theField);
00357   TrajectoryStateOnSurface tsos2(param2, error, hit->det()->surface(), &*theField);
00358 
00359   LogTrace(category)<<"Trajectory State on Surface of Seed";
00360   LogTrace(category)<<"mom: "<<tsos.globalMomentum()<<" phi: "<<tsos.globalMomentum().phi();
00361   LogTrace(category)<<"pos: " << tsos.globalPosition(); 
00362   LogTrace(category) << "The RecSegment relies on: ";
00363   LogTrace(category) << dumper.dumpMuonId(hit->geographicalId());
00364 
00365   result.push_back( tsosToSeed(tsos, hit->geographicalId().rawId()) ); 
00366   result.push_back( tsosToSeed(tsos2, hit->geographicalId().rawId()) );
00367 
00368   return result;
00369 }

void CosmicMuonSeedGenerator::createSeeds ( TrajectorySeedCollection results,
const CosmicMuonSeedGenerator::MuonRecHitPairVector hits,
const edm::EventSetup eSetup 
) const [private]

Definition at line 293 of file CosmicMuonSeedGenerator.cc.

References createSeed(), LogTrace, and theMaxSeeds.

00295                                                                              {
00296 
00297   const std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00298 
00299   if (hitpairs.size() == 0 || results.size() >= theMaxSeeds ) return;
00300   for (CosmicMuonSeedGenerator::MuonRecHitPairVector::const_iterator ihitpair = hitpairs.begin(); ihitpair != hitpairs.end(); ihitpair++) {
00301     const std::vector<TrajectorySeed>& sds = createSeed((*ihitpair),eSetup);
00302     LogTrace(category)<<"created seeds from rechit "<<sds.size();
00303     results.insert(results.end(),sds.begin(),sds.end());
00304     if ( results.size() >= theMaxSeeds ) break;
00305   }
00306   return;
00307 }

void CosmicMuonSeedGenerator::createSeeds ( TrajectorySeedCollection results,
const MuonTransientTrackingRecHit::MuonRecHitContainer hits,
const edm::EventSetup eSetup 
) const [private]

generate TrajectorySeeds and put them into results

Referenced by produce().

bool CosmicMuonSeedGenerator::leftIsBetter ( const MuonTransientTrackingRecHit::MuonRecHitPointer lhs,
const MuonTransientTrackingRecHit::MuonRecHitPointer rhs 
) const [private]

compare quality of two rechits

Definition at line 403 of file CosmicMuonSeedGenerator.cc.

00404                                                                                   {
00405 
00406      if ( (lhs->degreesOfFreedom() > rhs->degreesOfFreedom() )  ||
00407           ( (lhs->degreesOfFreedom() == rhs->degreesOfFreedom() ) &&
00408             (lhs)->chi2() < (rhs)->chi2() ) )  return true;
00409      else return false;
00410 
00411 }

CosmicMuonSeedGenerator::MuonRecHitPairVector CosmicMuonSeedGenerator::makeSegPairs ( const MuonTransientTrackingRecHit::MuonRecHitContainer hits1,
const MuonTransientTrackingRecHit::MuonRecHitContainer hits2,
std::string  tag 
) const [private]

Definition at line 415 of file CosmicMuonSeedGenerator.cc.

References deltaPhi().

Referenced by produce().

00415                                                                                                                                                                                    {
00416 
00417    MuonRecHitPairVector result;
00418   const std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00419 
00420    if (hits1.empty() || hits2.empty()  )  return result;
00421 
00422    for (MuonRecHitContainer::const_iterator ihit1 = hits1.begin(); ihit1 != hits1.end(); ihit1++) {
00423      for (MuonRecHitContainer::const_iterator ihit2 = hits2.begin(); ihit2 != hits2.end(); ihit2++) {
00424         float dphi = deltaPhi((*ihit1)->globalPosition().phi(), (*ihit2)->globalPosition().phi());
00425         if ( dphi < 0.5 ) {
00426            if ((*ihit1)->globalPosition().y() > 0.0 && ( (*ihit1)->globalPosition().y()  > (*ihit2)->globalPosition().y() ) ) { 
00427               std::string tag2 = "top"+tag;
00428 
00429               result.push_back(MuonRecHitPair(*ihit1, *ihit2, tag2));
00430            } else if ((*ihit1)->globalPosition().y() < 0.0 && ( (*ihit1)->globalPosition().y()  < (*ihit2)->globalPosition().y() ) ) {
00431               std::string tag2 = "bottom"+tag;
00432               result.push_back(MuonRecHitPair(*ihit2, *ihit1, tag2));
00433 
00434            }
00435         }
00436      }
00437    }
00438 
00439    return result;
00440 }

void CosmicMuonSeedGenerator::produce ( edm::Event event,
const edm::EventSetup eSetup 
) [virtual]

reconstruct muon's seeds

Implements edm::EDProducer.

Definition at line 96 of file CosmicMuonSeedGenerator.cc.

References category, createSeeds(), edm::EventSetup::get(), LogTrace, makeSegPairs(), output(), MuonDetLayerMeasurements::recHits(), selectSegments(), MuonDetLayerMeasurements::setEvent(), theCSCRecSegmentLabel, theDTRecSegmentLabel, theEnableCSCFlag, theEnableDTFlag, theField, theMaxSeeds, and theMuonLayers.

00096                                                                                  {
00097 
00098   eSetup.get<IdealMagneticFieldRecord>().get(theField);
00099 
00100   auto_ptr<TrajectorySeedCollection> output(new TrajectorySeedCollection());
00101   
00102   TrajectorySeedCollection seeds;
00103  
00104   std::string category = "Muon|RecoMuon|CosmicMuonSeedGenerator";
00105 
00106   // Muon Geometry - DT, CSC and RPC 
00107   eSetup.get<MuonRecoGeometryRecord>().get(theMuonLayers);
00108 
00109   // get the DT layers
00110   vector<DetLayer*> dtLayers = theMuonLayers->allDTLayers();
00111 
00112   // get the CSC layers
00113   vector<DetLayer*> cscForwardLayers = theMuonLayers->forwardCSCLayers();
00114   vector<DetLayer*> cscBackwardLayers = theMuonLayers->backwardCSCLayers();
00115      
00116   MuonDetLayerMeasurements muonMeasurements(theDTRecSegmentLabel,theCSCRecSegmentLabel,
00117                                             InputTag(),
00118                                             theEnableDTFlag,theEnableCSCFlag,false);
00119 
00120   muonMeasurements.setEvent(event);
00121 
00122   MuonRecHitContainer allHits;
00123 
00124   vector<MuonRecHitContainer> RHMBs;
00125   vector<MuonRecHitContainer> RHMEFs;
00126   vector<MuonRecHitContainer> RHMEBs;
00127 
00128   stable_sort(allHits.begin(),allHits.end(),DecreasingGlobalY());
00129 
00130   for (vector<DetLayer*>::reverse_iterator icsclayer = cscForwardLayers.rbegin();
00131        icsclayer != cscForwardLayers.rend() - 1; ++icsclayer) {
00132        
00133        MuonRecHitContainer RHMF = muonMeasurements.recHits(*icsclayer);
00134        allHits.insert(allHits.end(),RHMF.begin(),RHMF.end());
00135 
00136   }
00137 
00138   for (vector<DetLayer*>::reverse_iterator icsclayer = cscBackwardLayers.rbegin();
00139        icsclayer != cscBackwardLayers.rend() - 1; ++icsclayer) {
00140 
00141        MuonRecHitContainer RHMF = muonMeasurements.recHits(*icsclayer);
00142        allHits.insert(allHits.end(),RHMF.begin(),RHMF.end());
00143 
00144   }
00145 
00146   for (vector<DetLayer*>::reverse_iterator idtlayer = dtLayers.rbegin();
00147        idtlayer != dtLayers.rend(); ++idtlayer) {
00148 
00149        MuonRecHitContainer RHMB = muonMeasurements.recHits(*idtlayer);
00150        RHMBs.push_back(RHMB);
00151 
00152        if ( idtlayer != dtLayers.rbegin() ) allHits.insert(allHits.end(),RHMB.begin(),RHMB.end());
00153 
00154   }
00155 
00156 //  stable_sort(allHits.begin(),allHits.end(),DecreasingGlobalY());
00157 
00158   LogTrace(category)<<"all RecHits: "<<allHits.size();
00159 
00160 //  CosmicMuonSeedGenerator::MuonRecHitPairVector mb41 = makeSegPairs(RHMBs[0], RHMBs[3], "mb41");
00161 //  createSeeds(seeds, mb41, eSetup);
00162 
00163 //  CosmicMuonSeedGenerator::MuonRecHitPairVector mb43 = makeSegPairs(RHMBs[0],RHMBs[1], "mb43");
00164 //  createSeeds(seeds, mb43, eSetup);
00165 
00166   CosmicMuonSeedGenerator::MuonRecHitPairVector mb42 = makeSegPairs(RHMBs[0],RHMBs[2], "mb42");
00167   createSeeds(seeds, mb42, eSetup);
00168 
00169 //  CosmicMuonSeedGenerator::MuonRecHitPairVector mb32 = makeSegPairs(RHMBs[1], RHMBs[2], "mb32");
00170 //  createSeeds(seeds, mb32, eSetup);
00171 
00172   CosmicMuonSeedGenerator::MuonRecHitPairVector mb31 = makeSegPairs(RHMBs[1], RHMBs[3], "mb31");
00173   createSeeds(seeds, mb31, eSetup);
00174 
00175 //  CosmicMuonSeedGenerator::MuonRecHitPairVector mb21 = makeSegPairs(RHMBs[2], RHMBs[3], "mb21");
00176 //  createSeeds(seeds, mb21, eSetup);
00177 
00178   if ( !allHits.empty() ) {
00179 
00180     MuonRecHitContainer goodhits = selectSegments(allHits);
00181     theMaxSeeds += seeds.size(); // reset max seeds for the second option
00182     LogTrace(category)<<"good RecHits: "<<goodhits.size();
00183 
00184     if ( goodhits.empty() ) {
00185       LogTrace(category)<<"No qualified Segments in Event! ";
00186       LogTrace(category)<<"Use 2D RecHit";
00187 
00188       createSeeds(seeds,allHits,eSetup);
00189 
00190     } 
00191     else {
00192       createSeeds(seeds,goodhits,eSetup);
00193     }
00194   }
00195 
00196   LogTrace(category)<<"Seeds built: "<<seeds.size();
00197 
00198   for(std::vector<TrajectorySeed>::iterator seed = seeds.begin();
00199       seed != seeds.end(); ++seed) {
00200         output->push_back(*seed);
00201   }
00202 
00203   event.put(output);
00204   seeds.clear();
00205 
00206 }

MuonTransientTrackingRecHit::MuonRecHitContainer CosmicMuonSeedGenerator::selectSegments ( const MuonTransientTrackingRecHit::MuonRecHitContainer  )  const [private]

select seed candidates from Segments in Event

Referenced by produce().

TrajectorySeed CosmicMuonSeedGenerator::tsosToSeed ( const TrajectoryStateOnSurface tsos,
uint32_t  id 
) const [private]

Definition at line 519 of file CosmicMuonSeedGenerator.cc.

References alongMomentum, TrajectoryStateTransform::persistentState(), and theTSTransform.

Referenced by createSeed().

00519                                                                                                           {
00520 
00521   PTrajectoryStateOnDet *seedTSOS =
00522     theTSTransform->persistentState(tsos, id);
00523 
00524   edm::OwnVector<TrackingRecHit> container;
00525   TrajectorySeed seed(*seedTSOS,container,alongMomentum);
00526   delete seedTSOS;
00527   return seed;
00528 }


Member Data Documentation

edm::InputTag CosmicMuonSeedGenerator::theCSCRecSegmentLabel [private]

the name of the CSC rec hits collection

Definition at line 108 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), and produce().

edm::InputTag CosmicMuonSeedGenerator::theDTRecSegmentLabel [private]

the name of the DT rec hits collection

Definition at line 105 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), and produce().

bool CosmicMuonSeedGenerator::theEnableCSCFlag [private]

enable CSCSegment Flag

Definition at line 102 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), and produce().

bool CosmicMuonSeedGenerator::theEnableDTFlag [private]

enable DT Segment Flag

Definition at line 99 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), and produce().

edm::ESHandle<MagneticField> CosmicMuonSeedGenerator::theField [private]

Definition at line 117 of file CosmicMuonSeedGenerator.h.

Referenced by createSeed(), and produce().

double CosmicMuonSeedGenerator::theMaxCSCChi2 [private]

Definition at line 115 of file CosmicMuonSeedGenerator.h.

Referenced by checkQuality(), and CosmicMuonSeedGenerator().

double CosmicMuonSeedGenerator::theMaxDTChi2 [private]

the maximum chi2 required for dt and csc rechits

Definition at line 114 of file CosmicMuonSeedGenerator.h.

Referenced by checkQuality(), and CosmicMuonSeedGenerator().

unsigned int CosmicMuonSeedGenerator::theMaxSeeds [private]

the maximum number of Seeds

Definition at line 111 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), createSeeds(), and produce().

edm::ESHandle<MuonDetLayerGeometry> CosmicMuonSeedGenerator::theMuonLayers [private]

Definition at line 116 of file CosmicMuonSeedGenerator.h.

Referenced by produce().

std::map<std::string, float> CosmicMuonSeedGenerator::theParameters [private]

Definition at line 121 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), and createSeed().

TrajectoryStateTransform* CosmicMuonSeedGenerator::theTSTransform [private]

Definition at line 119 of file CosmicMuonSeedGenerator.h.

Referenced by CosmicMuonSeedGenerator(), tsosToSeed(), and ~CosmicMuonSeedGenerator().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:16:55 2009 for CMSSW by  doxygen 1.5.4