Photon Reconstruction

Complete: 4

Goals of this page

Giving a brief description of what is involved in photon and conversion reconstruction. For photon analysis, see WorkBookPhotonAnalysis

Introduction

Photon Producer

CMSSW22X

Photons are built from ECAL SuperClusters constructed using the corrected Hybrid super clusters in the ECAL barrel and the corrected Multi5x5 in endcaps. REMARK: in CMSSW22X the preshower is not included in the detector simulation. Details about Ecal clustering algorithms can be found in ECALDPGClustering. All SuperClusters are considered as candidate Photons (cuts on SC Et>5 Gev ad H/E < 0.2 were introduced startng frm cmssw180) , so the photon producer creates one Photon object for every SuperCluster. The Photon contains an edm::Ref to the SuperCluster, plus information useful for analysis using photons, such as the energy in 5x5 crystals, the ratio of the energy in 3x3 crystals to the SuperCluster energy (R9, useful for identifying converted photons), a method to return the presence or not of a matched pixel seed, and a method to set the the position of the primary vertex and redefine the photon direction. By default the primary vertex position is assumed to be at the nominal origin of the CMS reference frame. The Photon contains as well a vector of edm::Ref to Conversion objects and trhough that conversion track pair, fitted vertex and all other conversion varibles can be accessed.

CMSSW310

Photon and Conversion reconstruction software has been reorganized so here is a schematic description of the reconstruction workflow and of its components. The blue box contains all steps necessary to build Conversions while the red block contains the step for building photons. The workflow for conversion is shown first accordingly with the order of reconstruction sequences. Indeed conversions need to be created and stored in the event beforehand so that a reference can be attached to the PhotonCore.


ConversionRecoWorkflowRotated.GIF


PhotonRecoWorkflowRotated.GIF

The PhotonCore is an intermidiate object with, at present, the function of containing references to the other necessary components, i.e. SuperClusters, Conversions and ElectronPixelSeeds. It is built from SuperClusters, after filtering them with a cut on Et and on H/E. A collection of PhotonCore is saved in the event content but it is not meant for direct use by the user since it does not give access to photon specific quantities. The final Photon object contains a reference to the PhotonCore and hence to all what it contains plus all photon specific variables.

Photons are built out of PhotonCore objects by the PhotonProducer where additional filitering can be applied if necessary. In the CMSSW31X series the Photon satisfies more pre-selection criteria than in the past, in order to reduce the fakes, hence the number of objects stored in the PhotonCollection. The requirements applied are:

  • Super Cluster Et > 10 GeV
  • H/E < 0.5 for both Barrel and Endcap. The H/E is calculated in a cone size with dR=0.15. The energy of the supercluster is used for the EM.
These two cuts were present also in CMSSW22X, however the calculation of the H/E is now different and it based on the hadron energy collected in the Hcal towers in the given radius, where the radius is chosen to be complementary to the one use for calculating the isolation in Hcal.

Then a candidate Photon (reco::Candidate) is built from its 4-momentum. The energy attributed to the Photon is the Super Cluster energy if R9<0.93 (converted) , and the e5x5 energy if R9>0.93 (unconverted). Note: in CMSSW31X the preshower is simulated and the endcap superclusters do include the ES energy. For details on this and on energy corrections, please refer to ECALDPGClustering.

  • In the endcaps, the e5x5 is added with the preshower energy.
  • The e5x5 (barrel) is corrected here for the lateral leakage, (f(eta) energy correction)

The direction of the momentum is by calculated using the Offline Primary vertex position (the first vtx in the list of offline vertices is used) as the photon origin. Next step, before storing the candidate in the event, a loose isolation in the calorimeters is applied if the photon Et is below a certain threshold (default is 100 GeV).

  • ecal rec hit Et sum in a cone with dr=0.06, dR=0.4 < 5 GeV + 0.15* Et(photon) (same cut for barrel and endcap)
  • hcal tower Et sum in a cone with dr=0.15, dR=0.4 < 7 GeV (Barrel), 10 GeV (endcap). The possibility of scaling with pt is encoded and configurable

Isolation is calculated using the "jurassic method". The size of the eta strip for photons is set by default to 0.04

In the CMS.PhotonProducer, Shower shapes , Isolation variables and flags indicating the ECAL fiducial region are calculated or accessed via helper tools and stored in the Photon object. The shower shapes are calculating using the RecoEcal/EgammaCoreTools/interface/EcalCusterTools while the isolation variables are calculated with RecoEgamma/PhotonIdentification/interface/PhotonIsolationCalulator.h, based on the basic tools for isolation calculation described in SWGuideEgammaIsolation

Additional cuts are coded and applicable only for photons with Et<100 GeV but they are OFF by configuration Such cuts are: isolation in the tracker

  • Number of tracks in the cone with dR=0.4 < N
  • Pt sum of tracks inside cone dR=0.4 < threshold
  • shower eta width (sigmaIetaIeta) < threshold

Default values for pre-selection cuts are set in the official configuration for Photon production in RecoEgamma/EgammaPhotonProducers/python/photons_cfi.py

Finalization of photon pre-selection at reconstruction level is still under way. For the extended description of photon identification tools and flavours please refer to PhotonIdAnalysis.

The updated Photon and Conversion software interfaces can be found at reco::Photon and reco::Conversion The PhotonCore is of no interest to the user.

Converted Photon producer

Because of the large Tracker material budget, photons easily convert into e+e- pairs before reaching ECAL.

Tracks from e+e- can be reconstructed in the Tracker adding extra information to that already available from ECAL. Tracks are reconstructed with a specific seed/track finding method which combines an OutIn seed finding starting from the SuperClusters in ECAL. Tracks found in this way are subsequently used as starting point for InOut seed/track finding. For each SuperCluster the all +- track combinations are considered and a Conversion object is created for each valid pair. This implies that for a single SuperCluster there can be more than just one ConvertedPhoton. A maximum number of 3 candidates is stored in the event (the number is configurable).

However, an MVA exploiting the likelihood is built from E/P (E from Super Cluster and p from the track pair), the tracks delta cot theta, the tracks delta phi at vertex and the track normalized chi2 is used to chose the best candidate. The training is done with a sample of photons for which the two reconstructed tracks are correclty associated to e+- MC truth and one sample in which the two reconstructed tracks fail the association. The former is considered signal, the latter background. The MVA data can be accessed whenever at analysis time if one uses directly the Conversion collection. What is actually done for reconstruction is that we store in the Photon object only the reference to the best candidate, i.e. the conversion with the largest likelihood value.

The final Conversion object contains a vector of edm::TrackRef with size 0,1,2, a reference to the SuperCluster from which it originated and the fitted vertex which can all be accessed via devoted methods. Useful additional methods return the E/P, the deltaCotTheta, the extrapolated Z coordinate of the primary vertex, plus others which are useful for refining the conversion selection.

The official configuration for Photon production is in RecoEgamma/EgammaPhotonProducers/python/conversions_cfi.py

Converted Photons as developed so far are optimal for isolated, high energy photons.

Complete description of the method is given in CMS Note 2006/005 when the original software was developed in the old CMS software framework. Since, the work described in the note, has been proted into CMSSW (a vesion zero draft AN-2008/102 exists, with summary of performance as in 22X)

CMSSW310

In CMSSW310 pre-selection of Super Clusters considered for conversion reconstruction is in synch with the selection applied for Photon reconstruction. So also Conversions are such that:
  • Super Cluster Et > 10 GeV
  • H/E < 0.5 for both Barrel and Endcap. The H/E is calculated in a cone size with DR=0.15. The energy of the supercluster is used for the EM.

More information can be found in the Offline Guide

Set up your Environment

In CMSSW22X

In CMSSW22X

In CMSSW310

Run standard photon reconstruction

One might want to re-run photon reconstruction for example to change the photon pre-selection cuts. In this case simple reReconstruction assuming that PhotonCore amd all the objects whose references are stored in it, are available (which is a very reasonable assumption if running on RECO or AOD) can be performed by using RecoEgamma/Examples/python/photonReReco_fromRECO_cfg.py Just copy the photonReReco_fromRECO_cfg.py in a subDir of CMSSW_3_1_0/src and execute
cmsRun photonReReco_fromRECO_cfg.py

That .py performs the whole Conversion tracks + Conversion + PhotonCore + Photon. In order to reReconstruct only Photons from PhotonCore one needs to replace

process.photonReReco = cms.Path(process.photonSequence)
with
process.photonReReco = cms.Path(process.photons)

and

process.schedule = cms.Schedule(process.conversionReReco,process.photonReReco,process.endjob_step,process.out_step)

process.schedule = cms.Schedule(process.photonReReco,process.endjob_step,process.out_step)

The reconstruction sequences which will be executed are defined in SWGuideEgammaStandardSequences. The event content of the root ouput file produced by running photonReReco_fromRECO_cfg.py is defined by the lines

# Output definition
process.output = cms.OutputModule("PoolOutputModule",
    outputCommands = process.RECOSIMEventContent.outputCommands,
    fileName = cms.untracked.string('photons.root'),
    dataset = cms.untracked.PSet(
        dataTier = cms.untracked.string(''),
        filterName = cms.untracked.string('')
    )
)
In the example provided in CVS files with RECOSIM event content were used as inputs and the choice was made to write in the ouput file the same event content. In this case the output file will contain the same event plus a copy of the photon and conversion collections, recognizable by the different process name, i.e. RERECO (or whatever other name one might like to choose)

If one wishes to reReconstruct photons with different pre-selection cuts, one does not need changing the file containing the official configuration (as described above) but just updatting the parameter in his own config file.

Example:Cutting at Et>20 instead of default 10 GeV
In the photonReReco_fromRECO_cfg.py one just needs to add the line

process.photons.minSCEtBarrel = 20
process.photons.minSCEtEndcap = 20

If, additionally, one wishes to change parameters for the measurement of isolation variables used and set in the Photon, one can add to the previous config file, the line

process.photons.isolationSumsCalculatorSet.EcalRecHitOuterRadiusA_Barrel = 0.5
In this example the default size (dR=0.4) of the cone outer radius for ecal isolation is changed to 0.5

IMPORTANT remembering that EcalRecHits are needed by the CMS.PhotonProducer in order to calculate the shower shapes and isolation. Although in general RecHits are not stored in the AOD event content (e.g. Tracker Rec Hits) a collection of reducedEcalRecHits is stored in AOD.

So if one wishes to reReco Photons from PhotonCore from an AOD file, one needs to add to the example .py the following lines

process.photons.barrelEcalHits = "reducedEcalRecHitsEB"
process.photons.endcapEcalHits = "reducedEcalRecHitsEE"

Re-reconstructing Conversions from AOD, instead, is unfortunately not possible, since they require the RecoTrackExtras, which, being large objects are not saved. Should one want to re-make Conversion, e.g. to improve the pre-selection, needs to use input files with RECO event content

Review status

Reviewer/Editor and Date (copy from screen) Comments
NancyMarinelli - 30 June 2009 Improve instructions for photon/conversion reReco
NancyMarinelli - 29 June 2009 Include workflows
NancyMarinelli - 17 June 2009 Update for cmssw310
NancyMarinelli - 22 Nov 2006 some editing
JennyWilliams - 17 Dec 2007 moved converted photon notes into here as placeholder. Unused conv photon workbook chapter is deleted.
DavidFutyan - 20 Dec 2007 separate SWGuidePhotonReco (photon reconstruction) from WorkBookPhotoAnalysis (photon analysis)

Responsible: NancyMarinelli
Last reviewed by: ChrisSeez - 13 Dec 2006

Topic attachments
I Attachment History Action Size Date Who Comment
GIFgif ConversionRecoWorkflowRotated.GIF r1 manage 21.6 K 2009-06-26 - 12:31 NancyMarinelli  
GIFgif PhotonRecoWorkflowRotated.GIF r1 manage 20.5 K 2009-06-26 - 12:39 NancyMarinelli  
PNGpng snapshot1.png r1 manage 38.7 K 2007-12-20 - 20:30 DavidFutyan  
Edit | Attach | Watch | Print version | History: r28 < r27 < r26 < r25 < r24 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r28 - 2009-10-08 - NancyMarinelli



 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback