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

Topo clustering using already positioned edm4hep::CalorimeterHit #57

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kjvbrt
Copy link
Contributor

@kjvbrt kjvbrt commented Nov 8, 2023

This PR removes Topo clustering algorithm dependency on the positioning tools.

Quick validation

Runtime and memory consumption not affected (tested with 100 evt.)

Old clusters

CreateTopoClusters  DEBUG Building 6 cluster.                                          
CreateTopoClustersVERBOSE Cluster energy:     0.733712                               
CreateTopoClustersVERBOSE Cluster energy:     0.00887322                             
CreateTopoClustersVERBOSE Cluster energy:     0.00670568                                                                                                                     
CreateTopoClustersVERBOSE Cluster energy:     0.00718246                             
CreateTopoClustersVERBOSE Cluster energy:     0.00781475                               
CreateTopoClustersVERBOSE Cluster energy:     0.00811453                               
CreateTopoClusters  DEBUG Number of clusters with cells in E and HCal:        0        
CreateTopoClusters  DEBUG Total energy of clusters:                           0.772403      
CreateTopoClusters  DEBUG Leftover cells :                                    15

New clusters

CreateTopoClusters  DEBUG Building 6 clusters.                                                             
CreateTopoClusters  DEBUG Building cluster with ID: 1                                                      
CreateTopoClustersVERBOSE Cluster energy:     0.733712                                                     
CreateTopoClusters  DEBUG Building cluster with ID: 4                                                      
CreateTopoClustersVERBOSE Cluster energy:     0.00887322                                                   
CreateTopoClusters  DEBUG Building cluster with ID: 7                                                      
CreateTopoClustersVERBOSE Cluster energy:     0.00670568                                                   
CreateTopoClusters  DEBUG Building cluster with ID: 8                                                      
CreateTopoClustersVERBOSE Cluster energy:     0.00718246                                                   
CreateTopoClusters  DEBUG Building cluster with ID: 10                                                     
CreateTopoClustersVERBOSE Cluster energy:     0.00781475                                                   
CreateTopoClusters  DEBUG Building cluster with ID: 11                                                     
CreateTopoClustersVERBOSE Cluster energy:     0.00811453                                                   
CreateTopoClusters  DEBUG Number of clusters with cells in E and HCal:        0                            
CreateTopoClusters  DEBUG Total energy of clusters:                           0.772403                     
CreateTopoClusters  DEBUG Leftover cells :                                    15

@kjvbrt kjvbrt requested a review from BrieucF November 9, 2023 16:26
@BrieucF
Copy link
Contributor

BrieucF commented Nov 9, 2023

Could you add an example of steering file on how to use it "the new way" under RecFCCeeCalorimeter/tests/options?

@kjvbrt
Copy link
Contributor Author

kjvbrt commented Nov 10, 2023

The example steering:

from Configurables import Merge2CaloHitCollections   
merge_ecal_cells = Merge2CaloHitCollections("MergeECalCells",                                              
                                            OutputLevel=DEBUG)                                             
merge_ecal_cells.inHitsA.Path = "ECalBarrelPositionedCells"                                                
merge_ecal_cells.inHitsB.Path = "ECalEndcapPositionedCells"     
merge_ecal_cells.outHits.Path = "ECalCells"          
                          
createTopoClusters = CaloTopoClusterFCCee("CreateTopoClusters",
                                     neigboursTool=readNeighboursMap,                                      
                                     noiseTool=readNoisyCellsMap, 
                                     readoutName=ecalBarrelReadoutNamePhiEta,
                                     seedSigma=4,                                                          
                                     neighbourSigma=2,                              
                                     lastNeighbourSigma=0,                   
                                     OutputLevel=VERBOSE)                              
createTopoClusters.cells.Path = "ECalCells"                                                                
createTopoClusters.clusters.Path = "CaloTopoClusters"                                                      
createTopoClusters.clusterCells.Path = "CaloTopoClusterCells"

The algorithm runs over collection of all cells from all subsystems created by the merging algorithm.

debug() << "Cloning " << inCollB->size() << " from the \""
<< m_inCollB.fullKey().key() << "\" collection." << endmsg;
for (const auto& hit : *inCollB) {
outColl->push_back(hit.clone());
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this make sure you merge hits with the same CellID into 1 hit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants