65 std::vector<reco::GenParticle>
muons_;
108 phiMin_(
iConfig.getParameter<
double>(
"phiMin")),
109 phiMax_(
iConfig.getParameter<
double>(
"phiMax")),
110 minMassPair_(
iConfig.getParameter<
double>(
"minMassPair")),
111 maxMassPair_(
iConfig.getParameter<
double>(
"maxMassPair")),
112 muonInfo_(minMassPair_, maxMassPair_),
113 muonInfoFromZ_(minMassPair_, maxMassPair_) {
116 muonInfo_.setupTree(
"di_muon", fs);
117 muonInfoFromZ_.setupTree(
"di_muon_from_Z", fs);
131 for (
const auto& particle : *(genParticles.
product())) {
134 if (particle.p() <
pMin_)
136 if (particle.pt() <
ptMin_)
144 if (particle.mother()->pdgId() ==
zBosonPdg_) {
156 desc.
setComment(
"Extract information on 'Z -> mu mu' decays.");
157 desc.
add<
double>(
"pMin", 3.0);
158 desc.
add<
double>(
"ptMin", 15.0);
159 desc.
add<
double>(
"etaMin", -3.0);
160 desc.
add<
double>(
"etaMax", 3.0);
161 desc.
add<
double>(
"phiMin", -3.1416);
162 desc.
add<
double>(
"phiMax", 3.1416);
163 desc.
add<
double>(
"minMassPair", 85.8);
164 desc.
add<
double>(
"maxMassPair", 95.8);
165 descriptions.
add(
"zMuMuMassConstraintParameterFinder", desc);
174 tree_ = fs->
make<TTree>(name.c_str(), name.c_str());
175 tree_->Branch(
"muons", &muons_);
176 tree_->Branch(
"di_muon_mass", &diMuonMass_);
177 tree_->Branch(
"pdg_mother", &pdgMother_);
178 tree_->Branch(
"in_mass_window", &passed_);
182 if (muons_.size() == 2) {
183 diMuonMass_ = (muons_[0].p4() + muons_[1].p4()).M();
184 pdgMother_ = muons_[0].mother()->pdgId();
static const std::string kSharedResource
std::vector< GenParticle > GenParticleCollection
collection of GenParticles
const double maxMassPair_
std::vector< reco::GenParticle > & muons()
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
etaMax_(conf.getParameter< double >("etaMax"))
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
helper class containing information about a di-muon system
void setupTree(const std::string &, edm::Service< TFileService > &)
void setComment(std::string const &value)
ptMin_(conf.getParameter< double >("ptMin"))
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< reco::GenParticleCollection > genParticlesToken_
pMin_(conf.getParameter< double >("pMin"))
DiMuonInfo(double, double)
DiMuonInfo muonInfoFromZ_
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
const double maxMassPair_
T const * product() const
const double minMassPair_
std::vector< reco::GenParticle > muons_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
~ZMuMuMassConstraintParameterFinder() override
ZMuMuMassConstraintParameterFinder(const edm::ParameterSet &)
etaMin_(conf.getParameter< double >("etaMin"))
const double minMassPair_