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
Phase1 in FastSim of CMS #23363
Phase1 in FastSim of CMS #23363
Conversation
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23363/4874 |
A new Pull Request was created by @angirar for master. It involves the following packages: Configuration/Eras @perrotta, @ssekmen, @lveldere, @civanch, @mdhildreth, @cmsbuild, @franzoni, @slava77, @fabiocos, @davidlange6 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
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.
Thanks for the PR. It looks mostly good, but I found a couple of details more to be ironed out.
I believe it would be good to also add a 2017 FastSim workflow to runTheMatrix.py
in this PR to allow testing of the developments.
#include "CAGraph.h" | ||
|
||
#include "RecoPixelVertexing/PixelTriplets/src/CAGraph.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" |
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.
Please remove both includes as they are not needed here (likely the #include CAGraph.h
needs to be moved to the .cc
file).
edm::ParameterSetDescription BPix; | ||
edm::ParameterSetDescription FPix; | ||
const bool isFastSim; | ||
std::vector<unsigned> layerPairs; |
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.
None of these are used, so please remove.
#include "CAGraph.h" | ||
|
||
#include "RecoPixelVertexing/PixelTriplets/src/CAGraph.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" |
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.
Please remove both includes as they are not needed here (likely the #include CAGraph.h
needs to be moved to the .cc
file).
edm::ParameterSetDescription BPix; | ||
edm::ParameterSetDescription FPix; | ||
const bool isFastSim; | ||
std::vector<unsigned> layerPairs; |
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.
None of these are used, so please remove.
caHardPtCut(cfg.getParameter<double>("CAHardPtCut")), | ||
layerList(cfg.getParameter<std::vector<std::string>>("layerList")), | ||
isFastSim(cfg.getParameter<bool>("isFastSim")), | ||
layerPairs(cfg.getParameter<std::vector<unsigned>>("layerPairs")) |
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.
As said earlier, these additions are not needed, please remove.
TTRHBuilder = cms.string('WithoutRefit'), | ||
HitProducer = cms.string('TrackingRecHitProducer'), | ||
), | ||
layerPairs = lowPtQuadStepHitDoublets.layerPairs.value(), |
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.
Move to the definition of _fastSim_lowPtQuadStepSeeds
.
TTRHBuilder = cms.string('WithoutRefit'), | ||
HitProducer = cms.string('TrackingRecHitProducer'), | ||
), | ||
layerPairs = lowPtTripletStepHitDoublets.layerPairs.value(), |
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.
Move to the definition of _fastSim_lowPtTripletStepSeeds
.
@@ -71,9 +78,10 @@ class LayerHitMapCache { | |||
assert (key>=0); | |||
const RecHitsSortedInPhi * lhm = theCache.get(key); | |||
if (lhm==nullptr) { | |||
auto tmp=new RecHitsSortedInPhi (region.hits(iSetup,layer), region.origin(), layer.detLayer()); | |||
// auto tmp=new RecHitsSortedInPhi (region.hits(iSetup,layer), region.origin(), layer.detLayer()); |
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.
Please remove commented line.
tmp->theOrigin = region.origin(); | ||
theCache.add( key, tmp); | ||
// theCache.add( key, tmp); |
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.
Please remove commented line.
@@ -181,11 +182,13 @@ std::string SeedingLayerSetsBuilder::LayerSpec::print(const std::vector<std::str | |||
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(const edm::ParameterSet & cfg, edm::ConsumesCollector&& iC): | |||
SeedingLayerSetsBuilder(cfg, iC) | |||
{} | |||
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(const edm::ParameterSet & cfg, edm::ConsumesCollector& iC) | |||
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(const edm::ParameterSet & cfg, edm::ConsumesCollector& iC): | |||
isFastSim(cfg.getParameter<bool>("isFastSim")) |
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 would prefer that the flag and the FastSim hit collection name (or maybe even the token) are passed as arguments to the constructor.
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 you elaborate on this? Do you want me to create a new constructor which has the FastSim token as argument?
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 (although now I think maybe passing the collection name would be more clean and in line with what the SeedingLayerSetsBuilder
does in standard reco). Note that you can call this constructor first to do it's job, so it should be something along
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(const edm::ParameterSet & cfg, edm::ConsumesCollector& iC, const edm::InputTag& fastsimHitTag):
SeedingLayerSetsBuilder(cfg, iC),
fastSimrecHitsToken_(iC.consumes<FastTrackerRecHitCollection>(fastSimHitTag))
{}
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 tried it this way but I keep getting the following error -
Exception Message:
A get using a EDGetToken with the C++ type 'edm::OwnVector<FastTrackerRecHit,edm::ClonePolicy >' was made using an uninitialized token.
Please check that the variable is being initialized from a 'consumes' call.
I'm investigating 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.
Do you call that constructor from the FastSim side?
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 I am. Infact, when I declared the constructor the way you have written above, it gives error : "mem-initializer for 'SeedingLayerSetsBuilder::fastSimrecHitsToken_' follows constructor delegation
fastSimrecHitsToken_(iC.consumes(fastsimHitTag))"
So instead I declared it simply as
SeedingLayerSetsBuilder::SeedingLayerSetsBuilder(const edm::ParameterSet & cfg, edm::ConsumesCollector& iC, const edm::InputTag& fastsimHitTag):
fastSimrecHitsToken_(iC.consumes(fastsimHitTag))
{}
which works, and I'm calling it from SeedFinderSelector like this - "SeedingLayerSetsBuilder s(cfg, consumesCollector, edm::InputTag("fastTrackerRecHits"));" after making the unique pointer of SeedingLayerSetsBuilder here https://github.com/angirar/cmssw/blob/9fb1e01e75e58cef6411dfae4d642918442b3d72/FastSimulation/Tracking/src/SeedFinderSelector.cc#L54
I know it goes inside the new constructor and comes back (by putting the cout statements) but still gives an error about 'uninitialized token'.
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.
Right, sorry, it didn't occur to me that (of course) when delegating a constructor call one can't use the initializer list anymore.
Could you clarify what do you mean with
I'm calling it from SeedFinderSelector like this - "SeedingLayerSetsBuilder s(cfg, consumesCollector, edm::InputTag("fastTrackerRecHits"));" after making the unique pointer of SeedingLayerSetsBuilder here
? I interpret (possibly incorrectly) what you wrote as
seedingLayers_ = std::make_unique<SeedingLayerSetsBuilder>(cfg, consumesCollector);
SeedingLayerSetsBuilder s(cfg, consumesCollector, edm::InputTag("fastTrackerRecHits"));
while you should use the FastSim-specific constructor for the unique_ptr
seedingLayers_ = std::make_unique<SeedingLayerSetsBuilder>(cfg, consumesCollector, edm::InputTag("fastTrackerRecHits"));
Otherwise the token member variable in seedingLayers_
object stays indeed uninitialized.
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.
Ah right.. with little tweaking its working now. Thanks.
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-23363/4905 |
+1 |
+1 |
+operations the addition of a new Era and the corresponding modification to the standard sequences appear consistent with the purpose of the PR |
+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 will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
New configurable tracker geometry for Phase0 and Phase1. Configurable track reconstruction sequence with new iterations added for Phase1. Iteration specific CA seeding (quadruplets and triplets) also in place.