Producer for particle flow blocks. More...
#include <PFBlockProducer.h>
Public Member Functions | |
virtual void | beginJob () |
virtual void | beginRun (edm::Run &r, const edm::EventSetup &c) |
PFBlockProducer (const edm::ParameterSet &) | |
virtual void | produce (edm::Event &, const edm::EventSetup &) |
~PFBlockProducer () | |
Private Attributes | |
edm::InputTag | inputTagConvBremGsfRecTracks_ |
edm::InputTag | inputTagGsfRecTracks_ |
edm::InputTag | inputTagPFClustersECAL_ |
edm::InputTag | inputTagPFClustersHCAL_ |
edm::InputTag | inputTagPFClustersHFEM_ |
edm::InputTag | inputTagPFClustersHFHAD_ |
edm::InputTag | inputTagPFClustersPS_ |
edm::InputTag | inputTagPFConversions_ |
edm::InputTag | inputTagPFNuclear_ |
edm::InputTag | inputTagPFV0_ |
edm::InputTag | inputTagRecMuons_ |
edm::InputTag | inputTagRecTracks_ |
PFBlockAlgo | pfBlockAlgo_ |
Particle flow block algorithm. | |
bool | useConvBremGsfTracks_ |
switch on/off Conversions Brem Recovery | |
bool | useConversions_ |
switch on/off Conversions | |
bool | useNuclear_ |
use NuclearInteractions ? | |
bool | usePFatHLT_ |
Particle Flow at HLT ? | |
bool | useV0_ |
switch on/off V0 | |
bool | verbose_ |
verbose ? |
Producer for particle flow blocks.
This producer makes use of PFBlockAlgo, the particle flow block algorithm. Particle flow itself consists in reconstructing particles from the particle flow blocks This is done at a later stage, see PFProducer and PFAlgo.
Definition at line 34 of file PFBlockProducer.h.
PFBlockProducer::PFBlockProducer | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 34 of file PFBlockProducer.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), ExpressReco_HICollisions_FallBack::nuclearInteractionsPurity, ExpressReco_HICollisions_FallBack::useConvBremPFRecTracks, and ExpressReco_HICollisions_FallBack::useIterTracking.
{ // use configuration file to setup input/output collection names inputTagRecTracks_ = iConfig.getParameter<InputTag>("RecTracks"); inputTagGsfRecTracks_ = iConfig.getParameter<InputTag>("GsfRecTracks"); inputTagConvBremGsfRecTracks_ = iConfig.getParameter<InputTag>("ConvBremGsfRecTracks"); inputTagRecMuons_ = iConfig.getParameter<InputTag>("RecMuons"); inputTagPFNuclear_ = iConfig.getParameter<InputTag>("PFNuclear"); inputTagPFConversions_ = iConfig.getParameter<InputTag>("PFConversions"); inputTagPFV0_ = iConfig.getParameter<InputTag>("PFV0"); inputTagPFClustersECAL_ = iConfig.getParameter<InputTag>("PFClustersECAL"); inputTagPFClustersHCAL_ = iConfig.getParameter<InputTag>("PFClustersHCAL"); inputTagPFClustersHFEM_ = iConfig.getParameter<InputTag>("PFClustersHFEM"); inputTagPFClustersHFHAD_ = iConfig.getParameter<InputTag>("PFClustersHFHAD"); inputTagPFClustersPS_ = iConfig.getParameter<InputTag>("PFClustersPS"); verbose_ = iConfig.getUntrackedParameter<bool>("verbose",false); bool debug_ = iConfig.getUntrackedParameter<bool>("debug",false); usePFatHLT_ = iConfig.getParameter<bool>("usePFatHLT"); useNuclear_ = iConfig.getParameter<bool>("useNuclear"); useConversions_ = iConfig.getParameter<bool>("useConversions"); useConvBremGsfTracks_ = iConfig.getParameter<bool>("useConvBremGsfTracks"); bool useConvBremPFRecTracks = iConfig.getParameter<bool>("useConvBremPFRecTracks"); useV0_ = iConfig.getParameter<bool>("useV0"); produces<reco::PFBlockCollection>(); // particle flow parameters ----------------------------------- std::vector<double> DPtovPtCut = iConfig.getParameter<std::vector<double> >("pf_DPtoverPt_Cut"); std::vector<unsigned> NHitCut = iConfig.getParameter<std::vector<unsigned> >("pf_NHit_Cut"); bool useIterTracking = iConfig.getParameter<bool>("useIterTracking"); int nuclearInteractionsPurity = iConfig.getParameter<unsigned>("nuclearInteractionsPurity"); if (useNuclear_){ if (nuclearInteractionsPurity > 3 || nuclearInteractionsPurity < 1) { nuclearInteractionsPurity = 1; edm::LogInfo("PFBlockProducer") << "NI purity not properly implemented. Set it to the strongest level " << nuclearInteractionsPurity << endl; } vector<string> securityLevel; securityLevel.push_back("isNucl"); securityLevel.push_back("isNucl && isNuclLoose"); securityLevel.push_back("isNucl && isNuclLoose && isNuclKink"); edm::LogInfo("PFBlockProducer") << "NI interactions are corrected in PFlow for " << securityLevel[nuclearInteractionsPurity-1].c_str() << endl; } pfBlockAlgo_.setParameters( DPtovPtCut, NHitCut, useConvBremPFRecTracks, useIterTracking, nuclearInteractionsPurity); pfBlockAlgo_.setDebug(debug_); }
PFBlockProducer::~PFBlockProducer | ( | ) |
Definition at line 135 of file PFBlockProducer.cc.
{ }
void PFBlockProducer::beginJob | ( | void | ) | [virtual] |
void PFBlockProducer::beginRun | ( | edm::Run & | r, |
const edm::EventSetup & | c | ||
) | [virtual] |
void PFBlockProducer::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 148 of file PFBlockProducer.cc.
References edm::EventID::event(), newFWLiteAna::found, edm::Event::getByLabel(), edm::EventBase::id(), LogDebug, pfConversions_cfi::pfConversions, pfV0_cfi::pfV0, edm::Event::put(), and edm::EventID::run().
{ LogDebug("PFBlockProducer")<<"START event: "<<iEvent.id().event() <<" in run "<<iEvent.id().run()<<endl; // get rectracks Handle< reco::PFRecTrackCollection > recTracks; // LogDebug("PFBlockProducer")<<"get reco tracks"<<endl; bool found = iEvent.getByLabel(inputTagRecTracks_, recTracks); if(!found ) LogError("PFBlockProducer")<<" cannot get rectracks: " <<inputTagRecTracks_<<endl; // get GsfTracks Handle< reco::GsfPFRecTrackCollection > GsfrecTracks; if(!usePFatHLT_) { found = iEvent.getByLabel(inputTagGsfRecTracks_,GsfrecTracks); if(!found ) LogError("PFBlockProducer")<<" cannot get Gsfrectracks: " << inputTagGsfRecTracks_ <<endl; } // get ConvBremGsfTracks Handle< reco::GsfPFRecTrackCollection > convBremGsfrecTracks; if(useConvBremGsfTracks_) { found = iEvent.getByLabel(inputTagConvBremGsfRecTracks_,convBremGsfrecTracks); if(!found ) LogError("PFBlockProducer")<<" cannot get ConvBremGsfrectracks: " << inputTagConvBremGsfRecTracks_ <<endl; } // get recmuons Handle< reco::MuonCollection > recMuons; // LogDebug("PFBlockProducer")<<"get reco muons"<<endl; if(!usePFatHLT_) { found = iEvent.getByLabel(inputTagRecMuons_, recMuons); //if(!found ) // LogError("PFBlockProducer")<<" cannot get recmuons: " // <<inputTagRecMuons_<<endl; // get PFNuclearInteractions } //---------- Gouzevitch // Handle< reco::PFNuclearInteractionCollection > pfNuclears; Handle< reco::PFDisplacedTrackerVertexCollection > pfNuclears; if( useNuclear_ ) { found = iEvent.getByLabel(inputTagPFNuclear_, pfNuclears); if(!found ) LogError("PFBlockProducer")<<" cannot get PFNuclearInteractions : " <<inputTagPFNuclear_<<endl; } // get conversions Handle< reco::PFConversionCollection > pfConversions; if( useConversions_ ) { found = iEvent.getByLabel(inputTagPFConversions_, pfConversions); if(!found ) LogError("PFBlockProducer")<<" cannot get PFConversions : " <<inputTagPFConversions_<<endl; } // get V0s Handle< reco::PFV0Collection > pfV0; if( useV0_ ) { found = iEvent.getByLabel(inputTagPFV0_, pfV0); if(!found ) LogError("PFBlockProducer")<<" cannot get PFV0 : " <<inputTagPFV0_<<endl; } // get ECAL, HCAL and PS clusters Handle< reco::PFClusterCollection > clustersECAL; found = iEvent.getByLabel(inputTagPFClustersECAL_, clustersECAL); if(!found ) LogError("PFBlockProducer")<<" cannot get ECAL clusters: " <<inputTagPFClustersECAL_<<endl; Handle< reco::PFClusterCollection > clustersHCAL; found = iEvent.getByLabel(inputTagPFClustersHCAL_, clustersHCAL); if(!found ) LogError("PFBlockProducer")<<" cannot get HCAL clusters: " <<inputTagPFClustersHCAL_<<endl; Handle< reco::PFClusterCollection > clustersHFEM; found = iEvent.getByLabel(inputTagPFClustersHFEM_, clustersHFEM); if(!found ) LogError("PFBlockProducer")<<" cannot get HFEM clusters: " <<inputTagPFClustersHFEM_<<endl; Handle< reco::PFClusterCollection > clustersHFHAD; found = iEvent.getByLabel(inputTagPFClustersHFHAD_, clustersHFHAD); if(!found ) LogError("PFBlockProducer")<<" cannot get HFHAD clusters: " <<inputTagPFClustersHFHAD_<<endl; Handle< reco::PFClusterCollection > clustersPS; found = iEvent.getByLabel(inputTagPFClustersPS_, clustersPS); if(!found ) LogError("PFBlockProducer")<<" cannot get PS clusters: " <<inputTagPFClustersPS_<<endl; Handle< reco::PFRecTrackCollection > nuclearRecTracks; if( usePFatHLT_ ) { pfBlockAlgo_.setInput( recTracks, clustersECAL, clustersHCAL, clustersHFEM, clustersHFHAD, clustersPS ); } else { pfBlockAlgo_.setInput( recTracks, GsfrecTracks, convBremGsfrecTracks, recMuons, pfNuclears, nuclearRecTracks, pfConversions, pfV0, clustersECAL, clustersHCAL, clustersHFEM, clustersHFHAD, clustersPS ); } pfBlockAlgo_.findBlocks(); if(verbose_) { ostringstream str; str<<pfBlockAlgo_<<endl; LogInfo("PFBlockProducer") << str.str()<<endl; } auto_ptr< reco::PFBlockCollection > pOutputBlockCollection( pfBlockAlgo_.transferBlocks() ); iEvent.put(pOutputBlockCollection); LogDebug("PFBlockProducer")<<"STOP event: "<<iEvent.id().event() <<" in run "<<iEvent.id().run()<<endl; }
Definition at line 53 of file PFBlockProducer.h.
Definition at line 52 of file PFBlockProducer.h.
Definition at line 56 of file PFBlockProducer.h.
Definition at line 57 of file PFBlockProducer.h.
Definition at line 58 of file PFBlockProducer.h.
Definition at line 59 of file PFBlockProducer.h.
Definition at line 60 of file PFBlockProducer.h.
Definition at line 61 of file PFBlockProducer.h.
Definition at line 55 of file PFBlockProducer.h.
edm::InputTag PFBlockProducer::inputTagPFV0_ [private] |
Definition at line 62 of file PFBlockProducer.h.
Definition at line 54 of file PFBlockProducer.h.
Definition at line 51 of file PFBlockProducer.h.
PFBlockAlgo PFBlockProducer::pfBlockAlgo_ [private] |
Particle flow block algorithm.
Definition at line 86 of file PFBlockProducer.h.
bool PFBlockProducer::useConvBremGsfTracks_ [private] |
switch on/off Conversions Brem Recovery
Definition at line 77 of file PFBlockProducer.h.
bool PFBlockProducer::useConversions_ [private] |
switch on/off Conversions
Definition at line 74 of file PFBlockProducer.h.
bool PFBlockProducer::useNuclear_ [private] |
use NuclearInteractions ?
Definition at line 70 of file PFBlockProducer.h.
bool PFBlockProducer::usePFatHLT_ [private] |
Particle Flow at HLT ?
Definition at line 83 of file PFBlockProducer.h.
bool PFBlockProducer::useV0_ [private] |
switch on/off V0
Definition at line 80 of file PFBlockProducer.h.
bool PFBlockProducer::verbose_ [private] |
verbose ?
Definition at line 67 of file PFBlockProducer.h.