Title: A clustering algorithm for a generalised calorimeter
1A clustering algorithm for a generalised
calorimeter
- Chris Ainsley
- University of Cambridge
- ltainsley_at_hep.phy.cam.ac.ukgt
LC Simulation Workshop 9-10 December 2004, DESY,
Germany
2Order of service
- Layer-by-layer approach to clustering.
- Separation of nearby charged/neutral clusters.
- Application to a generalised calorimeter.
- Clustering a Z event in the full CALICE
calorimeter. - Coding in the LCIO framework.
- Summary.
3Layer-by-layer clustering the algorithm
- Form clusters by tracking closely-related hits
(gt 1/3 mip) layer-by-layer through
calorimeter - for a given hit j in a given layer l, minimize
the distance d w.r.t all hits k in layer l-1 - if d lt dist_max_ecal (Ecal) or dist_max_hcal
(Hcal) for minimum d, assign hit j to same
cluster as hit k which yields minimum - if not, repeat with all hits in layer l-2, then,
if necessary, layer l-3, etc., right through to
first layer of Ecal - after iterating over all hits j, seed new
clusters with those still unassigned, grouping
those within prox_seed_max into same seed - if in Ecal, calculate weighted centre of each
clusters hits in layer l (weight by energy
(analogue) or density (digital)) and assign a
direction cosine to each hit along the line
joining its clusters centre in the seed layer
(or (0,0,0) if its a seed) to its clusters
centre in layer l - if in Hcal, assign a direction cosine to each hit
along the line from the hit to which each is
linked (or (0,0,0) if its a seed) to the hit
itself - try to recover backward-spiralling track-like,
and low multiplicity halo, cluster fragments
45 GeV ?? event at 3 cm separation
Reconstructed clusters
True particle clusters
- Cell-size 11 cm2 (Si/W Ecal RPC Hcal).
- dist_max_ecal 2.0 cm dist_max_hcal 3.0
cm. - 98 of event energy maps black ? black (?)
and red ? red (?) .
5Same event, different clustering cuts
Reconstructed clusters
True particle clusters
- dist_max_ecal 3.0 cm dist_max_hcal 1.0
cm. - Now 78 of event energy maps black ? red (?)
and red ? black (?) . - 22 confusion.
6Layer-by-layer clustering in a generalised
detector
- Approach requires layer index to vary smoothly
e.g. in TESLA detector, index changes abruptly - at stave boundaries in Ecal barrel (layers
overlap at 45) - at barrel/endcap boundaries in Ecal Hcal
(layers overlap at 90). - To apply layer-by-layer clustering, need a scheme
to overcome this. - Achieved by replacing layer index with
pseudolayer index in regions where layer index
discontinuities occur. - Same-pseudolayer indexed hits defined by closed
shells of octagonal prisms coaxial with z-axis. - Simple extension to cope with any arbitrary
n-fold rotationally-symmetric, layered
calorimeter octagonal prisms ? n-polygonal
prisms. - Locations/orientations of shells automatically
set by locations/orientations of real, physical,
sensitive layers. - Just takes n and layer-spacings in barrel and
endcaps as input.
7How the generalised detector shapes up
Transverse section
Longitudinal section
- Solid blue lines aligned along real, physical,
sensitive layers. - Dot-dashed magenta lines bound shell
containing hits with same pseudolayer index, l. - Pseudostaves automatically encoded by
specifying n, f1 and Rl and Zl (? l).
891 GeV Z ? u,d,s jets event
Reconstructed clusters
True particle clusters
- Reconstruction in full detector (Si/W Ecal
RPC Hcal). - dist_max_ecal 2.0 cm dist_max_hcal 3.0
cm. - Good 11 correspondence between reconstructed
and true clusters (5 highest energy clusters
shown).
9Clustering in LCIO a modular approach
- Modules to do the reconstruction
- CalorimeterConfig.cc
- ? (re)defines calorimeter layer positions
- HitToCell.cc
- ? merges same-cell hits
- CellToStore.cc
- ? stores cells above energy threshold
- StoreCalibration.cc
- ? calibrates the stored cell energies
- StoreToStoreOrdered.cc
- ? ranks stored cells by weight in each
pseudolayer (in preparation for clustering) - StoreOrderedToCluster1.cc
- ? does the coarse cluster reconstruction
- Cluster1ToCluster2.cc
- ? attempts matching of backward-spiralling
track-like cluster fragments onto
forward-propagating parent clusters - Cluster2ToCluster3.cc
- ? attempts to reunite low multiplicity halo
cluster fragments with parent clusters.
- Additional module to access MC truth
- StoreOrderedToMCParticle.cc
- ? forms the true clusters.
- Plotting modules
- ClusterToClusterOrdered.cc
- ? ranks reconstructed clusters by energy in
each pseudostave (in preparation for plotting) - PlotRecoClusters.cc
- ? plots reconstructed clusters
colour-correlated with energy-rank in
pseudostave - MCParticleToMCParticleOrdered.cc
- ? ranks true clusters by energy in each
pseudostave (in preparation for plotting) - PlotTrueClusters.cc
- ? plots true clusters colour-correlated with
energy-rank in pseudostave - PlotPerformance.cc
- ? plots the distribution of energy between true
and reconstructed clusters.
10Modifying the detector
- Given detector configuration, clustering governed
by global constants set in header file
LCIOFrameSteer.h ? tweaks go in here. - Layer positions fed in through CalorimeterConfig.c
c. - To apply algorithm to new detector designs, just
need to modify these two files. - Lets see how
11Snippets of code from LCIOFrameSteer.h
- Set the detector parameters
- const int nlayers_ecal 40
- // number of Ecal (pseudo)layers
- const int nlayers_hcal 40
- // number of Hcal (pseudo)layers
- const int npseudostaves_barrel 8
- // degree of rotational symmetry of barrel
- const double phi_1 M_PI/2.
- // azimuthal angle of first barrel (pseudo)stave
- Set the Ecal type
- const string ecal siw
- // siw gt Si/W Ecal
- // maps gt MAPS Ecal
- Set the Hcal type
- const string hcal rpc
- // rpc gt Fe/RPC Hcal
- // scint gt Fe/scintillator Hcal
- Set the mode of operation
- const string mode a/d
- Set the clustering cuts
- const double dist_max_ecal 20.0 // mm
- // maximum d for cluster continuity across
Ecal - // layers
- const double dist_max_hcal 30.0 // mm
- // maximum d for cluster continuity across
Hcal - // layers
- const double prox_seed_max 20.0 // mm
- // maximum radius of new cluster seed
- const double prox_merge_max 20.0 // mm
- // maximum proximity for backward-spiralling
track- - // matching
- const double cos_gamma_max 0.25
- // minimum angle between direction cosines for
- // backward-spiralling track-matching
- const int cluster_size_min 10
- // maximum cluster size to be considered halo
- const double tan_beta_max 6.0
- // maximum angle for halo recovery
12Snippets of code from CalorimeterConfig.cc
- Set the layer positions in the r- and
z-directions - (e.g. TESLA TDR design)
- // Create collections for the r and z layers
- LCCollectionVec siteOfRLayerVec new
- LCCollectionVec(LCIOLCFLOATVEC)
- LCCollectionVec siteOfZLayerVec new
- LCCollectionVec(LCIOLCFLOATVEC)
- // Fill the collections with their positions
- for (int l0 llt1nlayers_ecalnlayers_hcal
l) - LCFloatVec siteOfRLayer new LCFloatVec
- LCFloatVec siteOfZLayer new LCFloatVec
- if (llt30) // layers 1-30 (Ecal) layer 0
- siteOfRLayer-gtpush_back(1698.85(3.9
l)) - siteOfZLayer-gtpush_back(2831.10(3.9
l)) -
- else if (l gt30 lltnlayers_ecal) //
31-40 (Ecal) - siteOfRLayer-gtpush_back(1815.85(6.7 (l
-30)))
- else // layers 41-80 (Hcal) layer 81
- siteOfRLayer-gtpush_back(1931.25(24.5 (l
-41))) - siteOfZLayer-gtpush_back(3039.25(24.5 (l
-41))) -
- siteOfRLayerVec-gtpush_back(siteOfRLayer)
- siteOfZLayerVec-gtpush_back(siteOfZLayer)
-
- // And save the collections
- evt-gtaddCollection(siteOfRLayerVec,"site_rlayers"
) - evt-gtaddCollection(siteOfZLayerVec,
"site_zlayers") -
13Summary outlook
- RD on clustering algorithm for generalised
calorimeter on-going. - Approach utilizes the high granularity of the
calorimeter cells to track clusters
(pseudo)layer-by-(pseudo)layer. - Pseudolayer concept ? flexibility to cope with
alternative layered geometries without having to
recode algorithm itself. - Applicable to any (likely) detector design
comprising an n-fold rotationally symmetric
barrel closed by endcaps ? just to specify need n
and layer-spacings. - Written in C LCIO (v1.3) compliant
modularised ? input parameters kept distinct from
reconstruction. - Will aim to make code publicly available soon.
14The end
15Cluster-tracking between pseudolayers
From the pseudobarrel
From the pseudoendcap