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

Phase1 in FastSim of CMS #23363

Merged
merged 26 commits into from Jun 19, 2018
Merged

Phase1 in FastSim of CMS #23363

merged 26 commits into from Jun 19, 2018

Conversation

angirar
Copy link
Contributor

@angirar angirar commented May 29, 2018

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.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @angirar for master.

It involves the following packages:

Configuration/Eras
Configuration/StandardSequences
FastSimulation/SimplifiedGeometryPropagator
FastSimulation/Tracking
RecoPixelVertexing/PixelTriplets
RecoTracker/IterativeTracking
RecoTracker/TkHitPairs
RecoTracker/TkSeedingLayers

@perrotta, @ssekmen, @lveldere, @civanch, @mdhildreth, @cmsbuild, @franzoni, @slava77, @fabiocos, @davidlange6 can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @GiacomoSguazzoni, @rovere, @VinInn, @Martin-Grunewald, @mschrode, @gpetruc, @matt-komm, @ebrondol, @dgulhan this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

Copy link
Contributor

@makortel makortel left a 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"
Copy link
Contributor

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;
Copy link
Contributor

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"
Copy link
Contributor

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;
Copy link
Contributor

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"))
Copy link
Contributor

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(),
Copy link
Contributor

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(),
Copy link
Contributor

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());
Copy link
Contributor

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);
Copy link
Contributor

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"))
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

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))
{}

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 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.

Copy link
Contributor

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?

Copy link
Contributor Author

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'.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@ssekmen
Copy link
Contributor

ssekmen commented Jun 15, 2018

+1

@civanch
Copy link
Contributor

civanch commented Jun 17, 2018

+1

@fabiocos
Copy link
Contributor

+operations

the addition of a new Era and the corresponding modification to the standard sequences appear consistent with the purpose of the PR

@fabiocos
Copy link
Contributor

@fabozzi @prebello could you please check and sign it in case?

@fabozzi
Copy link
Contributor

fabozzi commented Jun 18, 2018

+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 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)

@fabiocos
Copy link
Contributor

+1

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