41 static const char category[] =
"Muon|RecoMuon|L3MuonCandidateProducer";
49 trackToken_ = consumes<reco::TrackCollection>(theL3CollectionLabel);
55 linkToken_ = consumes<reco::MuonTrackLinksCollection>(theL3LinksLabel);
56 if (theL3LinksLabel.label() ==
"" or theL3LinksLabel.label() ==
"unused")
62 if (muon_track_for_momentum ==
std::string(
"Tracker"))
64 else if (muon_track_for_momentum ==
std::string(
"Standalone"))
66 else if (muon_track_for_momentum ==
std::string(
"Global"))
67 theType=CombinedTrack;
69 LogError(
category)<<
"invalid value for MuonPtOption, please choose among 'Tracker', 'Standalone', 'Global'";
70 theType=CombinedTrack;
73 produces<RecoChargedCandidateCollection>();
85 LogTrace(
category)<<
" Taking the L3/GLB muons: "<<theL3CollectionLabel.label();
87 event.getByToken(trackToken_,tracks);
91 event.getByToken(linkToken_, links);
97 for (
unsigned int i=0;
i<tracks->size();
i++) {
102 for(reco::MuonTrackLinksCollection::const_iterator
link = links->begin();
110 if (
link->globalTrack().isNull()) {
116 float dR =
deltaR(inRef->eta(),inRef->phi(),
link->globalTrack()->eta(),
link->globalTrack()->phi());
117 float dPt =
abs(inRef->pt() -
link->globalTrack()->pt())/inRef->pt();
118 if (dR < 0.02 and dPt < 0.001) {
121 case InnerTrack: tkRef =
link->trackerTrack();
break;
122 case OuterTrack: tkRef =
link->standAloneTrack();
break;
123 case CombinedTrack: tkRef =
link->globalTrack();
break;
124 default: tkRef =
link->globalTrack();
break;
136 LogDebug(
category) <<
"tkRef Used For Momentum pt " << tkRef->pt() <<
" inRef from the input collection pt " << inRef->pt();
138 Particle::Charge
q = tkRef->charge();
143 if(
abs(q)==1) pid = q < 0 ? 13 : -13;
150 candidates->push_back(cand);
153 event.put(candidates);
156 <<
"================================";
T getParameter(std::string const &) const
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static const char category[]
L3MuonCandidateProducer(const edm::ParameterSet &)
constructor with config
Abs< T >::type abs(const T &t)
virtual ~L3MuonCandidateProducer()
destructor
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
bool isNull() const
Checks for null.
double deltaR(double eta1, double eta2, double phi1, double phi2)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
void setTrack(const reco::TrackRef &r)
set reference to track
virtual void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
produce candidates
ParameterSet const & parameterSet(Provenance const &provenance)
math::PtEtaPhiELorentzVectorF LorentzVector