![]() |
|
|||
File indexing completed on 2024-06-18 07:06:12
0001 // SPDX-License-Identifier: LGPL-3.0-or-later 0002 // Copyright (C) 2023 Christopher Dilks 0003 0004 R__LOAD_LIBRARY(EpicAnalysis) 0005 0006 /* ePIC simulation example 0007 * - note the similarity of the macro to the fast simulation 0008 * - you only need to swap `AnalysisDelphes` with `AnalysisEpic` to switch 0009 * between fast and full simulations 0010 */ 0011 void analysis_epic( 0012 TString configFile="tutorial/epic.config", // input config file 0013 TString outfilePrefix="tutorial.epic" // output filename prefix 0014 ) 0015 { 0016 0017 // setup analysis ======================================== 0018 AnalysisEpic *A = new AnalysisEpic(configFile, outfilePrefix); 0019 0020 // settings 0021 A->verbose = true; // print event-by-event information 0022 //A->maxEvents = 1000; // use this to limit the number of events 0023 A->writeSidisTree = true; // write event-by-event info into TTree 0024 A->writeParticleTree = true; // write particle level info into TTree 0025 0026 // set reconstruction method and final states ============================= 0027 // - see `Analysis` constructor for methods (or other tutorials) 0028 0029 A->SetReconMethod("Ele"); 0030 // A->SetReconMethod("DA"); 0031 // A->SetReconMethod("JB"); 0032 // A->SetReconMethod("Sigma"); 0033 // A->SetReconMethod("Mixed"); 0034 // A->SetReconMethod("eSigma"); 0035 0036 A->AddFinalState("pipTrack"); 0037 // A->AddFinalState("pimTrack"); 0038 // A->AddFinalState("KpTrack"); 0039 // A->AddFinalState("KmTrack"); 0040 0041 0042 // define cuts ==================================== 0043 // - cuts are defined the same way as bins are defined; be mindful 0044 // of what bins you are defining vs. what cuts you are defining. 0045 // For example, if you define a Q2 minimum cut, and you also define 0046 // Q2 bins below, you may be creating more bins than you actually 0047 // need, since the Q2 minimum cut actually defines another bin; 0048 // in this case, your Q2 bins effectively define a Q2 minimum. 0049 A->AddBinScheme("w"); A->BinScheme("w")->BuildBin("Min",3.0); // W > 3 GeV 0050 A->AddBinScheme("y"); A->BinScheme("y")->BuildBin("Range",0.01,0.95); // 0.01 < y < 0.95 0051 A->AddBinScheme("z"); A->BinScheme("z")->BuildBin("Range",0.2,0.9); // 0.2 < z < 0.9 0052 A->AddBinScheme("xF"); A->BinScheme("xF")->BuildBin("Min",0.0); // xF > 0 0053 A->AddBinScheme("ptLab"); A->BinScheme("ptLab")->BuildBin("Min",0.1); // pT_lab > 0.1 GeV (tracking limit) 0054 0055 0056 // set binning scheme ==================================== 0057 // - see other tutorials for guidance 0058 // - see `Analysis` constructor for available bin variables 0059 A->AddBinScheme("q2"); 0060 A->AddBinScheme("x"); 0061 0062 // 3x2 grid of (x,Q2) bins, equal width in logarithmic scale 0063 A->BinScheme("q2")->BuildBins( 2, 1, 100, true ); 0064 A->BinScheme("x")->BuildBins( 3, 0.01, 1, true ); 0065 0066 0067 0068 // perform the analysis ================================== 0069 A->Execute(); 0070 0071 // for reference, here is a print out of HistosDAG 0072 // - it lists each node, together with its inputs and outputs, which 0073 // indicate the connections between the nodes 0074 //A->GetHistosDAG()->PrintBreadth("HistosDAG Nodes"); 0075 0076 }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.5 LXR engine. The LXR team |
![]() ![]() |