39 #include <TLorentzVector.h> 72 produces<std::vector<pat::CompositeCandidate>>();
81 auto jpsiCands = std::make_unique<std::vector<pat::CompositeCandidate>>();
86 const double JPSI_MASS = 3.097;
88 if (h_muons.isValid() && h_muons->size() > 1) {
90 muonsEnd = h_muons->end(),
92 imuon != muonsEnd - 1;
94 if (imuon->pt() > 1.0) {
96 if (imuon->charge() * jmuon->charge() < 0) {
104 double dR = reco::deltaR<pat::Muon, pat::Muon>(*imuon, *jmuon);
108 if (fabs(jpsi.
mass() - JPSI_MASS) < 1.0) {
109 jpsiCands->push_back(jpsi);
Analysis-level particle class.
void set(reco::Candidate &c) const
set up a candidate
void addUserFloat(const std::string &label, float data, const bool overwrite=false)
Set user-defined float.
edm::EDGetTokenT< edm::View< pat::Muon > > muonSrcToken_
#define DEFINE_FWK_MODULE(type)
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
double mass() const final
mass
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
PatJPsiProducer(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override