#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 166 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 202 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(). 00203 {
00204
00205 // Check we have a meaningful combination of options
00206 if (det==Detector::kNear && (datatype==kTau || datatype==kElectron)){
00207 assert(0 && "Tau/Electron files don't exist for ND");
00208 }
00209
00210 reg.Set("UseAll185i", false); //use all -185kA data
00211 reg.Set("ReadPDFs", true);
00212 reg.Set("RunPeriod", (int)runPeriod);
00213
00214 // According to some error message, this is done somewhere else...
00215 //MCReweight &mcReweight = MCReweight::Instance();
00216 //NeugenWeightCalculator *neugenWeightCal = new NeugenWeightCalculator;
00217 //mcReweight.AddWeightCalculator(neugenWeightCal);
00218
00219 JobC jc;
00220
00221 // set message service verbosity levels before creating path
00222 // so that messages from the constructor don't get lost
00223 jc.Msg.SetLevel("MicroDSTMaker","Info");
00224 jc.Msg.SetLevel("NCAnalysisUtils","Info");
00225 jc.Msg.SetLevel("NCAnalysisCuts","Info");
00226 jc.Msg.SetLevel("NCUtils","Info");
00227
00228 //Create path
00229 jc.Path.Create("Analysis", "MicroDSTMaker::Ana");
00230
00231 JobCModule& jm=jc.Path("Analysis").Mod("MicroDSTMaker");
00232
00233 jm.GetConfig().UnLockValues();
00234 jm.GetConfig() = reg;
00235 jm.Config(jm.GetConfig());
00236 jm.GetConfig().LockKeys();
00237
00238 jc.Path("Analysis").Run();
00239 //Job Report
00240 jc.Path("Analysis").Report();
00241 //Get Message Statistics
00242 jc.Msg.Stats();
00243 }
|
|
|
Definition at line 195 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 103 of file make_uDST.h. References beamtype, reg, and Registry::Set().
|
|
|
Definition at line 159 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 // The ternary logic is as follows: If datatype is kData, we still
00086 // need to add some MC files because of the way the uDSTs are
00087 // designed, so use the MC designator. For all other cases, use the
00088 // actual datatype (MC, tau or electron)
00089 string glob=path+"/"+
00090 get_designator(det, datatype)+"*antp*.root";
00091 reg.Set("FilePath", glob.c_str());
00092 }
|
|
|
Definition at line 173 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 96 of file make_uDST.h. References reg, and Registry::Set().
|
|
|
Definition at line 189 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 111 of file make_uDST.h. References BeamType::AsString(), beamtype, datatype, det, Form(), kBlind, kMockData, reg, runPeriod, and Registry::Set(). 00112 {
00113 assert(det!=Detector::kUnknown);
00114 assert(datatype!=kUnknown);
00115 assert(beamtype!=BeamType::kUnknown);
00116 // Make sure the run period is set for MC
00117 assert(runPeriod!=NC::RunUtil::kRunAll || datatype==kData);
00118
00119 string fileName(path+"/");
00120 if (det == Detector::kFar) fileName += "far";
00121 else if (det==Detector::kNear) fileName += "near";
00122 else assert(0 && "Unknown detector. Have you called set_detector?");
00123
00124 fileName += "_";
00125 fileName += BeamType::AsString(beamtype);
00126 // This relies on NC::RunUtil::kRunI == 1 etc, which is indeed the case
00127 fileName += Form("_run%d_", (int)runPeriod);
00128
00129 switch(datatype){
00130 case kMC:
00131 fileName += "mc";
00132 break;
00133 case kElectron:
00134 fileName += "electron";
00135 break;
00136 case kTau:
00137 fileName += "tau";
00138 break;
00139 case kData:
00140 fileName += "data_"+month;
00141 break;
00142 case kMockData:
00143 fileName += "mock";
00144 break;
00145 case kBlind:
00146 fileName += "blind";
00147 break;
00148 case kUnknown:
00149 assert(0 && "datatype not set");
00150 }
00151
00152 fileName += tag+".uDST.root";
00153
00154 reg.Set("FileName", fileName.c_str());
00155 }
|
|
|
Definition at line 182 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