28 int main (
int argc,
char* argv[])
66 gROOT->SetStyle (
"Plain");
69 eventCont.
add(
new TH1F(
"jetpt",
"Jet Pt", 100, 0, 200) );
70 eventCont.
add(
new TH1F(
"jetnum",
"Jet Size", 100, 0, 50) );
71 eventCont.
add(
new TH1F(
"metpt",
"MET Pt", 100, 0, 200) );
72 eventCont.
add(
new TH1F(
"photonpt",
"Photon Pt", 100, 0, 200) );
73 eventCont.
add(
new TH1F(
"trackpt",
"Track Pt", 100, 0, 200) );
74 eventCont.
add(
new TH1F(
"electronpt",
"Electron Pt", 100, 0, 200) );
75 eventCont.
add(
new TH1F(
"taupt",
"Tau Pt", 100, 0, 200) );
89 for (eventCont.
toBegin(); ! eventCont.
atEnd(); ++eventCont)
102 assert( h_met.isValid() );
106 assert( h_photon.isValid() );
110 assert( h_track.isValid() );
113 eventCont.
getByLabel (electronLabel, h_electron);
114 assert( h_electron.isValid() );
118 assert( h_tau.isValid() );
122 eventCont.
hist(
"jetnum")->Fill( h_jet->size() );
124 const vector< pat::Jet >::const_iterator kJetEnd = h_jet->end();
125 for (vector< pat::Jet >::const_iterator jetIter = h_jet->begin();
129 eventCont.
hist(
"jetpt")->Fill( jetIter->pt() );
132 const vector< pat::MET >::const_iterator kMetEnd = h_met->end();
133 for (vector< pat::MET >::const_iterator metIter = h_met->begin();
137 eventCont.
hist(
"metpt")->Fill( metIter->pt() );
140 const vector< pat::Photon >::const_iterator kPhotonEnd = h_photon->end();
141 for (vector< pat::Photon >::const_iterator photonIter = h_photon->begin();
142 photonIter != kPhotonEnd;
145 eventCont.
hist(
"photonpt")->Fill( photonIter->pt() );
148 const vector< reco::Track >::const_iterator kTrackEnd = h_track->end();
149 for (vector< reco::Track >::const_iterator trackIter = h_track->begin();
150 trackIter != kTrackEnd;
153 eventCont.
hist(
"trackpt")->Fill( trackIter->pt() );
156 const vector< pat::Electron >::const_iterator kElectronEnd = h_electron->end();
157 for (vector< pat::Electron >::const_iterator electronIter = h_electron->begin();
158 electronIter != kElectronEnd;
161 eventCont.
hist(
"electronpt")->Fill( electronIter->pt() );
164 const vector< pat::Tau >::const_iterator kTauEnd = h_tau->end();
165 for (vector< pat::Tau >::const_iterator tauIter = h_tau->begin();
169 eventCont.
hist (
"taupt")->Fill (tauIter->pt() );
std::string & stringValue(std::string key)
void parseArguments(int argc, char **argv, bool allowArgs=false)
int main(int argc, char **argv)
bool getByLabel(const std::type_info &iInfo, const char *iModuleLabel, const char *iProductInstanceLabel, const char *iProcessLabel, void *oData) const
void add(TH1 *histPtr, const std::string &directory="")
const EventContainer & toBegin()
TH1 * hist(const std::string &name)