Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PFCluster truth selector #18106

Merged
merged 9 commits into from Apr 11, 2017
Merged

Conversation

rafaellopesdesa
Copy link
Contributor

This is a small tool that we use at EGM to select ECAL PFcluster matched to GEN photons that did not convert before the calorimeter. The commits are uploaded in EgammaMCTools because of the dependency on GEN (for matching) and SIM (to veto conversions using trackingParticles).

We need it for 90X in the context of the high-level PF studies for the 2017 run, but we are PRing here first (as it is required) and, after review and integration in 91X, we will immediately backport to 90X.

The PR does not alter any standard validation sequence since it is not run by default. It consist of 4 files: the EDProducer, the BuildFile to compile, the python cfi for the producer and a small test script that basically does what this tool is supposed to used to: make ECAL PF Cluster, make trackingParticles, match and select.

Attn: @jainshilpi , @fcouderc

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @rafaellopesdesa (Rafael Lopes de Sa) for master.

It involves the following packages:

RecoEgamma/EgammaMCTools

@perrotta, @cmsbuild, @slava77, @davidlange6 can you please review it and eventually sign? Thanks.
@Sam-Harper, @lgray this is something you requested to watch as well.
@Muzaffar, @davidlange6, @smuzaffar you are the release manager for this.

cms-bot commands are listed here #13028

@slava77
Copy link
Contributor

slava77 commented Mar 28, 2017

@cmsbuild please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 28, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/18755/console Started: 2017/03/28 15:05

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h"


class PFClusterMatchedToPhotonsSelector : public edm::EDProducer {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason for it being a legacy module?
Shouldn't it better inherit from public edm::stream::EDProducer<> ?


bool isConversion = false;
for (auto&& vertRef : trackingParticle.decayVertices()) {
if (vertRef->position().rho() > 123.8 && std::abs(vertRef->position().z()) < 304.5) continue; //EB
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't these 123.8 and 304.5 be taken from some definition in dataformats or geometry?
Otherwise, define some constant with reasonable name for these boundaries and use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't find an easy way to do this. Can it be done like in the TRK-POG code here:

https://github.com/cms-sw/cmssw/blob/master/SimGeneral/TrackingAnalysis/python/TrackingParticleSelection_cfi.py

ie, defined as a parameter?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, a const parameter with a reasonable name is better than a magic number

bool isConversion = false;
for (auto&& vertRef : trackingParticle.decayVertices()) {
if (vertRef->position().rho() > 123.8 && std::abs(vertRef->position().z()) < 304.5) continue; //EB
if (std::abs(vertRef->position().z()) > 317.0) continue; // EE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this 317.0 be taken from some definition in dataformats or geometry?
Otherwise, define some constant with reasonable name for these boundaries and use it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above. I will put as a parameter, following the selection done in the tracking POG code.

@@ -0,0 +1,10 @@
import FWCore.ParameterSet.Config as cms

particleFlowClusterECALMatchedToPhotons = cms.EDProducer('PFClusterMatchedToPhotonsSelector',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicates the config automatically produced by ParameterSetDescription
Please remove this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove the description here and leave the python file, if that's ok with you.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No: please stick on fillDescription and remove this file.
Explicit python config can be used if you want to clone and modify the default module

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 7, 2017

Pull request #18106 was updated. @perrotta, @perrozzi, @thuer, @cmsbuild, @slava77, @govoni, @davidlange6 can you please check and sign again.

@perrotta
Copy link
Contributor

perrotta commented Apr 8, 2017

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 8, 2017

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/19020/console Started: 2017/04/08 09:51

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 8, 2017

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 8, 2017

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Apr 8, 2017

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-18106/19020/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 23
  • DQMHistoTests: Total histograms compared: 1917345
  • DQMHistoTests: Total failures: 117
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 1917055
  • DQMHistoTests: Total skipped: 173
  • DQMHistoTests: Total Missing objects: 0
  • Checked 94 log files, 14 edm output root files, 23 DQM output files

@perrotta
Copy link
Contributor

perrotta commented Apr 8, 2017

+1
New producer used in some local test, with no effext on standard workflows
Implementation looks correct

@rafaellopesdesa
Copy link
Contributor Author

@perrozzi, @thuer, @govoni In order to help the generator approval, I would like to describe the single change I did in DataFormats/HepMCCandidate. I added to the dictionaries generated:

  • edm::ValueMap < reco::GenParticleRef >
  • edm::Wrapper < edm::ValueMap < reco::GenParticleRef > >

Nothing else was changed.

@perrozzi
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request requires discussion in the ORP meeting before it's merged. @Muzaffar, @davidlange6, @smuzaffar

@davidlange6
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 1a07832 into cms-sw:master Apr 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants