61 gROOT->SetStyle (
"Plain");
64 eventCont.
add(
new TH1F (
"Zmass",
"Candidate Z mass", 50, 20, 220) );
76 for (eventCont.
toBegin(); ! eventCont.
atEnd(); ++eventCont)
84 vector< pat::Muon >
const & muonVec = *muonHandle;
88 if (muonVec.begin() == muonVec.end())
98 const vector< pat::Muon >::const_iterator kEndIter = muonVec.end();
99 const vector< pat::Muon >::const_iterator kAlmostEndIter = kEndIter - 1;
100 for (vector< pat::Muon >::const_iterator outerIter = muonVec.begin();
101 kAlmostEndIter != outerIter;
104 for (vector< pat::Muon >::const_iterator innerIter = outerIter + 1;
105 kEndIter != innerIter;
109 if (outerIter->charge() * innerIter->charge() >= 0)
continue;
113 eventCont.
hist(
"Zmass")->Fill( (outerIter->p4() + innerIter->p4()).M() );
std::string & stringValue(std::string key)
void parseArguments(int argc, char **argv, bool allowArgs=false)
const EventContainer & toBegin() override
bool atEnd() const override
void add(TH1 *histPtr, const std::string &directory="")
bool getByLabel(const std::type_info &iInfo, const char *iModuleLabel, const char *iProductInstanceLabel, const char *iProcessLabel, void *oData) const override
TH1 * hist(const std::string &name)