46 using namespace trigger;
47 using namespace l1extra;
64 vector<string> validTriggers,
67 :
HLTMuonMatchAndPlot(pset, triggerName, moduleNames, inputSelection, customName, validTriggers, currentRun, currentEventSetup)
78 LogTrace (
"HLTMuonVal") <<
"\n\n Inside HLTTopPlotter Constructor";
79 LogTrace (
"HLTMuonVal") <<
"The trigger name is " << triggerName
80 <<
"and we've done all the other intitializations";
82 LogTrace (
"HLTMuonVal") <<
"exiting constructor\n\n";
103 LogTrace (
"HLTMuonVal") <<
"Inside of TopPlotter analyze method!"
104 <<
"calling my match and plot module's analyze..."
113 LogTrace (
"HLTMuonVal") <<
"Do top-specific selection" << endl;
118 iEvent.
getByLabel(CaloJetInputTag, jetsHandle);
124 LogTrace (
"HLTMuonVal") <<
"Looking in jet collection" << endl;
129 CaloJetCollection::const_iterator
jet;
136 for (jet = jets->begin(); jet != jets->end(); jet++){
138 if (fabs(jet->eta()) <EtaCut_ && jet->et() > PtCut_) {
140 selectedJets.push_back((*jet));
150 sortJets(selectedJets);
154 LogTrace (
"HLTMuonVal") <<
"Number of jets in this event = "
159 if (n_jets_20 < NJets_ ) {
160 LogTrace (
"HLTMuonVal") <<
"Not enought jets in this event, skipping it"
176 LogTrace(
"HLTMuonVal") <<
"Calling analyze for muon ana" << endl;
180 LogTrace (
"HLTMuonVal") <<
"TOPPLOT: returned from muon ana, now in top module"
182 <<
"muon ana stored size rec muons = "
186 vector<HLTMuonMatchAndPlot::MatchStruct>::const_iterator iRecMuon;
189 for (
unsigned int i = 0;
190 i < recMatches.size();
194 LogTrace (
"HLTMuonVal") <<
"Cand " << numCands
196 << recMatches[
i].recCand->pt()
198 << recMatches[
i].recCand->eta()
200 << recMatches[
i].recCand->phi()
204 double deltaRLeadJetLep =
reco::deltaR (recMatches[
i].recCand->eta(), recMatches[
i].recCand->phi(),
205 selectedJets[0].eta(), selectedJets[0].phi());
213 hDeltaRMaxJetLep[0]->Fill(deltaRLeadJetLep);
214 hJetMultip[0]->Fill(n_jets_20);
224 if ( (recMatches[
i].l1Cand.pt() > 0) && ((useFullDebugInformation) || (isL1Path)) ) {
225 hDeltaRMaxJetLep[1]->Fill(deltaRLeadJetLep);
226 hJetMultip[1]->Fill(n_jets_20);
235 for (
size_t j = 0;
j < recMatches[
i].hltCands.size();
j++ ) {
236 if ( recMatches[
i].hltCands[
j].
pt() > 0 ) {
238 hDeltaRMaxJetLep[
j+HLT_PLOT_OFFSET]->Fill(deltaRLeadJetLep);
239 hJetMultip[
j+HLT_PLOT_OFFSET]->Fill(n_jets_20);
250 LogTrace (
"HLTMuonVal") <<
"-----End of top plotter analyze method-----" << endl;
259 TString myLabel, newFolder;
262 LogTrace (
"HLTMuonVal") <<
"Inside begin for top analyzer" << endl;
265 LogTrace (
"HLTMuonVal") <<
"Calling begin for muon analyzer" << endl;
268 LogTrace (
"HLTMuonVal") <<
"Continuing with top analyzer begin" << endl;
277 myLabel = theL1CollectionLabel;
278 myLabel = myLabel(myLabel.Index(
"L1"),myLabel.Length());
279 myLabel = myLabel(0,myLabel.Index(
"Filtered")+8);
284 newFolder =
"HLT/Muon/Distributions/" + theTriggerName +
"/" + mySelection.customLabel;
290 vector<string> binLabels;
291 binLabels.push_back( theL1CollectionLabel.c_str() );
292 for (
size_t i = 0;
i < theHltCollectionLabels.size();
i++ )
293 binLabels.push_back( theHltCollectionLabels[
i].c_str() );
299 myLabel = theL1CollectionLabel;
300 myLabel = myLabel(myLabel.Index(
"L1"),myLabel.Length());
301 myLabel = myLabel(0,myLabel.Index(
"Filtered")+8);
303 myLabel =
"L1Filtered";
315 hDeltaRMaxJetLep.push_back (bookIt(
"topDeltaRMaxJetLep_All",
"delta R between muon and highest pt jet", theDRParameters));
316 if (useFullDebugInformation || isL1Path) hDeltaRMaxJetLep.push_back (bookIt(
"topDeltaRMaxJetLep_" + myLabel,
"delta R between muon and highest pt jet", theDRParameters));
318 hJetMultip.push_back (bookIt(
"topJetMultip_All",
"Jet multiplicity", theJetMParameters));
319 if (useFullDebugInformation || isL1Path) hJetMultip.push_back(bookIt(
"topJetMultip_" + myLabel,
"Jet multiplicity", theJetMParameters));
331 for (
unsigned int i = 0;
i < theHltCollectionLabels.size();
i++ ) {
334 myLabel = theHltCollectionLabels[
i];
335 TString
level = ( myLabel.Contains(
"L2") ) ?
"L2" :
"L3";
336 myLabel = myLabel(myLabel.Index(level),myLabel.Length());
337 myLabel = myLabel(0,myLabel.Index(
"Filtered")+8);
339 TString tempString = theHltCollectionLabels[
i];
340 TString
level = ( tempString.Contains(
"L2") ) ?
"L2" :
"L3";
341 myLabel = level +
"Filtered";
346 hDeltaRMaxJetLep.push_back (bookIt(
"topDeltaRMaxJetLep_" + myLabel,
"delta R between muon and highest pt jet", theDRParameters)) ;
347 hJetMultip.push_back (bookIt(
"topJetMultip_" + myLabel,
"Jet Multiplicity", theJetMParameters)) ;
373 LogTrace (
"HLTMuonVal") <<
"Sorting Jets" << endl;
377 for (
unsigned int iJet = 0;
378 iJet < theJets.size();
381 for (
unsigned int jJet = iJet;
382 jJet < theJets.size();
385 if ( theJets[jJet].
et() > theJets[iJet].et() ) {
387 theJets[iJet] = theJets[jJet];
388 theJets[jJet] = tmpJet;
395 for (
unsigned int iJet = 0;
396 iJet != theJets.size();
399 LogTrace (
"HLTMuonVal") <<
"Jet # " << iJet
400 <<
" Et = " << theJets[iJet].et()
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
Jets made from CaloTowers.
void cd(void)
go to top directory (ie. root)
void sortJets(reco::CaloJetCollection &theJets)
std::vector< Muon > MuonCollection
collection of Muon objects
double deltaR(double eta1, double phi1, double eta2, double phi2)
HLTTopPlotter(const edm::ParameterSet &pset, std::string triggerName, std::vector< std::string > moduleNames, MuonSelectionStruct inputSelection, std::string customName, std::vector< std::string > validTriggers, const edm::Run ¤tRun, const edm::EventSetup ¤tEventSetup)
Constructor.
void analyze(const edm::Event &iEvent)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual void analyze(const edm::Event &iEvent)
T const * product() const
std::vector< AlignmentParameters * > Parameters
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
void setCurrentFolder(const std::string &fullpath)
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects