39 produces<reco::CandSoftLeptonTagInfoCollection>();
56 if(!PVCollection.
isValid())
return;
57 if(!PVCollection->empty()){
59 vertex=&PVCollection->front();
74 for (
unsigned int i = 0;
i < theJetCollection->size();
i++){
78 std::vector<const reco::GsfElectron *> Elec;
79 for(
unsigned int ie=0,
ne=theGEDGsfElectronCollection->size(); ie<
ne; ++ie){
82 const reco::GsfElectron* recoelectron=theGEDGsfElectronCollection->refAt(ie).get();
108 properties.
ptRel = ( (pjet-pel).Cross(pel) ).
R() / pjet.R();
109 float mag = pel.R()*pjet.R();
110 float dot = recoelectron->
p4().Dot(jetRef->
p4());
111 properties.
etaRel = -
log((mag - dot)/(mag + dot)) / 2.;
112 properties.
ratio = recoelectron->
pt() / jetRef->
pt();
113 properties.
ratioRel = recoelectron->
p4().Dot(jetRef->
p4()) / pjet.Mag2();
118 tagInfo.
insert(lepPtr, properties );
120 theElecTagInfo->push_back(tagInfo);
122 iEvent.
put(theElecTagInfo);
127 using namespace reco;
129 uint32_t
hit = hitPattern.getHitPattern(HitPattern::TRACK_HITS, 0);
130 bool hitCondition = !(HitPattern::validHitFilter(
hit)
131 && ((HitPattern::pixelBarrelHitFilter(
hit)
132 && HitPattern::getLayer(
hit) < 3)
133 || HitPattern::pixelEndcapHitFilter(
hit)));
134 if(hitCondition)
return false;
140 static const double lepton_mass = 0.00;
141 static const double jet_mass = 5.279;
142 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> > lepton(vector.Dot(axis) / axis.r(), ROOT::Math::VectorUtil::Perp(vector, axis), 0., lepton_mass);
143 ROOT::Math::LorentzVector<ROOT::Math::PxPyPzM4D<double> >
jet( axis.r(), 0., 0., jet_mass );
144 ROOT::Math::BoostX boost( -
jet.Beta() );
145 return boost(lepton).x();
T getParameter(std::string const &) const
float boostedPPar(const math::XYZVector &, const math::XYZVector &)
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())
edm::EDGetTokenT< reco::BeamSpot > token_BeamSpot
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
SoftPFElectronTagInfoProducer(const edm::ParameterSet &conf)
virtual void produce(edm::Event &, const edm::EventSetup &)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< CandSoftLeptonTagInfo > CandSoftLeptonTagInfoCollection
bool isElecClean(edm::Event &, const reco::GsfElectron *)
Abs< T >::type abs(const T &t)
double deltaR2(const T1 &t1, const T2 &t2)
~SoftPFElectronTagInfoProducer()
T const * get() const
Returns C++ pointer to the item.
const reco::Vertex * vertex
void insert(const REF &lepton, const SoftLeptonProperties &properties)
double significance() const
T const * product() const
virtual double px() const
x coordinate of momentum vector
XYZVectorD XYZVector
spatial vector with cartesian internal representation
T const * product() const
edm::EDGetTokenT< reco::VertexCollection > token_primaryVertex
Analysis-level electron class.
bool passConversionVeto() const
vertex fit combined with missing number of hits method
virtual double pz() const
z coordinate of momentum vector
T dot(const Basic3DVector &v) const
Scalar product, or "dot" product, with a vector of same type.
const Point & position() const
position
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
edm::EDGetTokenT< edm::View< reco::Jet > > token_jets
virtual double py() const
y coordinate of momentum vector
const TransientTrackBuilder * transientTrackBuilder
Global3DVector GlobalVector
virtual GsfTrackRef gsfTrack() const
reference to a GsfTrack