Implements edm::EDProducer.
Definition at line 57 of file ZMuMuOneTrackUserData.cc.
References pat::PATObject< ObjectType >::addUserFloat(), beamSpot_, gather_cfg::cout, WZMuSkim_cff::dimuons, reco::Candidate::eta(), edm::Event::getByLabel(), i, edm::Ref< C, T, F >::isNonnull(), reco::Candidate::mass(), reco::Candidate::phi(), primaryVertices_, reco::Candidate::pt(), edm::Event::put(), reco::Candidate::rapidity(), src_, detailsBasic3DVector::z, and zGenParticlesMatch_.
Referenced by JSONExport.JsonExport::export(), HTMLExport.HTMLExport::export(), and HTMLExport.HTMLExportStatic::export().
63 std::cout <<
">>> No beam spot found !!!"<<std::endl;
68 std::cout <<
">>> No primary vertices found !!!"<<std::endl;
71 bool isMCMatchTrue=
false;
79 auto_ptr<vector<pat::CompositeCandidate> > dimuonColl(
new vector<pat::CompositeCandidate> () );
82 for (
unsigned int i = 0;
i< dimuons->size();++
i){
88 float trueMass,truePt,trueEta,truePhi,trueY;
107 dimuon.addUserFloat(
"TrueMass",trueMass);
108 dimuon.addUserFloat(
"TruePt",truePt);
109 dimuon.addUserFloat(
"TrueEta",trueEta);
110 dimuon.addUserFloat(
"TruePhi",truePhi);
111 dimuon.addUserFloat(
"TrueY",trueY);
115 dimuonColl->push_back(dimuon);
119 evt.
put( dimuonColl);
InputTag zGenParticlesMatch_
Analysis-level particle class.
virtual float mass() const =0
mass
virtual float eta() const =0
momentum pseudorapidity
virtual float phi() const =0
momentum azimuthal angle
virtual double rapidity() const =0
rapidity
bool isNonnull() const
Checks for non-null.
virtual float pt() const =0
transverse momentum
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
InputTag primaryVertices_