34 produces<reco::MuonCollection>().setBranchAlias(
theAlias +
"s");
45 const std::string
metname =
"Muon|RecoMuon|MuonIdentification|GlobalMuonToMuonProducer";
47 LogTrace(metname) <<
"Valid RecHits: "<<track.
found() <<
" invalid RecHits: " << track.
lost();
51 if((*recHit)->isValid()){
52 const GeomDet* geomDet = trackingGeometry->idToDet((*recHit)->geographicalId());
54 double z = geomDet->
toGlobal((*recHit)->localPosition()).
z();
55 LogTrace(metname) << i++ <<
" r: "<< r <<
" z: "<<z <<
" "<<geomDet->
toGlobal((*recHit)->localPosition())
65 const std::string
metname =
"Muon|RecoMuon|MuonIdentification|GlobalMuonToMuonProducer";
74 if(linksCollection->empty()) {
75 event.put(muonCollection);
84 for(reco::MuonTrackLinksCollection::const_iterator links = linksCollection->begin();
85 links != linksCollection->end(); ++links){
90 LogTrace(metname) <<
"standAloneTrack";
98 muon.
setTrack(links->trackerTrack());
102 muon.
setCharge(links->globalTrack()->charge());
105 double energy =
sqrt(links->globalTrack()->p() * links->globalTrack()->p() + 0.011163691);
107 links->globalTrack()->py(),
108 links->globalTrack()->pz(),
112 muon.
setVertex(links->globalTrack()->vertex());
114 muonCollection->push_back(muon);
118 event.put(muonCollection);
T getParameter(std::string const &) const
virtual ~GlobalMuonToMuonProducer()
Destructor.
GlobalMuonToMuonProducer(const edm::ParameterSet &)
Constructor.
unsigned short lost() const
Number of lost (=invalid) hits on track.
const std::string metname
virtual void setCharge(Charge q)
set electric charge
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
virtual void setP4(const LorentzVector &p4)
set 4-momentum
std::vector< Muon > MuonCollection
collection of Muon objects
virtual void setStandAlone(const TrackRef &t)
edm::InputTag theLinksCollectionLabel
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
void setAlias(std::string alias)
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual void setVertex(const Point &vertex)
set vertex
void printTrackRecHits(const reco::Track &track, edm::ESHandle< GlobalTrackingGeometry > trackingGeometry) const
virtual void setTrack(const TrackRef &t)
virtual void produce(edm::Event &, const edm::EventSetup &)
reconstruct muons
const BoundPlane & surface() const
The nominal surface of the GeomDet.
unsigned short found() const
Number of valid hits on track.
virtual void setCombined(const TrackRef &t)
const PositionType & position() const
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.