<commit_before>/**
 * @file   TrackletAODdNdeta.C
 * @author <NAME> <<EMAIL>>
 * @date   Wed Apr 27 16:51:47 2016
 * 
 * @brief  A tracklet dNdeta train
 * 
 * 
 * @ingroup pwglf_forward_tracklets
 */
#include "TrainSetup.C"
#ifndef __CINT__
#include <AliESDInputHandlerRP.h>
// #include <AliMixInputEventHandler.h>
// #include <AliMixEventPool.h>
// #include <AliMixEventCutObj.h>
#include <TMacro.h>
#else
class AliAnalysisTaskSE;
#endif

/** 
 * Train definition to make custom AOD with tracklets 
 * 
 * Run as 
 @verbatim 
 runTrain --class=TrackletAODTrain --name=NAME --url=URL 
 @endverbatim 
 *
 * See also 
 *
 * - https://twiki.cern.ch/twiki/bin/view/ALICE/FMDTrains
 * - http://hehi00.nbi.dk:8888/pwglfforward/train_setup_doc.html
 * 
 * This train uses a custom PAR file (RubensCode.par) of the classes
 *
 * - AliTrackletTaskMulti
 * - AliITSMultRecBg
 *
 * If these classes lived in a compiled AliPhysics library (Say
 * libPWGUD.so), the we wouldn't need that PAR file.
 *
 * @ingroup pwglf_forward_tracklets
 */
struct TrackletAODdNdeta : public TrainSetup
{
  /** 
   * Constructor.  This sets up the available options 
   * 
   * @param name Free form name 
   */
  TrackletAODdNdeta(const char* name)
    : TrainSetup(name)
  {
    // Define all our options here
    const char* defCent = DefaultCentBins();
    fOptions.Add("trig",       "NAME",   "Trigger to use",         "V0AND");
    fOptions.Add("cent",       "METHOD", "Centrality selector",    "V0M");
    fOptions.Add("cent-bins",  "BINS",   "Centrality bins",        defCent); 
    fOptions.Add("eta-bins",   "BINS",   "Eta bins",               "r16:-2:+2");
    fOptions.Add("ipz-bins",   "BINS",   "IPz bins",               "u15");
    fOptions.Add("max-delta",  "X",      "Cut on weighted distance",25.);
    fOptions.Add("tail-delta", "X",      "Tail cut on distance",    5.);
    fOptions.Add("delta-cut",  "X",      "Cut on weighted distance",1.5);
    fOptions.Add("dphi-shift", "RADIANS","Bending shift",           0.0045);
    fOptions.Add("shifted-dphi-cut", "RADIANS", "Cut on dPhi-phiBent",  -1.);
    fOptions.Add("mc",                   "For MC data",             false);
    fOptions.Add("multsel",              "Enable MultSelection",    false);
    fOptions.Add("abs-min-cent","PERCENT","Absolute least cent.",   -1);
    fOptions.Add("reweight",   "FILE",    "File with weights",      "");
    fOptions.SetDescription("Analyse AOD for dN/deta from tracklets");
    fOptions.Set("type", "AOD");
  }
  /** 
   * The default centrality bins 
   * 
   * @return The list of centrality bins 
   */
  const char* DefaultCentBins() const
  {
    return "0-5-10-20-30-40-50-60-70-80-90";
  }
  /** 
   * Create output handler.  Overloaded here to set no output handler,
   * as this train does not define any AOD output.
   * 
   * @return Always null
   */
  virtual AliVEventHandler* CreateOutputHandler(UShort_t)
  {
    return 0;
  }
  /** 
   * Create centrality selection, and add to manager
   * 
   * @param mc Whether this is for MC 
   */
  virtual void CreateCentralitySelection(Bool_t mc)
  {
    mc               = fOptions.Has("mc");
    if (!mc) mc      = fRailway->IsMC();     
    if (fOptions.AsBool("multsel"))
      TrainSetup::CreateCentralitySelection(mc);
  }
  /** 
   * Create our tasks.  This uses the interpreter to make the object.
   * 
   * @param mgr 
   */
  void CreateTasks(AliAnalysisManager* mgr)
  {
    Info("CreateTasks", "Loading code");
    fRailway->LoadSource("FixPaths.C");
    fRailway->LoadSource("AliAODTracklet.C");
    fRailway->LoadSource("AliAODSimpleHeader.C");
    fRailway->LoadSource("AliTrackletWeights.C");
    fRailway->LoadSource("AliTrackletAODUtils.C");
    fRailway->LoadSource("AliTrackletAODdNdeta.C");
<commit_msg>Change order of loading scripts<commit_after>/**
 * @file   TrackletAODdNdeta.C
 * @author <NAME> <<EMAIL>>
 * @date   Wed Apr 27 16:51:47 2016
 * 
 * @brief  A tracklet dNdeta train
 * 
 * 
 * @ingroup pwglf_forward_tracklets
 */
#include "TrainSetup.C"
#ifndef __CINT__
#include <AliESDInputHandlerRP.h>
// #include <AliMixInputEventHandler.h>
// #include <AliMixEventPool.h>
// #include <AliMixEventCutObj.h>
#include <TMacro.h>
#else
class AliAnalysisTaskSE;
#endif

/** 
 * Train definition to make custom AOD with tracklets 
 * 
 * Run as 
 @verbatim 
 runTrain --class=TrackletAODTrain --name=NAME --url=URL 
 @endverbatim 
 *
 * See also 
 *
 * - https://twiki.cern.ch/twiki/bin/view/ALICE/FMDTrains
 * - http://hehi00.nbi.dk:8888/pwglfforward/train_setup_doc.html
 * 
 * This train uses a custom PAR file (RubensCode.par) of the classes
 *
 * - AliTrackletTaskMulti
 * - AliITSMultRecBg
 *
 * If these classes lived in a compiled AliPhysics library (Say
 * libPWGUD.so), the we wouldn't need that PAR file.
 *
 * @ingroup pwglf_forward_tracklets
 */
struct TrackletAODdNdeta : public TrainSetup
{
  /** 
   * Constructor.  This sets up the available options 
   * 
   * @param name Free form name 
   */
  TrackletAODdNdeta(const char* name)
    : TrainSetup(name)
  {
    // Define all our options here
    const char* defCent = DefaultCentBins();
    fOptions.Add("trig",       "NAME",   "Trigger to use",         "V0AND");
    fOptions.Add("cent",       "METHOD", "Centrality selector",    "V0M");
    fOptions.Add("cent-bins",  "BINS",   "Centrality bins",        defCent); 
    fOptions.Add("eta-bins",   "BINS",   "Eta bins",               "r16:-2:+2");
    fOptions.Add("ipz-bins",   "BINS",   "IPz bins",               "u15");
    fOptions.Add("max-delta",  "X",      "Cut on weighted distance",25.);
    fOptions.Add("tail-delta", "X",      "Tail cut on distance",    5.);
    fOptions.Add("delta-cut",  "X",      "Cut on weighted distance",1.5);
    fOptions.Add("dphi-shift", "RADIANS","Bending shift",           0.0045);
    fOptions.Add("shifted-dphi-cut", "RADIANS", "Cut on dPhi-phiBent",  -1.);
    fOptions.Add("mc",                   "For MC data",             false);
    fOptions.Add("multsel",              "Enable MultSelection",    false);
    fOptions.Add("abs-min-cent","PERCENT","Absolute least cent.",   -1);
    fOptions.Add("reweight",   "FILE",    "File with weights",      "");
    fOptions.SetDescription("Analyse AOD for dN/deta from tracklets");
    fOptions.Set("type", "AOD");
  }
  /** 
   * The default centrality bins 
   * 
   * @return The list of centrality bins 
   */
  const char* DefaultCentBins() const
  {
    return "0-5-10-20-30-40-50-60-70-80-90";
  }
  /** 
   * Create output handler.  Overloaded here to set no output handler,
   * as this train does not define any AOD output.
   * 
   * @return Always null
   */
  virtual AliVEventHandler* CreateOutputHandler(UShort_t)
  {
    return 0;
  }
  /** 
   * Create centrality selection, and add to manager
   * 
   * @param mc Whether this is for MC 
   */
  virtual void CreateCentralitySelection(Bool_t mc)
  {
    mc               = fOptions.Has("mc");
    if (!mc) mc      = fRailway->IsMC();     
    if (fOptions.AsBool("multsel"))
      TrainSetup::CreateCentralitySelection(mc);
  }
  /** 
   * Create our tasks.  This uses the interpreter to make the object.
   * 
   * @param mgr 
   */
  void CreateTasks(AliAnalysisManager* mgr)
  {
    Info("CreateTasks", "Loading code");
    fRailway->LoadSource("FixPaths.C");
    fRailway->LoadSource("AliAODSimpleHeader.C");
    fRailway->LoadSource("AliAODTracklet.C");
    fRailway->LoadSource("AliTrackletWeights.C");
    fRailway->LoadSource("AliTrackletAODUtils.C");
    fRailway->LoadSource("AliTrackletAODdNdeta.C");

{'fraction_non_alphanumeric': 0.1437268395976707, 'fraction_numerical': 0.015616728427739545, 'mean_word_length': 2.8302078053725293, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 33, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5934687', 'n_tokens_mistral': 2765, 'n_tokens_neox': 2578, 'n_words': 594}