48 auto theElecTagInfo = std::make_unique<reco::CandSoftLeptonTagInfoCollection>();
55 if(!PVCollection.
isValid())
return;
56 if(!PVCollection->empty()){
58 vertex=&PVCollection->front();
73 for (
unsigned int i = 0;
i < theJetCollection->size();
i++){
77 std::vector<const reco::GsfElectron *> Elec;
78 for(
unsigned int ie=0,
ne=theGEDGsfElectronCollection->size(); ie<
ne; ++ie){
81 const reco::GsfElectron* recoelectron=theGEDGsfElectronCollection->refAt(ie).get();
92 if(recoelectron->
gsfTrack().
get()==
nullptr)
continue;
107 properties.
ptRel = ( (pjet-pel).Cross(pel) ).
R() / pjet.R();
108 float mag = pel.R()*pjet.R();
109 float dot = recoelectron->
p4().Dot(jetRef->
p4());
110 properties.
etaRel = -
log((mag - dot)/(mag + dot)) / 2.;
111 properties.
ratio = recoelectron->
pt() / jetRef->
pt();
112 properties.
ratioRel = recoelectron->
p4().Dot(jetRef->
p4()) / pjet.Mag2();
118 tagInfo.
insert(lepPtr, properties );
120 theElecTagInfo->push_back(tagInfo);
GsfTrackRef gsfTrack() const override
reference to a GsfTrack
float boostedPPar(const math::XYZVector &, const math::XYZVector &)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::ConversionCollection > token_allConversions
edm::EDGetTokenT< edm::View< reco::GsfElectron > > token_elec
const LorentzVector & p4(P4Kind kind) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
double px() const final
x coordinate of momentum vector
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
reco::TransientTrack build(const reco::Track *p) const
double pt() const final
transverse momentum
int charge() const final
electric charge
void setJetRef(const edm::Ref< T > &jetRef)
Vector momentum() const final
spatial momentum vector
double pz() const final
z coordinate of momentum vector
bool isElecClean(edm::Event &, const reco::GsfElectron *)
Abs< T >::type abs(const T &t)
const LorentzVector & p4() const final
four-momentum Lorentz vector
T const * get() const
Returns C++ pointer to the item.
const reco::Vertex * vertex
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
void insert(const REF &lepton, const SoftLeptonProperties &properties)
constexpr auto deltaR2(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
double significance() const
T const * product() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
Analysis-level electron class.
double py() const final
y coordinate of momentum vector
bool passConversionVeto() const
vertex fit combined with missing number of hits method
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
const Point & position() const
position
edm::EDGetTokenT< edm::View< reco::Jet > > token_jets
const TransientTrackBuilder * transientTrackBuilder
Global3DVector GlobalVector