27 virtual void endJob()
override ;
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);
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;}
edm::EDGetTokenT< reco::TrackCollection > newTrackToken_
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< reco::TrackCollection > oldTrackToken_
reco::TrackRef findNewRef(reco::TrackRef oldTrackRef, edm::Handle< reco::TrackCollection > &newTrackCollection)
virtual void beginJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
std::vector< Muon > MuonCollection
collection of Muon objects
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
UpdatedMuonInnerTrackRef(const edm::ParameterSet &)
bool isNull() const
Checks for null.
double deltaR(double eta1, double eta2, double phi1, double phi2)
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
virtual void endJob() override
~UpdatedMuonInnerTrackRef()
Muon * clone() const
create a clone