Beispiel #1
0
        /// <summary>
        /// Specific options for ABCDExplorer.
        /// </summary>
        //class Options : CommandLineUtils.CommonOptions
        //{

        //}

        /// <summary>
        /// Loop through a set of ABCD methods and try to dump
        /// some generic and dense info on what it is like.
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //Options opt = CommandLineUtils.ParseOptions<Options>(args);

            // Setup which pairs of variables we will look at.
            var abcdPairs = new[]
            {
                Tuple.Create("SumCalR_Sum2JTrackPt", JetEventTypeSumCalRPlot, JetEventTypeSum2JTrackPt),
                Tuple.Create("SumCalR_DRToTrackSum", JetEventTypeSumCalRPlot, JetEventDRToTrackSum),
            };

            // Get the background along with the variables we are going to look at for each event.
            var backgrounds = CommandLineUtils.GetRequestedBackground()
                              .AsEventStream();

            // Do a background
            using (var output = new FutureTFile("ABCDExplorer.root"))
            {
                foreach (var vPair in abcdPairs)
                {
                    var dir = output.mkdir(vPair.Item1);

                    // Do something like the sum of logR and the NTrack variable Something dumb...
                    var explorer = new ABCDCutExplorer <EventType>(vPair.Item2, vPair.Item3);

                    // Do the uncorrelated version of the exploration.
                    var info = DoABCDExploration(explorer, backgrounds, dir.mkdir("correlated"));

                    // Next, get the uncorrelated version
                    var unCorVars    = UncorrelateVariables(info.CoVar, JetEventTypeSumCalRPlot, JetEventTypeSum2JTrackPt);
                    var exploreUnCor = new ABCDCutExplorer <EventType>(unCorVars.Item1, unCorVars.Item2);
                    DoABCDExploration(exploreUnCor, backgrounds, dir.mkdir("uncorrelated"));
                }
            }
        }
Beispiel #2
0
        /// <summary>
        /// Look at a single set of stuff for the ABCD method
        /// </summary>
        /// <param name="explorer"></param>
        /// <param name="backgrounds"></param>
        /// <param name="output"></param>
        private static ABCDInfo DoABCDExploration(ABCDCutExplorer <EventType> explorer, IQueryable <EventType> backgrounds, FutureTDirectory output)
        {
            var info = explorer.ProcessBackground(output.mkdir("JnZ"), backgrounds);

            // And a few signals
            var signalList = SampleMetaData.AllSamplesWithTag("signal")
                             .Select(i => Tuple.Create(i.NickName, Files.GetSampleAsMetaData(i)));

            foreach (var source in signalList)
            {
                // Do everything
                var asEvents = source.Item2
                               .AsEventStream();
                explorer.ProcessSignal(output.mkdir(source.Item1), asEvents);

                // Now, look carefully at only "signal" jets
                var asCalSignalEvents = asEvents
                                        .Where(t => SampleUtils.IsGoodSignalJet.Invoke(t.Item1.Jet) && SampleUtils.IsGoodSignalJet.Invoke(t.Item2.Jet));
                explorer.ProcessSignal(output.mkdir($"{source.Item1}-CalOnly"), asCalSignalEvents);
            }

            return(info);
        }