Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-06-17 07:06:50

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2023 Christopher Dilks
0003 
0004 R__LOAD_LIBRARY(EpicAnalysis)
0005 
0006 // ratios of histograms with y-cut enabled to those with y-cut disabled
0007 void analysis_yRatio(
0008     TString configFile="tutorial/delphes.config", // input config file
0009     TString outfilePrefix="yRatio"                // output filename prefix
0010 ) {
0011 
0012   // setup analysis ========================================
0013   AnalysisDelphes *A = new AnalysisDelphes(configFile, outfilePrefix);
0014 
0015   //A->maxEvents = 30000; // use this to limit the number of events
0016   A->writeSidisTree = true; // write SidisTree (for one bin)
0017   A->SetReconMethod("Ele"); // set reconstruction method
0018   A->AddFinalState("pipTrack"); // pion final state
0019   //A->AddFinalState("KpTrack"); // kaon final state
0020 
0021 
0022   // define cuts ====================================
0023   // - cuts are defined the same way as bins are defined; be mindful
0024   //   of what bins you are defining vs. what cuts you are defining.
0025   //   For example, if you define a Q2 minimum cut, and you also define
0026   //   Q2 bins below, you may be creating more bins than you actually
0027   //   need, since the Q2 minimum cut actually defines another bin;
0028   //   in this case, your Q2 bins effectively define a Q2 minimum.
0029   A->AddBinScheme("w");  A->BinScheme("w")->BuildBin("Min",3.0); // W > 3 GeV
0030   A->AddBinScheme("z");  A->BinScheme("z")->BuildBin("Range",0.2,0.9); // 0.2 < z < 0.9
0031   A->AddBinScheme("xF"); A->BinScheme("xF")->BuildBin("Min",0.0); // xF > 0
0032   A->AddBinScheme("ptLab");  A->BinScheme("ptLab")->BuildBin("Min",0.1); // pT_lab > 0.1 GeV (tracking limit)
0033 
0034 
0035   // set binning scheme ====================================
0036   // z ranges
0037   /*
0038   A->AddBinScheme("z");
0039   A->BinScheme("z")->BuildBin("Range", 0.2, 0.5 );
0040   A->BinScheme("z")->BuildBin("Range", 0.5, 0.8 );
0041   */
0042 
0043   // y minima
0044   A->AddBinScheme("y");
0045   A->BinScheme("y")->BuildBin("Max",0.95); // a bin with no minimum y-cut
0046   A->BinScheme("y")->BuildBin("Range",0.03,0.95);
0047   A->BinScheme("y")->BuildBin("Range",0.05,0.95);
0048   A->BinScheme("y")->BuildBin("Range",0.10,0.95);
0049 
0050   // perform the analysis ==================================
0051   A->Execute();
0052 };