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
PFCluster truth selector #18106
Conversation
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. cms-bot commands are listed here #13028 |
@cmsbuild please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticleFwd.h" | ||
|
||
|
||
class PFClusterMatchedToPhotonsSelector : public edm::EDProducer { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
ie, defined as a parameter?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
please test |
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1 |
@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:
Nothing else was changed. |
+1 |
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 |
+1 |
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