Implements edm::EDProducer.
Definition at line 60 of file ZMuMuOneTrackUserData.cc.
References pat::PATObject< ObjectType >::addUserFloat(), beamSpotToken_, gather_cfg::cout, WZMuSkim_cff::dimuons, reco::Candidate::eta(), edm::Event::getByToken(), i, edm::Ref< C, T, F >::isNonnull(), reco::Candidate::mass(), reco::Candidate::phi(), primaryVerticesToken_, reco::Candidate::pt(), edm::Event::put(), reco::Candidate::rapidity(), srcToken_, detailsBasic3DVector::z, and zGenParticlesMatchToken_.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
66 std::cout <<
">>> No beam spot found !!!"<<std::endl;
71 std::cout <<
">>> No primary vertices found !!!"<<std::endl;
74 bool isMCMatchTrue=
false;
82 auto_ptr<vector<pat::CompositeCandidate> > dimuonColl(
new vector<pat::CompositeCandidate> () );
85 for (
unsigned int i = 0;
i< dimuons->size();++
i){
91 float trueMass,truePt,trueEta,truePhi,trueY;
110 dimuon.addUserFloat(
"TrueMass",trueMass);
111 dimuon.addUserFloat(
"TruePt",truePt);
112 dimuon.addUserFloat(
"TrueEta",trueEta);
113 dimuon.addUserFloat(
"TruePhi",truePhi);
114 dimuon.addUserFloat(
"TrueY",trueY);
118 dimuonColl->push_back(dimuon);
122 evt.
put( dimuonColl);
Analysis-level particle class.
bool isNonnull() const
Checks for non-null.
virtual float mass() const =0
mass
EDGetTokenT< GenParticleMatch > zGenParticlesMatchToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual float eta() const =0
momentum pseudorapidity
virtual float phi() const =0
momentum azimuthal angle
virtual double rapidity() const =0
rapidity
EDGetTokenT< VertexCollection > primaryVerticesToken_
virtual float pt() const =0
transverse momentum
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
EDGetTokenT< BeamSpot > beamSpotToken_
EDGetTokenT< std::vector< reco::CompositeCandidate > > srcToken_