skkwan / phase2-l1Calo-analyzer

0 stars 2 forks source link

Clarify energy sum and shower shape computations in old vs. new emulator #16

Closed skkwan closed 7 months ago

skkwan commented 7 months ago

I would like also to add to what Gianluca already said that while the new producer (Phase2L1CaloEGammaEmulator) gives us the variables e2x5 and e5x5, the other producer (L1EGammaCrystalsEmulatorProducer) compute just e3x5 giving us no informations on the shower shape. I don't know if you plan to completly dismiss L1EGammaCrystalsEmulatorProducer in favor of Phase2L1CaloEGammaEmulator but, in order to perform a comparison we should have the shower shape information in both.

skkwan commented 7 months ago

Clarified on Mattermost as follows, marking as closed.

The energy in a 3x5 of crystals should be the energy of the cluster itself. The previous producer L1EGammaCrystalsEmulatorProducer used floats instead of integers, so the current producer uses integers to better emulate the firmware instead of the previous "idealized" picture.

Here are the old [1] and new [2] collections. So in the end we decided to not modify the old producer, because the idea was to switch from the old producer to the new producer. And while I was making the new firmware-based emulator/producer, I saw that some flags like the photon one were never computed in the firmware, so I set them to zero. [1] https://github.com/cms-l1t-offline/cmssw/blob/l1t-integration-CMSSW_13_2_0_pre3/L1Trigger/L1CaloTrigger/plugins/L1EGammaCrystalsEmulatorProducer.cc#L1116-L1143 [2] https://github.com/cms-l1t-offline/cmssw/blob/l1t-integration-CMSSW_13_2_0_pre3/L1Trigger/L1CaloTrigger/plugins/Phase2L1CaloEGammaEmulator.cc#L453-L476