/// <summary>
        /// Load up data and plot the jet pT for jets with
        /// eta less than 1.5.
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            var t = new NTStopwatch();
            t.Start();

            var dataset = "user.emmat.mc15_13TeV.361022.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ2W.merge.AOD.e3668_s2576_s2132_r6765_r6282__EXOT15_v3_EXT0";
            var jobFiles = GRIDJobs.FindJobFiles("DiVertAnalysis", 3, dataset);

            var events = QueryablerecoTree.CreateQueriable(jobFiles);
            //events.CleanupQuery = false; // Set to keep C++ around
            //events.IgnoreQueryCache = true; // Set to ignore query cache for speed

            using (var f = new FutureTFile("S1.root"))
            {
                var count = events.FutureCount();
                events
                    .SelectMany(e => e.Jet)
                    .Where(j => Math.Abs(j.eta) < 1.5)
                    .FuturePlot("pt", "Jet pT; pT [GeV]", 100, 0.0, 100.0, j => j.pT)
                    .Save(f);

                Console.WriteLine($"Saw {count.Value} events.");
            }

            // Print out usage
            Console.WriteLine("Time taken to run this query:");
            t.Stop();
            t.Print();
        }
Exemple #2
0
 static void Main(string[] args)
 {
     var t = new NTStopwatch();
     t.Start();
     var h = new NTH1F("hi", "there", 10, 0.0, 100.0);
     for (int i = 0; i < 100000000; i++)
     {
         h.Fill(10);
     }
     t.Stop();
     h.Print();
     t.Print();
 }
Exemple #3
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();

            t.Start();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);

            for (int i = 0; i < 100000000; i++)
            {
                h.Fill(10);
            }
            t.Stop();
            h.Print();
            t.Print();
        }
Exemple #4
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);
            h.Fill(4);
            var a = h.GetXaxis();

            string newname = "fork";
            t.Start();
            for (int i = 0; i < 30000; i++)
            {
                a.SetBinLabel(3, newname);
            }
            t.Stop();
            t.Print();
        }
Exemple #5
0
        static void Main(string[] args)
        {
            var t = new NTStopwatch();
            var h = new NTH1F("hi", "there", 10, 0.0, 100.0);

            h.Fill(4);
            var a = h.GetXaxis();

            string newname = "fork";

            t.Start();
            for (int i = 0; i < 30000; i++)
            {
                a.SetBinLabel(3, newname);
            }
            t.Stop();
            t.Print();
        }
        static void Main(string[] args)
        {
            var t = new NTStopwatch();

            t.Start();
            var filename = @"C:\Users\gordo\Documents\GRIDDS\user.emma.mc15_13TeV.361023.Pythia8EvtGen_A14NNPDF23LO_jetjet_JZ3W.merge.DAOD_EXOT15.e3668_s2576_s2132_r7773_r7676_p2952.v201\copied\ntuples_QCD_JZ3__0_addFullEtaMLP.root";
            var tree     = ROOTData.QueryablerecoTree.CreateQueriable(new FileInfo(filename));

            tree.IgnoreQueryCache = true;

            using (var f = new FutureTFile(new FileInfo("../../../../01.root")))
            {
                tree
                .Select(e => e.event_HTMiss)
                .Plot("met", "MET; Missing H_{T} [GeV]", 100, 0.0, 500.0)
                .Save(f);
            }
            t.Stop();
            t.Print();
            WriteLine("done");
        }