diff --git a/[refs] b/[refs] index b221d2c30885a..c2918f5793384 100644 --- a/[refs] +++ b/[refs] @@ -1,3 +1,3 @@ --- refs/heads/gh-pages: 90c10214674639ca7a94515baf184b0cc75e1b69 -refs/heads/CMSSW_4_1_X: 766b7ef7741fbfe4984e9c97778f66c3b40a829e +refs/heads/CMSSW_4_1_X: 0c9d6111d28bedcaca7da53bdc2d590f4d6bccdc diff --git a/trunk/HLTrigger/HLTexample/src/HLTProdCand.cc b/trunk/HLTrigger/HLTexample/src/HLTProdCand.cc index e1b7b65777633..12e5eec529e67 100644 --- a/trunk/HLTrigger/HLTexample/src/HLTProdCand.cc +++ b/trunk/HLTrigger/HLTexample/src/HLTProdCand.cc @@ -16,26 +16,26 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" -#include "DataFormats/EgammaCandidates/interface/Photon.h" -#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" #include "DataFormats/EgammaCandidates/interface/Electron.h" #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h" -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" - +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" +#include "DataFormats/JetReco/interface/CaloJet.h" #include "DataFormats/JetReco/interface/CaloJetCollection.h" +#include "DataFormats/Candidate/interface/CompositeCandidate.h" +#include "DataFormats/Candidate/interface/CompositeCandidateFwd.h" #include "DataFormats/METReco/interface/CaloMET.h" -#include "DataFormats/METReco/interface/CaloMETCollection.h" +#include "DataFormats/METReco/interface/CaloMETFwd.h" +#include "DataFormats/METReco/interface/MET.h" +#include "DataFormats/METReco/interface/METFwd.h" +#include "DataFormats/JetReco/interface/GenJet.h" #include "DataFormats/JetReco/interface/GenJetCollection.h" #include "DataFormats/METReco/interface/GenMET.h" #include "DataFormats/METReco/interface/GenMETCollection.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" - #include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -54,14 +54,16 @@ HLTProdCand::HLTProdCand(const edm::ParameterSet& iConfig) : //register your products - produces(); - produces(); - produces(); + produces("photons"); + produces("electrons"); + produces("muons"); produces("taus"); produces("jets"); - produces(); - produces(); - produces(); + produces("mets"); + produces("hts"); + + produces("tracks"); + produces("clusters"); } @@ -82,12 +84,13 @@ HLTProdCand::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) using namespace reco; // produce collections of photons, electrons, muons, taus, jets, MET - auto_ptr phot (new PhotonCollection); + auto_ptr phot (new RecoEcalCandidateCollection); auto_ptr elec (new ElectronCollection); - auto_ptr muon (new MuonCollection); + auto_ptr muon (new RecoChargedCandidateCollection); auto_ptr taus (new CaloJetCollection); // stored as jets auto_ptr jets (new CaloJetCollection); auto_ptr mets (new CaloMETCollection); + auto_ptr hts (new METCollection); // as well as charged tracks and elmg. superclusters auto_ptr trck (new RecoChargedCandidateCollection); @@ -155,7 +158,7 @@ HLTProdCand::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) ecal->push_back(RecoEcalCandidate(-ipdg/abs(ipdg),p4)); } else if (abs(ipdg)==13) { // mu+ mu- - muon->push_back(Muon(-ipdg/abs(ipdg),p4)); + muon->push_back(RecoChargedCandidate(-ipdg/abs(ipdg),p4)); } else if (abs(ipdg)==15 || abs(ipdg)==17) { // tau+ tau- or 4th generation tau'+ tau'- CaloJet::Specific specific; @@ -163,7 +166,7 @@ HLTProdCand::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) taus->push_back(CaloJet(p4,specific,jetconst)); } else if (abs(ipdg)==22) { // photon - // phot->push_back( Photon(0,p4,math::XYZPoint(0,0,0),SuperClusterRef(), ClusterShapeRef()) ); + phot->push_back(RecoEcalCandidate(0,p4)); ecal->push_back(RecoEcalCandidate(0,p4)); } else if (abs(ipdg)==12 || abs(ipdg)==14 || abs(ipdg)==16 || abs(ipdg)==18) { // neutrinos (e mu tau 4th generation) @@ -185,27 +188,29 @@ HLTProdCand::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) } } - LogDebug("") << "Number of g/e/m/t/j/M/SC/TR objects reconstructed:" + LogDebug("") << "Number of g/e/m/t/j/M/H/TR/SC objects reconstructed:" << " " << phot->size() << " " << elec->size() << " " << muon->size() << " " << taus->size() << " " << jets->size() << " " << mets->size() - << " " << ecal->size() + << " " << hts->size() << " " << trck->size() + << " " << ecal->size() ; // put them into the event - iEvent.put(phot); - iEvent.put(elec); - iEvent.put(muon); + iEvent.put(phot,"photons"); + iEvent.put(elec,"electrons"); + iEvent.put(muon,"muons"); iEvent.put(taus,"taus"); iEvent.put(jets,"jets"); - iEvent.put(mets); - iEvent.put(ecal); - iEvent.put(trck); + iEvent.put(mets,"mets"); + iEvent.put(hts,"hts"); + iEvent.put(trck,"tracks"); + iEvent.put(ecal,"clusters"); return; } diff --git a/trunk/HLTrigger/HLTfilters/interface/HLTFiltCand.h b/trunk/HLTrigger/HLTfilters/interface/HLTFiltCand.h index 700abbc6611c7..a8e2fc24ac50e 100644 --- a/trunk/HLTrigger/HLTfilters/interface/HLTFiltCand.h +++ b/trunk/HLTrigger/HLTfilters/interface/HLTFiltCand.h @@ -8,8 +8,8 @@ * HLT trigger acting on candidates, requiring a g/e/m/j tuple above * pt cuts * - * $Date: 2006/10/04 16:02:42 $ - * $Revision: 1.16 $ + * $Date: 2007/03/26 11:31:42 $ + * $Revision: 1.1 $ * * \author Martin Grunewald * @@ -35,6 +35,7 @@ class HLTFiltCand : public HLTFilter { edm::InputTag tausTag_; // input tag identifying product containing taus edm::InputTag jetsTag_; // input tag identifying product containing jets edm::InputTag metsTag_; // input tag identifying product containing METs + edm::InputTag httsTag_; // input tag identifying product containing HTs edm::InputTag trckTag_; // input tag identifying product containing Tracks edm::InputTag ecalTag_; // input tag identifying product containing SuperClusters diff --git a/trunk/HLTrigger/HLTfilters/src/HLTFiltCand.cc b/trunk/HLTrigger/HLTfilters/src/HLTFiltCand.cc index 17e3cf3b95255..b1ee27954557d 100644 --- a/trunk/HLTrigger/HLTfilters/src/HLTFiltCand.cc +++ b/trunk/HLTrigger/HLTfilters/src/HLTFiltCand.cc @@ -2,8 +2,8 @@ * * See header file for documentation * - * $Date: 2007/09/20 19:58:39 $ - * $Revision: 1.5 $ + * $Date: 2007/09/24 18:20:12 $ + * $Revision: 1.6 $ * * \author Martin Grunewald * @@ -13,21 +13,25 @@ #include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" #include "DataFormats/EgammaCandidates/interface/Electron.h" #include "DataFormats/EgammaCandidates/interface/ElectronFwd.h" -#include "DataFormats/EgammaCandidates/interface/Photon.h" -#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h" -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" +#include "DataFormats/JetReco/interface/CaloJet.h" #include "DataFormats/JetReco/interface/CaloJetCollection.h" +#include "DataFormats/Candidate/interface/CompositeCandidate.h" +#include "DataFormats/Candidate/interface/CompositeCandidateFwd.h" #include "DataFormats/METReco/interface/CaloMET.h" -#include "DataFormats/METReco/interface/CaloMETCollection.h" -#include "DataFormats/METReco/interface/GenMET.h" +#include "DataFormats/METReco/interface/CaloMETFwd.h" +#include "DataFormats/METReco/interface/MET.h" +#include "DataFormats/METReco/interface/METFwd.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" +#include "DataFormats/JetReco/interface/GenJet.h" +#include "DataFormats/JetReco/interface/GenJetCollection.h" +#include "DataFormats/METReco/interface/GenMET.h" +#include "DataFormats/METReco/interface/GenMETCollection.h" #include "DataFormats/Common/interface/RefToBase.h" #include "DataFormats/HLTReco/interface/HLTFilterObject.h" @@ -45,6 +49,7 @@ HLTFiltCand::HLTFiltCand(const edm::ParameterSet& iConfig) : tausTag_ (iConfig.getParameter("tausTag")), jetsTag_ (iConfig.getParameter("jetsTag")), metsTag_ (iConfig.getParameter("metsTag")), + httsTag_ (iConfig.getParameter("httsTag")), trckTag_ (iConfig.getParameter("trckTag")), ecalTag_ (iConfig.getParameter("ecalTag")), @@ -57,6 +62,7 @@ HLTFiltCand::HLTFiltCand(const edm::ParameterSet& iConfig) : << " t: " << tausTag_.encode() << " j: " << jetsTag_.encode() << " M: " << metsTag_.encode() + << " H: " << httsTag_.encode() <<" TR: " << trckTag_.encode() <<" SC: " << ecalTag_.encode() ; @@ -96,12 +102,13 @@ HLTFiltCand::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) // get hold of products from Event - Handle photons; + Handle photons; Handle electrons; - Handle muons; + Handle muons; Handle taus; Handle jets; Handle mets; + Handle htts; Handle trcks; Handle ecals; @@ -111,21 +118,22 @@ HLTFiltCand::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) iEvent.getByLabel(tausTag_,taus ); iEvent.getByLabel(jetsTag_,jets ); iEvent.getByLabel(metsTag_,mets ); + iEvent.getByLabel(httsTag_,htts ); iEvent.getByLabel(trckTag_,trcks ); iEvent.getByLabel(ecalTag_,ecals ); - // look for at least one g,e,m,t,j,M,TR,SC above its pt cut + // look for at least one g,e,m,t,j,M,H,TR,SC above its pt cut // photons int nphot(0); - PhotonCollection::const_iterator aphot(photons->begin()); - PhotonCollection::const_iterator ophot(photons->end()); - PhotonCollection::const_iterator iphot; + RecoEcalCandidateCollection::const_iterator aphot(photons->begin()); + RecoEcalCandidateCollection::const_iterator ophot(photons->end()); + RecoEcalCandidateCollection::const_iterator iphot; for (iphot=aphot; iphot!=ophot; iphot++) { if (iphot->pt() >= min_Pt_) { nphot++; - ref=RefToBase(PhotonRef(photons,distance(aphot,iphot))); + ref=RefToBase(RecoEcalCandidateRef(photons,distance(aphot,iphot))); filterobject->putParticle(ref); } } @@ -145,13 +153,13 @@ HLTFiltCand::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) // muon int nmuon(0); - MuonCollection::const_iterator amuon(muons->begin()); - MuonCollection::const_iterator omuon(muons->end()); - MuonCollection::const_iterator imuon; + RecoChargedCandidateCollection::const_iterator amuon(muons->begin()); + RecoChargedCandidateCollection::const_iterator omuon(muons->end()); + RecoChargedCandidateCollection::const_iterator imuon; for (imuon=amuon; imuon!=omuon; imuon++) { if (imuon->pt() >= min_Pt_) { nmuon++; - ref=RefToBase(MuonRef(muons,distance(amuon,imuon))); + ref=RefToBase(RecoChargedCandidateRef(muons,distance(amuon,imuon))); filterobject->putParticle(ref); } } @@ -195,6 +203,19 @@ HLTFiltCand::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) } } + // htts + int nhtts(0); + METCollection::const_iterator ahtts(htts->begin()); + METCollection::const_iterator ohtts(htts->end()); + METCollection::const_iterator ihtts; + for (ihtts=ahtts; ihtts!=ohtts; ihtts++) { + if (ihtts->pt() >= min_Pt_) { + nhtts++; + ref=RefToBase(METRef(htts,distance(ahtts,ihtts))); + filterobject->putParticle(ref); + } + } + // trcks int ntrck(0); RecoChargedCandidateCollection::const_iterator atrcks(trcks->begin()); @@ -223,20 +244,21 @@ HLTFiltCand::filter(edm::Event& iEvent, const edm::EventSetup& iSetup) // final filter decision: const bool accept ( (nphot>0) && (nelec>0) && (nmuon>0) && (ntaus>0) && - (njets>0) && (nmets>0) && (ntrck>0) && (necal>0) ); + (njets>0) && (nmets>0) && (nhtts>=0) && (ntrck>0) && (necal>0) ); // All filters: put filter object into the Event iEvent.put(filterobject); - LogDebug("") << "Number of g/e/m/t/j/M/SC/TR objects accepted:" + LogDebug("") << "Number of g/e/m/t/j/M/H/TR/SC objects accepted:" << " " << nphot << " " << nelec << " " << nmuon << " " << ntaus << " " << njets << " " << nmets - << " " << necal + << " " << nhtts << " " << ntrck + << " " << necal ; // return with final filter decision diff --git a/trunk/HLTrigger/HLTfilters/src/SealModule.cc b/trunk/HLTrigger/HLTfilters/src/SealModule.cc index b373c3974e716..0969524664ead 100644 --- a/trunk/HLTrigger/HLTfilters/src/SealModule.cc +++ b/trunk/HLTrigger/HLTfilters/src/SealModule.cc @@ -6,25 +6,29 @@ #include "HLTrigger/HLTfilters/interface/HLTHighLevel.h" #include "HLTrigger/HLTfilters/interface/HLTDoublet.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidateFwd.h" #include "DataFormats/EgammaCandidates/interface/Electron.h" -#include "DataFormats/EgammaCandidates/interface/Photon.h" -#include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "DataFormats/EgammaCandidates/interface/ElectronFwd.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" +#include "DataFormats/RecoCandidate/interface/RecoChargedCandidateFwd.h" +#include "DataFormats/JetReco/interface/CaloJet.h" #include "DataFormats/JetReco/interface/CaloJetCollection.h" +#include "DataFormats/Candidate/interface/CompositeCandidate.h" +#include "DataFormats/Candidate/interface/CompositeCandidateFwd.h" #include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/METReco/interface/CaloMETFwd.h" #include "DataFormats/METReco/interface/MET.h" -#include "DataFormats/RecoCandidate/interface/RecoChargedCandidate.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" - +#include "DataFormats/METReco/interface/METFwd.h" #include "HLTrigger/HLTfilters/interface/HLTSinglet.h" #include "HLTrigger/HLTfilters/src/HLTSinglet.cc" // template HLTSinglet ; +typedef HLTSinglet HLT1Photon ; typedef HLTSinglet HLT1Electron ; -typedef HLTSinglet HLT1Photon ; -typedef HLTSinglet HLT1Muon ; +typedef HLTSinglet HLT1Muon ; typedef HLTSinglet HLT1Tau ; // taus are stored as jets typedef HLTSinglet HLT1CaloJet ; typedef HLTSinglet HLT1CaloMET ; @@ -38,9 +42,9 @@ typedef HLTSinglet HLT1SuperCluster; // template HLTSmartSinglet ; +typedef HLTSmartSinglet HLT1SmartPhoton ; typedef HLTSmartSinglet HLT1SmartElectron ; -typedef HLTSmartSinglet HLT1SmartPhoton ; -typedef HLTSmartSinglet HLT1SmartMuon ; +typedef HLTSmartSinglet HLT1SmartMuon ; typedef HLTSmartSinglet HLT1SmartTau ; // taus are stored as jets typedef HLTSmartSinglet HLT1SmartCaloJet ; typedef HLTSmartSinglet HLT1SmartCaloMET ;