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);
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;}
edm::EDGetTokenT< reco::TrackCollection > newTrackToken_
T getUntrackedParameter(std::string const &, T const &) const
virtual TrackRef innerTrack() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
virtual void setInnerTrack(const TrackRef &t)
set reference to Track
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
bool isNonnull() const
Checks for non-null.
bool isNull() const
Checks for null.
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
UpdatedMuonInnerTrackRef(const edm::ParameterSet &)
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
virtual void endJob() override
~UpdatedMuonInnerTrackRef()