iLCSoft / ILDConfig

Package for iLCSoft configuration files related to the ILD detector simulation
GNU General Public License v3.0
3 stars 23 forks source link

Always be zero in PhotonSig part in PandoraLikelihoodData xml file. #123

Open wenxingfang opened 3 years ago

wenxingfang commented 3 years ago

Dear Developer,

Do you have any detailed doc on how to use PandoraSettingsPhotonTraining.xml to get PandoraLikelihoodData9EBin.xml? Recently, I tried use default PandoraSettingsPhotonTraining.xml with electron and photon events as input, but the output of PandoraLikelihoodData9EBin.xml (shown below) always gives 0 in PhotonSig part.


<NEnergyBins>9</NEnergyBins>
<EnergyBinLowerEdges>0 0.2 0.5 1 1.5 2.5 5 10 20 </EnergyBinLowerEdges>
<NSignalEvents>0 0 0 0 0 0 0 0 0 </NSignalEvents>
<NBackgroundEvents>32791 5844 2492 1566 2072 3443 4109 5165 16767 </NBackgroundEvents>
<PhotonSigPeakRms_0>
    <NBinsX>50</NBinsX>
    <XLow>0</XLow>
    <XHigh>5</XHigh>
    <BinContents>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </BinContents>
</PhotonSigPeakRms_0>
<PhotonBkgPeakRms_0>
    <NBinsX>50</NBinsX>
    <XLow>0</XLow>
    <XHigh>5</XHigh>
    <BinContents>0 0 0 6.09923e-05 0.00262267 0.0142417 0.0759355 0.146443 0.0792291 0.11125 0.0987466 0.0766369 0.0766979 0.0653533 0.0559605 0.0451953 0.035528 0.0278125 0.0219267 0.0175048 0.0124424 0.0101857 0.00741057 0.00530633 0.00387301 0.0024092 0.00213473 0.00170779 0.000731908 0.000853893 0.000518435 0.000457443 0.000243969 0.000243969 0.000121985 6.09923e-05 6.09923e-05 0 0 0 3.04962e-05 0 0 3.04962e-05 0 3.04962e-05 0 0 0 0 0 0 </BinContents>
</PhotonBkgPeakRms_0>
<PhotonSigPeakRms_1>
    <NBinsX>50</NBinsX>
    <XLow>0</XLow>
    <XHigh>5</XHigh>
    <BinContents>0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 </BinContents>
</PhotonSigPeakRms_1>
<PhotonBkgPeakRms_1>
    <NBinsX>50</NBinsX>
    <XLow>0</XLow>
    <XHigh>5</XHigh>
    <BinContents>0 0 0 0.000171116 0.00188227 0.00718686 0.0237851 0.0515058 0.0686174 0.08436 0.0833333 0.0879535 0.0817933 0.0773443 0.0793977 0.0626283 0.0511636 0.0482546 0.036961 0.0290897 0.0258385 0.0227584 0.0196783 0.0136893 0.0121492 0.00564682 0.00581793 0.00290897 0.00393566 0.00273785 0.00154004 0.00136893 0.00136893 0.00188227 0.000684463 0.000513347 0.000513347 0.000513347 0.000171116 0.000342231 0.000171116 0.000171116 0 0 0.000171116 0 0 0 0 0 0 0 </BinContents>
</PhotonBkgPeakRms_1>
rete commented 3 years ago

Hi @wenxingfang, I've personally never done that but I know @johnmarshall80 can point you on existing documentation.

PandoraPFA commented 3 years ago

Hi, The approach and performance are probably best documented in Bono's PhD thesis, but this is obviously more of a high-level documentation, rather than technical.

The implementation of the 'standalone' PhotonReconstruction algorithm is here.

I note that you have plenty of events/objects declared as background, but none as signal. I wonder whether the MC information is getting passed in correctly and reaching the Pandora algorithm? Bono's decision as to whether a cluster is signal-like or background-like seems to be defined here.

You could try adding some debug (maybe visual debugging, using PandoraMonitoringApi) to this part of the algorithm, to see what's going on.

Or, rather similarly, you could try running using one of the other algorithms that tries to access MC information, for study purposes, and see if that works out (as a way of validating the input information). E.g. see if there's any clusters made after this algorithm in the PandoraSettingsPerfectPhoton.xml file.

Otherwise, it looks like most of the technical stuff has been solved, in that you are producing a training output file. Just need to find out why it doesn't think any of the clusters are signal-like.

Hope that helps.

P.S. In our LArContent library, you'll see that use of machine learning has moved on significantly since this simple likelihood approach. If you have time and effort available to update this, SVMs, BDTs, etc. are possible without adding a dependency.