46 produces<reco::CandSoftLeptonTagInfoCollection>();
66 if(!theVertexCollection.
isValid() || theVertexCollection->empty())
return;
67 const reco::Vertex* vertex=&theVertexCollection->front();
75 for(
unsigned int ij=0, nj=theJetCollection->size(); ij<nj; ij++) {
83 if(
std::abs(lepPtr->pdgId())!=13)
continue;
93 for(
unsigned int im=0, nm=theMuonCollection->size(); im<nm; ++im) {
94 const reco::Muon* recomuon=&theMuonCollection->at(im);
99 muon=theMuonCollection->refAt(im).get();
106 muon=theMuonCollection->refAt(im).get();
125 properties.sip2d = ip2d.
value();
126 properties.sip3d = ip3d.
value();
128 properties.ptRel = ( (jetvect-muonvect).Cross(muonvect) ).
R() / jetvect.R();
129 float mag = muonvect.R()*jetvect.R();
130 float dot = muon->
p4().Dot(jetRef->
p4());
131 properties.etaRel = -
log((mag - dot)/(mag + dot)) / 2.;
132 properties.ratio = muon->
pt() / jetRef->
pt();
133 properties.ratioRel = muon->
p4().Dot(jetRef->
p4()) / jetvect.Mag2();
142 tagInfo.
insert(lepPtr, properties);
147 theMuonTagInfo->push_back(tagInfo);
151 iEvent.
put(theMuonTagInfo);
157 static const double lepton_mass = 0.00;
158 static const double jet_mass = 5.279;
159 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > lepton(vector.Dot(axis) / axis.r(), ROOT::Math::VectorUtil::Perp(vector, axis), 0., lepton_mass);
160 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> >
jet( axis.r(), 0., 0., jet_mass );
161 ROOT::Math::BoostX boost( -
jet.Beta() );
162 return boost(lepton).x();
T getParameter(std::string const &) const
math::XYZVector Vector
point in the space
virtual TrackRef innerTrack() const
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
T const * get() const
Returns C++ pointer to the item.
virtual Vector momentum() const
spatial momentum vector
reco::TransientTrack build(const reco::Track *p) const
double deltaR(const T1 &t1, const T2 &t2)
void setJetRef(const edm::Ref< T > &jetRef)
virtual double pt() const
transverse momentum
bool isLooseMuon(const reco::Muon &)
virtual size_t numberOfDaughters() const
number of daughters
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< CandSoftLeptonTagInfo > CandSoftLeptonTagInfoCollection
Abs< T >::type abs(const T &t)
edm::EDGetTokenT< edm::View< reco::Jet > > jetToken
T const * get() const
Returns C++ pointer to the item.
const edm::Ptr< reco::Candidate > & originalObjectRef() const
reference to original object. Returns a null reference if not available
virtual float boostedPPar(const math::XYZVector &, const math::XYZVector &)
reco::MuonRef muonRef() const
void insert(const REF &lepton, const SoftLeptonProperties &properties)
double significance() const
~SoftPFMuonTagInfoProducer()
virtual double px() const
x coordinate of momentum vector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
T const * product() const
virtual double pz() const
z coordinate of momentum vector
Particle reconstructed by the particle flow algorithm.
edm::EDGetTokenT< reco::VertexCollection > vertexToken
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
SoftPFMuonTagInfoProducer(const edm::ParameterSet &conf)
edm::EDGetTokenT< edm::View< reco::Muon > > muonToken
virtual void produce(edm::Event &, const edm::EventSetup &)
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
Analysis-level muon class.
virtual double py() const
y coordinate of momentum vector
Global3DVector GlobalVector