Go to the source code of this file.
|
int | main (int argc, char *argv[]) |
|
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 24 of file playingWithJets.cc.
References fwlite::EventContainer::add(), assert(), fwlite::EventContainer::atEnd(), SiPixelRawToDigiRegional_cfi::deltaPhi, fwlite::EventContainer::getByLabel(), fwlite::EventContainer::hist(), edm::HandleBase::isValid(), optutl::CommandLineParser::parseArguments(), createfilelist::parser, optutl::VariableMapCont::stringValue(), and fwlite::EventContainer::toBegin().
40 parser.stringValue (
"outputFile") =
"jetInfo.root";
63 gROOT->SetStyle (
"Plain");
66 eventCont.add(
new TH1F(
"jetpt",
"Jet p_{T} using standard absolute p_{T} calibration", 100, 0, 60) );
67 eventCont.add(
new TH1F(
"jeteta",
"Jet eta using standard absolute p_{T} calibration", 100, 0, 10) );
68 eventCont.add(
new TH1F(
"reljetpt",
"Jet p_{T} using relative inter eta calibration", 100, 0, 60) );
69 eventCont.add(
new TH1F(
"reljeteta",
"Jet eta using relative inter eta calibration", 100, 0, 10) );
70 eventCont.add(
new TH1F(
"phijet1jet2",
"Phi between Jet 1 and Jet 2", 100, 0, 3.5) );
71 eventCont.add(
new TH1F(
"invarMass",
"Invariant Mass of the 4-vector sum of Two Jets", 100, 0, 200) );
82 for (eventCont.toBegin(); ! eventCont.atEnd(); ++eventCont)
90 eventCont.getByLabel (jetLabel, jetHandle);
93 const vector< pat::Jet >::const_iterator kJetEnd = jetHandle->end();
94 for (vector< pat::Jet >::const_iterator jetIter = jetHandle->begin();
102 eventCont.hist(
"reljetpt") ->Fill( jetIter->correctedJet(
"REL").pt() );
103 eventCont.hist(
"reljeteta")->Fill( jetIter->correctedJet(
"REL").eta() );
104 eventCont.hist(
"jetpt") ->Fill( jetIter->correctedJet(
"ABS").pt() );
106 eventCont.hist(
"jeteta") ->Fill( jetIter->eta() );
110 if (jetHandle->size() < 2)
117 eventCont.hist(
"invarMass")->Fill( (jetHandle->at(0).p4() + jetHandle->at(1).p4()).M() );
118 eventCont.hist(
"phijet1jet2")->Fill(
deltaPhi( jetHandle->at(0).phi(), jetHandle->at(1).phi() ) );