Functions | Variables
PandAna.utils.misc Namespace Reference

Functions

def FindPandAnaDir (folder=None)
 
def GetPeriod (run, det)
 
def StopAllUserProjects ()
 

Variables

 BeamDirFD = np.array([-6.83271078e-05, 6.38772962e-02, 9.97957758e-01])
 
 BeamDirND = np.array([-8.42393199e-04, -6.17395015e-02, 9.98091942e-01])
 

Function Documentation

def PandAna.utils.misc.FindPandAnaDir (   folder = None)

Definition at line 10 of file misc.py.

References novadaq::HexUtils.format().

Referenced by PandAna.weight.xsec_utils.RPAWeightCCQE_2017.__init__(), PandAna.weight.xsec_utils.RPAWeightQ2_2017.__init__(), and PandAna.weight.xsec_utils.EmpiricalMECWgt2018.__init__().

10 def FindPandAnaDir(folder=None):
11  pandana = os.environ['FW_RELEASE_BASE']+'/PandAna'
12  if folder:
13  pandana = folder+'/PandAna'
14  assert os.path.isdir(pandana), "Cannot find directory : {}".format(pandana)
15  return pandana
16 
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def FindPandAnaDir(folder=None)
Definition: misc.py:10
def PandAna.utils.misc.GetPeriod (   run,
  det 
)

Definition at line 17 of file misc.py.

Referenced by PandAna.var.numuE_utils.GetSpline(), and PandAna.var.analysis_vars.kNumuHadE().

17 def GetPeriod(run, det):
18  if (det == detector.kFD):
19  if (run <= 12941): return 0
20  if (run <= 17139): return 1
21  if (run <= 20752): return 2
22  if (run <= 23419): return 3
23  if (run <= 24613): return 4
24  if (run <= 25412): return 5
25  if (run <= 28036): return 6
26  else: return 7
27  if (det == detector.kND):
28  if (run < 10377): return 0
29  if (run <= 10407): return 1
30  if (run <= 11228): return 2
31  if (run <= 11628): return 3
32  if (run <= 11925): return 4
33  if (run <= 12086): return 5
34  if (run <= 12516): return 6
35  else: return 7
36 
37 # stop all my pandana projects
def GetPeriod(run, det)
Definition: misc.py:17
def PandAna.utils.misc.StopAllUserProjects ( )

Definition at line 38 of file misc.py.

References print.

39  user = os.getenv('USER')
40  if os.getenv('_CONDOR_SCRATCH_DIR'):
41  print("Can only stop projects interactively")
42  sys.exit(2)
43  import samweb_client
44  SAM = samweb_client.SAMWebClient(experiment='nova')
45  projlist = SAM.listProjects(user=user, state='running')
46  for proj in projlist:
47  if (user+"_pandana_proj") in proj:
48  SAM.stopProject(proj)
49  return
50 
bool print
def StopAllUserProjects()
Definition: misc.py:38

Variable Documentation

PandAna.utils.misc.BeamDirFD = np.array([-6.83271078e-05, 6.38772962e-02, 9.97957758e-01])

Definition at line 7 of file misc.py.

PandAna.utils.misc.BeamDirND = np.array([-8.42393199e-04, -6.17395015e-02, 9.98091942e-01])

Definition at line 8 of file misc.py.