Classes | Enumerations | Functions
VLN Namespace Reference

Classes

class  DefaultInputVarExtractor
 
class  EventAddrVarExtractor
 
class  EventMCVarExtractor
 
class  EventRecoEVarExtractor
 
class  EventRecoVarExtractor
 
class  FiducialCutVarExtractor
 
class  PFParticleVarExtractor
 
class  VarExtractorBase
 
struct  VLNEnergy
 
class  VLNEnergyAnalyzer
 
class  VLNEnergyDataGen
 
class  VLNEnergyModel
 
class  VLNEnergyProducer
 
class  VLNEnergyVarExtractor
 

Enumerations

enum  Flavor : int { Flavor::Any = 0, Flavor::NuMu = 14 }
 
enum  Format { Format::CSV }
 

Functions

Flavor parseFlavor (const std::string &flavStr)
 
Format parseFormat (const std::string &formatStr)
 
std::string convertFilename (const std::string &path, const std::string &root, Format format)
 
static const std::vector< std::stringSCALAR_VARS ({"run","subRun","event"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 
static const std::vector< std::stringSCALAR_VARS ({"isCC","pdg","mode","lepPdg","nuE","lepE","hadE"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 
static const std::vector< std::stringSCALAR_VARS ({"nuE","lepE","hadE","longestTrackContained"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 
static const std::vector< std::stringSCALAR_VARS ({"calE","charge","nHits"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 
static const std::vector< std::stringSCALAR_VARS ({"vtxContain"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 
static const std::vector< std::stringSCALAR_VARS ({})
 
static const std::vector< std::stringVECTOR_VARS ({"length","is_shower","start.x","start.y","start.z","dir.x","dir.y","dir.z","energy","nHit","charge","calE",})
 
std::pair< double, double > calcHitsChargeCalE (const std::vector< art::Ptr< recob::Hit >> &hits, const art::Event &evt, calo::CalorimetryAlg &algCalorimetry, unsigned int plane)
 
static const std::vector< std::stringSCALAR_VARS ({"primaryE","totalE"})
 
static const std::vector< std::stringVECTOR_VARS ({})
 

Enumeration Type Documentation

enum VLN::Flavor : int
strong
Enumerator
Any 
NuMu 

Definition at line 6 of file utils.h.

6 : int { Any = 0, NuMu = 14 };
enum VLN::Format
strong
Enumerator
CSV 

Definition at line 7 of file utils.h.

Function Documentation

std::pair< double, double > VLN::calcHitsChargeCalE ( const std::vector< art::Ptr< recob::Hit >> &  hits,
const art::Event evt,
calo::CalorimetryAlg algCalorimetry,
unsigned int  plane 
)

Definition at line 10 of file utils.cxx.

16 {
17  const auto clockData =
19  ->DataFor(evt);
20 
21  const auto detProp =
23  ->DataFor(evt, clockData);
24 
25  const double charge =
27  clockData, detProp, hits
28  );
29 
30  const double calE = algCalorimetry.ElectronsFromADCArea(charge, plane);
31 
32  return std::make_pair(charge, calE);
33 }
double ElectronsFromADCArea(double area, unsigned short plane) const
static double LifetimeCorrectedTotalHitCharge(detinfo::DetectorClocksData const &clockData, detinfo::DetectorPropertiesData const &detProp, const std::vector< art::Ptr< recob::Hit > > &hits)
get the total hit charge, corrected for lifetime
std::string VLN::convertFilename ( const std::string path,
const std::string root,
Format  format 
)

Definition at line 35 of file utils.cxx.

38 {
39  std::string filename(basename(path.c_str()));
40  const size_t dotIdx = filename.find_last_of('.');
41 
42  if (dotIdx != std::string::npos) {
43  filename.resize(dotIdx);
44  }
45 
46  switch (format) {
47  case Format::CSV:
48  return filename + ".csv";
49  default:
50  throw std::invalid_argument("Unknown format");
51  }
52 }
std::string string
Definition: nybbler.cc:12
static bool format(QChar::Decomposition tag, QString &str, int index, int len)
Definition: qstring.cpp:11496
string filename
Definition: train.py:213
Flavor VLN::parseFlavor ( const std::string flavStr)

Definition at line 8 of file utils.cxx.

9 {
10  if (flavStr == "numu") {
11  return Flavor::NuMu;
12  }
13 
14  if (flavStr.empty() || (flavStr == "any")) {
15  return Flavor::Any;
16  }
17 
18  throw std::invalid_argument(
19  "Unknown flavor: " + flavStr
20  + ". Supported Flavors: 'numu', 'any', ''"
21  );
22 }
Format VLN::parseFormat ( const std::string formatStr)

Definition at line 24 of file utils.cxx.

25 {
26  if (formatStr == "csv") {
27  return Format::CSV;
28  }
29 
30  throw std::invalid_argument(
31  "Unknown format: " + formatStr + ". Supported Formats: 'csv'"
32  );
33 }
static const std::vector<std::string> VLN::SCALAR_VARS ( {"run","subRun","event"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {"primaryE","totalE"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {"vtxContain"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {"nuE","lepE","hadE","longestTrackContained"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {"isCC","pdg","mode","lepPdg","nuE","lepE","hadE"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {"calE","charge","nHits"}  )
static
static const std::vector<std::string> VLN::SCALAR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {"length","is_shower","start.x","start.y","start.z","dir.x","dir.y","dir.z","energy","nHit","charge","calE",}  )
static
static const std::vector<std::string> VLN::VECTOR_VARS ( {}  )
static