CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
MVASteering_cfi Namespace Reference

Functions

def EverythingInItsRightPlace
 
def GetTrainingFile
 DO NOT MODIFY BELOW THIS LINE (experts only) #############. More...
 

Variables

string BackgroundFileTestingGlob = "%s/*4.root"
 
string BackgroundFileTrainingGlob = "%s/*[012356789].root"
 
tuple BackgroundRootDir = os.path.join(TauTagToolsWorkingDirectory, "test", "qcd")
 
tuple BackgroundTestingFiles = glob.glob(BackgroundFileTestingGlob)
 
tuple BackgroundTrainFiles = glob.glob(BackgroundFileTrainingGlob)
 
 ExcludePrepassAndPrefail = False
 
string IsolationCutForTraining = "Alt$(ChargedOutlierPt[0], 0) < 1.0 && Alt$(NeutralOutlierPt[0], 0) < 1.5"
 
string LeadPionRequirementString = "( (MainTrackPt > %f && MainTrackAngle < 0.1) || (Alt$(TrackPt[0],0) > %f && Alt$(TrackAngle[0], 20) < 0.1) || (Alt$(PiZeroPt[0], 0) > %f && Alt$(PiZeroAngle[0], 20) < 0.1) )"
 
dictionary listOfMVANames = {}
 
dictionary MVACollections = {}
 USER PARAMETERS #######################################. More...
 
list myModules = []
 
list myTauAlgorithms = ["shrinkingConePFTauDecayModeProducer"]
 
tuple name = _mva.computerName.value()
 
list Project_Area = os.environ["CMSSW_BASE"]
 
float RequireLeadPionPt = 5.0
 
string SignalFileTestingGlob = "%s/*4.root"
 
string SignalFileTrainingGlob = "%s/*[012356789].root"
 
tuple SignalRootDir = os.path.join(TauTagToolsWorkingDirectory, "test", "ztt")
 
tuple SignalTestingFiles = glob.glob(SignalFileTestingGlob)
 
tuple SignalTrainFiles = glob.glob(SignalFileTrainingGlob)
 
tuple TauTagToolsWorkingDirectory = os.path.join(Project_Area, "src/RecoTauTag/TauTagTools")
 
 UseWeights = True
 
 WeightByIndividualDecayMode = False
 

Detailed Description

     MVASteering.py
     Author: Evan K. Friis, UC Davis (friis@physics.ucdavis.edu)

     Define the MVA configurations (ie TaNC) to be used in training/testing
             - which neural net 
             - which algorithms (shrinkingConePFTauDecayModeProducer, etc)
     Define locations of train/test ROOT files

Function Documentation

def MVASteering_cfi.EverythingInItsRightPlace ( )

Definition at line 119 of file MVASteering_cfi.py.

121  if not len(SignalTrainFiles) or not len(BackgroundTrainFiles) or not len(SignalTestingFiles) or not len(BackgroundTestingFiles):
122  raise IOError("The signal/background root file training/testing file list is empty! Check the SignalFileTrainingGlob etc. in MVASteering.py")
123 
124  # Ensure that we have all the necessary XML files
125  for aModule in myModules:
126  computerName = aModule.computerName.value() #conver to python string
127  xmlFileLoc = os.path.join(TauTagToolsWorkingDirectory, "xml", "%s.xml" % computerName)
128  if not os.path.exists(xmlFileLoc):
129  raise IOError("Can't find xml configuration file for %s - please check that %s exists!" % (computerName, xmlFileLoc))
130 
131  if not os.path.exists(SignalRootDir):
132  raise IOError("Signal root file directory (%s) does not exist! Have you created the MVA raw training data?" % SignalRootDir)
133  if not os.path.exists(BackgroundRootDir):
134  raise IOError("Background root file directory (%s) does not exist! Have you created the MVA raw training data?" % BackgroundRootDir)
def MVASteering_cfi.GetTrainingFile (   computerName,
  anAlgo 
)

DO NOT MODIFY BELOW THIS LINE (experts only) #############.

Definition at line 97 of file MVASteering_cfi.py.

97 
98 def GetTrainingFile(computerName, anAlgo):
99  return os.path.join(TauTagToolsWorkingDirectory, "test", "TrainDir_%s_%s" % (computerName, anAlgo), "%s.mva" % computerName)
100 
#Find the unique mva types to train
def GetTrainingFile
DO NOT MODIFY BELOW THIS LINE (experts only) #############.

Variable Documentation

string MVASteering_cfi.BackgroundFileTestingGlob = "%s/*4.root"

Definition at line 91 of file MVASteering_cfi.py.

string MVASteering_cfi.BackgroundFileTrainingGlob = "%s/*[012356789].root"

Definition at line 86 of file MVASteering_cfi.py.

tuple MVASteering_cfi.BackgroundRootDir = os.path.join(TauTagToolsWorkingDirectory, "test", "qcd")

Definition at line 81 of file MVASteering_cfi.py.

tuple MVASteering_cfi.BackgroundTestingFiles = glob.glob(BackgroundFileTestingGlob)

Definition at line 116 of file MVASteering_cfi.py.

tuple MVASteering_cfi.BackgroundTrainFiles = glob.glob(BackgroundFileTrainingGlob)

Definition at line 113 of file MVASteering_cfi.py.

MVASteering_cfi.ExcludePrepassAndPrefail = False

Definition at line 65 of file MVASteering_cfi.py.

string MVASteering_cfi.IsolationCutForTraining = "Alt$(ChargedOutlierPt[0], 0) < 1.0 && Alt$(NeutralOutlierPt[0], 0) < 1.5"

Definition at line 48 of file MVASteering_cfi.py.

string MVASteering_cfi.LeadPionRequirementString = "( (MainTrackPt > %f && MainTrackAngle < 0.1) || (Alt$(TrackPt[0],0) > %f && Alt$(TrackAngle[0], 20) < 0.1) || (Alt$(PiZeroPt[0], 0) > %f && Alt$(PiZeroAngle[0], 20) < 0.1) )"

Definition at line 70 of file MVASteering_cfi.py.

dictionary MVASteering_cfi.listOfMVANames = {}

Definition at line 101 of file MVASteering_cfi.py.

dictionary MVASteering_cfi.MVACollections = {}

USER PARAMETERS #######################################.

Definition at line 32 of file MVASteering_cfi.py.

list MVASteering_cfi.myModules = []

Definition at line 108 of file MVASteering_cfi.py.

list MVASteering_cfi.myTauAlgorithms = ["shrinkingConePFTauDecayModeProducer"]

Definition at line 51 of file MVASteering_cfi.py.

tuple MVASteering_cfi.name = _mva.computerName.value()

Definition at line 104 of file MVASteering_cfi.py.

list MVASteering_cfi.Project_Area = os.environ["CMSSW_BASE"]

Definition at line 15 of file MVASteering_cfi.py.

float MVASteering_cfi.RequireLeadPionPt = 5.0

Definition at line 69 of file MVASteering_cfi.py.

string MVASteering_cfi.SignalFileTestingGlob = "%s/*4.root"

Definition at line 90 of file MVASteering_cfi.py.

string MVASteering_cfi.SignalFileTrainingGlob = "%s/*[012356789].root"

Definition at line 85 of file MVASteering_cfi.py.

tuple MVASteering_cfi.SignalRootDir = os.path.join(TauTagToolsWorkingDirectory, "test", "ztt")

Definition at line 80 of file MVASteering_cfi.py.

tuple MVASteering_cfi.SignalTestingFiles = glob.glob(SignalFileTestingGlob)

Definition at line 115 of file MVASteering_cfi.py.

tuple MVASteering_cfi.SignalTrainFiles = glob.glob(SignalFileTrainingGlob)

Definition at line 112 of file MVASteering_cfi.py.

tuple MVASteering_cfi.TauTagToolsWorkingDirectory = os.path.join(Project_Area, "src/RecoTauTag/TauTagTools")

Definition at line 79 of file MVASteering_cfi.py.

MVASteering_cfi.UseWeights = True

Definition at line 56 of file MVASteering_cfi.py.

MVASteering_cfi.WeightByIndividualDecayMode = False

Definition at line 61 of file MVASteering_cfi.py.