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

New backend stage 1 producer/processor #500

Merged

Conversation

portalesHEP
Copy link

Added new stage 1 producer (HGCalBackendStage1Producer.cc) and processor (HGCalBackendStage1Processor.cc) defined so that the processor only handles the information from a single FPGA.

The previous producer/processor pair is kept for now, but renamed HGCalBackendLayer1Producer.cc/HGCalBackendLayer1Producer.cc following the older naming convention.

Copy link

@jbsauvan jbsauvan left a comment

Choose a reason for hiding this comment

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

Thanks @portalesHEP
in addition to the comments below, an update will be needed on the trigger chains:
In L1Trigger/L1THGCalUtilities/python/clustering2d.py there is currently the functor RozBinTruncation that is used to create a Producer with tuncation. This will require some modification.

@portalesHEP
Copy link
Author

portalesHEP commented Oct 26, 2021

Thanks @portalesHEP in addition to the comments below, an update will be needed on the trigger chains: In L1Trigger/L1THGCalUtilities/python/clustering2d.py there is currently the functor RozBinTruncation that is used to create a Producer with tuncation. This will require some modification.

This is now (mostly) done in commit e6047a.

It is done by adding a new RozBinTruncation definition in clustering2d_v2.py that calls the correct stage1 producer. In order to use it to produce ntuples, hgcalTriggerPrimitivesNew_cff has to be loaded instead of hgcalTriggerPrimitives_cff.

I still need to include some adaptation of the CreateDummy class, as right now truncation is applied by default with it in the new setup.

Copy link

@jbsauvan jbsauvan left a comment

Choose a reason for hiding this comment

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

Thanks @portalesHEP
In addition to the proposed removals in clustering2d_v2.py, could you run and apply the changes of code-checks and code-format?

Comment on lines 11 to 50
def create_distance(process, inputs,
distance=distance_C2d_params.dR_cluster, # cm
seed_threshold=distance_C2d_params.seeding_threshold_silicon, # MipT
cluster_threshold=distance_C2d_params.clustering_threshold_silicon # MipT
):
producer = process.hgcalBackEndStage1Producer.clone(
InputTriggerCells = cms.InputTag(inputs)
)
producer.ProcessorParameters.C2d_parameters = distance_C2d_params.clone(
dR_cluster = distance
)
set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
return producer


def create_topological(process, inputs,
seed_threshold=topological_C2d_params.seeding_threshold_silicon, # MipT
cluster_threshold=topological_C2d_params.clustering_threshold_silicon # MipT
):
producer = process.hgcalBackEndStage1Producer.clone(
InputTriggerCells = cms.InputTag(inputs)
)
producer.ProcessorParameters.C2d_parameters = topological_C2d_params.clone()
set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
return producer


def create_constrainedtopological(process, inputs,
distance=constrTopological_C2d_params.dR_cluster, # cm
seed_threshold=constrTopological_C2d_params.seeding_threshold_silicon, # MipT
cluster_threshold=constrTopological_C2d_params.clustering_threshold_silicon # MipT
):
producer = process.hgcalBackEndStage1Producer.clone(
InputTriggerCells = cms.InputTag(inputs)
)
producer.ProcessorParameters.C2d_parameters = constrTopological_C2d_params.clone(
dR_cluster = distance
)
set_threshold_params(producer.ProcessorParameters.C2d_parameters, seed_threshold, cluster_threshold)
return producer
Copy link

Choose a reason for hiding this comment

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

These functions should probably be removed (as well as the related imports) as these clustering algos are not supposed to be used with the new Stage 1 producer

Copy link
Author

Choose a reason for hiding this comment

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

Indeed, I removed them

producer = process.hgcalBackEndStage1Producer.clone(
InputTriggerCells = cms.InputTag(inputs)
)
producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
Copy link

Choose a reason for hiding this comment

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

C2d_parameters is a parameter of the producer and not of the processor in the case of hgcalBackEndStage1Producer.
Actually, I'm not sure that we need this CreateDummy at all, since a "dummy" stage1Producer would be created from RozBinTruncation with doTruncation=False

Copy link
Author

Choose a reason for hiding this comment

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

removed

Comment on lines 62 to 68
class CreateTruthDummy(object):
def __call__(self, process, inputs):
producer = process.hgcalBackEndStage1Producer.clone(
InputTriggerCells = cms.InputTag(inputs)
)
producer.ProcessorParameters.C2d_parameters = dummy_C2d_params.clone()
return producer
Copy link

Choose a reason for hiding this comment

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

Should probably be removed. It will probably not work like that.

Copy link
Author

Choose a reason for hiding this comment

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

removed

@portalesHEP
Copy link
Author

Thanks @portalesHEP In addition to the proposed removals in clustering2d_v2.py, could you run and apply the changes of code-checks and code-format?

This is now done too

@jbsauvan jbsauvan merged commit 2337244 into PFCal-dev:hgc-tpg-devel-CMSSW_12_0_0_pre3 Nov 2, 2021
@jbsauvan jbsauvan moved this from Review to Ready for Integration in HGC L1 Simulation and Algorithms Nov 2, 2021
@portalesHEP portalesHEP deleted the s1_standalone branch November 5, 2021 09:54
@jbsauvan jbsauvan moved this from Ready for Integration to Integration In Progress in HGC L1 Simulation and Algorithms Dec 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
HGC L1 Simulation and Algorithms
Integration In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants