#include "NCUtils/NCType.h"#include "NCUtils/NCRunUtil.h"#include "JobControl/JobC.h"#include "JobControl/JobCModule.h"#include "Registry/Registry.h"#include "Conventions/Detector.h"#include "Conventions/BeamType.h"#include "Conventions/ReleaseType.h"#include "MCReweight/MCReweight.h"#include "MCReweight/NeugenWeightCalculator.h"#include <iostream>#include <string>Go to the source code of this file.
Enumerations | |
| enum | EDataType { kUnknown = -1, kMC, kData, kMockData, kBlind, kElectron, kTau } |
Functions | |
| void | set_month (string m) |
| void | set_detector (Detector::Detector_t _det) |
| void | set_datatype (EDataType t) |
| void | set_runperiod (NC::RunUtil::ERunType r) |
| string | get_designator (Detector::Detector_t d, EDataType t) |
| void | set_dir (string path) |
| void | set_mc_version (ReleaseType::Release_t r) |
| void | set_beamtype (BeamType::BeamType_t b) |
| void | set_output (string path, string tag="") |
| void | set_cuts (NCType::ECuts c) |
| void | do_extractions (string codenames) |
| void | set_file_limit (int limit) |
| void | set_pdf_training_file (TString s) |
| void | set_mda_mc_path (TString s) |
| void | set_ann_use_lowE (bool useLowE) |
| void | run () |
Variables | |
| Registry | reg |
| EDataType | datatype = kUnknown |
| Detector::Detector_t | det = Detector::kUnknown |
| BeamType::BeamType_t | beamtype = BeamType::kUnknown |
| NC::RunUtil::ERunType | runPeriod = NC::RunUtil::kRunAll |
| string | month = "" |
|
|
Definition at line 15 of file make_uDST.h.
|
|
|
Definition at line 181 of file make_uDST.h. References reg, and Registry::Set().
|
|
||||||||||||
|
Definition at line 58 of file make_uDST.h. References kBlind, and kMockData. Referenced by set_dir(). 00059 {
00060 if(d==Detector::kFar){
00061 switch(datatype){
00062 case kMC: return "f210";
00063 case kData: // Fallthrough
00064 case kMockData: // Fallthrough
00065 case kBlind:
00066 return "F";
00067 case kElectron: return "f214";
00068 case kTau: return "f213";
00069 default: assert(0 && "Something went horribly wrong");
00070 }
00071 } else if(d==Detector::kNear){
00072 if(t==kMC) return "n";
00073 else return "N";
00074 }
00075
00076 assert(0 && "Something Wrong: unknown detector");
00077 }
|
|
|
Definition at line 217 of file make_uDST.h. References JobCModule::Config(), JobCPathModule::Create(), datatype, det, JobCModule::GetConfig(), jc, Registry::LockKeys(), JobC::Msg, JobC::Path, reg, JobCPathModule::Report(), runPeriod, Registry::Set(), JobCMsgModule::SetLevel(), JobCMsgModule::Stats(), and Registry::UnLockValues(). 00218 {
00219
00220 // Check we have a meaningful combination of options
00221 if (det==Detector::kNear && (datatype==kTau || datatype==kElectron)){
00222 assert(0 && "Tau/Electron files don't exist for ND");
00223 }
00224
00225 reg.Set("UseAll185i", false); //use all -185kA data
00226 reg.Set("ReadPDFs", true);
00227 reg.Set("RunPeriod", (int)runPeriod);
00228
00229 // According to some error message, this is done somewhere else...
00230 //MCReweight &mcReweight = MCReweight::Instance();
00231 //NeugenWeightCalculator *neugenWeightCal = new NeugenWeightCalculator;
00232 //mcReweight.AddWeightCalculator(neugenWeightCal);
00233
00234 JobC jc;
00235
00236 // set message service verbosity levels before creating path
00237 // so that messages from the constructor don't get lost
00238 jc.Msg.SetLevel("MicroDSTMaker","Info");
00239 jc.Msg.SetLevel("NCAnalysisUtils","Info");
00240 jc.Msg.SetLevel("NCAnalysisCuts","Info");
00241 jc.Msg.SetLevel("NCUtils","Info");
00242
00243 //Create path
00244 jc.Path.Create("Analysis", "MicroDSTMaker::Ana");
00245
00246 JobCModule& jm=jc.Path("Analysis").Mod("MicroDSTMaker");
00247
00248 jm.GetConfig().UnLockValues();
00249 jm.GetConfig() = reg;
00250 jm.Config(jm.GetConfig());
00251 jm.GetConfig().LockKeys();
00252
00253 jc.Path("Analysis").Run();
00254 //Job Report
00255 jc.Path("Analysis").Report();
00256 //Get Message Statistics
00257 jc.Msg.Stats();
00258 }
|
|
|
Definition at line 210 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 113 of file make_uDST.h. References beamtype, reg, and Registry::Set().
|
|
|
Definition at line 174 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 44 of file make_uDST.h. References datatype. 00045 {
00046 datatype=t;
00047 }
|
|
|
Definition at line 36 of file make_uDST.h. References det. 00037 {
00038 det=_det;
00039 }
|
|
|
Definition at line 81 of file make_uDST.h. References datatype, det, get_designator(), reg, and Registry::Set(). 00082 {
00083 assert(det!=Detector::kUnknown);
00084 assert(datatype!=kUnknown);
00085 string runPeriodStr;
00086 switch(runPeriod){
00087 case NC::RunUtil::kRunI:
00088 runPeriodStr="r1"; break;
00089 case NC::RunUtil::kRunII:
00090 runPeriodStr="r2"; break;
00091 case NC::RunUtil::kRunIII:
00092 runPeriodStr="r3"; break;
00093 case NC::RunUtil::kRunAll:
00094 // This will happen for data
00095 runPeriodStr=""; break;
00096 default:
00097 assert(0 && "Unknown runPeriod");
00098 }
00099 string glob=path+"/"+
00100 get_designator(det, datatype)+"*"+runPeriodStr+"*.antp*.root";
00101 reg.Set("FilePath", glob.c_str());
00102 }
|
|
|
Definition at line 188 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 106 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 204 of file make_uDST.h. References reg, s(), and Registry::Set().
|
|
|
Definition at line 29 of file make_uDST.h. References month. 00030 {
00031 month=m;
00032 }
|
|
||||||||||||
|
Definition at line 121 of file make_uDST.h. References BeamType::AsString(), beamtype, datatype, det, Form(), kBlind, kMockData, reg, runPeriod, and Registry::Set(). 00122 {
00123 assert(det!=Detector::kUnknown);
00124 assert(datatype!=kUnknown);
00125 assert(beamtype!=BeamType::kUnknown);
00126 // Make sure the run period is set for MC
00127 assert(runPeriod!=NC::RunUtil::kRunAll || datatype==kData);
00128
00129 string fileName(path+"/");
00130 if (det == Detector::kFar) fileName += "far";
00131 else if (det==Detector::kNear) fileName += "near";
00132 else assert(0 && "Unknown detector. Have you called set_detector?");
00133
00134 fileName += "_";
00135 fileName += BeamType::AsString(beamtype);
00136 fileName += "_";
00137 // Only add "run<n>" to the filename if we've been given a specific runperiod
00138 // This means that data doesn't get one
00139 if(runPeriod!=NC::RunUtil::kRunAll){
00140 // This relies on NC::RunUtil::kRunI == 1 etc, which is indeed the case
00141 fileName += Form("run%d_", (int)runPeriod);
00142 }
00143
00144 switch(datatype){
00145 case kMC:
00146 fileName += "mc";
00147 break;
00148 case kElectron:
00149 fileName += "electron";
00150 break;
00151 case kTau:
00152 fileName += "tau";
00153 break;
00154 case kData:
00155 fileName += "data_"+month;
00156 break;
00157 case kMockData:
00158 fileName += "mock";
00159 break;
00160 case kBlind:
00161 fileName += "blind";
00162 break;
00163 case kUnknown:
00164 assert(0 && "datatype not set");
00165 }
00166
00167 fileName += tag+".uDST.root";
00168
00169 reg.Set("FileName", fileName.c_str());
00170 }
|
|
|
Definition at line 197 of file make_uDST.h. References reg, s(), and Registry::Set().
|
|
|
Definition at line 51 of file make_uDST.h. References runPeriod. 00052 {
00053 runPeriod=r;
00054 }
|
|
|
Definition at line 23 of file make_uDST.h. Referenced by ParticleBeamMonAna::ana(), Anp::FillFlux::Fill(), Anp::RunModule::Init(), NtpTools::PassBeamCuts(), Trimmer::RunTrimmer(), set_beamtype(), set_output(), and ParticleTrimmer::trimPOT(). |
|
|
Definition at line 21 of file make_uDST.h. Referenced by run(), set_datatype(), set_dir(), and set_output(). |
|
|
|
|
Definition at line 19 of file make_uDST.h. Referenced by Anp::PlotPmt::Add(), Anp::SelectNuMu::Config(), Anp::SelectKinem::Config(), Anp::Interface::Config(), Anp::SelectKinem::GetAlg(), RegistryGui::GetRegistry(), Anp::RunkNN::MakeKin(), Anp::RunkNN::MakePid(), and SetKNNModule::Reco(). |
|
|
Definition at line 24 of file make_uDST.h. Referenced by NC::RunUtil::FindRunType(), NCPOTCounter::GetListOfFiles(), NCExtrapolationModule::Run(), run(), CDAnalysis::RunNumber2RunPeriod(), set_output(), and set_runperiod(). |
1.3.9.1