Implements edm::EDProducer.
Definition at line 60 of file ZMuMuOneTrackUserData.cc.
References pat::PATObject< ObjectType >::addUserFloat(), beamSpotToken_, gather_cfg::cout, hotlineSkims_cff::dimuons, reco::Candidate::eta(), edm::Event::getByToken(), i, edm::Ref< C, T, F >::isNonnull(), reco::Candidate::mass(), eostools::move(), reco::Candidate::phi(), HLT_25ns10e33_v2_cff::primaryVertices, primaryVerticesToken_, reco::Candidate::pt(), edm::Event::put(), reco::Candidate::rapidity(), srcToken_, 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 unique_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);
Analysis-level particle class.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool isNonnull() const
Checks for non-null.
EDGetTokenT< GenParticleMatch > zGenParticlesMatchToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual double pt() const =0
transverse momentum
virtual double mass() const =0
mass
virtual double rapidity() const =0
rapidity
EDGetTokenT< VertexCollection > primaryVerticesToken_
EDGetTokenT< BeamSpot > beamSpotToken_
EDGetTokenT< std::vector< reco::CompositeCandidate > > srcToken_
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity