43 inputPFlowLabel_tok_ = consumes<reco::PFCandidateCollection> (iConfig.
getParameter<
std::string>(
"InputPFlowLabel") );
46 if (outputFile_.size() > 0)
47 edm::LogInfo(
"OutputInfo") <<
" ParticleFLow Task histograms will be saved to '" << outputFile_.c_str() <<
"'";
48 else edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task histograms will NOT be saved";
65 me[
"CandidateEt"] =
dbe_->
book1D(
"CandidateEt",
"CandidateEt",1000,0,1000);
66 me[
"CandidateEta"] =
dbe_->
book1D(
"CandidateEta",
"CandidateEta",200,-5,5);
68 me[
"CandidateCharge"] =
dbe_->
book1D(
"CandidateCharge",
"CandidateCharge",5,-2,2);
69 me[
"PFCandidateType"] =
dbe_->
book1D(
"PFCandidateType",
"PFCandidateType",10,0,10);
73 me[
"NumElements"] =
dbe_->
book1D(
"NumElements",
"NumElements",25,0,25);
74 me[
"NumTrackElements"] =
dbe_->
book1D(
"NumTrackElements",
"NumTrackElements",5,0,5);
75 me[
"NumPS1Elements"] =
dbe_->
book1D(
"NumPS1Elements",
"NumPS1Elements",5,0,5);
76 me[
"NumPS2Elements"] =
dbe_->
book1D(
"NumPS2Elements",
"NumPS2Elements",5,0,5);
77 me[
"NumECALElements"] =
dbe_->
book1D(
"NumECALElements",
"NumECALElements",5,0,5);
78 me[
"NumHCALElements"] =
dbe_->
book1D(
"NumHCALElements",
"NumHCALElements",5,0,5);
79 me[
"NumMuonElements"] =
dbe_->
book1D(
"NumMuonElements",
"NumMuonElements",5,0,5);
83 me[
"TrackCharge"] =
dbe_->
book1D(
"TrackCharge",
"TrackCharge",5,-2,2);
84 me[
"TrackNumPoints"] =
dbe_->
book1D(
"TrackNumPoints",
"TrackNumPoints",100,0,100);
85 me[
"TrackNumMeasurements"] =
dbe_->
book1D(
"TrackNumMeasurements",
"TrackNumMeasurements",100,0,100);
86 me[
"TrackImpactParameter"] =
dbe_->
book1D(
"TrackImpactParameter",
"TrackImpactParameter",1000,0,1);
110 iEvent.
getByToken(inputPFlowLabel_tok_, pflow_hnd);
111 pflow_candidates = pflow_hnd.
product();
115 if (!pflow_candidates) {
117 edm::LogInfo(
"OutputInfo") <<
" failed to retrieve data required by ParticleFlow Task";
118 edm::LogInfo(
"OutputInfo") <<
" ParticleFlow Task cannot continue...!";
128 PFCandidateCollection::const_iterator pf;
129 for (pf = pflow_candidates->begin(); pf != pflow_candidates->end(); pf++) {
134 me[
"CandidateEt"]->Fill(particle->
et());
135 me[
"CandidateEta"]->Fill(particle->
eta());
136 me[
"CandidatePhi"]->Fill(particle->
phi());
137 me[
"CandidateCharge"]->Fill(particle->
charge());
138 me[
"CandidatePdgId"]->Fill(particle->
pdgId());
141 me[
"PFCandidateType"]->Fill(particle->
particleId());
218 if (outputFile_.size() > 0 &&
dbe_)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual double et() const GCC11_FINAL
transverse energy
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual int pdgId() const GCC11_FINAL
PDG identifier.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
virtual int charge() const GCC11_FINAL
electric charge
T const * product() const
Particle reconstructed by the particle flow algorithm.
virtual ParticleType particleId() const
PFTester(const edm::ParameterSet &)
void setCurrentFolder(const std::string &fullpath)