XENON1T / hax

Handy Analysis for XENON (reduce processed data)
8 stars 0 forks source link

Tfnn switch #237

Closed feigaodm closed 5 years ago

feigaodm commented 6 years ago

A dirty way to switch analysis to that using TensorFlow based position for post-SR1 analysis. I didn't have time to make a nicer function etc for more generic applications, for example extension to double scatter analysis. We may spend some effect on that too afterwards.

In post-SR1 lichens, we should switch the the corresponding position too.

zhut19 commented 5 years ago

Looks and tested to be okey.

feigaodm commented 5 years ago

Thanks @zhut19 for the fix. Stupid bug :)

feigaodm commented 5 years ago

After this PR is merged, we will need to do a few things to separate the treatment of SR1 and SR2 analysis.

For SR2:

For SR1, we want to avoid regenerating minitrees:

Initialize HAX in the standard way:, like this:

pax_version='6.8.0' 

hax.init(experiment='XENON1T',
         pax_version_policy= '6.10.1', 
         main_data_paths = ['/dali/lgrandi/xenon1t/processed/pax_v'+pax_version, 
                            '/project/lgrandi/xenon1t/processed/pax_v'+pax_version],
         minitree_paths=['/project/lgrandi/feigao/minitrees/pax_v'+pax_version,  # or add a path to which you can write to, in case minitrees are missing in the standard /project paths
                         '/project2/lgrandi/xenon1t/minitrees/pax_v'+pax_version,
                         '/project/lgrandi/xenon1t/minitrees/pax_v'+pax_version,
                         '/dali/lgrandi/xenon1t/minitrees/pax_v'+pax_version])

Please specify your own folder to store minitrees in case they are generated, otherwise you will see Errors because one doesn't have permission to write to xenon1t folders. Before loading minitrees, make sure to specify some minitree versions for SR1. Like the following:

hax.minitrees.hax.treemakers.corrections.Corrections.__version__ = '2.0'
hax.minitrees.hax.treemakers.posrec.PositionReconstruction.__version__ = '1.2'

Then you can load the minitrees without regeneration.

df_old = hax.minitrees.load(22237, ['Fundamentals','Corrections'],num_workers=1)

If minitree specification is skipped, you will likely generate the minitrees again.