44 produces<std::vector<reco::Muon> >();
74 edm::LogError(
"") <<
">>> Muon collection does not exist !!!";
81 edm::LogError(
"") <<
">>> Old Track collection does not exist !!!";
87 edm::LogError(
"") <<
">>> New Track collection does not exist !!!";
91 unsigned int muonCollectionSize = muonCollectionHandle->size();
95 for (
unsigned int i=0;
i<muonCollectionSize;
i++) {
111 newmuons->push_back(*newmu);
118 float dRMin=1000;
int found = -1;
119 for(
unsigned int i=0;
i<newTrackCollection->size();
i++){
121 if(newTrackRef.
isNull())
continue;
123 if( fabs( (1.0/newTrackRef->pt())-(1.0/oldTrackRef->pt())) >
maxInvPtDiff)
continue;
124 float dR =
deltaR(newTrackRef->momentum(), oldTrackRef->momentum());
125 if(dR <=
minDR && dR < dRMin){ dRMin=
dR; found =
i;}
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag newTrackTag_
virtual TrackRef innerTrack() const
#define DEFINE_FWK_MODULE(type)
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
reco::TrackRef findNewRef(reco::TrackRef oldTrackRef, edm::Handle< reco::TrackCollection > &newTrackCollection)
std::vector< Muon > MuonCollection
collection of Muon objects
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
UpdatedMuonInnerTrackRef(const edm::ParameterSet &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double deltaR(double eta1, double eta2, double phi1, double phi2)
Muon * clone() const
create a clone
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
edm::InputTag oldTrackTag_
~UpdatedMuonInnerTrackRef()
virtual void produce(edm::Event &, const edm::EventSetup &)