42 static const char category[] =
"Muon|RecoMuon|L3MuonCandidateProducer";
50 trackToken_ = consumes<reco::TrackCollection>(theL3CollectionLabel);
56 linkToken_ = consumes<reco::MuonTrackLinksCollection>(theL3LinksLabel);
57 if (theL3LinksLabel.label() ==
"" or theL3LinksLabel.label() ==
"unused")
63 if (muon_track_for_momentum ==
std::string(
"Tracker"))
65 else if (muon_track_for_momentum ==
std::string(
"Standalone"))
67 else if (muon_track_for_momentum ==
std::string(
"Global"))
68 theType=CombinedTrack;
70 LogError(
category)<<
"invalid value for MuonPtOption, please choose among 'Tracker', 'Standalone', 'Global'";
71 theType=CombinedTrack;
74 produces<RecoChargedCandidateCollection>();
86 LogTrace(
category)<<
" Taking the L3/GLB muons: "<<theL3CollectionLabel.label();
88 event.getByToken(trackToken_,tracks);
92 event.getByToken(linkToken_, links);
98 for (
unsigned int i=0;
i<tracks->size();
i++) {
103 for(reco::MuonTrackLinksCollection::const_iterator
link = links->begin();
111 if (
link->globalTrack().isNull()) {
117 float dR =
deltaR(inRef->eta(),inRef->phi(),
link->globalTrack()->eta(),
link->globalTrack()->phi());
118 float dPt =
abs(inRef->pt() -
link->globalTrack()->pt())/inRef->pt();
119 if (dR < 0.02 and dPt < 0.001) {
122 case InnerTrack: tkRef =
link->trackerTrack();
break;
123 case OuterTrack: tkRef =
link->standAloneTrack();
break;
124 case CombinedTrack: tkRef =
link->globalTrack();
break;
125 default: tkRef =
link->globalTrack();
break;
137 LogDebug(
category) <<
"tkRef Used For Momentum pt " << tkRef->pt() <<
" inRef from the input collection pt " << inRef->pt();
144 if(
abs(q)==1) pid = q < 0 ? 13 : -13;
151 candidates->push_back(cand);
154 event.put(candidates);
157 <<
"================================";
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
int Charge
electric charge type
std::string link(std::string &nm, std::string &ns)
bool isNull() const
Checks for null.
math::XYZPoint Point
point in the space
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
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
virtual void produce(edm::Event &, const edm::EventSetup &)
produce candidates
void setTrack(const reco::TrackRef &r)
set reference to track
math::XYZTLorentzVector LorentzVector
Lorentz vector.
ParameterSet const & parameterSet(Provenance const &provenance)