45 static const char category[] =
"Muon|RecoMuon|L3MuonCandidateProducer";
58 if (theL3LinksLabel.label() ==
"" or theL3LinksLabel.label() ==
"unused")
64 if (muon_track_for_momentum ==
std::string(
"Tracker"))
66 else if (muon_track_for_momentum ==
std::string(
"Standalone"))
68 else if (muon_track_for_momentum ==
std::string(
"Global"))
69 theType=CombinedTrack;
71 LogError(
category)<<
"invalid value for MuonPtOption, please choose among 'Tracker', 'Standalone', 'Global'";
72 theType=CombinedTrack;
75 produces<RecoChargedCandidateCollection>();
87 LogTrace(
category)<<
" Taking the L3/GLB muons: "<<theL3CollectionLabel.label();
89 event.getByLabel(theL3CollectionLabel,tracks);
93 event.getByLabel(theL3LinksLabel, links);
99 for (
unsigned int i=0;
i<tracks->size();
i++) {
104 for(reco::MuonTrackLinksCollection::const_iterator
link = links->begin();
112 if (
link->globalTrack().isNull()) {
118 float dR =
deltaR(inRef->eta(),inRef->phi(),
link->globalTrack()->eta(),
link->globalTrack()->phi());
119 float dPt =
abs(inRef->pt() -
link->globalTrack()->pt())/inRef->pt();
120 if (dR < 0.02 and dPt < 0.001) {
123 case InnerTrack: tkRef =
link->trackerTrack();
break;
124 case OuterTrack: tkRef =
link->standAloneTrack();
break;
125 case CombinedTrack: tkRef =
link->globalTrack();
break;
126 default: tkRef =
link->globalTrack();
break;
138 LogDebug(
category) <<
"tkRef Used For Momentum pt " << tkRef->pt() <<
" inRef from the input collection pt " << inRef->pt();
145 if(
abs(q)==1) pid = q < 0 ? 13 : -13;
152 candidates->push_back(cand);
155 event.put(candidates);
158 <<
"================================";
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
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.