CMS 3D CMS Logo

Functions
L3TkMuonProducer.cc File Reference
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EventSetup.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "RecoMuon/L3MuonProducer/src/L3TkMuonProducer.h"
#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h"
#include <string>

Go to the source code of this file.

Functions

string printseed (const L3TkMuonProducer::SeedRef &s)
 
string printvector (const vector< TrackRef > &v)
 
string printvector (const vector< L3TkMuonProducer::SeedRef > &v)
 

Function Documentation

string printseed ( const L3TkMuonProducer::SeedRef s)

Definition at line 97 of file L3TkMuonProducer.cc.

References edm::ProductID::id(), edm::Ref< C, T, F >::id(), edm::Ref< C, T, F >::key(), and alignCSCRings::r.

Referenced by L3TkMuonProducer::produce().

97  {
98  std::stringstream ss;
99  ss<<" seed ref: "<<s.id().id()<<":"<<s.key()<<" has "<< s->nHits()<<"rechits";
100  TrajectorySeed::range r=s->recHits();
102  for (;it!=r.second;++it)
103  ss<<"\n detId: "<<it->geographicalId()<<" position: "<<it->localPosition()<<" and error: "<<it->localPositionError();
104  return ss.str();
105 }
key_type key() const
Accessor for product key.
Definition: Ref.h:264
ProductID id() const
Accessor for product ID.
Definition: Ref.h:258
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
ProductIndex id() const
Definition: ProductID.h:38
string printvector ( const vector< TrackRef > &  v)

Definition at line 73 of file L3TkMuonProducer.cc.

References mps_fire::i.

Referenced by L3TkMuonProducer::produce().

73  {
74  std::stringstream ss;
75  for (unsigned int i=0;i!=v.size();++i) {
76  if (i!=0) ss<<"\n";
77  ss<<"track with ref: "<<v[i].id().id()<<":"<<v[i].key()
78  <<" and pT: "<<v[i]->pt()
79  <<" with seedRef: "<<v[i]->seedRef().id().id()<<":"<<v[i]->seedRef().key();
80  }
81  return ss.str();
82 }
string printvector ( const vector< L3TkMuonProducer::SeedRef > &  v)

Definition at line 84 of file L3TkMuonProducer.cc.

References mps_fire::i.

84  {
85  std::stringstream ss;
86  for (unsigned int i=0;i!=v.size();++i){
87  if (i!=0) ss<<"\n";
88  ss<<"seed ref: "<<v[i].id().id()<<":"<<v[i].key();
89  if (v[i]->l2Track().isNull())
90  ss<<" and pT: "<<v[i]->l1Particle()->pt()<<" of L1: "<<v[i]->l1Particle().id().id()<<":"<<v[i]->l1Particle().key();
91  else
92  ss<<" and pT: "<<v[i]->l2Track()->pt()<<" of L2: "<<v[i]->l2Track().id().id()<<":"<<v[i]->l2Track().key();
93  }
94  return ss.str();
95 }