diff --git a/TIMBER/Analyzer.py b/TIMBER/Analyzer.py index 85b19db..0438062 100755 --- a/TIMBER/Analyzer.py +++ b/TIMBER/Analyzer.py @@ -5,8 +5,7 @@ """ from TIMBER.CollectionOrganizer import CollectionOrganizer -from TIMBER.Utilities.CollectionGen import BuildCollectionDict, GetKeyValForBranch, StructDef, StructObj -from TIMBER.Tools.Common import GetHistBinningTuple, CompileCpp, ConcatCols, GetStandardFlags, ExecuteCmd +from TIMBER.Tools.Common import GenerateHash, GetHistBinningTuple, CompileCpp, ConcatCols, GetStandardFlags, ExecuteCmd from clang import cindex from collections import OrderedDict @@ -31,7 +30,7 @@ class analyzer(object): When using class functions to perform actions, an active node will always be tracked so that the next action uses the active node and assigns the output node as the new #ActiveNode""" - def __init__(self,fileName,eventsTreeName="Events",runTreeName="Runs", createAllCollections=False): + def __init__(self,fileName,eventsTreeName="Events",runTreeName="Runs"): """Constructor. Sets up the tracking of actions on an RDataFrame as nodes. Also @@ -40,13 +39,11 @@ def __init__(self,fileName,eventsTreeName="Events",runTreeName="Runs", createAll branch (#lhaid), if the file is data (#isData), and if the file is before NanoAOD version 6 (#preV6). - @param fileName (str): A ROOT file path, a path to a txt file which contains several ROOT file paths separated by + @param fileName (str, list(str)): A ROOT file path, a path to a txt file which contains several ROOT file paths separated by new line characters, or a list of either .root and/or .txt files. @param eventsTreeName (str, optional): Name of TTree in fileName where events are stored. Defaults to "Events" (for NanoAOD) @param runTreeName (str, optional): Name of TTree in fileName where run information is stored (for generated event info in simulation). Defaults to "Runs" (for NanoAOD) - @param createAllCollections (str, optional): Create all of the collection structs immediately. This consumes memory no matter what - and the collections will increase processing times compared to accessing column values directly. Defaults to False. """ ## @var fileName @@ -96,11 +93,13 @@ def __init__(self,fileName,eventsTreeName="Events",runTreeName="Runs", createAll super(analyzer, self).__init__() self.fileName = fileName self._eventsTreeName = eventsTreeName + self._runTreeName = runTreeName self.silent = False # Setup TChains for multiple or single file self._eventsChain = ROOT.TChain(self._eventsTreeName) self.RunChain = ROOT.TChain(runTreeName) + print ('Opening files...') if isinstance(self.fileName,list): for f in self.fileName: self._addFile(f) @@ -114,22 +113,23 @@ def __init__(self,fileName,eventsTreeName="Events",runTreeName="Runs", createAll self.AllNodes = [self.BaseNode] self.Corrections = {} - # Check if dealing with data - if hasattr(self.RunChain,'genEventCount'): - self.isData = False + if hasattr(self.RunChain,'genEventSumw'): self.preV6 = True - elif hasattr(self.RunChain,'genEventCount_'): - self.isData = False + elif hasattr(self.RunChain,'genEventSumw_'): self.preV6 = False - else: self.isData = True + # Check if dealing with data + if hasattr(self._eventsChain,'genWeight'): + self.isData = False + else: + self.isData = True # Count number of generated events if not data - self.genEventCount = 0.0 + self.genEventSumw = 0.0 if not self.isData: for i in range(self.RunChain.GetEntries()): self.RunChain.GetEntry(i) - if self.preV6: self.genEventCount+= self.RunChain.genEventCount - else: self.genEventCount+= self.RunChain.genEventCount_ + if self.preV6: self.genEventSumw+= self.RunChain.genEventSumw + else: self.genEventSumw+= self.RunChain.genEventSumw_ # Get LHAID from LHEPdfWeights branch self.lhaid = "-1" @@ -172,7 +172,12 @@ def _addFile(self,f): if 'root://' not in f and f.startswith('/store/'): f='root://cms-xrd-global.cern.ch/'+f self._eventsChain.Add(f) - self.RunChain.Add(f) + if ROOT.TFile.Open(f,'READ') == None: + raise ReferenceError('File %s does not exist'%f) + tempF = ROOT.TFile.Open(f,'READ') + if tempF.Get(self._runTreeName) != None: + self.RunChain.Add(f) + tempF.Close() elif f.endswith(".txt"): txt_file = open(f,"r") for l in txt_file.readlines(): @@ -216,8 +221,12 @@ def DataFrame(self): ''' return self.ActiveNode.DataFrame - def Snapshot(self,columns,outfilename,treename,lazy=False,openOption='RECREATE'): + def Snapshot(self,columns,outfilename,treename,lazy=False,openOption='UPDATE',saveRunChain=True): '''@see Node#Snapshot''' + if saveRunChain: + self.SaveRunChain(outfilename,merge=False) + elif saveRunChain == False and openOption == 'UPDATE': + openOption = 'RECREATE' self.ActiveNode.Snapshot(columns,outfilename,treename,lazy,openOption) def SaveRunChain(self,filename,merge=True): @@ -253,6 +262,19 @@ def GetCollectionNames(self): ''' return self._collectionOrg.GetCollectionNames() + def GetColumnNames(self,node=None): + '''Return a list of all column names that currently exist. + + @param node (Node): Defaults to None in which case the ActiveNode is used. + + Returns: + list(str): Column names. + ''' + if node == None: + return [str(c) for c in self.DataFrame.GetColumnNames()] + else: + return [str(c) for c in node.DataFrame.GetColumnNames()] + def SetActiveNode(self,node): '''Sets the active node. @@ -299,8 +321,8 @@ def TrackNode(self,node): None ''' if isinstance(node,Node): - if node.name in self.GetTrackedNodeNames(): - print ('WARNING: Attempting to track a node with the same name as one that is already being tracked (%s).'%(node.name)) + if node.hash in self._getTrackedNodeHashes(): + print ('WARNING: Attempting to track a node with the same hash as one that is already being tracked (%s, %s).'%(node.hash, node.name)) self.AllNodes.append(node) else: raise TypeError('TrackNode() does not support arguments of type %s. Please provide a Node.'%(type(node))) @@ -312,6 +334,14 @@ def GetTrackedNodeNames(self): [str]: List of names of nodes being tracked. ''' return [n.name for n in self.AllNodes] + + def _getTrackedNodeHashes(self): + '''Gets the names of the nodes currently being tracked. + + Returns: + [str]: List of names of nodes being tracked. + ''' + return [n.hash for n in self.AllNodes] def GetCorrectionNames(self): '''Get names of all corrections being tracked. @@ -511,13 +541,14 @@ def Discriminate(self,name,discriminator,node=None,passAsActiveNode=None): return newNodes - def SubCollection(self,name,basecoll,condition,skip=[]): + def SubCollection(self,name,basecoll,condition,useTake=False,skip=[]): '''Creates a collection of a current collection (from a NanoAOD-like format) where the array-type branch is slimmed based on some selection. @param name (str): Name of new collection. @param basecoll (str): Name of derivative collection. - @param condition (str): C++ condition that determines which items to keep. + @param condition (str): C++ condition that determines which items to keep or a list of indexes to keep (must useTake for latter). + @param useTake (bool): If `condition` is list of indexes, use VecOps::Take to build subcollection. @param skip ([str]): List of variable names in the collection to skip. Returns: @@ -527,11 +558,17 @@ def SubCollection(self,name,basecoll,condition,skip=[]): SubCollection('TopJets','FatJet','FatJet_msoftdrop > 105 && FatJet_msoftdrop < 220') ''' collBranches = [str(cname) for cname in self.DataFrame.GetColumnNames() if basecoll in str(cname) and str(cname) not in skip] - if condition != '': self.Define(name+'_idx','%s'%(condition)) + if condition != '' and not useTake: + self.Define(name+'_idx','%s'%(condition)) + for b in collBranches: replacementName = b.replace(basecoll,name) if b == 'n'+basecoll: - if condition != '': self.Define(replacementName,'std::count(%s_idx.begin(), %s_idx.end(), 1)'%(name,name),nodetype='SubCollDefine') + if condition != '': + if not useTake: + self.Define(replacementName,'std::count(%s_idx.begin(), %s_idx.end(), 1)'%(name,name),nodetype='SubCollDefine') + else: + self.Define(replacementName,'%s.size()'%condition) else: self.Define(replacementName,b) elif 'Struct>' in self.DataFrame.GetColumnType(b): # skip internal structs continue @@ -539,8 +576,13 @@ def SubCollection(self,name,basecoll,condition,skip=[]): print ('Found type %s during SubCollection'%self.DataFrame.GetColumnType(b)) self.Define(replacementName,b,nodetype='SubCollDefine') else: - if condition != '': self.Define(replacementName,'%s[%s]'%(b,name+'_idx'),nodetype='SubCollDefine') - else: self.Define(replacementName,b,nodetype='SubCollDefine') + if condition != '': + if not useTake: + self.Define(replacementName,'%s[%s]'%(b,name+'_idx'),nodetype='SubCollDefine') + elif useTake: + self.Define(replacementName,'ROOT::VecOps::Take(%s,%s)'%(b,condition)) + else: + self.Define(replacementName,b,nodetype='SubCollDefine') return self.ActiveNode @@ -578,7 +620,7 @@ def ObjectFromCollection(self,name,basecoll,index,skip=[]): Example: ObjectFromCollection('LeadJet','FatJet','0') ''' - collBranches = [str(cname) for cname in self.DataFrame.GetColumnNames() if basecoll in str(cname) and str(cname) not in skip] + collBranches = [str(cname) for cname in self.DataFrame.GetColumnNames() if ( (basecoll in str(cname)) and (str(cname) not in skip))] for b in collBranches: replacementName = b.replace(basecoll,name) if b == 'n'+basecoll: @@ -589,7 +631,7 @@ def ObjectFromCollection(self,name,basecoll,index,skip=[]): else: self.Define(replacementName,'%s[%s]'%(b,index),nodetype='SubCollDefine') - return self.ActiveNode() + return self.ActiveNode def MergeCollections(self,name,collectionNames): '''Merge collections (provided by list of names in `collectionNames`) into @@ -674,7 +716,10 @@ def AddCorrection(self,correction,evalArgs={},node=None): if not isinstance(correction,Correction): raise TypeError('AddCorrection() does not support argument type %s for correction. Please provide a Correction.'%(type(correction))) elif isinstance(correction, Calibration): raise TypeError('Attempting to add a Calibration and not a Correction. Corrections weight events while Calibrations weight variables.') - newNode = self._addModule(correction, evalArgs, 'Correction', node) + if not correction.existing: + newNode = self._addModule(correction, evalArgs, 'Correction', node) + else: + newNode = self.ActiveNode if node == None else node # Add correction to track self.Corrections[correction.name] = correction @@ -688,11 +733,12 @@ def AddCorrection(self,correction,evalArgs={},node=None): else: raise ValueError('Correction.GetType() returns %s'%correction.GetType()) - for i,v in enumerate(variations): - newNode = self.Define(correction.name+'__'+v,correction.name+'__vec[%s]'%i,newNode,nodetype='Correction') + if not correction.existing: + for i,v in enumerate(variations): + newNode = self.Define(correction.name+'__'+v,correction.name+'__vec[%s]'%i,newNode,nodetype='Correction') # self.TrackNode(returnNode) - return self.SetActiveNode(newNode) + return self.SetActiveNode(newNode) def AddCorrections(self,correctionList,node=None): '''Add multiple Corrections to track. Sets new #ActiveNode with all correction @@ -735,10 +781,17 @@ def _checkCorrections(self,node,correctionNames,dropList): raise ValueError('MakeWeightCols() does not support correctionNames argument of type %s. Please provide a list.'%(type(correctionNames))) else: correctionsToCheck = correctionNames + # First look for anything in the base RDataFrame that matches + correctionsInBase = [] + allBaseCols = [str(c) for c in self.BaseNode.DataFrame.GetColumnNames()] + for corr in correctionsToCheck: + if (corr+'__nom' in allBaseCols) or (corr+'__up' in allBaseCols): + correctionsInBase.append(corr) + # Go up the tree from the current node, only grabbing # those corrections along the path (ie. don't care about # corrections on other forks) - correctionsToApply = [] + correctionsToApply = correctionsInBase nextNode = node.parent while nextNode: if nextNode.name.endswith('__vec'): @@ -758,7 +811,7 @@ def _checkCorrections(self,node,correctionNames,dropList): return correctionsToApply - def MakeWeightCols(self,name='',node=None,correctionNames=None,dropList=[],correlations=[]): + def MakeWeightCols(self,name='',node=None,correctionNames=None,dropList=[],correlations=[],extraNominal=''): '''Makes columns/variables to store total weights based on the Corrections that have been added. This function automates the calculation of the columns that store the nominal weight and the @@ -781,6 +834,8 @@ def MakeWeightCols(self,name='',node=None,correctionNames=None,dropList=[],corre are dropped from consideration. @param correlations list(tuple of strings): List of tuples of correlations to create. Ex. If you have syst1, syst2, syst3 corrections and you want to correlate syst1 and syst2, provide [("syst1","syst2")]. To anti-correlate, add a "!" infront of the correction name. Ex. [("syst1","!syst2")] + @param extraNominal (str): String to prepend to all weight calculations. Will be multiplied by the rest of the pieces + put together automatically. Defaults to ''. Returns: Node: New #ActiveNode. @@ -793,7 +848,7 @@ def MakeWeightCols(self,name='',node=None,correctionNames=None,dropList=[],corre correctionsToApply = self._checkCorrections(node,correctionNames,dropList) # Build nominal weight first (only "weight", no "uncert") - weights = {'nominal':''} + weights = {'nominal':'' if extraNominal == '' else extraNominal+' *'} for corrname in correctionsToApply: corr = self.Corrections[corrname] if corr.GetType() in ['weight','corr']: @@ -985,9 +1040,9 @@ def DrawTemplates(self,hGroup,saveLocation,projection='X',projectionArgs=(),file down.SetLineColor(ROOT.kBlue) leg = ROOT.TLegend(0.7,0.7,0.9,0.9) - leg.AddEntry(nominal.GetValue(),'Nominal','lf') - leg.AddEntry(up.GetValue(),'Up','l') - leg.AddEntry(down.GetValue(),'Down','l') + leg.AddEntry(nominal,'Nominal','lf') + leg.AddEntry(up,'Up','l') + leg.AddEntry(down,'Down','l') up.Draw('same hist') down.Draw('same hist') @@ -1055,11 +1110,11 @@ def CalibrateVars(self,varCalibDict,evalArgs,newCollectionName,variationsFlag=Tr # Create the product of weights new_columns = OrderedDict() - baseCollectionName = varCalibDict.keys()[0].split('_')[0] + if len(varCalibDict.keys()) > 0: baseCollectionName = varCalibDict.keys()[0].split('_')[0] for var in varCalibDict.keys(): isRVec = "RVec" in self.DataFrame.GetColumnType(var) # nominal first - new_var_name = var.replace(baseCollectionName,newCollectionName) + new_var_name = var+'_nom'#.replace(baseCollectionName,newCollectionName) if not isRVec: new_columns[new_var_name] = var for calib in varCalibDict[var]: @@ -1072,16 +1127,14 @@ def CalibrateVars(self,varCalibDict,evalArgs,newCollectionName,variationsFlag=Tr if variationsFlag == True: for i,v in enumerate(['up','down']): if not isRVec: - new_columns[new_var_name+'_'+calib.name+'__'+v] = new_columns[new_var_name].replace(calib.name+'__vec[0]',calib.name+'__vec[%s]'%i+1) + new_columns[var+'_'+calib.name+'__'+v] = new_columns[new_var_name].replace(calib.name+'__vec[0]',calib.name+'__vec[%s]'%i+1) else: nom_minus_calib = new_columns[new_var_name].replace(calib.name+'__vec,','').replace(calib.name+'__vec','') - new_columns[new_var_name+'_'+calib.name+'__'+v] = 'hardware::HadamardProduct({0},{1},{2})'.format(nom_minus_calib, calib.name+'__vec',i+1) + new_columns[var+'_'+calib.name+'__'+v] = 'hardware::HadamardProduct({0},{1},{2})'.format(nom_minus_calib, calib.name+'__vec',i+1) # Actually define the columns for c in new_columns.keys(): newNode = self.Define(c, new_columns[c], newNode, nodetype='Calibration') - newNode = self.SubCollection(newCollectionName,baseCollectionName,'',skip=varCalibDict.keys()+new_columns.keys()) - return self.SetActiveNode(newNode) def _checkCalibrations(self,node,varCalibDict,evalArgs): @@ -1159,7 +1212,7 @@ def Nminus1(self,cutgroup,node=None): return nminusones - def PrintNodeTree(self,outfilename,verbose=False,toSkip=[]): + def PrintNodeTree(self,outfilename,verbose=False,toSkip=['SubCollDefine']): '''Print a PDF image of the node structure of the analysis. Requires python graphviz package which should be an installed dependency. @@ -1168,7 +1221,7 @@ def PrintNodeTree(self,outfilename,verbose=False,toSkip=[]): @param toSkip ([], optional): Skip list of types of nodes (with sub-string matching so providing "Define" will cut out *all* definitions). Possible options are "Define", "Cut", "Correction", "MergeDefine", and "SubCollDefine". - Defaults to empty list. + Defaults to ["SubCollDefine"]. Returns: None @@ -1177,17 +1230,17 @@ def PrintNodeTree(self,outfilename,verbose=False,toSkip=[]): graph = nx.DiGraph(comment='Node processing tree') # Build graph with all nodes for node in self.AllNodes: - this_node_name = node.name + this_node_hash = node.hash this_node_label = node.name if verbose: this_node_label += '\n%s'%textwrap.fill(node.action,50) - graph.add_node(this_node_name, label=this_node_label, type=node.type) + graph.add_node(this_node_hash, label=this_node_label, type=node.type) for child in node.children: - graph.add_edge(this_node_name,child.name) + graph.add_edge(this_node_hash,child.hash) # Contract egdes where we want nodes dropped for skip in toSkip: for node in graph.nodes: - if skip in graph.nodes[node]["type"]: + if graph.nodes[node]["type"] == skip: graph = nx.contracted_edge(graph,(list(graph.pred[node].keys())[0],node),self_loops=False) # Write out dot and draw dot = nx.nx_pydot.to_pydot(graph) @@ -1304,6 +1357,7 @@ def __init__(self, name, DataFrame, action='', nodetype='', children=[], parent= self.children = children self.parent = parent self.type = nodetype + self.hash = GenerateHash() def Close(self): '''Safely deletes Node instance and all descendants. @@ -1776,6 +1830,30 @@ def Merge(self): out.Add(self[key]) return out + def Add(self,name,item,meta={}): + '''Add histogram to the group. Internal group name + will match the histogram name if not otherwise specified + but note that this will cause an RDataFrame loop to happen! + + @param item (TH1): Histogram to add. + ''' + nameToPass = item.GetName() if name == '' else name + super(HistGroup,self).Add(nameToPass,item,meta) + + def __getitem__(self,key,lazy=False): + '''Get value from key as you would with dictionary. + If lazy == False and the stored value is a histogram pointer, + return the actual histogram. + Ex. `val = mygroup["item_name"]` + + @param key (obj): Key for name/key in Group. + Returns: + obj: Item for given key. + ''' + if lazy == False and not isinstance(self.items[key],ROOT.TH1): + self.items[key] = self.items[key].GetValue() + return self.items[key] + ########################### # Module handling classes # ########################### @@ -1953,14 +2031,14 @@ def _instantiate(self,args): try: if a == "": line += '"", ' - elif a == "true" or a == "false": - line += '%s, '%(a) elif isinstance(a,bool) and a == True: line += 'true, ' elif isinstance(a,bool) and a == False: line += 'false, ' elif isinstance(a,int) or isinstance(a,float): line += '%s, '%(a) + elif a.startswith('{') and a.endswith('}'): + line += '%s, '%(a) elif isinstance(a,str): line += '"%s", '%(a) else: @@ -2037,10 +2115,10 @@ def MakeCall(self,inArgs = {},toCheck=None): self._call = out - def GetCall(self,inArgs = {},toCheck = None): + def GetCall(self,evalArgs = {},toCheck = None): '''Gets the call to the method to be evaluated per-event. - @param inArgs (list, optional): Args to use for eval if #MakeCall() has not already been called. Defaults to []. + @param evalArgs (list, optional): Args to use for eval if #MakeCall() has not already been called. Defaults to []. If #MakeCall() has not already been called and inArgs == [], then the arguments to the method will be deduced from the C++ method definition argument names. @param toCheck (Node, ROOT.RDataFrame, list, optional): Object with column information to check argument names exist. @@ -2050,7 +2128,7 @@ def GetCall(self,inArgs = {},toCheck = None): str: The string that calls the method to evaluate per-event. Pass to Analyzer.Define(), Analyzer.Cut(), etc. ''' if self._call == None: - self.MakeCall(inArgs,toCheck) + self.MakeCall(evalArgs,toCheck) return self._call def GetMainFunc(self): @@ -2083,11 +2161,12 @@ class Correction(ModuleWorker): (2) the return must be a vector ordered as for "weight" type and for "uncert" type. ''' - def __init__(self,name,script,constructor=[],mainFunc='eval',corrtype=None,columnList=None,isClone=False,cloneFuncInfo=None): + def __init__(self,name,script='',constructor=[],mainFunc='eval',corrtype=None,columnList=None,isClone=False,cloneFuncInfo=None): '''Constructor @param name (str): Correction name. - @param script (str): Path to C++ script with function to calculate correction. + @param script (str, optional): Path to C++ script with function to calculate correction. Use an + empty string to point to existing columns that do not need to be calculated. Defaults to ''. @param constructor ([str], optional): List of arguments to script class constructor. Defaults to []. @param mainFunc (str, optional): Name of the function to use inside script. Defaults to None and the class will try to deduce it. @@ -2103,7 +2182,12 @@ def __init__(self,name,script,constructor=[],mainFunc='eval',corrtype=None,colum _funcInfo from the object from which this one i ''' - super(Correction,self).__init__(name,script,constructor,mainFunc,columnList,isClone,cloneFuncInfo) + if script != '': + super(Correction,self).__init__(name,script,constructor,mainFunc,columnList,isClone,cloneFuncInfo) + self.existing = False + else: + self.existing = True + self.name = name self._setType(corrtype) def Clone(self,name,newMainFunc=None,newType=None): diff --git a/TIMBER/CollectionOrganizer.py b/TIMBER/CollectionOrganizer.py index 2f42f8a..c217c02 100644 --- a/TIMBER/CollectionOrganizer.py +++ b/TIMBER/CollectionOrganizer.py @@ -38,20 +38,23 @@ def _parsetype(self, t): Returns: str: TIMBER-friendly version of the type. ''' - if not t.startswith('ROOT::VecOps::RVec<'): - collType = False + nRVecs = len(re.findall('ROOT::VecOps::RVec<',t)) + if nRVecs == 0: + collType = t + isVect = False else: - collType = str(t).replace('ROOT::VecOps::RVec<','') - if collType.endswith('>'): - collType = collType[:-1] - collType += '&' + isVect = True + collType = t.strip() + collType = re.sub('ROOT::VecOps::RVec<','',collType,count=1) + collType = re.sub('>','',collType,count=1) + collType += ' &' if 'Bool_t' in collType: - collType = collType.replace('Bool_t&','std::_Bit_reference') + collType = collType.replace('Bool_t &','Bool_t&').replace('Bool_t&','std::_Bit_reference') - if collType == '&': + if collType == ' &': collType = '' - return collType + return collType, isVect def AddCollection(self, c): '''Add a collection to tracking. @@ -90,17 +93,32 @@ def AddBranch(self, b, btype=''): ''' collname = b.split('_')[0] varname = '_'.join(b.split('_')[1:]) - typeStr = self._parsetype(btype) + typeStr, isVect = self._parsetype(btype) if typeStr == False or varname == '' or 'n'+collname not in self._baseBranches: - self._otherBranches[b] = { - 'type': typeStr, - 'alias': False - } + matches = [m for m in self._otherBranches.keys() if (m.startswith(collname) and '_'.join(m.split('_')[1:]) != '')] + if len(matches) == 0: + self._otherBranches[b] = { + 'type': typeStr, + 'isVect': isVect, + 'alias': False + } + else: + if varname != '': + self.AddCollection(collname) + self._collectionDict[collname][varname] = { + 'type': typeStr, + 'isVect': isVect, + 'alias': False + } + for match in matches: + self._collectionDict[collname]['_'.join(match.split('_')[1:])] = self._otherBranches[match] + del self._otherBranches[match] elif varname != '': self.AddCollection(collname) self._collectionDict[collname][varname] = { 'type': typeStr, + 'isVect': isVect, 'alias': False } @@ -147,7 +165,8 @@ def BuildCppCollection(self,collection,node,silent=True): newNode = node attributes = [] for aname in self.GetCollectionAttributes(collection): - attributes.append('%s %s'%(self._collectionDict[collection][aname]['type'], aname)) + if self._collectionDict[collection][aname]['isVect']: + attributes.append('%s %s'%(self._collectionDict[collection][aname]['type'], aname)) if collection+'s' not in self._builtCollections: self._builtCollections.append(collection+'s') diff --git a/TIMBER/Framework/include/EffLoader.h b/TIMBER/Framework/include/EffLoader.h index 66cf887..9008217 100644 --- a/TIMBER/Framework/include/EffLoader.h +++ b/TIMBER/Framework/include/EffLoader.h @@ -1,3 +1,5 @@ +#ifndef _TIMBER_EFFLOADER +#define _TIMBER_EFFLOADER #include #include "TFile.h" #include "TEfficiency.h" @@ -53,5 +55,5 @@ class EffLoader { * @return std::vector {nominal value, up error+nominal, down error+nominal} */ std::vector eval(float xval, float yval = 0, float zval = 0); - -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/TIMBER/Framework/include/JER_weight.h b/TIMBER/Framework/include/JER_weight.h index fb18f90..446f155 100644 --- a/TIMBER/Framework/include/JER_weight.h +++ b/TIMBER/Framework/include/JER_weight.h @@ -34,7 +34,7 @@ class JER_weight { * variations for that jet. */ template - RVec< RVec > eval(std::vector jets, std::vector genJets, float fixedGridRhoFastjetAll){ + RVec> eval(std::vector jets, std::vector genJets, float fixedGridRhoFastjetAll){ RVec< RVec > out (jets.size()); for (size_t ijet = 0; ijet < jets.size(); ijet++) { out[ijet] = (RVec)_smearer.GetSmearValsPt(hardware::TLvector(jets[ijet]), hardware::TLvector(genJets), fixedGridRhoFastjetAll); diff --git a/TIMBER/Framework/include/JES_weight.h b/TIMBER/Framework/include/JES_weight.h index 89346c1..f68ab57 100644 --- a/TIMBER/Framework/include/JES_weight.h +++ b/TIMBER/Framework/include/JES_weight.h @@ -54,8 +54,8 @@ class JES_weight { * variations for that jet. */ template - RVec< RVec > eval(std::vector jets, float fixedGridRhoFastjetAll){ - RVec< RVec > out (jets.size()); + RVec> eval(std::vector jets, float fixedGridRhoFastjetAll){ + RVec> out (jets.size()); for (size_t ijet = 0; ijet < jets.size(); ijet++) { RVec ijet_out {1.0, 1.0, 1.0}; diff --git a/TIMBER/Framework/include/JMR_weight.h b/TIMBER/Framework/include/JMR_weight.h index 830210c..786ba95 100644 --- a/TIMBER/Framework/include/JMR_weight.h +++ b/TIMBER/Framework/include/JMR_weight.h @@ -48,8 +48,8 @@ class JMR_weight { * variations for that jet. */ template - RVec< RVec > eval(std::vector jets, std::vector genJets){ - RVec< RVec > out (jets.size()); + RVec> eval(std::vector jets, std::vector genJets){ + RVec> out (jets.size()); for (size_t ijet = 0; ijet < jets.size(); ijet++) { RVec genJetsV = hardware::TLvector(genJets); diff --git a/TIMBER/Framework/include/JMS_weight.h b/TIMBER/Framework/include/JMS_weight.h index a9281d4..a03a7d5 100644 --- a/TIMBER/Framework/include/JMS_weight.h +++ b/TIMBER/Framework/include/JMS_weight.h @@ -41,6 +41,6 @@ class JMS_weight { * is the jet index and the inner vector is the nominal (0), up (1), and down (2 * variations for that jet. */ - RVec< RVec> eval(size_t nJets); + RVec> eval(size_t nJets); }; #endif \ No newline at end of file diff --git a/TIMBER/Framework/include/LumiFilter.h b/TIMBER/Framework/include/LumiFilter.h index 1e90066..092bab1 100644 --- a/TIMBER/Framework/include/LumiFilter.h +++ b/TIMBER/Framework/include/LumiFilter.h @@ -27,7 +27,7 @@ class LumiFilter { LumiFilter(std::string filename); /** * @brief Construct a new Lumi Filter object for a given year. - * Supports formatting as `2017` or `17`. 2016 not needed currently. + * Supports formatting as (for example) `2017` or `17`. * * @param year */ diff --git a/TIMBER/Framework/include/Prefire_weight.h b/TIMBER/Framework/include/Prefire_weight.h index 63bdb36..fe5e103 100644 --- a/TIMBER/Framework/include/Prefire_weight.h +++ b/TIMBER/Framework/include/Prefire_weight.h @@ -21,47 +21,14 @@ class Prefire_weight { std::vector> _variations = {{0,"PrefireWeight"},{1,"PrefireWeight_Up"},{-1,"PrefireWeight_Down"}}; int _variation; - template - float EGvalue(int jetidx, std::vector PhoColl, std::vector EleColl) { - float phopf = 1.0; - float phopf_temp, elepf_temp; - std::vector PhotonInJet; - Photon *pho; - for (size_t pid = 0; pid < PhoColl.size(); pid++) { - pho = &PhoColl[pid]; - if (pho->jetIdx == jetidx) { - if (PhotonInRange(pho->pt,pho->eta)) { - phopf_temp = 1 - GetPrefireProbability(_photonmap, pho->eta, pho->pt, _photonPtRange.second); - elepf_temp = 1.0; - if (pho->electronIdx > -1) { - Electron *matchEle = &EleColl[pho->electronIdx]; - if (PhotonInRange(matchEle->pt,matchEle->eta)) { - elepf_temp = 1 - GetPrefireProbability(_photonmap,matchEle->eta,matchEle->pt,_photonPtRange.second); - } - } - phopf *= std::min(phopf_temp,elepf_temp); - PhotonInJet.push_back(pid); - } - } - } - Electron *ele; - for (size_t eid = 0; eid < EleColl.size(); eid++){ - ele = &EleColl[eid]; - if ((ele->jetIdx == jetidx) && (Pythonic::InList(ele->photonIdx, PhotonInJet) == -1)) { - if (PhotonInRange(ele->pt, ele->eta)) { - phopf *= 1 - GetPrefireProbability(_photonmap, ele->eta, ele->pt, _photonPtRange.second); - } - } - } - return phopf; - } + float EGvalue(int jetidx, RVec Photon_pt, RVec Photon_eta, RVec Photon_jetIdx, RVec Photon_electronIdx, + RVec Electron_pt, RVec Electron_eta, RVec Electron_jetIdx, RVec Electron_photonIdx); float GetPrefireProbability(TH2F* map, float eta, float pt, float maxpt); bool PhotonInRange(float pt, float eta); bool JetInRange(float pt, float eta); bool ObjInRange(float pt, float eta, std::pair ptRange, std::pair etaRange); - public: /** * @brief Construct a new Prefire_weight object @@ -74,38 +41,20 @@ class Prefire_weight { /** * @brief Calculate the value of the weight. * - * @tparam Jet - * @tparam Photon - * @tparam Electron - * @param Jets JetStruct from TIMBER - * @param Photons PhotonStruct from TIMBER - * @param Electrons ElectronStruct from TIMBER + * @param Jet_pt + * @param Jet_eta + * @param Photon_pt + * @param Photon_eta + * @param Photon_jetIdx + * @param Photon_electronIdx + * @param Electron_pt + * @param Electron_eta + * @param Electron_jetIdx + * @param Electron_photonIdx * @return ROOT::VecOps::RVec */ - template - ROOT::VecOps::RVec eval(std::vector Jets, std::vector Photons, std::vector Electrons) { - Jet *jet; - float weight, jetpf, phopf; - std::string branchname; - ROOT::VecOps::RVec out(3); - for (size_t i = 0; i<_variations.size(); i++){ - _variation = _variations[i].first; - branchname = _variations[i].second; - weight = 1.0; - for (size_t ijet = 0; ijetpt,jet->eta)) { - jetpf *= 1 - GetPrefireProbability(_jetmap, jet->eta, jet->pt, _jetPtRange.second); - } - phopf = EGvalue(ijet, Photons, Electrons); - weight *= std::min(jetpf, phopf); - } - weight *= EGvalue(-1, Photons, Electrons); - out[i] = weight; - } - return out; - } + ROOT::VecOps::RVec eval(RVec Jet_pt, RVec Jet_eta, + RVec Photon_pt, RVec Photon_eta, RVec Photon_jetIdx, RVec Photon_electronIdx, + RVec Electron_pt, RVec Electron_eta, RVec Electron_jetIdx, RVec Electron_photonIdx); }; #endif \ No newline at end of file diff --git a/TIMBER/Framework/include/common.h b/TIMBER/Framework/include/common.h index 2990238..3abe94f 100644 --- a/TIMBER/Framework/include/common.h +++ b/TIMBER/Framework/include/common.h @@ -32,24 +32,27 @@ namespace hardware { * just does the char + string formatting for you. * * @param file Ex. TIMBER/data/example.root + * @param inTIMBER If file is in TIMBERPATH. Defaults to true. * @param option Defaults to "READ" for read-only. * @return TFile* */ - TFile *Open(std::string file, const char *option = "READ"); + TFile *Open(std::string file, bool inTIMBER = true, const char *option = "READ"); /** * @brief Generically open a histogram from a file into memory (closing * the file in the process). * * @param filename * @param histname + * @param inTIMBER If file is in TIMBERPATH. Defaults to true. * @return TH1* */ - TH1 *LoadHist(std::string filename, std::string histname); + TH1 *LoadHist(std::string filename, std::string histname, bool inTIMBER = true); /** * @brief Hadamard product of two vectors (`v3[i] = v1[i]*v2[i]`) * * @param v1 * @param v2 + * @param inTIMBER If file is in TIMBERPATH. Defaults to true. * @return RVec */ RVec HadamardProduct(RVec v1, RVec v2); @@ -64,6 +67,14 @@ namespace hardware { * @return RVec */ RVec HadamardProduct(RVec v1, RVec> v2, int v2subindex); + /** + * @brief Hadamard product of a base vector and a list of N more vectors (`vout[i] = v1[i]*v2[i]*v3[i]...`). + * + * @param v1 + * @param Multiv2 + * @return RVec + */ + RVec MultiHadamardProduct(RVec v1, RVec> Multiv2); /** * @brief Hadamard product of a base vector and a list of N more vectors (`vout[i] = v1[i]*v2[i][v2subindex]*v3[i][v2subindex]...`) * where v has multiple sub-elements, only one of which should be accessed diff --git a/TIMBER/Framework/src/JMS_weight.cc b/TIMBER/Framework/src/JMS_weight.cc index 74fd4f3..9f62970 100644 --- a/TIMBER/Framework/src/JMS_weight.cc +++ b/TIMBER/Framework/src/JMS_weight.cc @@ -2,8 +2,8 @@ JMS_weight::JMS_weight(int year) : _jmsVals(_jmsTable[year]) {}; -RVec< RVec> JMS_weight::eval(size_t nFatJet){ - RVec< RVec> out; +RVec> JMS_weight::eval(size_t nFatJet){ + RVec> out; out.reserve(nFatJet); for (size_t i=0; i_jmsVals); diff --git a/TIMBER/Framework/src/LumiFilter.cc b/TIMBER/Framework/src/LumiFilter.cc index d1c1bda..6f48d25 100644 --- a/TIMBER/Framework/src/LumiFilter.cc +++ b/TIMBER/Framework/src/LumiFilter.cc @@ -5,10 +5,12 @@ LumiFilter::LumiFilter(std::string filename) { } LumiFilter::LumiFilter(int year){ - if (year == 17 or year == 2017) { - boost::property_tree::read_json(std::getenv("TIMBERPATH")+std::string("TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt"), ptree); + if (year == 16 or year == 2016) { + boost::property_tree::read_json(std::getenv("TIMBERPATH")+std::string("TIMBER/data/LumiJSON/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt"), ptree); + } else if (year == 17 or year == 2017) { + boost::property_tree::read_json(std::getenv("TIMBERPATH")+std::string("TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt"), ptree); } else if (year == 18 or year == 2018) { - boost::property_tree::read_json(std::getenv("TIMBERPATH")+std::string("TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_17SeptEarlyReReco2018ABC_PromptEraD_Collisions18_JSON.txt"), ptree); + boost::property_tree::read_json(std::getenv("TIMBERPATH")+std::string("TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_Legacy2018_Collisions18_JSON.txt"), ptree); } else { std::cout << "Year " << year << " not supported by LumiFilter" << std::endl; throw; diff --git a/TIMBER/Framework/src/Pileup_weight.cc b/TIMBER/Framework/src/Pileup_weight.cc index 77a993a..9340a33 100644 --- a/TIMBER/Framework/src/Pileup_weight.cc +++ b/TIMBER/Framework/src/Pileup_weight.cc @@ -17,7 +17,7 @@ void Pileup_weight::init(std::string filename_mc, std::string filename_data, if (filename_mc != "auto") { _autoPU = false; - _mcHist = hardware::LoadHist(filename_mc,histname_mc); + _mcHist = hardware::LoadHist(filename_mc,histname_mc,false); } else { _autoPU = true; gROOT->cd(); diff --git a/TIMBER/Framework/src/Prefire_weight.cc b/TIMBER/Framework/src/Prefire_weight.cc index ca801ea..14ca209 100644 --- a/TIMBER/Framework/src/Prefire_weight.cc +++ b/TIMBER/Framework/src/Prefire_weight.cc @@ -55,4 +55,62 @@ bool Prefire_weight::ObjInRange(float pt, float eta, std::pair ptRa out = true; } return out; +} + +float Prefire_weight::EGvalue(int jetidx, RVec Photon_pt, RVec Photon_eta, RVec Photon_jetIdx, RVec Photon_electronIdx, + RVec Electron_pt, RVec Electron_eta, RVec Electron_jetIdx, RVec Electron_photonIdx) { + float phopf = 1.0; + float phopf_temp, elepf_temp; + std::vector PhotonInJet; + for (size_t pid = 0; pid < Photon_pt.size(); pid++) { + if (Photon_jetIdx[pid] == jetidx) { + if (PhotonInRange(Photon_pt[pid],Photon_eta[pid])) { + phopf_temp = 1 - GetPrefireProbability(_photonmap, Photon_eta[pid], Photon_pt[pid], _photonPtRange.second); + elepf_temp = 1.0; + if (Photon_electronIdx[pid] > -1) { + int eid = Photon_electronIdx[pid]; + if (PhotonInRange(Electron_pt[eid],Electron_eta[eid])) { + elepf_temp = 1 - GetPrefireProbability(_photonmap,Electron_eta[eid],Electron_pt[eid],_photonPtRange.second); + } + } + phopf *= std::min(phopf_temp,elepf_temp); + PhotonInJet.push_back(pid); + } + } + } + for (size_t eid = 0; eid < Electron_pt.size(); eid++){ + if ((Electron_jetIdx[eid] == jetidx) && (Pythonic::InList(Electron_photonIdx[eid], PhotonInJet) == -1)) { + if (PhotonInRange(Electron_pt[eid], Electron_eta[eid])) { + phopf *= 1 - GetPrefireProbability(_photonmap, Electron_eta[eid], Electron_pt[eid], _photonPtRange.second); + } + } + } + return phopf; +} + +ROOT::VecOps::RVec Prefire_weight::eval(RVec Jet_pt, RVec Jet_eta, + RVec Photon_pt, RVec Photon_eta, RVec Photon_jetIdx, RVec Photon_electronIdx, + RVec Electron_pt, RVec Electron_eta, RVec Electron_jetIdx, RVec Electron_photonIdx) { + float weight, jetpf, phopf; + std::string branchname; + ROOT::VecOps::RVec out(3); + for (size_t i = 0; i<_variations.size(); i++){ + _variation = _variations[i].first; + branchname = _variations[i].second; + weight = 1.0; + for (size_t ijet = 0; ijetGet(histname.c_str()); hist->SetDirectory(0); file->Close(); @@ -32,6 +36,19 @@ RVec hardware::HadamardProduct(RVec v1, RVec> v2, int return out; } +RVec hardware::MultiHadamardProduct(RVec v1, RVec> Multiv2) { + RVec out; + out.reserve(v1.size()); + for (size_t i = 0; i& v2 : Multiv2) { + val *= v2[i]; + } + out.push_back(val); + } + return out; +} + RVec hardware::MultiHadamardProduct(RVec v1, RVec>> Multiv2, int v2subindex) { RVec out; out.reserve(v1.size()); diff --git a/TIMBER/Tools/AutoJME.py b/TIMBER/Tools/AutoJME.py index 0cd88e3..0887a40 100644 --- a/TIMBER/Tools/AutoJME.py +++ b/TIMBER/Tools/AutoJME.py @@ -35,7 +35,7 @@ def AutoJME(a, jetCollection, year, dataEra=''): Returns: analyzer: Manipulated version of the input analyzer object. ''' - dataEraLetter = dataEra.lower().replace('data','').upper() + dataEraLetter = dataEra.lower().replace('data','').upper().replace('1','').replace('2','') if jetCollection == "FatJet": jetType = "AK8PFPuppi" genJetColl = "GenJetAK8" diff --git a/TIMBER/Tools/AutoPU.py b/TIMBER/Tools/AutoPU.py index 51c99d1..9f9251b 100644 --- a/TIMBER/Tools/AutoPU.py +++ b/TIMBER/Tools/AutoPU.py @@ -10,13 +10,42 @@ def AutoPU(a, era): Returns: analyzer: Manipulated input. ''' - ftemplate = ROOT.TFile.Open(TIMBERPATH+'/TIMBER/data/Pileup/pileup_%s.root'%era) - htemplate = ftemplate.Get('pileup') - binning = ('autoPU','autoPU', htemplate.GetNbinsX(), htemplate.GetXaxis().GetXmin(), htemplate.GetXaxis().GetXmax()) - autoPU = a.DataFrame.Histo1D(binning,"Pileup_nTrueInt").GetValue() + autoPU = MakePU(a, era) + print ('AutoPU: Extracting Pileup_nTrueInt distribution') ROOT.gROOT.cd() - ROOT.gDirectory.Add(autoPU) - c_PU = Correction('pileup','TIMBER/Framework/src/Pileup_weight.cc',['"%s"'%era], corrtype="weight") + ROOT.gDirectory.Add(autoPU.GetValue()) + c_PU = Correction('Pileup','TIMBER/Framework/src/Pileup_weight.cc',[era], corrtype="weight") a.AddCorrection(c_PU) + return a + +def MakePU(a, era, filename=''): + '''Create the histogram for the "Pileup_nTrueInt" distribution. + Histogram will be named "autoPU". + + @param a (analyzer): Object to manipulate and return. + @param era (str): 2016(UL), 2017(UL), 2018(UL) + @param filename (str): Name of ROOT file to save pileup histogram to. + Defaults to '' in which case no file will be written. + + Returns: + TH1F: Histogram of Pileup_nTrueInt. + ''' + ftemplate = ROOT.TFile.Open(TIMBERPATH+'/TIMBER/data/Pileup/pileup_%s.root'%era) + htemplate = ftemplate.Get('pileup') + binning = ('autoPU', 'autoPU', htemplate.GetNbinsX(), htemplate.GetXaxis().GetXmin(), htemplate.GetXaxis().GetXmax()) + autoPU = a.DataFrame.Histo1D(binning,"Pileup_nTrueInt") ftemplate.Close() + if filename != '': + fout = ROOT.TFile.Open(filename,'RECREATE') + fout.cd() + autoPU.Write() + fout.Close() + return autoPU + +def ApplyPU(a, era, filename, histname='autoPU'): + c_PU = Correction('Pileup','TIMBER/Framework/include/Pileup_weight.h', + [filename, 'pileup_%s'%era, + histname, 'pileup'], + corrtype="weight") + a.AddCorrection(c_PU) return a \ No newline at end of file diff --git a/TIMBER/Tools/CMS/CMS_lumi.py b/TIMBER/Tools/CMS/CMS_lumi.py index e741a60..69b26ac 100644 --- a/TIMBER/Tools/CMS/CMS_lumi.py +++ b/TIMBER/Tools/CMS/CMS_lumi.py @@ -17,7 +17,7 @@ lumiTextOffset = 0.2 cmsTextSize = 0.75 -cmsTextOffset = 0.1 +cmsTextOffset = 0.15 relPosX = 0.045 relPosY = 0.035 @@ -41,11 +41,11 @@ def CMS_lumi(pad, iPeriod=4, iPosX=11, sim=False ): alignY_=3 alignX_=2 - if( iPosX/10==0 ): alignX_=1 + if( int(iPosX/10)==0 ): alignX_=1 if( iPosX==0 ): alignY_=1 - if( iPosX/10==1 ): alignX_=1 - if( iPosX/10==2 ): alignX_=2 - if( iPosX/10==3 ): alignX_=3 + if( int(iPosX/10)==1 ): alignX_=1 + if( int(iPosX/10)==2 ): alignX_=2 + if( int(iPosX/10)==3 ): alignX_=3 align_ = 10*alignX_ + alignY_ H = pad.GetWh() @@ -113,7 +113,7 @@ def CMS_lumi(pad, iPeriod=4, iPosX=11, sim=False ): extraTextSize = extraOverCmsTextSize*cmsTextSize latex.SetTextFont(42) - latex.SetTextAlign(31) + latex.SetTextAlign(30) latex.SetTextSize(lumiTextSize*t) latex.DrawLatex(1-r,1-t+cmsTextOffset*t,lumiText) @@ -160,8 +160,8 @@ def CMS_lumi(pad, iPeriod=4, iPosX=11, sim=False ): latex.SetTextFont(extraTextFont) latex.SetTextAlign(align_) latex.SetTextSize(extraTextSize*t) - if not sim: latex.DrawLatex(posX_, posY_- relExtraDY*cmsTextSize*t, extraText) - else: latex.DrawLatex(posX_, posY_- relExtraDY*cmsTextSize*t, extraText + ' simulation') + latex.DrawLatex(posX_, posY_- relExtraDY*cmsTextSize*t, extraText if not sim else extraText + ' simulation') + elif( writeExtraText ): if( iPosX==0): posX_ = l + relPosX*(1-l-r) diff --git a/TIMBER/Tools/Common.py b/TIMBER/Tools/Common.py index c9ed997..dda9905 100755 --- a/TIMBER/Tools/Common.py +++ b/TIMBER/Tools/Common.py @@ -3,7 +3,7 @@ @{ ''' -import json, os, subprocess, sys, glob, ROOT +import json, os, subprocess, sys, glob, ROOT, random, string from ROOT import RDataFrame from TIMBER.Tools.CMS import CMS_lumi, tdrstyle from contextlib import contextmanager @@ -84,6 +84,7 @@ def CutflowTxt(name,node,efficiency=False): out.close() def StitchQCD(QCDdict,normDict=None): + from TIMBER.Analyzer import HistGroup '''Stitches together histograms in QCD hist groups. @param QCDdict ({string:HistGroup}): Dictionary of HistGroup objects @@ -98,7 +99,7 @@ def StitchQCD(QCDdict,normDict=None): for hkey in QCDdict[k].keys(): QCDdict[k][hkey].Scale(normDict[k]) # Stitch - out = TIMBER.Analyzer.HistGroup("QCD") + out = HistGroup("QCD") for ksample in QCDdict.keys(): for khist in QCDdict[ksample].keys(): if khist not in out.keys(): @@ -449,6 +450,61 @@ def DictToLatexTable(dict2convert,outfilename,roworder=[],columnorder=[]): latexout.write('\\end{table}') latexout.close() +class MemoryFile(): + def __init__(self): + self.str = '' + def write(self,inStr): + self.str += inStr + +def DictToMarkdownTable(dict2convert,outfilename=None,roworder=[],columnorder=[]): + '''Converts a dictionary with two layers (ie. only one set of sub-keys) to + a Markdown table. First set of keys (ie. external) are rows, second (ie. internal) are columns. + If the column entry for a given row is not provided (ie. missing key), then '-' is substituted. + + @param dict2convert (dict): Input dictionary. + @param outfilename (str): Output .md file name. Defaults to None in which case the markdown as a string is returned. + @param roworder (list, optional): Custom ordering of rows. Defaults to [] in which case the sorted keys are used. + @param columnorder (list, optional): Custom ordering of columns. Defaults to [] in which case the sorted keys are used. + ''' + # Determine order of rows and columns + if len(roworder) == 0: + rows = sorted(dict2convert.keys()) + else: + rows = roworder + if len(columnorder) == 0: + columns = [] + for r in rows: + thesecolumns = dict2convert[r].keys() + for c in thesecolumns: + if c not in columns: + columns.append(c) + columns.sort() + else: + columns = columnorder + # Book output + if outfilename == None: mdout = MemoryFile() + else: mdout = open(outfilename,'w') + # Write first line with column names + column_string = '| |' + for c in columns: + column_string += str(c)+'\t| ' + column_string = column_string[:-2]+'\n' + mdout.write(column_string) + # Write rows + mdout.write('-'.join(['|' for i in range(len(columns)+2)]) +'\n') + for r in rows: + row_string = '| '+r+'\t| ' + for c in columns: + if c in dict2convert[r].keys(): + row_string += str(dict2convert[r][c])+'\t| ' + else: + row_string += '- \t| ' + row_string = row_string[:-2]+' |\n' + mdout.write(row_string) + + if outfilename != None: mdout.close() + else: return mdout.str + def FindCommonString(string_list): '''Finds a common string between a list of strings. @@ -511,3 +567,6 @@ def cd(newdir): finally: os.chdir(prevdir) ## @} + +def GenerateHash(length=8): + return ''.join(random.choice(string.ascii_uppercase + string.ascii_lowercase + string.digits) for i in range(length)) \ No newline at end of file diff --git a/TIMBER/Tools/Plot.py b/TIMBER/Tools/Plot.py index ca75902..6e20b2c 100644 --- a/TIMBER/Tools/Plot.py +++ b/TIMBER/Tools/Plot.py @@ -7,7 +7,7 @@ from collections import OrderedDict from TIMBER.Analyzer import HistGroup -def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},colors={},scale=True,stackBkg=False,doSoverB=False): +def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},colors={},scale=True,stackBkg=False,doSoverB=False,forceForward=False,forceBackward=False): '''Create a plot that compares the shapes of backgrounds versus signal. If stackBkg, backgrounds will be stacked together and signals will be plot separately. Total background and signals are scaled to 1 if scale == True. Inputs organized @@ -35,9 +35,12 @@ def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},col # Initialize c = ROOT.TCanvas('c','c',800,700) - legend = ROOT.TLegend(0.6,max(0.72,0.8-0.05*(1-len(bkgs.keys()))),0.87,0.88) + c.SetBottomMargin(0.12) + c.SetTopMargin(0.08) + c.SetRightMargin(0.05) + legend = ROOT.TLegend(0.73,0.8-0.04*(len(bkgs.keys())+len(signals.keys())-1),0.9,0.88) legend.SetBorderSize(0) - ROOT.gStyle.SetTextFont(42) + # ROOT.gStyle.SetTextFont(42) ROOT.gStyle.SetOptStat(0) tot_bkg_int = 0 if stackBkg: @@ -92,12 +95,12 @@ def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},col colors_in_legend.append(colors[pname]) if stackBkg: - maximum = max(bkgStack.GetMaximum(),signals.values()[0].GetMaximum())*1.4 + maximum = max(bkgStack.GetMaximum(),max([s.GetMaximum() for s in signals.values()]))*1.4 bkgStack.SetMaximum(maximum) else: - if len(bkgs.values()) > 0: bkgmax = bkgs.values()[0].GetMaximum() + if len(bkgs.values()) > 0: bkgmax = list(bkgs.values())[0].GetMaximum() else: bkgmax = 0 - if len(signals.values()) > 0: sigmax = signals.values()[0].GetMaximum() + if len(signals.values()) > 0: sigmax = list(signals.values())[0].GetMaximum() else: sigmax = 0 maximum = max(bkgmax,sigmax)*1.4 @@ -138,7 +141,7 @@ def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},col legend.Draw() if doSoverB: - s_over_b,line_pos = MakeSoverB(bkgStack,signals.values()[0]) + s_over_b,line_pos,maximums = MakeSoverB(bkgStack,list(signals.values())[0],forceForward,forceBackward) SoverB.cd() s_over_b.GetYaxis().SetTitle('S/#sqrt{B}') s_over_b.GetXaxis().SetTitle(prettyvarname) @@ -153,27 +156,40 @@ def CompareShapes(outfilename,year,prettyvarname,bkgs={},signals={},names={},col s_over_b.GetXaxis().SetTitleSize(0.09) s_over_b.GetYaxis().SetTitleOffset(0.4) s_over_b.Draw('hist') - if line_pos: + if line_pos: # split line line = ROOT.TLine(line_pos,s_over_b.GetMinimum(),line_pos,s_over_b.GetMaximum()) line.SetLineColor(ROOT.kRed) line.SetLineStyle(10) line.SetLineWidth(2) line.Draw('same') - + # Optimization line + temp = [] + for m in maximums: + low = s_over_b.GetMinimum() + high = s_over_b.GetMaximum() + mline = ROOT.TLine(m,low,m,high) + mline.SetLineColor(ROOT.kBlue) + mline.SetLineStyle(0) + mline.Draw('same') + temp.append(mline) + text = ROOT.TText(m,low+(high-low)/3," %.2f "%m) + if (s_over_b.GetXaxis().GetXmax() - m) < (0.9*s_over_b.GetXaxis().GetXmax()): + text.SetTextAlign(31) + text.SetTextSize(0.09) + text.Draw() + temp.append(text) c.cd() - c.SetBottomMargin(0.12) - c.SetTopMargin(0.08) - c.SetRightMargin(0.11) - CMS_lumi.writeExtraText = 1 - CMS_lumi.extraText = "Preliminary simulation" - CMS_lumi.lumi_sqrtS = "13 TeV" - CMS_lumi.cmsTextSize = 0.6 - CMS_lumi.CMS_lumi(c, year, 11) + # CMS_lumi.writeExtraText = 1 + # CMS_lumi.extraText = "Preliminary simulation" + # CMS_lumi.cmsTextSize = 0.6 + # CMS_lumi.lumiTextSize = 0.75 + # CMS_lumi.cmsTextSize = 0.85 + CMS_lumi.CMS_lumi(c, iPeriod=year, sim=True) - c.Print(outfilename,'png') + c.Print(outfilename,outfilename.split('.')[-1]) -def MakeSoverB(stack_of_bkgs,signal): +def MakeSoverB(stack_of_bkgs,signal,forceForward=False,forceBackward=False): '''Makes the SoverB distribution and returns it. Assumes that signal and stack_of_bkgs have same binning. @@ -212,37 +228,46 @@ def MakeSoverB(stack_of_bkgs,signal): nbins = total_bkgs.GetNbinsX() peak_bin = signal.GetMaximumBin() - if total_bkgs.GetXaxis().GetXmin() == 0: - if peak_bin == nbins: - forward = False - elif peak_bin == 1: - forward = True - else: - forward = True + if forceForward and forceBackward: + raise ValueError("Cannot forceForward and forceBackward. Please pick one.") + elif forceForward: + forward = True peak_bin = False - print ('Not a mass distribution. Forward = %s'%forward) - # If peak is non-zero, do background cumulative scan to left of peak - # and forward scan to right - else: - forward = None - print ('Mass-like distribution.') - # Clone original distirbution, set new range around peak, get cumulative - bkg_int_low = MakeCumulative(total_bkgs,1, peak_bin,forward=False) - bkg_int_high = MakeCumulative(total_bkgs,peak_bin,nbins+1, forward=True) - - sig_int_low = MakeCumulative(signal,1, peak_bin,forward=False) - sig_int_high = MakeCumulative(signal,peak_bin,nbins+1, forward=True) - - # Make empty versions of original histograms - bkg_int = total_bkgs.Clone() - bkg_int.Reset() - sig_int = signal.Clone() - sig_int.Reset() - - bkg_int.Add(bkg_int_low) - bkg_int.Add(bkg_int_high) - sig_int.Add(sig_int_low) - sig_int.Add(sig_int_high) + elif forceBackward: + forward = False + peak_bin = False + else: # Deduce + if total_bkgs.GetXaxis().GetXmin() == 0: + if peak_bin == nbins: + forward = False + elif peak_bin == 1: + forward = True + else: + forward = True + peak_bin = False + print ('Score-like distribution. Forward = %s'%forward) + # If peak is non-zero, do background cumulative scan to left of peak + # and forward scan to right + else: + forward = None + print ('Mass-like distribution.') + # Clone original distirbution, set new range around peak, get cumulative + bkg_int_low = MakeCumulative(total_bkgs,1, peak_bin,forward=False) + bkg_int_high = MakeCumulative(total_bkgs,peak_bin,nbins+1, forward=True) + + sig_int_low = MakeCumulative(signal,1, peak_bin,forward=False) + sig_int_high = MakeCumulative(signal,peak_bin,nbins+1, forward=True) + + # Make empty versions of original histograms + bkg_int = total_bkgs.Clone() + bkg_int.Reset() + sig_int = signal.Clone() + sig_int.Reset() + + bkg_int.Add(bkg_int_low) + bkg_int.Add(bkg_int_high) + sig_int.Add(sig_int_low) + sig_int.Add(sig_int_high) if forward != None: # if forward == False: @@ -265,10 +290,22 @@ def MakeSoverB(stack_of_bkgs,signal): print ('WARNING: Background is empty for bin %s'%ix) peak_bin_edge = False + maximum = [] if peak_bin != False: peak_bin_edge = bkg_int.GetBinLowEdge(peak_bin) + full_range = [0,s_over_b.GetNbinsX()] + s_over_b.GetXaxis().SetRange(full_range[0],peak_bin) + maximum.append(s_over_b.GetBinLowEdge(s_over_b.GetMaximumBin())) + s_over_b.GetXaxis().SetRange(peak_bin,full_range[1]) + maximum.append(s_over_b.GetBinLowEdge(s_over_b.GetMaximumBin())+s_over_b.GetBinWidth(s_over_b.GetMaximumBin())) + s_over_b.GetXaxis().SetRange(full_range[0],full_range[1]) + else: + bin_edge = s_over_b.GetBinLowEdge(s_over_b.GetMaximumBin()) + if forward: + maximum.append(bin_edge+s_over_b.GetBinWidth(s_over_b.GetMaximumBin())) + maximum.append(bin_edge) - return s_over_b, peak_bin_edge + return s_over_b, peak_bin_edge, maximum def MakeCumulative(hist,low,high,forward=True): '''Custom cumulative distribution function which has more predictable @@ -434,7 +471,7 @@ def EasyPlots(name, histlist, bkglist=[],signals=[],colors=[],titles=[],logy=Fal mains.append(ROOT.TPad(hist.GetName()+'_main',hist.GetName()+'_main',0, 0.1, 1, 1)) subs.append(ROOT.TPad(hist.GetName()+'_sub',hist.GetName()+'_sub',0, 0, 0, 0)) - legends.append(ROOT.TLegend(0.65,0.6,0.95,0.93)) + legends.append(ROOT.TLegend(0.70,0.6,0.95,0.90)) stacks.append(ROOT.THStack(hist.GetName()+'_stack',hist.GetName()+'_stack')) tot_hist = hist.Clone(hist.GetName()+'_tot') tot_hist.Reset() diff --git a/TIMBER/Utilities/CollectionGen.py b/TIMBER/Utilities/CollectionGen.py index 385cc2e..0584839 100644 --- a/TIMBER/Utilities/CollectionGen.py +++ b/TIMBER/Utilities/CollectionGen.py @@ -32,7 +32,7 @@ def GetKeyValForBranch(rdf, bname, includeType=True): collType = str(rdf.GetColumnType(bname)).replace('ROOT::VecOps::RVec<','') if collType.endswith('>'): collType = collType[:-1] collType += '&' - if 'Bool_t' in collType: collType = collType.replace('Bool_t&','std::_Bit_reference') + if 'Bool_t' in collType: collType = collType.replace('Bool_t &','Bool_t&').replace('Bool_t&','std::_Bit_reference') if includeType: out = (collname, collType+' '+varname) else: diff --git a/TIMBER/Utilities/Condor/templates/jdl_template b/TIMBER/Utilities/Condor/templates/jdl_template index 8864ff6..20e22cb 100644 --- a/TIMBER/Utilities/Condor/templates/jdl_template +++ b/TIMBER/Utilities/Condor/templates/jdl_template @@ -2,8 +2,8 @@ universe = vanilla Executable = TEMPSCRIPT Should_Transfer_Files = YES WhenToTransferOutput = ON_EXIT -request_cpus = 4 -request_memory = 4000 +request_cpus = 1 +request_memory = 2000 Output = logs/output_$(Cluster)_$(Process).stdout Error = logs/output_$(Cluster)_$(Process).stderr Log = logs/output_$(Cluster)_$(Process).log diff --git a/TIMBER/Utilities/TrigTester.py b/TIMBER/Utilities/TrigTester.py index e66c404..b850d62 100644 --- a/TIMBER/Utilities/TrigTester.py +++ b/TIMBER/Utilities/TrigTester.py @@ -11,6 +11,7 @@ ##################################################################################################### import ROOT,pprint,sys +from collections import OrderedDict from optparse import OptionParser pp = pprint.PrettyPrinter(indent=4) @@ -75,8 +76,16 @@ def drawHere(name,tree,var,cuts,histWbinning=None): return outhist # Open file/tree -f = ROOT.TFile.Open(options.input) -tree = f.Get(options.tree) +if options.input.endswith('.root'): + f = ROOT.TFile.Open(options.input) + tree = f.Get(options.tree) +else: + tree = ROOT.TChain(options.tree) + txt = open(options.input,'r') + for f in txt.readlines(): + if f != '': + tree.Add(f.strip()) + txt.close() possible_trigs = {} # If just checking if there are no trigger bits for any events... @@ -102,7 +111,12 @@ def drawHere(name,tree,var,cuts,histWbinning=None): quit() # Otherwise, establish what we're looking for -fullSelection_string = '(%s) && !(%s)'%(options.cuts,options.Not) +fullSelection_string = '' +if options.cuts != '': fullSelection_string += '(%s)'%(options.cuts) +if options.Not != '': + if fullSelection_string == '': fullSelection_string += '!(%s)'%(options.Not) + else: fullSelection_string += '&& !(%s)'%(options.Not) + print('Full selection will be evaluated as '+fullSelection_string) if options.vs == '': fullSelection = tree.GetEntries(fullSelection_string) @@ -118,7 +132,7 @@ def drawHere(name,tree,var,cuts,histWbinning=None): # Ignore trigger if requested ignore = False for ign in options.ignore.split(','): - if ign.lower() in branchObj.GetName().lower(): + if ign != '' and ign.lower() in branchObj.GetName().lower(): print('Ignoring '+branchObj.GetName()) ignore = True if ignore: continue @@ -128,11 +142,11 @@ def drawHere(name,tree,var,cuts,histWbinning=None): # If no comparison against another branch, just count if options.vs == '': - thisTrigPassCount = float(tree.GetEntries('%s==1 && %s==1 && !%s'%(options.cuts,branchObj.GetName(),options.Not))) + thisTrigPassCount = float(tree.GetEntries('(%s)==1 && %s==1 && !(%s)'%(options.cuts,branchObj.GetName(),options.Not))) if thisTrigPassCount/(fullSelection) > options.threshold: possible_trigs[branchObj.GetName()] = '%s/%s = %.2f' % (int(thisTrigPassCount),int(fullSelection),thisTrigPassCount/fullSelection) # If comparing against another branch, draw else: - thisTrigPassCount = drawHere('pass_'+branchObj.GetName(),tree,options.vs,'%s==1 && %s==1 && !%s'%(options.cuts,branchObj.GetName(),options.Not),histWbinning=fullSelection) + thisTrigPassCount = drawHere('pass_'+branchObj.GetName(),tree,options.vs,'(%s)==1 && %s==1 && !(%s)'%(options.cuts,branchObj.GetName(),options.Not),histWbinning=fullSelection) ratio = thisTrigPassCount.Clone('ratio_'+branchObj.GetName()) ratio.Divide(fullSelection) # ratio.Draw('hist') @@ -143,21 +157,26 @@ def drawHere(name,tree,var,cuts,histWbinning=None): # Only consider those triggers manually specified else: for trig in options.manual.split(','): + if trig not in [b.GetName() for b in tree.GetListOfBranches()]: + continue + branchObj = tree.GetBranch(trig) # If no comparison against another branch, just count if options.vs == '': - thisTrigPassCount = float(tree.GetEntries('%s==1 && %s==1 && !%s'%(options.cuts,branchObj.GetName(),options.Not))) + thisTrigPassCount = float(tree.GetEntries('(%s)==1 && %s==1 && !(%s)'%(options.cuts,branchObj.GetName(),options.Not))) if thisTrigPassCount/(fullSelection) > options.threshold: possible_trigs[branchObj.GetName()] = '%s/%s = %.2f' % (int(thisTrigPassCount),int(fullSelection),thisTrigPassCount/fullSelection) # If comparing against another branch, draw else: - thisTrigPassCount = drawHere('pass_'+branchObj.GetName(),tree,options.vs,'%s==1 && %s==1 && !%s'%(options.cuts,branchObj.GetName(),options.Not),histWbinning=fullSelection) + thisTrigPassCount = drawHere('pass_'+branchObj.GetName(),tree,options.vs,'(%s)==1 && %s==1 && !(%s)'%(options.cuts,branchObj.GetName(),options.Not),histWbinning=fullSelection) ratio = thisTrigPassCount.Clone('ratio_'+branchObj.GetName()) ratio.Divide(fullSelection) possible_trigs[branchObj.GetName()] = ratio # pp.pprint(possible_trigs) # Print out results if just counting -if options.vs == '': - pp.pprint(possible_trigs) +if options.vs == '': + ordered = OrderedDict(sorted(possible_trigs.items(), key=lambda t: float(t[1].split(' = ')[-1]),reverse=True)) + for n,v in ordered.items(): + print ('\t%s: %s'%(n,v)) # Book histogram out = ROOT.TH1F('out','out',len(possible_trigs.keys()),0,len(possible_trigs.keys())) @@ -166,7 +185,7 @@ def drawHere(name,tree,var,cuts,histWbinning=None): # Loop over HLTs/bins and set bin label and content bincount = 1 - for k in possible_trigs.keys(): + for k in ordered.keys(): out.GetXaxis().SetBinLabel(bincount,k.replace('HLT_','')[:25]) # truncate file name so that it fits in bin label out.SetBinContent(bincount,float(possible_trigs[k].split(' = ')[-1])) bincount+=1 @@ -234,4 +253,4 @@ def drawHere(name,tree,var,cuts,histWbinning=None): if options.output == '': c.Print('TrigTester_'+sys.argv[1].split('.')[0]+'_vs_'+options.vs+'.pdf','pdf') else: - c.Print(options.output+'.pdf','pdf') \ No newline at end of file + c.Print(options.output+'.pdf','pdf') diff --git a/TIMBER/data/LumiJSON/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt b/TIMBER/data/LumiJSON/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt new file mode 100644 index 0000000..a9a0464 --- /dev/null +++ b/TIMBER/data/LumiJSON/Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt @@ -0,0 +1,535 @@ +{ + "273158": [[1, 1283]], + "273302": [[1, 459]], + "273402": [[100, 292]], + "273403": [[1, 68]], + "273404": [[1, 22]], + "273405": [[2, 34]], + "273406": [[1, 125]], + "273408": [[1, 9]], + "273409": [[1, 317]], + "273410": [[1, 99]], + "273411": [[1, 29]], + "273425": [[62, 352], [354, 742]], + "273446": [[1, 48]], + "273447": [[1, 113], [115, 420]], + "273448": [[1, 396]], + "273449": [[1, 216]], + "273450": [[1, 214], [219, 647]], + "273492": [ + [71, 282], + [284, 325], + [327, 343] + ], + "273493": [[1, 241]], + "273494": [[1, 192]], + "273502": [ + [73, 256], + [258, 318], + [320, 813], + [815, 1077] + ], + "273503": [[1, 598]], + "273554": [[77, 444]], + "273555": [[1, 173]], + "273725": [[83, 252], [254, 2556]], + "273728": [[1, 112]], + "273730": [[1, 2126]], + "274094": [[108, 332]], + "274146": [[1, 73]], + "274157": [[105, 537]], + "274159": [[1, 47]], + "274160": [[1, 214]], + "274161": [[1, 516]], + "274172": [[31, 95]], + "274198": [[81, 192]], + "274199": [[1, 630]], + "274200": [[1, 678]], + "274240": [[1, 40], [42, 86]], + "274241": [[1, 1180]], + "274244": [[1, 607]], + "274250": [[1, 704]], + "274251": [[1, 546]], + "274283": [[1, 22]], + "274284": [[1, 215]], + "274286": [[1, 154]], + "274314": [[97, 165]], + "274315": [[1, 432]], + "274316": [[1, 974]], + "274317": [[1, 22]], + "274319": [[1, 225]], + "274335": [[60, 1013]], + "274336": [[1, 20]], + "274337": [[1, 22]], + "274338": [[1, 703]], + "274339": [[1, 99]], + "274344": [[1, 639]], + "274345": [[1, 170]], + "274382": [[94, 144]], + "274387": [[88, 447]], + "274388": [[1, 1820]], + "274420": [[93, 268]], + "274421": [[1, 356]], + "274422": [[1, 2207]], + "274440": [[92, 498]], + "274441": [[1, 443]], + "274442": [[1, 752]], + "274954": [[37, 60]], + "274955": [[1, 98]], + "274968": [[1, 1206]], + "274969": [[1, 1007]], + "274970": [[1, 47]], + "274971": [[1, 905]], + "274998": [[63, 794]], + "274999": [[1, 1257]], + "275000": [[1, 140]], + "275001": [[1, 1781], [1786, 2061]], + "275059": [[78, 81], [105, 150]], + "275066": [[1, 111]], + "275067": [[1, 396]], + "275068": [[1, 922]], + "275073": [[1, 523]], + "275074": [[1, 647]], + "275124": [[106, 433]], + "275125": [[1, 989]], + "275282": [[90, 185]], + "275283": [[1, 137]], + "275284": [[1, 74]], + "275290": [[96, 150]], + "275291": [[1, 356]], + "275292": [[1, 125]], + "275293": [[1, 142], [144, 201]], + "275309": [[55, 627]], + "275310": [[1, 1939]], + "275311": [[1, 1253]], + "275319": [[141, 292]], + "275337": [[1, 433]], + "275338": [[1, 520]], + "275344": [[76, 368]], + "275345": [[1, 353]], + "275370": [[81, 371]], + "275371": [[1, 569]], + "275375": [[127, 1453]], + "275376": [[1, 3096]], + "275657": [[1, 111]], + "275658": [[1, 344]], + "275659": [[1, 17]], + "275761": [[1, 11]], + "275767": [[1, 8]], + "275772": [[1, 61]], + "275773": [[1, 21]], + "275774": [[1, 317]], + "275776": [[1, 149]], + "275777": [[1, 304]], + "275778": [[1, 319]], + "275782": [[1, 131], [133, 762]], + "275832": [[1, 371]], + "275833": [ + [1, 53], + [56, 115], + [117, 254] + ], + "275834": [[1, 303]], + "275835": [[1, 20]], + "275836": [ + [1, 429], + [431, 1163], + [1166, 1170], + [1184, 1306] + ], + "275837": [[1, 186], [198, 726]], + "275847": [[1, 2263]], + "275886": [[70, 109]], + "275890": [[1, 1393]], + "275911": [ + [62, 298], + [300, 354], + [356, 445] + ], + "275912": [[1, 303]], + "275913": [[1, 484]], + "275918": [[1, 318], [348, 361]], + "275920": [[1, 472]], + "275921": [[1, 32]], + "275923": [[1, 127]], + "275931": [[1, 89]], + "275963": [[82, 139], [141, 172]], + "276092": [[74, 153]], + "276097": [[1, 507]], + "276242": [[1, 7], [18, 61], [72, 1669]], + "276243": [[1, 15], [18, 627]], + "276244": [[1, 1202]], + "276282": [[75, 534], [537, 1151]], + "276283": [[1, 1087]], + "276315": [[40, 175], [178, 227]], + "276317": [[1, 147]], + "276318": [[1, 103], [106, 576]], + "276355": [[1, 34]], + "276361": [ + [1, 161], + [169, 208], + [210, 800], + [802, 844] + ], + "276363": [[1, 238], [242, 1489]], + "276384": [[1, 1117]], + "276437": [ + [63, 224], + [227, 1074], + [1076, 2190] + ], + "276454": [[1, 527]], + "276458": [[1, 341]], + "276495": [[87, 279]], + "276501": [[1, 221], [223, 2556]], + "276502": [[1, 741]], + "276525": [[87, 1606], [1626, 2904]], + "276527": [[1, 214]], + "276528": [[1, 394]], + "276542": [[74, 858]], + "276543": [[1, 961]], + "276544": [[1, 163]], + "276545": [[1, 110], [117, 213]], + "276581": [[79, 447]], + "276582": [[1, 873]], + "276583": [[1, 60]], + "276584": [[1, 2]], + "276585": [[1, 253]], + "276586": [[1, 658], [680, 781]], + "276587": [[1, 1006]], + "276653": [[72, 562]], + "276655": [[1, 593], [595, 1114]], + "276659": [[1, 127], [129, 252]], + "276775": [[96, 1269]], + "276776": [[1, 1823]], + "276794": [[1, 885]], + "276807": [[66, 227]], + "276808": [[1, 883]], + "276810": [[1, 291]], + "276811": [[1, 2563]], + "276831": [[64, 2711]], + "276834": [[1, 729]], + "276870": [ + [78, 1354], + [1356, 3108], + [3111, 3258], + [3260, 3484] + ], + "276935": [ + [79, 184], + [186, 838], + [842, 906] + ], + "276940": [[70, 214]], + "276946": [[1, 34]], + "276947": [[1, 150]], + "276948": [[1, 481]], + "276950": [[1, 2353]], + "277069": [[81, 394]], + "277070": [[1, 1063]], + "277071": [[1, 82], [90, 178]], + "277072": [[1, 253], [256, 484]], + "277073": [[1, 98]], + "277076": [ + [1, 3], + [5, 7], + [9, 35], + [38, 1037] + ], + "277087": [[204, 1191]], + "277094": [[1, 161], [164, 598]], + "277096": [[1, 2093]], + "277112": [[1, 155]], + "277126": [[42, 60]], + "277127": [[1, 438], [440, 902]], + "277148": [[83, 715]], + "277166": [[77, 433]], + "277168": [[1, 2223]], + "277180": [[88, 228]], + "277194": [[113, 139], [144, 2070]], + "277305": [[62, 744]], + "277420": [[84, 346]], + "277981": [[82, 83], [85, 163]], + "277991": [[1, 98]], + "277992": [[1, 260], [262, 312]], + "278017": [ + [77, 97], + [99, 213], + [215, 512], + [514, 600] + ], + "278018": [ + [1, 263], + [265, 627], + [642, 1011], + [1020, 1181] + ], + "278167": [[87, 1660], [1662, 2260]], + "278175": [[1, 88]], + "278193": [[77, 231]], + "278239": [[76, 754]], + "278240": [ + [1, 64], + [70, 113], + [115, 1309] + ], + "278273": [[75, 114]], + "278274": [[1, 85]], + "278288": [[67, 84]], + "278289": [[1, 42], [44, 60]], + "278290": [[1, 11]], + "278308": [ + [87, 216], + [219, 1200], + [1217, 1848], + [1876, 1885] + ], + "278310": [[1, 709]], + "278315": [ + [73, 254], + [256, 661], + [663, 767] + ], + "278345": [[84, 500], [503, 833]], + "278346": [[1, 150]], + "278349": [ + [1, 401], + [403, 612], + [630, 639] + ], + "278366": [[1, 453]], + "278406": [[85, 360], [362, 1682]], + "278509": [[91, 1557]], + "278769": [[75, 111]], + "278770": [[1, 767]], + "278801": [[48, 92]], + "278802": [[1, 21]], + "278803": [[1, 330]], + "278804": [[1, 8]], + "278805": [[1, 26], [30, 291]], + "278808": [ + [1, 445], + [447, 462], + [464, 1793] + ], + "278820": [[17, 1540]], + "278822": [[1, 1627]], + "278873": [[70, 136]], + "278874": [[1, 484]], + "278875": [[1, 834]], + "278923": [[55, 467]], + "278957": [[79, 227]], + "278962": [[68, 418]], + "278963": [[1, 23], [25, 175]], + "278969": [ + [70, 1051], + [1053, 1291], + [1293, 1465] + ], + "278975": [[1, 857]], + "278976": [[1, 20]], + "278986": [[71, 199]], + "279024": [[82, 382]], + "279029": [[1, 260]], + "279071": [[71, 244]], + "279080": [[68, 224]], + "279115": [[118, 524]], + "279116": [[38, 485]], + "279479": [[86, 190]], + "279588": [[100, 1259]], + "279653": [[77, 77], [82, 268]], + "279654": [ + [1, 108], + [110, 1231], + [1285, 1307] + ], + "279656": [[1, 43], [82, 87]], + "279658": [[1, 713]], + "279667": [[68, 1033]], + "279681": [[77, 111]], + "279682": [[1, 47]], + "279683": [[1, 34]], + "279684": [[1, 34]], + "279685": [[1, 93], [95, 209]], + "279691": [[71, 124]], + "279694": [[1, 2235]], + "279715": [ + [71, 474], + [476, 477], + [480, 480], + [511, 511], + [523, 691] + ], + "279716": [ + [1, 860], + [875, 1528], + [1530, 1653] + ], + "279760": [ + [68, 578], + [585, 728], + [798, 806] + ], + "279766": [[1, 1694]], + "279767": [[1, 776]], + "279794": [[77, 1100]], + "279823": [[61, 395]], + "279841": [[75, 398], [407, 2122]], + "279844": [[72, 304]], + "279887": [[79, 397]], + "279931": [ + [84, 628], + [630, 801], + [803, 1043], + [1045, 3022] + ], + "279966": [[79, 441]], + "279975": [ + [70, 190], + [192, 253], + [256, 281], + [283, 709], + [734, 1121] + ], + "279993": [[85, 163]], + "279994": [[1, 59]], + "280013": [[1, 34]], + "280015": [ + [1, 39], + [41, 56], + [59, 554], + [560, 584] + ], + "280016": [[1, 163]], + "280017": [[1, 613]], + "280018": [[1, 1282]], + "280020": [[1, 47]], + "280024": [[1, 427]], + "280187": [[4, 70]], + "280188": [[1, 253]], + "280191": [[1, 781], [783, 909]], + "280194": [[1, 238]], + "280242": [[1, 411], [414, 639]], + "280249": [[1, 1437]], + "280251": [[1, 165], [167, 372]], + "280327": [[49, 98]], + "280330": [[1, 870]], + "280349": [[1, 247], [252, 639]], + "280363": [[1, 367]], + "280364": [ + [1, 619], + [621, 1090], + [1102, 1363] + ], + "280383": [[64, 73]], + "280384": [[1, 47]], + "280385": [[1, 519], [523, 2022]], + "281613": [[101, 903]], + "281639": [[1, 136]], + "281641": [[1, 319]], + "281693": [[1, 2191]], + "281707": [ + [99, 982], + [1000, 1065], + [1087, 1089] + ], + "281726": [[1, 291]], + "281727": [[1, 1605]], + "281797": [[125, 2176]], + "281975": [[1, 215]], + "281976": [[1, 2166]], + "282033": [[82, 124]], + "282034": [[1, 35]], + "282035": [[1, 47]], + "282037": [[1, 457], [459, 1862]], + "282092": [[92, 222], [624, 2276]], + "282708": [[1, 8]], + "282710": [[1, 9]], + "282712": [[1, 1], [10, 68]], + "282730": [[89, 171]], + "282731": [[1, 176]], + "282732": [[1, 73]], + "282733": [[1, 178]], + "282734": [[1, 330]], + "282735": [[1, 1823]], + "282800": [[1, 382]], + "282807": [[1, 330]], + "282814": [[1, 1843]], + "282842": [[1, 80]], + "282917": [[117, 201]], + "282918": [[1, 59]], + "282919": [[1, 243]], + "282922": [[1, 137]], + "282923": [ + [1, 17], + [19, 30], + [32, 86], + [88, 229] + ], + "283042": [[1, 10]], + "283043": [[1, 519]], + "283049": [[82, 98]], + "283050": [[1, 227]], + "283052": [[1, 124]], + "283059": [[1, 458]], + "283270": [[76, 1913]], + "283283": [[1, 1748]], + "283305": [[79, 93]], + "283306": [[1, 291]], + "283307": [[1, 461]], + "283308": [ + [1, 547], + [549, 571], + [573, 948] + ], + "283353": [[80, 832]], + "283358": [[1, 243], [245, 986]], + "283359": [[1, 428]], + "283407": [[82, 124]], + "283408": [ + [1, 2125], + [2203, 2416], + [2528, 2543] + ], + "283416": [[49, 245]], + "283453": [[83, 537]], + "283469": [[74, 74]], + "283478": [[76, 303], [324, 973]], + "283548": [[144, 291]], + "283680": [[1, 87]], + "283681": [[1, 23]], + "283682": [[1, 389]], + "283685": [[1, 314]], + "283820": [[67, 1552]], + "283830": [[1, 729]], + "283834": [[1, 85]], + "283835": [[1, 112]], + "283865": [[1, 1177]], + "283876": [[65, 736]], + "283877": [[1, 1496]], + "283884": [[349, 756]], + "283885": [[1, 1723]], + "283933": [[88, 240]], + "283934": [ + [1, 784], + [793, 870], + [875, 1245], + [1267, 1291] + ], + "283946": [[85, 1462]], + "283964": [[1, 388]], + "284006": [[73, 394]], + "284014": [[1, 266]], + "284025": [[109, 162]], + "284029": [[1, 112]], + "284035": [[1, 369]], + "284036": [[1, 356]], + "284037": [[1, 343]], + "284038": [[1, 60]], + "284039": [[1, 34]], + "284040": [[1, 35]], + "284041": [[1, 47]], + "284042": [[1, 137]], + "284043": [[1, 227]], + "284044": [[1, 30]] +} \ No newline at end of file diff --git a/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt b/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt deleted file mode 100644 index 9c734d3..0000000 --- a/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_EOY2017ReReco_Collisions17_JSON.txt +++ /dev/null @@ -1 +0,0 @@ -{"297050": [[12, 137], [193, 776]], "297056": [[12, 203]], "297057": [[1, 4], [14, 105], [112, 377], [385, 418], [424, 509], [516, 906]], "297099": [[24, 62]], "297100": [[1, 15], [21, 369], [375, 381]], "297101": [[1, 668], [673, 697], [700, 856], [862, 937], [943, 1101]], "297113": [[1, 204], [211, 252]], "297114": [[1, 99], [106, 161]], "297175": [[1, 85]], "297176": [[11, 120], [125, 214]], "297177": [[1, 162]], "297178": [[1, 54], [59, 334], [342, 749], [754, 967], [972, 1037], [1043, 1264], [1272, 1282], [1290, 1385]], "297215": [[1, 47]], "297218": [[1, 27]], "297219": [[1, 80], [85, 281], [288, 579], [585, 916], [921, 1429], [1436, 2004], [2010, 2638]], "297224": [[10, 19], [24, 138]], "297225": [[1, 32]], "297227": [[9, 192]], "297292": [[1, 125], [130, 131], [136, 667], [675, 753]], "297293": [[1, 121], [127, 150]], "297296": [[1, 236], [240, 401], [406, 418], [425, 497]], "297308": [[1, 44]], "297359": [[39, 70], [164, 180]], "297411": [[32, 737], [740, 800], [807, 950]], "297424": [[32, 149]], "297425": [[1, 107], [112, 157]], "297426": [[1, 28], [34, 84], [90, 111]], "297429": [[1, 72]], "297430": [[1, 199]], "297431": [[1, 49], [55, 64], [71, 188]], "297432": [[1, 112]], "297433": [[1, 159]], "297434": [[1, 161]], "297435": [[1, 94]], "297467": [[50, 138]], "297468": [[1, 74]], "297469": [[1, 4], [9, 70]], "297483": [[37, 68], [71, 201], [206, 214]], "297484": [[1, 47], [53, 208], [214, 214]], "297485": [[1, 16], [23, 253], [258, 299], [302, 314], [321, 420]], "297486": [[1, 74], [79, 598], [603, 625]], "297487": [[1, 433], [439, 491], [495, 603], [609, 613]], "297488": [[1, 73], [80, 424]], "297503": [[5, 275], [282, 559], [566, 606], [612, 635], [642, 772], [777, 779]], "297504": [[1, 41], [125, 136]], "297505": [[1, 394]], "297557": [[8, 28], [67, 113], [119, 167], [173, 174], [180, 394]], "297558": [[9, 266]], "297562": [[1, 69], [120, 369]], "297563": [[1, 254], [260, 264]], "297598": [[17, 17], [22, 33]], "297599": [[1, 169], [211, 225], [230, 312], [319, 385], [395, 407]], "297603": [[1, 420]], "297604": [[1, 126], [131, 272], [279, 375], [381, 407]], "297605": [[1, 6], [13, 20], [24, 89], [95, 223], [257, 407]], "297606": [[1, 94], [99, 231]], "297620": [[32, 318]], "297656": [[64, 116], [123, 135], [140, 230], [269, 307], [313, 330], [341, 388], [393, 433]], "297665": [[1, 153], [159, 209], [214, 279]], "297666": [[1, 11], [17, 81], [86, 121]], "297670": [[21, 34]], "297674": [[3, 102], [108, 188]], "297675": [[1, 123], [129, 239], [244, 328], [334, 467], [470, 471]], "297722": [[55, 160], [165, 353]], "297723": [[1, 13], [51, 222]], "298996": [[33, 216]], "298997": [[1, 37], [47, 47]], "299000": [[4, 77]], "299042": [[33, 55]], "299061": [[38, 355]], "299062": [[1, 163], [166, 303]], "299064": [[7, 85]], "299065": [[13, 248], [251, 342]], "299067": [[1, 459]], "299096": [[2, 97]], "299149": [[29, 470]], "299178": [[37, 56], [58, 111]], "299180": [[5, 98]], "299184": [[1, 561]], "299185": [[1, 120]], "299327": [[1, 72]], "299329": [[1, 172]], "299368": [[37, 175]], "299369": [[1, 303]], "299370": [[1, 7], [47, 705]], "299380": [[34, 227]], "299381": [[1, 45]], "299394": [[5, 33]], "299395": [[1, 187]], "299396": [[1, 81]], "299420": [[2, 50]], "299443": [[145, 164]], "299450": [[39, 88]], "299477": [[39, 42], [82, 87]], "299478": [[1, 175]], "299479": [[1, 123]], "299480": [[1, 6], [8, 715]], "299481": [[1, 196], [199, 236], [260, 479], [487, 940], [943, 1037], [1061, 1257]], "299593": [[95, 177], [179, 896]], "299594": [[1, 317]], "299595": [[1, 134], [138, 138]], "299597": [[3, 91], [93, 540]], "299649": [[151, 332]], "300087": [[36, 59], [61, 126], [128, 216], [218, 239]], "300105": [[1, 21]], "300106": [[1, 74]], "300107": [[1, 28], [30, 47]], "300117": [[35, 67]], "300122": [[46, 730], [735, 924], [927, 1295]], "300123": [[1, 384], [387, 612]], "300155": [[35, 1229]], "300156": [[1, 72]], "300157": [[9, 1107]], "300226": [[43, 448]], "300233": [[43, 162]], "300234": [[1, 59]], "300235": [[1, 187]], "300236": [[11, 187]], "300237": [[1, 713], [716, 717]], "300238": [[30, 58], [62, 329]], "300239": [[1, 145], [148, 167], [171, 213]], "300240": [[1, 7], [11, 46], [51, 362]], "300280": [[52, 56], [61, 69], [73, 150], [155, 165], [178, 198], [207, 222], [226, 251], [255, 268], [275, 345], [349, 370], [381, 548], [553, 607], [617, 639], [663, 691]], "300281": [[3, 8]], "300282": [[1, 9], [13, 59], [73, 92], [97, 114], [142, 151], [156, 186]], "300283": [[1, 34]], "300284": [[1, 22], [38, 47], [50, 82], [90, 98], [108, 130], [133, 152], [156, 250], [260, 414], [420, 561], [568, 585], [590, 680], [691, 751]], "300364": [[27, 46]], "300365": [[1, 20]], "300366": [[1, 21]], "300367": [[1, 20]], "300368": [[1, 20]], "300369": [[1, 20]], "300370": [[1, 20]], "300371": [[1, 20]], "300372": [[1, 8]], "300373": [[1, 21]], "300374": [[1, 21]], "300375": [[1, 93]], "300389": [[1, 1], [4, 5], [8, 8], [11, 20], [23, 39], [60, 149]], "300390": [[2, 21]], "300391": [[1, 21]], "300392": [[1, 21]], "300393": [[1, 20]], "300394": [[1, 21]], "300395": [[1, 20]], "300396": [[1, 20]], "300397": [[1, 20]], "300398": [[1, 20]], "300399": [[1, 20]], "300400": [[1, 677]], "300401": [[19, 673]], "300459": [[40, 332]], "300461": [[1, 98]], "300462": [[1, 97]], "300463": [[1, 124]], "300464": [[1, 103], [126, 265]], "300466": [[1, 650]], "300467": [[1, 563]], "300497": [[26, 175]], "300514": [[38, 150]], "300515": [[1, 838], [957, 1013]], "300516": [[1, 111]], "300517": [[1, 8], [103, 623]], "300558": [[8, 548]], "300560": [[1, 640], [645, 844]], "300574": [[15, 111]], "300575": [[1, 82]], "300576": [[7, 123], [125, 1206]], "300631": [[41, 49], [63, 66], [75, 226]], "300632": [[1, 21]], "300633": [[1, 447]], "300635": [[1, 23], [26, 176]], "300636": [[1, 335], [338, 1572]], "300673": [[41, 47], [49, 49], [52, 56], [59, 66]], "300674": [[1, 33]], "300675": [[1, 33]], "300676": [[1, 26]], "300742": [[56, 343]], "300777": [[21, 509]], "300780": [[3, 341]], "300785": [[1, 549], [552, 750], [752, 1201], [1219, 1272]], "300806": [[36, 214]], "300811": [[6, 508]], "300812": [[1, 59]], "300816": [[6, 161]], "300817": [[1, 33], [36, 74], [80, 383], [410, 493]], "301046": [[162, 223]], "301141": [[25, 31]], "301142": [[1, 897]], "301161": [[36, 805]], "301165": [[1, 145]], "301179": [[35, 59]], "301180": [[1, 97]], "301183": [[3, 10], [13, 303]], "301281": [[38, 157]], "301283": [[3, 886]], "301298": [[45, 949]], "301323": [[35, 474], [477, 990]], "301330": [[22, 353]], "301359": [[33, 319]], "301384": [[1, 476]], "301391": [[38, 214]], "301392": [[1, 627]], "301393": [[2, 18]], "301396": [[1, 33]], "301397": [[1, 228], [231, 517], [519, 728]], "301398": [[1, 9]], "301399": [[1, 108]], "301417": [[50, 367]], "301447": [[86, 96], [99, 400], [404, 512]], "301448": [[1, 329]], "301449": [[1, 404]], "301450": [[1, 173]], "301461": [[28, 581]], "301472": [[35, 830]], "301475": [[1, 18]], "301476": [[1, 844]], "301519": [[42, 250]], "301524": [[1, 110], [117, 263]], "301529": [[1, 49]], "301530": [[1, 110]], "301531": [[1, 394]], "301532": [[1, 611]], "301567": [[14, 372]], "301627": [[57, 943]], "301664": [[28, 445]], "301665": [[1, 294], [319, 487]], "301694": [[36, 102]], "301912": [[43, 52], [101, 422]], "301913": [[1, 58]], "301914": [[1, 350]], "301941": [[31, 568]], "301959": [[30, 1938]], "301960": [[1, 147]], "301970": [[6, 123]], "301984": [[17, 317]], "301985": [[1, 367]], "301986": [[1, 381]], "301987": [[1, 1128]], "301997": [[37, 407]], "301998": [[1, 1704]], "302019": [[34, 86]], "302026": [[24, 53], [66, 72]], "302029": [[1, 98]], "302031": [[1, 401], [403, 446], [448, 675], [678, 818]], "302033": [[1, 40], [44, 46]], "302034": [[1, 20]], "302037": [[18, 20]], "302038": [[10, 10]], "302040": [[1, 174]], "302041": [[1, 72]], "302042": [[1, 523]], "302043": [[1, 228]], "302131": [[71, 943]], "302159": [[33, 140]], "302163": [[32, 671], [674, 1230]], "302165": [[1, 85]], "302166": [[1, 16]], "302225": [[54, 133], [136, 923]], "302228": [[58, 78], [81, 293]], "302229": [[1, 457]], "302240": [[1, 960]], "302262": [[37, 471]], "302263": [[1, 1250]], "302277": [[15, 17], [22, 192], [194, 391]], "302279": [[1, 71]], "302280": [[1, 152]], "302322": [[33, 870]], "302328": [[42, 722]], "302337": [[27, 162]], "302342": [[19, 72]], "302343": [[1, 98]], "302344": [[3, 482]], "302350": [[1, 136]], "302388": [[27, 157], [164, 717]], "302392": [[45, 407]], "302393": [[1, 887]], "302448": [[21, 312], [317, 442], [445, 483], [486, 1926]], "302472": [[28, 808]], "302473": [[1, 368], [398, 406]], "302474": [[1, 305]], "302475": [[1, 7]], "302476": [[1, 259]], "302479": [[30, 222], [225, 340]], "302484": [[8, 176]], "302485": [[1, 922]], "302492": [[10, 21], [23, 59]], "302493": [[1, 7]], "302494": [[1, 618]], "302509": [[73, 92]], "302513": [[37, 89]], "302522": [[29, 46]], "302523": [[1, 59]], "302525": [[1, 677], [747, 778]], "302526": [[1, 582]], "302548": [[40, 124]], "302551": [[1, 7]], "302553": [[1, 188]], "302554": [[1, 7]], "302555": [[1, 11]], "302563": [[40, 46]], "302565": [[1, 7]], "302572": [[6, 291]], "302573": [[1, 693], [730, 1285]], "302596": [[47, 534], [545, 705], [710, 986]], "302597": [[1, 1054]], "302634": [[37, 73], [75, 123], [125, 129], [133, 165], [168, 175], [177, 216], [218, 358], [361, 375], [378, 404], [407, 423], [425, 503], [505, 578], [581, 594], [596, 638]], "302635": [[1, 22], [24, 28], [30, 39], [41, 53], [55, 132], [134, 144], [146, 265], [267, 271], [274, 344], [347, 357], [359, 375], [378, 384], [386, 414], [416, 494], [497, 608], [611, 634], [637, 684], [687, 706], [708, 724], [726, 901], [904, 954], [957, 982], [984, 1072], [1075, 1124], [1126, 1129], [1132, 1206], [1209, 1234], [1236, 1291]], "302651": [[1, 149]], "302654": [[1, 317]], "302661": [[1, 72]], "302663": [[1, 706]], "303825": [[1, 180]], "303832": [[54, 1334], [1338, 1913]], "303838": [[54, 54], [83, 2044]], "303885": [[60, 2052]], "303948": [[55, 1678]], "303998": [[58, 319]], "303999": [[1, 751]], "304000": [[1, 56]], "304062": [[54, 2014]], "304119": [[71, 138], [143, 150]], "304120": [[1, 253]], "304125": [[1, 1769]], "304144": [[76, 2596], [2598, 2656]], "304158": [[165, 1750], [1752, 2087]], "304169": [[50, 1714], [1731, 1733]], "304170": [[1, 620]], "304199": [[10, 18]], "304200": [[1, 321]], "304204": [[55, 607]], "304209": [[52, 98], [100, 133], [135, 157], [176, 253], [255, 477]], "304291": [[56, 85]], "304292": [[1, 1125], [1183, 1779], [1781, 1811]], "304333": [[74, 1653]], "304354": [[82, 295]], "304366": [[44, 1387], [1390, 1396], [1399, 1402], [1404, 1407], [1409, 1412], [1414, 1416], [1419, 1421], [1424, 1873]], "304446": [[40, 92], [110, 111]], "304447": [[1, 534], [540, 1644]], "304451": [[1, 60]], "304505": [[60, 86]], "304506": [[1, 370]], "304507": [[1, 239]], "304508": [[1, 1324]], "304562": [[52, 56], [60, 848]], "304616": [[52, 223], [227, 740], [747, 1002]], "304625": [[73, 536]], "304626": [[1, 8]], "304654": [[53, 704]], "304655": [[1, 1194]], "304661": [[53, 67], [69, 143], [147, 173], [175, 198], [237, 240]], "304662": [[1, 150]], "304663": [[1, 689]], "304671": [[51, 1193]], "304672": [[1, 60]], "304737": [[69, 149]], "304738": [[1, 1681]], "304739": [[3, 16]], "304740": [[1, 278]], "304776": [[49, 98]], "304777": [[1, 431], [438, 510]], "304778": [[4, 1300]], "304797": [[28, 87], [91, 306], [308, 377], [385, 1202], [1205, 2950]], "305044": [[3, 203], [302, 306], [309, 310], [313, 313], [318, 330]], "305045": [[1, 873]], "305046": [[1, 667], [671, 686]], "305059": [[63, 518], [520, 575]], "305062": [[1, 8]], "305063": [[1, 35]], "305064": [[1, 2045]], "305081": [[52, 1107]], "305112": [[68, 1527]], "305113": [[9, 72]], "305114": [[1, 526]], "305178": [[69, 124]], "305179": [[1, 21]], "305180": [[1, 9]], "305181": [[1, 8]], "305182": [[1, 8]], "305183": [[1, 231], [262, 266]], "305184": [[1, 8]], "305186": [[1, 112], [120, 422]], "305188": [[1, 1002]], "305202": [[74, 132], [136, 729]], "305204": [[1, 1229]], "305207": [[52, 1077]], "305208": [[1, 372]], "305234": [[52, 99]], "305236": [[1, 23]], "305237": [[1, 16], [18, 1147]], "305247": [[57, 433]], "305248": [[1, 957]], "305252": [[1, 548]], "305282": [[75, 207]], "305310": [[60, 157], [163, 458]], "305311": [[1, 153]], "305312": [[1, 227]], "305313": [[1, 741]], "305314": [[1, 404]], "305336": [[36, 241]], "305338": [[1, 107]], "305341": [[1, 503]], "305349": [[1, 34]], "305350": [[1, 21]], "305351": [[1, 868]], "305358": [[91, 231], [233, 253]], "305364": [[50, 147]], "305365": [[1, 668], [676, 832]], "305366": [[1, 721], [724, 756], [769, 1254]], "305376": [[71, 168]], "305377": [[9, 1292], [1294, 1383], [1386, 1525]], "305405": [[44, 536], [573, 575]], "305406": [[1, 394], [401, 520], [528, 535], [540, 1475]], "305440": [[20, 291]], "305441": [[1, 121]], "305516": [[46, 518], [558, 639]], "305517": [[1, 163]], "305518": [[1, 1134]], "305586": [[53, 583]], "305589": [[1, 691]], "305590": [[1, 500], [517, 1020]], "305636": [[60, 339], [342, 667], [671, 2390]], "305766": [[55, 902]], "305809": [[56, 197]], "305814": [[85, 689], [692, 978], [980, 1074], [1077, 1912]], "305821": [[59, 830]], "305832": [[87, 266]], "305840": [[1, 1144]], "305842": [[1, 862]], "305862": [[81, 705]], "305898": [[70, 780]], "305902": [[53, 521]], "305967": [[1, 32]], "306029": [[63, 96]], "306030": [[1, 110]], "306036": [[60, 63]], "306037": [[1, 49]], "306038": [[1, 139]], "306041": [[1, 320]], "306042": [[1, 371]], "306048": [[1, 140]], "306049": [[1, 358]], "306051": [[1, 415]], "306091": [[422, 629]], "306092": [[1, 588], [593, 976]], "306095": [[1, 300]], "306121": [[57, 152]], "306122": [[1, 127]], "306125": [[1, 756], [770, 2642], [2667, 3007]], "306126": [[1, 497]], "306134": [[53, 84]], "306135": [[1, 1095]], "306138": [[1, 1298]], "306139": [[1, 1112]], "306153": [[78, 165]], "306154": [[1, 251], [253, 691], [709, 1233]], "306155": [[1, 1440]], "306169": [[1, 745]], "306170": [[1, 22]], "306171": [[1, 503]], "306418": [[1, 33], [35, 75]], "306419": [[1, 62]], "306420": [[1, 108]], "306422": [[9, 126]], "306423": [[1, 333]], "306432": [[1, 339]], "306454": [[13, 101]], "306455": [[1, 11]], "306456": [[1, 237], [239, 787]], "306457": [[1, 31]], "306458": [[1, 17], [20, 35], [37, 41], [43, 47], [49, 53], [56, 60], [62, 66], [68, 72], [74, 77], [79, 83], [85, 89], [93, 102], [104, 108], [110, 114], [116, 120], [122, 126], [129, 139], [141, 145], [147, 151], [153, 166], [169, 173], [175, 179], [181, 185], [187, 191], [193, 197], [200, 210], [212, 216], [218, 222], [225, 229], [231, 235], [237, 241], [243, 247], [249, 249], [252, 256], [258, 268]], "306459": [[1, 512], [514, 2275]], "306460": [[1, 73]]} \ No newline at end of file diff --git a/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt b/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt new file mode 100644 index 0000000..5882756 --- /dev/null +++ b/TIMBER/data/LumiJSON/Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt @@ -0,0 +1,615 @@ +{ + "297050": [[12, 137], [193, 776]], + "297056": [[12, 203]], + "297057": [[1, 4], [14, 105], [112, 377], [385, 418], [424, 509], [516, 906]], + "297099": [[24, 62]], + "297100": [[1, 15], [21, 369], [375, 381]], + "297101": [[1, 668], [673, 697], [700, 856], [862, 937], [943, 1101]], + "297113": [[1, 204], [211, 252]], + "297114": [[1, 99], [106, 161]], + "297175": [[1, 85]], + "297176": [[11, 120], [125, 214]], + "297177": [[1, 162]], + "297178": [ + [1, 54], + [59, 334], + [342, 749], + [754, 967], + [972, 1037], + [1043, 1264], + [1272, 1282], + [1290, 1385] + ], + "297179": [[1, 6], [12, 97]], + "297215": [[1, 47]], + "297218": [[1, 27]], + "297219": [ + [1, 80], + [85, 281], + [288, 579], + [585, 916], + [921, 1429], + [1436, 2004], + [2010, 2638] + ], + "297224": [[10, 19], [24, 138]], + "297225": [[1, 32]], + "297227": [[9, 192]], + "297292": [[1, 125], [130, 131], [136, 667], [675, 753]], + "297293": [[1, 121], [127, 150]], + "297296": [[1, 236], [240, 401], [406, 418], [425, 497]], + "297308": [[1, 44]], + "297359": [[39, 70], [164, 180]], + "297411": [[32, 737], [740, 800], [807, 950]], + "297424": [[32, 149]], + "297425": [[1, 107], [112, 157]], + "297426": [[1, 28], [34, 84], [90, 111]], + "297429": [[1, 72]], + "297430": [[1, 199]], + "297431": [[1, 49], [55, 64], [71, 188]], + "297432": [[1, 112]], + "297433": [[1, 159]], + "297434": [[1, 161]], + "297435": [[1, 94]], + "297467": [[50, 138]], + "297468": [[1, 74]], + "297469": [[1, 4], [9, 70]], + "297483": [[37, 68], [71, 201], [206, 214]], + "297484": [[1, 47], [53, 208], [214, 214]], + "297485": [[1, 16], [23, 253], [258, 299], [302, 314], [321, 420]], + "297486": [[1, 74], [79, 598], [603, 625]], + "297487": [[1, 433], [439, 491], [495, 603], [609, 613]], + "297488": [[1, 73], [80, 424]], + "297503": [ + [5, 275], + [282, 559], + [566, 606], + [612, 635], + [642, 772], + [777, 779] + ], + "297504": [[1, 41], [125, 136]], + "297505": [[1, 394]], + "297557": [[8, 28], [67, 113], [119, 167], [173, 174], [180, 394]], + "297558": [[9, 266]], + "297562": [[1, 69], [120, 369]], + "297563": [[1, 254], [260, 264]], + "297598": [[17, 17], [22, 33]], + "297599": [[1, 169], [211, 225], [230, 312], [319, 385], [395, 407]], + "297603": [[1, 420]], + "297604": [[1, 126], [131, 272], [279, 375], [381, 407]], + "297605": [[1, 6], [13, 20], [24, 89], [95, 223], [257, 407]], + "297606": [[1, 94], [99, 231]], + "297620": [[32, 318]], + "297656": [ + [64, 116], + [123, 135], + [140, 230], + [269, 307], + [313, 330], + [341, 388], + [393, 433] + ], + "297665": [[1, 153], [159, 209], [214, 279]], + "297666": [[1, 11], [17, 81], [86, 121]], + "297670": [[21, 34]], + "297674": [[3, 102], [108, 188]], + "297675": [[1, 123], [129, 239], [244, 328], [334, 467], [470, 471]], + "297722": [[55, 160], [165, 353]], + "297723": [[1, 13], [51, 222]], + "298996": [[33, 216]], + "298997": [[1, 37], [47, 47]], + "299000": [[4, 77]], + "299042": [[33, 55]], + "299061": [[38, 355]], + "299062": [[1, 163], [166, 303]], + "299064": [[7, 85]], + "299065": [[13, 248], [251, 342]], + "299067": [[1, 459]], + "299096": [[2, 97]], + "299149": [[29, 470]], + "299178": [[37, 56], [58, 111]], + "299180": [[5, 98]], + "299184": [[1, 561]], + "299185": [[1, 120]], + "299327": [[1, 72]], + "299329": [[1, 172]], + "299368": [[37, 175]], + "299369": [[1, 303]], + "299370": [[1, 7], [47, 705]], + "299380": [[34, 227]], + "299381": [[1, 45]], + "299394": [[5, 33]], + "299395": [[1, 187]], + "299396": [[1, 81]], + "299420": [[2, 50]], + "299443": [[145, 164]], + "299450": [[39, 88]], + "299477": [[39, 42], [82, 87]], + "299478": [[1, 175]], + "299479": [[1, 123]], + "299480": [[1, 6], [8, 715]], + "299481": [ + [1, 196], + [199, 236], + [260, 479], + [487, 940], + [943, 1037], + [1061, 1257] + ], + "299593": [[95, 177], [179, 896]], + "299594": [[1, 317]], + "299595": [[1, 134], [138, 138]], + "299597": [[3, 91], [93, 540]], + "299649": [[151, 332]], + "300087": [[36, 59], [61, 126], [128, 216], [218, 239]], + "300105": [[1, 21]], + "300106": [[1, 74]], + "300107": [[1, 28], [30, 47]], + "300117": [[35, 67]], + "300122": [[46, 730], [735, 924], [927, 1295]], + "300123": [[1, 384], [387, 612]], + "300155": [[35, 1229]], + "300156": [[1, 72]], + "300157": [[9, 1107]], + "300226": [[43, 448]], + "300233": [[43, 162]], + "300234": [[1, 59]], + "300235": [[1, 187]], + "300236": [[11, 187]], + "300237": [[1, 713], [716, 717]], + "300238": [[30, 58], [62, 329]], + "300239": [[1, 145], [148, 167], [171, 213]], + "300240": [[1, 7], [11, 46], [51, 362]], + "300280": [ + [52, 56], + [61, 69], + [73, 150], + [155, 165], + [178, 198], + [207, 222], + [226, 251], + [255, 268], + [275, 345], + [349, 370], + [381, 548], + [553, 607], + [617, 639], + [663, 691] + ], + "300281": [[3, 8]], + "300282": [[1, 9], [13, 59], [73, 92], [97, 114], [142, 151], [156, 186]], + "300283": [[1, 34]], + "300284": [ + [1, 22], + [38, 47], + [50, 82], + [90, 98], + [108, 130], + [133, 152], + [156, 250], + [260, 414], + [420, 561], + [568, 585], + [590, 680], + [691, 751] + ], + "300364": [[27, 46]], + "300372": [[1, 8]], + "300375": [[1, 93]], + "300389": [[1, 1], [4, 5], [8, 8], [11, 20], [23, 39], [60, 149]], + "300399": [[1, 20]], + "300400": [[1, 677]], + "300401": [[19, 673]], + "300459": [[40, 332]], + "300461": [[1, 98]], + "300462": [[1, 97]], + "300463": [[1, 124]], + "300464": [[1, 103], [126, 265]], + "300466": [[1, 650]], + "300467": [[1, 563]], + "300497": [[26, 175]], + "300514": [[38, 150]], + "300515": [[1, 838], [957, 1013]], + "300516": [[1, 111]], + "300517": [[1, 8], [103, 623]], + "300558": [[8, 548]], + "300560": [[1, 640], [645, 844]], + "300574": [[15, 111]], + "300575": [[1, 82]], + "300576": [[7, 123], [125, 1206]], + "300631": [[41, 49], [63, 66], [75, 226]], + "300632": [[1, 21]], + "300633": [[1, 447]], + "300635": [[1, 23], [26, 176]], + "300636": [[1, 335], [338, 1572]], + "300673": [[41, 47], [49, 49], [52, 56], [59, 66]], + "300674": [[1, 33]], + "300675": [[1, 33]], + "300676": [[1, 26]], + "300742": [[56, 343]], + "300777": [[21, 509]], + "300780": [[3, 341]], + "300785": [[1, 549], [552, 750], [752, 1201], [1219, 1272]], + "300806": [[36, 214]], + "300811": [[6, 508]], + "300812": [[1, 59]], + "300816": [[6, 161]], + "300817": [[1, 33], [36, 74], [80, 383], [410, 493]], + "301046": [[162, 223]], + "301141": [[25, 31]], + "301142": [[1, 897]], + "301161": [[36, 805]], + "301165": [[1, 145]], + "301179": [[35, 59]], + "301180": [[1, 97]], + "301183": [[3, 10], [13, 303]], + "301281": [[38, 157]], + "301283": [[3, 886]], + "301298": [[45, 949]], + "301323": [[35, 474], [477, 990]], + "301330": [[22, 353]], + "301359": [[33, 319]], + "301384": [[1, 476]], + "301391": [[38, 214]], + "301392": [[1, 627]], + "301393": [[2, 18]], + "301396": [[1, 33]], + "301397": [[1, 228], [231, 517], [519, 728]], + "301398": [[1, 9]], + "301399": [[1, 108]], + "301417": [[50, 367]], + "301447": [[86, 96], [99, 400], [404, 512]], + "301448": [[1, 329]], + "301449": [[1, 404]], + "301450": [[1, 173]], + "301461": [[28, 581]], + "301472": [[35, 830]], + "301475": [[1, 18]], + "301476": [[1, 844]], + "301519": [[42, 250]], + "301524": [[1, 110], [117, 263]], + "301529": [[1, 49]], + "301530": [[1, 110]], + "301531": [[1, 394]], + "301532": [[1, 611]], + "301567": [[14, 372]], + "301627": [[57, 943]], + "301664": [[28, 445]], + "301665": [[1, 294], [319, 487]], + "301694": [[36, 102]], + "301912": [[43, 52], [101, 422]], + "301913": [[1, 58]], + "301914": [[1, 350]], + "301941": [[31, 568]], + "301959": [[30, 1938]], + "301960": [[1, 147]], + "301970": [[6, 123]], + "301984": [[17, 317]], + "301985": [[1, 367]], + "301986": [[1, 381]], + "301987": [[1, 1128]], + "301997": [[37, 407]], + "301998": [[1, 1704]], + "302019": [[34, 86]], + "302026": [[24, 53], [66, 72]], + "302029": [[1, 98]], + "302031": [[1, 401], [403, 446], [448, 675], [678, 818]], + "302033": [[1, 40], [44, 46]], + "302034": [[1, 20]], + "302037": [[18, 20]], + "302038": [[10, 10]], + "302040": [[1, 174]], + "302041": [[1, 72]], + "302042": [[1, 523]], + "302043": [[1, 228]], + "302131": [[71, 943]], + "302159": [[33, 140]], + "302163": [[32, 671], [674, 1230]], + "302165": [[1, 85]], + "302166": [[1, 16]], + "302225": [[54, 133], [136, 923]], + "302228": [[58, 78], [81, 293]], + "302229": [[1, 457]], + "302240": [[1, 960]], + "302262": [[37, 471]], + "302263": [[1, 1250]], + "302277": [[15, 17], [22, 192], [194, 391]], + "302279": [[1, 71]], + "302280": [[1, 152]], + "302322": [[33, 870]], + "302328": [[42, 722]], + "302337": [[27, 162]], + "302342": [[19, 72]], + "302343": [[1, 98]], + "302344": [[3, 482]], + "302350": [[1, 136]], + "302388": [[27, 157], [164, 717]], + "302392": [[45, 407]], + "302393": [[1, 887]], + "302448": [[21, 312], [317, 442], [445, 483], [486, 1926]], + "302472": [[28, 808]], + "302473": [[1, 368], [398, 406]], + "302474": [[1, 305]], + "302475": [[1, 7]], + "302476": [[1, 259]], + "302479": [[30, 222], [225, 340]], + "302484": [[8, 176]], + "302485": [[1, 922]], + "302492": [[10, 21], [23, 59]], + "302493": [[1, 7]], + "302494": [[1, 618]], + "302509": [[73, 92]], + "302513": [[37, 89]], + "302522": [[29, 46]], + "302523": [[1, 59]], + "302525": [[1, 677], [747, 778]], + "302526": [[1, 582]], + "302548": [[40, 124]], + "302551": [[1, 7]], + "302553": [[1, 188]], + "302554": [[1, 7]], + "302555": [[1, 11]], + "302563": [[40, 46]], + "302565": [[1, 7]], + "302572": [[6, 291]], + "302573": [[1, 693], [730, 1285]], + "302596": [[47, 534], [545, 705], [710, 986]], + "302597": [[1, 1054]], + "302634": [ + [37, 73], + [75, 123], + [125, 129], + [133, 165], + [168, 175], + [177, 216], + [218, 358], + [361, 375], + [378, 404], + [407, 423], + [425, 503], + [505, 578], + [581, 594], + [596, 638] + ], + "302635": [ + [1, 22], + [24, 28], + [30, 39], + [41, 53], + [55, 132], + [134, 144], + [146, 265], + [267, 271], + [274, 344], + [347, 357], + [359, 375], + [378, 384], + [386, 414], + [416, 494], + [497, 608], + [611, 634], + [637, 684], + [687, 706], + [708, 724], + [726, 901], + [904, 954], + [957, 982], + [984, 1072], + [1075, 1124], + [1126, 1129], + [1132, 1206], + [1209, 1234], + [1236, 1291] + ], + "302651": [[1, 149]], + "302654": [[1, 317]], + "302661": [[1, 72]], + "302663": [[1, 706]], + "303825": [[1, 180]], + "303832": [[54, 1334], [1338, 1913]], + "303838": [[54, 54], [83, 2044]], + "303885": [[60, 2052]], + "303948": [[55, 1678]], + "303998": [[58, 319]], + "303999": [[1, 751]], + "304000": [[1, 56]], + "304062": [[54, 2014]], + "304119": [[71, 138], [143, 150]], + "304120": [[1, 253]], + "304125": [[1, 1769]], + "304144": [[76, 2596], [2598, 2656]], + "304158": [[165, 1750], [1752, 2087]], + "304169": [[50, 1714], [1731, 1733]], + "304170": [[1, 620]], + "304199": [[10, 18]], + "304200": [[1, 321]], + "304204": [[55, 607]], + "304209": [[52, 98], [100, 133], [135, 157], [176, 253], [255, 477]], + "304291": [[56, 85]], + "304292": [[1, 1125], [1183, 1779], [1781, 1811]], + "304333": [[74, 1653]], + "304354": [[82, 295]], + "304366": [ + [44, 1387], + [1390, 1396], + [1399, 1402], + [1404, 1407], + [1409, 1412], + [1414, 1416], + [1419, 1421], + [1424, 1873] + ], + "304446": [[40, 92], [110, 111]], + "304447": [[1, 534], [540, 1644]], + "304451": [[1, 60]], + "304505": [[60, 86]], + "304506": [[1, 370]], + "304507": [[1, 239]], + "304508": [[1, 1324]], + "304562": [[52, 56], [60, 848]], + "304616": [[52, 223], [227, 740], [747, 1002]], + "304625": [[73, 536]], + "304626": [[1, 8]], + "304654": [[53, 704]], + "304655": [[1, 1194]], + "304661": [[53, 67], [69, 143], [147, 173], [175, 198], [237, 240]], + "304662": [[1, 150]], + "304663": [[1, 689]], + "304671": [[51, 1193]], + "304672": [[1, 60]], + "304737": [[69, 149]], + "304738": [[1, 1681]], + "304739": [[3, 16]], + "304740": [[1, 278]], + "304776": [[49, 98]], + "304777": [[1, 431], [438, 510]], + "304778": [[4, 1300]], + "304797": [[28, 87], [91, 306], [308, 377], [385, 1202], [1205, 2950]], + "305044": [[3, 203], [302, 306], [309, 310], [313, 313], [318, 330]], + "305045": [[1, 873]], + "305046": [[1, 667], [671, 686]], + "305059": [[63, 518], [520, 575]], + "305062": [[1, 8]], + "305063": [[1, 35]], + "305064": [[1, 2045]], + "305081": [[52, 1107]], + "305112": [[68, 1527]], + "305113": [[9, 72]], + "305114": [[1, 526]], + "305178": [[69, 124]], + "305179": [[1, 21]], + "305180": [[1, 9]], + "305181": [[1, 8]], + "305182": [[1, 8]], + "305183": [[1, 231], [262, 266]], + "305184": [[1, 8]], + "305186": [[1, 112], [120, 422]], + "305188": [[1, 1002]], + "305202": [[74, 132], [136, 729]], + "305204": [[1, 1229]], + "305207": [[52, 1077]], + "305208": [[1, 372]], + "305234": [[52, 99]], + "305236": [[1, 23]], + "305237": [[1, 16], [18, 1147]], + "305247": [[57, 433]], + "305248": [[1, 957]], + "305252": [[1, 548]], + "305282": [[75, 207]], + "305310": [[60, 157], [163, 458]], + "305311": [[1, 153]], + "305312": [[1, 227]], + "305313": [[1, 741]], + "305314": [[1, 404]], + "305336": [[36, 241]], + "305338": [[1, 107]], + "305341": [[1, 503]], + "305349": [[1, 34]], + "305350": [[1, 21]], + "305351": [[1, 868]], + "305358": [[91, 231], [233, 253]], + "305364": [[50, 147]], + "305365": [[1, 668], [676, 832]], + "305366": [[1, 721], [724, 756], [769, 934], [936, 1254]], + "305376": [[71, 168]], + "305377": [[9, 1292], [1294, 1383], [1386, 1525]], + "305405": [[44, 536], [573, 575]], + "305406": [[1, 394], [401, 520], [528, 535], [540, 1475]], + "305440": [[20, 291]], + "305441": [[1, 121]], + "305516": [[46, 518], [558, 639]], + "305517": [[1, 163]], + "305518": [[1, 1134]], + "305586": [[53, 583]], + "305589": [[1, 691]], + "305590": [[1, 500], [517, 1020]], + "305636": [[60, 339], [342, 667], [671, 2390]], + "305766": [[55, 902]], + "305809": [[56, 197]], + "305814": [[85, 689], [692, 978], [980, 1074], [1077, 1912]], + "305821": [[59, 830]], + "305832": [[87, 266]], + "305840": [[1, 1144]], + "305842": [[1, 862]], + "305862": [[81, 705]], + "305898": [[70, 780]], + "305902": [[53, 521]], + "305967": [[1, 32]], + "306029": [[63, 96]], + "306030": [[1, 110]], + "306036": [[60, 63]], + "306037": [[1, 49]], + "306038": [[1, 139]], + "306041": [[1, 320]], + "306042": [[1, 371]], + "306048": [[1, 140]], + "306049": [[1, 358]], + "306051": [[1, 415]], + "306091": [[422, 629]], + "306092": [[1, 588], [593, 976]], + "306095": [[1, 300]], + "306121": [[57, 152]], + "306122": [[1, 127]], + "306125": [[1, 756], [770, 2642], [2667, 3007]], + "306126": [[1, 497]], + "306134": [[53, 84]], + "306135": [[1, 1095]], + "306138": [[1, 1298]], + "306139": [[1, 1112]], + "306153": [[78, 165]], + "306154": [[1, 251], [253, 691], [709, 1233]], + "306155": [[1, 1440]], + "306169": [[1, 745]], + "306170": [[1, 22]], + "306171": [[1, 503]], + "306418": [[1, 33], [35, 75]], + "306419": [[1, 62]], + "306420": [[1, 108]], + "306422": [[9, 126]], + "306423": [[1, 333]], + "306432": [[1, 339]], + "306454": [[13, 101]], + "306455": [[1, 11]], + "306456": [[1, 237], [239, 787]], + "306457": [[1, 31]], + "306458": [ + [1, 17], + [20, 35], + [37, 41], + [43, 47], + [49, 53], + [56, 60], + [62, 66], + [68, 72], + [74, 77], + [79, 83], + [85, 89], + [93, 102], + [104, 108], + [110, 114], + [116, 120], + [122, 126], + [129, 139], + [141, 145], + [147, 151], + [153, 166], + [169, 173], + [175, 179], + [181, 185], + [187, 191], + [193, 197], + [200, 210], + [212, 216], + [218, 222], + [225, 229], + [231, 235], + [237, 241], + [243, 247], + [249, 249], + [252, 256], + [258, 268] + ], + "306459": [[1, 512], [514, 2275]], + "306460": [[1, 73]] +} \ No newline at end of file diff --git a/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_17SeptEarlyReReco2018ABC_PromptEraD_Collisions18_JSON.txt b/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_17SeptEarlyReReco2018ABC_PromptEraD_Collisions18_JSON.txt deleted file mode 100644 index e2c924a..0000000 --- a/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_17SeptEarlyReReco2018ABC_PromptEraD_Collisions18_JSON.txt +++ /dev/null @@ -1 +0,0 @@ -{"315257": [[1, 88], [91, 92]], "315259": [[1, 172]], "315264": [[32, 261]], "315265": [[4, 58]], "315267": [[1, 244]], "315270": [[1, 633]], "315322": [[23, 118], [122, 1354]], "315339": [[37, 654]], "315357": [[44, 732], [736, 770], [780, 831]], "315361": [[40, 619]], "315363": [[1, 35], [37, 47], [49, 67], [69, 80], [82, 90]], "315366": [[10, 61], [67, 750]], "315420": [[28, 920], [924, 942], [954, 1748]], "315488": [[42, 843]], "315489": [[1, 653], [672, 709]], "315490": [[1, 24]], "315506": [[13, 100]], "315510": [[1, 345]], "315512": [[1, 1122]], "315543": [[55, 171]], "315555": [[22, 97]], "315556": [[1, 26]], "315557": [[1, 279]], "315640": [[46, 87]], "315641": [[1, 4]], "315642": [[1, 92]], "315644": [[1, 184]], "315645": [[1, 40], [47, 390], [395, 565], [567, 594]], "315646": [[1, 1033]], "315647": [[1, 58]], "315648": [[1, 110]], "315689": [[24, 1127], [1180, 1186]], "315690": [[10, 654]], "315702": [[38, 113]], "315703": [[1, 545]], "315704": [[1, 61]], "315705": [[1, 700]], "315713": [[35, 359], [374, 385], [400, 1123]], "315721": [[33, 50], [56, 626]], "315741": [[34, 92]], "315764": [[37, 309]], "315770": [[39, 332]], "315784": [[29, 33], [40, 156], [158, 161]], "315785": [[1, 198], [201, 305]], "315786": [[1, 72]], "315790": [[1, 716], [718, 922]], "315800": [[41, 621]], "315801": [[1, 344]], "315840": [[33, 1154]], "315973": [[39, 240], [262, 914]], "315974": [[1, 71]], "316058": [[42, 405]], "316059": [[1, 321], [323, 567]], "316060": [[1, 935]], "316061": [[1, 23], [194, 206]], "316062": [[1, 4]], "316082": [[37, 407]], "316110": [[1, 210]], "316111": [[1, 48]], "316113": [[1, 64]], "316114": [[1, 777], [779, 1562]], "316153": [[1, 770]], "316186": [[38, 81]], "316187": [[1, 1091], [1093, 1100], [1207, 2077]], "316199": [[33, 1197]], "316200": [[1, 10]], "316201": [[1, 498]], "316202": [[1, 403]], "316216": [[25, 466]], "316217": [[1, 264]], "316218": [[1, 1008]], "316219": [[1, 283]], "316239": [[38, 626]], "316240": [[1, 1224]], "316241": [[1, 325]], "316271": [[36, 121]], "316361": [[22, 124], [126, 131], [133, 135], [137, 137], [139, 142], [144, 145], [147, 147], [149, 159], [161, 174], [176, 178], [180, 189], [191, 197], [199, 208], [210, 223]], "316362": [[1, 208], [210, 212], [214, 225], [227, 242], [244, 269], [271, 319], [332, 392], [394, 395], [397, 402], [404, 404], [406, 410], [412, 412], [414, 418], [420, 428], [430, 450]], "316363": [[1, 39], [41, 49]], "316377": [[19, 19], [21, 40]], "316378": [[1, 29]], "316379": [[1, 70]], "316380": [[1, 708], [714, 1213]], "316455": [[36, 71]], "316457": [[1, 1454]], "316469": [[17, 444]], "316470": [[1, 476]], "316472": [[1, 70], [76, 333]], "316505": [[44, 205], [207, 921], [923, 1364]], "316569": [[20, 703], [742, 1945]], "316590": [[17, 526]], "316613": [[49, 241]], "316615": [[1, 338]], "316666": [[1, 981]], "316667": [[1, 197]], "316700": [[46, 346], [388, 397]], "316701": [[1, 479]], "316702": [[1, 388]], "316715": [[33, 45]], "316716": [[1, 181]], "316717": [[1, 192]], "316718": [[1, 311]], "316719": [[1, 91], [100, 144]], "316720": [[1, 182]], "316721": [[1, 15]], "316722": [[1, 751]], "316723": [[1, 64]], "316758": [[11, 1609]], "316766": [[51, 1920], [1922, 2199]], "316876": [[34, 38], [40, 644]], "316877": [[1, 164], [171, 401]], "316879": [[1, 156]], "316928": [[40, 188]], "316985": [[33, 503]], "316993": [[44, 254]], "316994": [[1, 14]], "316995": [[1, 623]], "317080": [[41, 66]], "317087": [[43, 177], [213, 222], [257, 852]], "317089": [[1, 1003]], "317182": [[47, 63], [65, 1424]], "317212": [[36, 175]], "317213": [[1, 375]], "317279": [[43, 508]], "317291": [[34, 824]], "317292": [[1, 330]], "317297": [[1, 283], [347, 760]], "317319": [[44, 182]], "317320": [[1, 326], [333, 411], [413, 1827]], "317338": [[66, 107]], "317339": [[1, 163]], "317340": [[1, 418]], "317382": [[58, 128]], "317383": [[1, 58]], "317391": [[39, 46]], "317392": [[1, 1116], [1119, 1900]], "317435": [[1, 1397]], "317438": [[1, 68], [71, 309]], "317475": [[33, 89], [105, 115]], "317478": [[1, 23]], "317484": [[1, 448], [467, 514], [519, 545]], "317488": [[1, 844]], "317527": [[41, 1487]], "317591": [[43, 334]], "317626": [[40, 2045]], "317640": [[29, 829]], "317641": [[1, 1390]], "317648": [[45, 139]], "317649": [[1, 621]], "317650": [[1, 1304]], "317661": [[35, 1256]], "317663": [[1, 858]], "317683": [[83, 402]], "317696": [[38, 682]], "318733": [[1, 33]], "318828": [[54, 123]], "318872": [[16, 287]], "318874": [[1, 320]], "318876": [[1, 161]], "318877": [[1, 615]], "319077": [[52, 92]], "319337": [[48, 2240]], "319347": [[40, 690]], "319348": [[1, 37]], "319349": [[1, 148]], "319449": [[35, 559], [562, 734]], "319450": [[1, 287], [290, 683]], "319456": [[138, 346]], "319459": [[1, 78]], "319486": [[38, 103]], "319503": [[1, 317]], "319524": [[36, 1459]], "319526": [[1, 282]], "319528": [[1, 259]], "319579": [[41, 3168]], "319625": [[17, 206]], "319639": [[31, 1509]], "319656": [[51, 310]], "319657": [[1, 167]], "319658": [[1, 225]], "319659": [[1, 87]], "319678": [[36, 294]], "319687": [[46, 90]], "319697": [[47, 482], [490, 490]], "319698": [[1, 312]], "319756": [[44, 1966]], "319840": [[41, 388]], "319841": [[1, 167]], "319847": [[49, 51]], "319848": [[1, 53]], "319849": [[1, 492]], "319851": [[1, 4]], "319853": [[1, 40], [47, 262]], "319854": [[1, 225]], "319908": [[1, 40], [43, 53]], "319909": [[1, 7]], "319910": [[1, 983]], "319912": [[1, 59]], "319913": [[1, 56]], "319914": [[1, 32]], "319915": [[1, 416]], "319941": [[43, 298]], "319942": [[1, 50]], "319950": [[38, 205]], "319991": [[46, 882]], "319992": [[1, 264]], "319993": [[1, 955]], "320002": [[52, 192]], "320006": [[1, 34], [36, 341]], "320010": [[1, 330]], "320011": [[1, 302]], "320012": [[1, 99]], "320023": [[17, 292]], "320024": [[1, 410]], "320025": [[1, 113]], "320026": [[1, 204]], "320038": [[43, 663]], "320039": [[1, 30]], "320040": [[1, 737]], "320059": [[1, 105]], "320060": [[1, 42]], "320061": [[1, 49]], "320062": [[1, 21]], "320063": [[1, 64]], "320064": [[1, 200]], "320065": [[1, 920]], "320673": [[35, 901]], "320674": [[1, 599]], "320688": [[49, 531]], "320712": [[39, 242]], "320757": [[51, 382]], "320804": [[46, 1274]], "320807": [[1, 7]], "320809": [[1, 716]], "320821": [[41, 221]], "320822": [[1, 523]], "320823": [[1, 360]], "320824": [[1, 1051]], "320838": [[93, 357]], "320840": [[1, 471]], "320841": [[1, 205]], "320853": [[41, 369]], "320854": [[1, 125]], "320855": [[1, 565]], "320856": [[1, 159]], "320857": [[1, 272]], "320858": [[1, 230]], "320859": [[1, 40]], "320887": [[49, 321]], "320888": [[1, 26]], "320916": [[2, 25]], "320917": [[1, 1926]], "320920": [[1, 178]], "320933": [[40, 214]], "320934": [[1, 831]], "320936": [[1, 407]], "320941": [[1, 93]], "320980": [[44, 142]], "320995": [[26, 214]], "320996": [[1, 380]], "321004": [[39, 188]], "321005": [[1, 61]], "321006": [[1, 162]], "321007": [[1, 831]], "321009": [[1, 85]], "321010": [[1, 342]], "321011": [[1, 213]], "321012": [[1, 35], [190, 201]], "321051": [[58, 1179]], "321055": [[1, 302], [304, 326], [328, 340], [368, 759]], "321067": [[39, 225], [232, 639]], "321068": [[1, 715]], "321069": [[1, 313]], "321119": [[45, 214]], "321121": [[1, 47]], "321122": [[1, 395]], "321124": [[1, 819]], "321126": [[1, 493]], "321134": [[33, 70]], "321138": [[1, 741]], "321140": [[1, 798]], "321149": [[35, 1424], [1426, 1476], [1478, 1553], [1558, 1576], [1578, 1588], [1591, 1743]], "321165": [[1, 8]], "321166": [[1, 10]], "321167": [[1, 141], [143, 143], [145, 510], [512, 552], [554, 691], [693, 923]], "321177": [[38, 74], [77, 214], [216, 232], [234, 247], [249, 321], [323, 365], [367, 455]], "321178": [[5, 78]], "321218": [[49, 962]], "321219": [[1, 934]], "321221": [[1, 40]], "321230": [[41, 124]], "321231": [[1, 59]], "321232": [[1, 30]], "321233": [[1, 727]], "321262": [[1, 4]], "321283": [[48, 357]], "321294": [[1, 62]], "321295": [[1, 307], [309, 316], [318, 384], [390, 394], [396, 604], [606, 616], [619, 646], [649, 690], [693, 754]], "321296": [[1, 24], [34, 41], [44, 67]], "321305": [[20, 2600], [2605, 2651]], "321311": [[1, 10]], "321312": [[1, 768]], "321313": [[1, 408]], "321393": [[1, 127], [134, 148]], "321396": [[1, 1475]], "321397": [[1, 365]], "321414": [[31, 1283]], "321415": [[1, 804]], "321431": [[30, 189]], "321432": [[1, 47]], "321433": [[1, 125]], "321434": [[1, 642]], "321436": [[1, 710]], "321457": [[43, 451], [453, 1888]], "321461": [[1, 149]], "321475": [[50, 518], [526, 2084]], "321710": [[1, 57]], "321712": [[1, 2], [16, 54], [57, 115], [117, 263]], "321730": [[2, 257], [259, 291]], "321732": [[1, 127], [129, 181], [185, 189], [192, 245], [248, 252], [254, 373], [375, 381], [386, 386], [389, 392], [395, 424], [426, 432], [434, 448], [450, 452], [454, 459], [467, 586], [589, 680], [682, 686], [689, 903], [905, 973], [975, 1448]], "321735": [[1, 146]], "321755": [[33, 361], [363, 470], [472, 473], [475, 487], [489, 729]], "321758": [[1, 47], [49, 75], [77, 121], [128, 130], [146, 148], [151, 155], [161, 165], [168, 189]], "321760": [[1, 171], [175, 205], [207, 238], [240, 258], [260, 420], [422, 520], [526, 586], [588, 593], [598, 602], [604, 607], [613, 716], [719, 721], [727, 788], [794, 818], [822, 824], [828, 830], [834, 836], [840, 841], [845, 855]], "321773": [[11, 14], [25, 35], [39, 52], [54, 79]], "321774": [[1, 12], [14, 52], [54, 119]], "321775": [[1, 12], [14, 14]], "321776": [[1, 12], [15, 19], [30, 45]], "321777": [[1, 81], [83, 169], [174, 176], [192, 207]], "321778": [[8, 150]], "321780": [[1, 332], [336, 338], [342, 346], [351, 357], [359, 360], [362, 371], [374, 383], [392, 412], [414, 420], [422, 493], [496, 499], [502, 503], [505, 508], [517, 518]], "321781": [[6, 37], [53, 56], [58, 66], [69, 69], [77, 180], [186, 209], [212, 265], [269, 274], [276, 290], [293, 312], [316, 410], [412, 427]], "321813": [[32, 352]], "321815": [[1, 23]], "321817": [[1, 536]], "321818": [[1, 690]], "321820": [[1, 214]], "321831": [[25, 781]], "321832": [[1, 389], [403, 510]], "321833": [[1, 407]], "321834": [[1, 333]], "321879": [[39, 47], [50, 52], [55, 68], [71, 73], [77, 89], [93, 95], [99, 111], [114, 116], [120, 132], [136, 138], [141, 154], [157, 159], [163, 175], [178, 181], [185, 197], [200, 202], [207, 218], [222, 356]], "321880": [[1, 41], [44, 132]], "321887": [[54, 948]], "321908": [[43, 472]], "321909": [[1, 208], [210, 1654]], "321917": [[4, 156], [164, 808]], "321919": [[1, 6]], "321933": [[43, 232], [235, 326]], "321960": [[18, 47]], "321961": [[1, 354]], "321973": [[37, 746], [748, 968], [972, 1253]], "321975": [[1, 866]], "321988": [[45, 996], [1106, 1486]], "321990": [[1, 471]], "322013": [[14, 22]], "322014": [[1, 17]], "322022": [[42, 185], [201, 1805]], "322040": [[32, 70]], "322057": [[38, 58]], "322068": [[51, 724]], "322079": [[39, 200], [216, 393], [409, 428]], "322106": [[48, 871]], "322113": [[48, 159]], "322118": [[1, 516], [530, 874]], "322179": [[43, 820], [823, 1783]], "322201": [[39, 266]], "322204": [[1, 280], [282, 301], [303, 331], [337, 1143]], "322222": [[1, 526]], "322252": [[42, 1586]], "322317": [[48, 101]], "322319": [[1, 163]], "322322": [[1, 170], [267, 1205]], "322324": [[1, 416]], "322332": [[37, 1055]], "322348": [[40, 1505]], "322355": [[36, 137]], "322356": [[1, 779]], "322381": [[45, 577]], "322407": [[46, 582]], "322430": [[46, 501]], "322431": [[59, 1166]], "322480": [[60, 408]], "322492": [[1, 1386]], "322510": [[37, 45]], "322599": [[43, 294]], "322602": [[1, 69], [72, 72]], "322603": [[1, 10]], "322605": [[1, 280]], "322617": [[1, 601]], "322625": [[41, 484], [492, 1167]], "322633": [[1, 249]], "323414": [[1, 46]], "323423": [[1, 136]], "323470": [[38, 172], [176, 218], [223, 266]], "323471": [[1, 238]], "323472": [[1, 64]], "323473": [[1, 227]], "323474": [[1, 355]], "323475": [[1, 77]], "323487": [[42, 177], [184, 498]], "323488": [[1, 514], [555, 734], [738, 793]], "323492": [[1, 33]], "323493": [[1, 144]], "323495": [[1, 187]], "323524": [[25, 561]], "323525": [[1, 91], [97, 1126]], "323526": [[1, 248], [253, 466]], "323693": [[38, 151]], "323696": [[1, 257]], "323702": [[1, 808]], "323725": [[18, 346]], "323726": [[1, 60]], "323727": [[1, 83], [88, 677], [682, 813], [819, 822], [826, 987]], "323755": [[27, 815], [818, 823], [826, 826], [828, 830], [833, 861], [864, 964]], "323775": [[38, 81], [84, 171]], "323778": [[1, 934]], "323790": [[45, 948]], "323794": [[1, 68]], "323841": [[46, 510]], "323857": [[1, 357]], "323940": [[49, 1567]], "323954": [[1, 77]], "323976": [[31, 85]], "323978": [[1, 73]], "323980": [[1, 202]], "323983": [[1, 188]], "323997": [[1, 498]], "324021": [[44, 819]], "324022": [[1, 554]], "324077": [[54, 710], [712, 753]], "324201": [[20, 834], [837, 1385]], "324202": [[1, 240]], "324205": [[1, 163]], "324206": [[1, 149]], "324207": [[1, 34]], "324209": [[1, 142]], "324237": [[33, 236]], "324245": [[23, 1681]], "324293": [[39, 1440], [1442, 2176], [2178, 2342]], "324315": [[1, 200], [203, 204]], "324318": [[1, 332]], "324420": [[1, 625]], "324729": [[1, 193]], "324747": [[63, 1139]], "324764": [[1, 150]], "324765": [[1, 481]], "324769": [[1, 328]], "324772": [[1, 165]], "324785": [[77, 664]], "324791": [[1, 1217]], "324835": [[40, 230], [302, 369]], "324840": [[1, 96]], "324841": [[1, 1347]], "324846": [[1, 151], [154, 517]], "324878": [[62, 111], [113, 175], [180, 1800]], "324897": [[30, 170]], "324970": [[1, 425], [428, 598], [606, 632], [634, 1529], [1532, 2195]], "324980": [[39, 917], [919, 954], [956, 968], [1005, 1042], [1044, 2340]], "324997": [[29, 150]], "324998": [[1, 368]], "324999": [[1, 14]], "325000": [[1, 371]], "325001": [[1, 105], [108, 171], [173, 595]], "325022": [[45, 1594]], "325057": [[42, 383]], "325097": [[40, 96]], "325098": [[1, 8]], "325099": [[1, 394]], "325100": [[1, 254]], "325101": [[1, 462], [464, 485]], "325110": [[1, 21]], "325117": [[1, 533]], "325159": [[48, 266]], "325168": [[1, 21]], "325169": [[1, 23]], "325170": [[1, 692], [694, 1205]], "325172": [[1, 267], [269, 485]]} diff --git a/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_Legacy2018_Collisions18_JSON.txt b/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_Legacy2018_Collisions18_JSON.txt new file mode 100644 index 0000000..229f970 --- /dev/null +++ b/TIMBER/data/LumiJSON/Cert_314472-325175_13TeV_Legacy2018_Collisions18_JSON.txt @@ -0,0 +1,648 @@ +{ + "315257": [[1, 88], [91, 92]], + "315259": [[1, 172]], + "315264": [[32, 261]], + "315265": [[4, 58]], + "315267": [[1, 244]], + "315270": [[1, 633]], + "315322": [[23, 118], [122, 1354]], + "315339": [[37, 654]], + "315357": [[44, 732], [736, 770], [780, 831]], + "315361": [[40, 619]], + "315363": [[1, 35], [37, 47], [49, 67], [69, 80], [82, 90]], + "315366": [[10, 61], [67, 750]], + "315420": [[28, 920], [924, 942], [954, 1748]], + "315488": [[42, 843]], + "315489": [[1, 653], [672, 709]], + "315490": [[1, 24]], + "315506": [[13, 100]], + "315510": [[1, 345]], + "315512": [[1, 1122]], + "315543": [[55, 171]], + "315555": [[22, 97]], + "315556": [[1, 26]], + "315557": [[1, 279]], + "315640": [[46, 87]], + "315641": [[1, 4]], + "315642": [[1, 92]], + "315644": [[1, 184]], + "315645": [[1, 40], [47, 390], [395, 565], [567, 594]], + "315646": [[1, 1033]], + "315647": [[1, 58]], + "315648": [[1, 110]], + "315689": [[24, 1127], [1180, 1186]], + "315690": [[10, 654]], + "315702": [[38, 113]], + "315703": [[1, 545]], + "315704": [[1, 61]], + "315705": [[1, 700]], + "315713": [[35, 359], [374, 385], [400, 1123]], + "315721": [[33, 50], [56, 626]], + "315741": [[34, 92]], + "315764": [[37, 309]], + "315770": [[39, 332]], + "315784": [[29, 33], [40, 156], [158, 161]], + "315785": [[1, 198], [201, 305]], + "315786": [[1, 72]], + "315790": [[1, 716], [718, 922]], + "315800": [[41, 621]], + "315801": [[1, 344]], + "315840": [[33, 1154]], + "315973": [[39, 240], [262, 914]], + "315974": [[1, 71]], + "316058": [[42, 405]], + "316059": [[1, 321], [323, 567]], + "316060": [[1, 935]], + "316061": [[1, 23], [194, 206]], + "316062": [[1, 4]], + "316082": [[37, 407]], + "316110": [[1, 210]], + "316111": [[1, 48]], + "316113": [[1, 64]], + "316114": [[1, 777], [779, 1562]], + "316153": [[1, 770]], + "316186": [[38, 81]], + "316187": [[1, 1091], [1093, 1100], [1207, 2077]], + "316199": [[33, 1197]], + "316200": [[1, 10]], + "316201": [[1, 498]], + "316202": [[1, 403]], + "316216": [[25, 466]], + "316217": [[1, 264]], + "316218": [[1, 1008]], + "316219": [[1, 283]], + "316239": [[38, 626]], + "316240": [[1, 1224]], + "316241": [[1, 325]], + "316271": [[36, 121]], + "316361": [ + [22, 124], + [126, 131], + [133, 135], + [137, 137], + [139, 142], + [144, 145], + [147, 147], + [149, 159], + [161, 174], + [176, 178], + [180, 189], + [191, 197], + [199, 208], + [210, 223] + ], + "316362": [ + [1, 208], + [210, 212], + [214, 225], + [227, 242], + [244, 269], + [271, 319], + [332, 392], + [394, 395], + [397, 402], + [404, 404], + [406, 410], + [412, 412], + [414, 418], + [420, 428], + [430, 450] + ], + "316363": [[1, 39], [41, 49]], + "316377": [[19, 19], [21, 40]], + "316378": [[1, 29]], + "316379": [[1, 70]], + "316380": [[1, 708], [714, 1213]], + "316455": [[36, 71]], + "316457": [[1, 1454]], + "316469": [[17, 444]], + "316470": [[1, 476]], + "316472": [[1, 70], [76, 333]], + "316505": [[44, 205], [207, 921], [923, 1364]], + "316569": [[20, 703], [742, 1945]], + "316590": [[17, 526]], + "316613": [[49, 241]], + "316615": [[1, 338]], + "316666": [[1, 981]], + "316667": [[1, 197]], + "316700": [[46, 346], [388, 397]], + "316701": [[1, 479]], + "316702": [[1, 388]], + "316715": [[33, 45]], + "316716": [[1, 181]], + "316717": [[1, 192]], + "316718": [[1, 311]], + "316719": [[1, 91], [100, 144]], + "316720": [[1, 182]], + "316721": [[1, 15]], + "316722": [[1, 751]], + "316723": [[1, 64]], + "316758": [[11, 1609]], + "316766": [[51, 1920], [1922, 2199]], + "316876": [[34, 38], [40, 644]], + "316877": [[1, 164], [171, 401]], + "316879": [[1, 156]], + "316928": [[40, 188]], + "316985": [[33, 503]], + "316993": [[44, 254]], + "316994": [[1, 14]], + "316995": [[1, 623]], + "317080": [[41, 66]], + "317087": [[43, 177], [213, 222], [257, 852]], + "317089": [[1, 1003]], + "317182": [[47, 63], [65, 1424]], + "317212": [[36, 175]], + "317213": [[1, 375]], + "317279": [[43, 508]], + "317291": [[34, 824]], + "317292": [[1, 330]], + "317297": [[1, 283], [347, 760]], + "317319": [[44, 182]], + "317320": [[1, 326], [333, 411], [413, 1827]], + "317338": [[66, 107]], + "317339": [[1, 163]], + "317340": [[1, 418]], + "317382": [[58, 128]], + "317383": [[1, 58]], + "317391": [[39, 46]], + "317392": [[1, 1116], [1119, 1900]], + "317435": [[1, 1397]], + "317438": [[1, 68], [71, 309]], + "317475": [[33, 89], [105, 115]], + "317478": [[1, 23]], + "317484": [[1, 448], [467, 514], [519, 545]], + "317488": [[1, 844]], + "317527": [[41, 1487]], + "317591": [[43, 334]], + "317626": [[40, 2045]], + "317640": [[29, 829]], + "317641": [[1, 1390]], + "317648": [[45, 139]], + "317649": [[1, 621]], + "317650": [[1, 1304]], + "317661": [[35, 1256]], + "317663": [[1, 858]], + "317683": [[83, 402]], + "317696": [[38, 682]], + "318733": [[1, 33]], + "318828": [[54, 123]], + "318872": [[16, 287]], + "318874": [[1, 320]], + "318876": [[1, 161]], + "318877": [[1, 615]], + "319077": [[52, 92]], + "319337": [[48, 2240]], + "319347": [[40, 690]], + "319348": [[1, 37]], + "319349": [[1, 148]], + "319449": [[35, 559], [562, 734]], + "319450": [[1, 287], [290, 683]], + "319456": [[138, 346]], + "319459": [[1, 78]], + "319486": [[38, 103]], + "319503": [[1, 317]], + "319524": [[36, 1459]], + "319526": [[1, 282]], + "319528": [[1, 259]], + "319579": [[41, 3168]], + "319625": [[17, 206]], + "319639": [[31, 1509]], + "319656": [[51, 310]], + "319657": [[1, 167]], + "319658": [[1, 225]], + "319659": [[1, 87]], + "319678": [[36, 294]], + "319687": [[46, 90]], + "319697": [[47, 482], [490, 490]], + "319698": [[1, 312]], + "319756": [[44, 1966]], + "319840": [[41, 388]], + "319841": [[1, 167]], + "319847": [[49, 51]], + "319848": [[1, 53]], + "319849": [[1, 492]], + "319851": [[1, 4]], + "319853": [[1, 40], [47, 262]], + "319854": [[1, 225]], + "319908": [[1, 40], [43, 53]], + "319909": [[1, 7]], + "319910": [[1, 983]], + "319912": [[1, 59]], + "319913": [[1, 56]], + "319914": [[1, 32]], + "319915": [[1, 416]], + "319941": [[43, 298]], + "319942": [[1, 50]], + "319950": [[38, 205]], + "319991": [[46, 882]], + "319992": [[1, 264]], + "319993": [[1, 955]], + "320002": [[52, 192]], + "320006": [[1, 34], [36, 341]], + "320010": [[1, 330]], + "320011": [[1, 302]], + "320012": [[1, 99]], + "320023": [[17, 292]], + "320024": [[1, 410]], + "320025": [[1, 113]], + "320026": [[1, 204]], + "320038": [[43, 663]], + "320039": [[1, 30]], + "320040": [[1, 737]], + "320059": [[1, 105]], + "320060": [[1, 42]], + "320061": [[1, 49]], + "320062": [[1, 21]], + "320063": [[1, 64]], + "320064": [[1, 200]], + "320065": [[1, 920]], + "320673": [[35, 901]], + "320674": [[1, 599]], + "320688": [[49, 531]], + "320712": [[39, 242]], + "320757": [[51, 382]], + "320804": [[46, 1274]], + "320807": [[1, 7]], + "320809": [[1, 716]], + "320821": [[41, 221]], + "320822": [[1, 523]], + "320823": [[1, 360]], + "320824": [[1, 1051]], + "320838": [[93, 357]], + "320840": [[1, 471]], + "320841": [[1, 205]], + "320853": [[41, 369]], + "320854": [[1, 125]], + "320855": [[1, 565]], + "320856": [[1, 159]], + "320857": [[1, 272]], + "320858": [[1, 230]], + "320859": [[1, 40]], + "320887": [[49, 321]], + "320888": [[1, 26]], + "320916": [[2, 25]], + "320917": [[1, 1926]], + "320920": [[1, 178]], + "320933": [[40, 214]], + "320934": [[1, 831]], + "320936": [[1, 407]], + "320941": [[1, 93]], + "320980": [[44, 142]], + "320995": [[26, 214]], + "320996": [[1, 380]], + "321004": [[39, 188]], + "321005": [[1, 61]], + "321006": [[1, 162]], + "321007": [[1, 831]], + "321009": [[1, 85]], + "321010": [[1, 342]], + "321011": [[1, 213]], + "321012": [[1, 35], [190, 201]], + "321051": [[58, 1179]], + "321055": [[1, 302], [304, 326], [328, 340], [368, 759]], + "321067": [[39, 225], [232, 639]], + "321068": [[1, 715]], + "321069": [[1, 313]], + "321119": [[45, 214]], + "321121": [[1, 47]], + "321122": [[1, 395]], + "321124": [[1, 819]], + "321126": [[1, 493]], + "321134": [[33, 70]], + "321138": [[1, 741]], + "321140": [[1, 798]], + "321149": [ + [35, 86], + [88, 1424], + [1426, 1475], + [1478, 1553], + [1558, 1575], + [1578, 1588], + [1591, 1743] + ], + "321165": [[1, 8]], + "321166": [[1, 10]], + "321167": [ + [1, 141], + [143, 143], + [145, 510], + [512, 552], + [554, 691], + [693, 923] + ], + "321177": [ + [38, 74], + [77, 214], + [216, 232], + [234, 247], + [249, 321], + [323, 365], + [367, 455] + ], + "321178": [[5, 78]], + "321218": [[49, 962]], + "321219": [[1, 934]], + "321221": [[1, 40]], + "321230": [[41, 124]], + "321231": [[1, 59]], + "321232": [[1, 30]], + "321233": [[1, 727]], + "321262": [[1, 4]], + "321283": [[48, 357]], + "321294": [[1, 62]], + "321295": [ + [1, 307], + [309, 316], + [318, 384], + [390, 394], + [396, 604], + [606, 616], + [619, 646], + [649, 690], + [693, 754] + ], + "321296": [[1, 24], [34, 41], [44, 67]], + "321305": [[20, 2600], [2605, 2651]], + "321311": [[1, 10]], + "321312": [[1, 768]], + "321313": [[1, 408]], + "321393": [[1, 127], [134, 148]], + "321396": [[1, 1475]], + "321397": [[1, 365]], + "321414": [[31, 1283]], + "321415": [[1, 804]], + "321431": [[30, 189]], + "321432": [[1, 47]], + "321433": [[1, 125]], + "321434": [[1, 642]], + "321436": [[1, 710]], + "321457": [[43, 451], [453, 1888]], + "321461": [[1, 149]], + "321475": [[50, 518], [526, 2084]], + "321710": [[1, 57]], + "321712": [[1, 2], [16, 54], [57, 115], [117, 263]], + "321730": [[2, 257], [259, 291]], + "321732": [ + [1, 127], + [129, 181], + [185, 189], + [192, 245], + [248, 252], + [254, 373], + [375, 381], + [386, 386], + [389, 392], + [395, 424], + [426, 432], + [434, 448], + [450, 452], + [454, 459], + [467, 586], + [589, 680], + [682, 686], + [689, 903], + [905, 973], + [975, 1448] + ], + "321735": [[1, 146]], + "321755": [[33, 361], [363, 470], [472, 473], [475, 487], [489, 729]], + "321758": [ + [1, 47], + [49, 75], + [77, 121], + [128, 130], + [146, 148], + [151, 155], + [161, 165], + [168, 189] + ], + "321760": [ + [1, 171], + [175, 205], + [207, 238], + [240, 258], + [260, 420], + [422, 520], + [526, 586], + [588, 593], + [598, 602], + [604, 607], + [613, 716], + [719, 721], + [727, 788], + [794, 818], + [822, 824], + [828, 830], + [834, 836], + [840, 841], + [845, 855] + ], + "321773": [[11, 14], [25, 35], [39, 52], [54, 79]], + "321774": [[1, 12], [14, 52], [54, 119]], + "321775": [[1, 12], [14, 14]], + "321776": [[1, 12], [15, 19], [30, 45]], + "321777": [[1, 81], [83, 169], [174, 176], [192, 207]], + "321778": [[8, 150]], + "321780": [ + [1, 332], + [336, 338], + [342, 346], + [351, 357], + [359, 360], + [362, 371], + [374, 383], + [392, 412], + [414, 420], + [422, 493], + [496, 499], + [502, 503], + [505, 508], + [517, 518] + ], + "321781": [ + [6, 37], + [53, 56], + [58, 66], + [69, 69], + [77, 180], + [186, 209], + [212, 265], + [269, 274], + [276, 290], + [293, 312], + [316, 410], + [412, 427] + ], + "321813": [[32, 352]], + "321815": [[1, 23]], + "321817": [[1, 536]], + "321818": [[1, 690]], + "321820": [[1, 214]], + "321831": [[25, 781]], + "321832": [[1, 389], [403, 510]], + "321833": [[1, 407]], + "321834": [[1, 333]], + "321879": [ + [39, 47], + [50, 52], + [55, 68], + [71, 73], + [77, 89], + [93, 95], + [99, 111], + [114, 116], + [120, 132], + [136, 138], + [141, 154], + [157, 159], + [163, 175], + [178, 181], + [185, 197], + [200, 202], + [207, 218], + [222, 356] + ], + "321880": [[1, 41], [44, 132]], + "321887": [[54, 948]], + "321908": [[43, 472]], + "321909": [[1, 208], [210, 1654]], + "321917": [[4, 156], [164, 808]], + "321919": [[1, 6]], + "321933": [[43, 232], [235, 326]], + "321960": [[18, 47]], + "321961": [[1, 354]], + "321973": [[37, 746], [748, 968], [972, 1253]], + "321975": [[1, 866]], + "321988": [[45, 996], [1106, 1486]], + "321990": [[1, 471]], + "322013": [[14, 22]], + "322014": [[1, 17]], + "322022": [[42, 185], [201, 1805]], + "322040": [[32, 70]], + "322057": [[38, 58]], + "322068": [[51, 724]], + "322079": [[39, 200], [216, 393], [409, 428]], + "322106": [[48, 871]], + "322113": [[48, 159]], + "322118": [[1, 516], [530, 874]], + "322179": [[43, 820], [823, 1783]], + "322201": [[39, 266]], + "322204": [[1, 280], [282, 301], [303, 331], [337, 1143]], + "322222": [[1, 526]], + "322252": [[42, 1586]], + "322317": [[48, 101]], + "322319": [[1, 163]], + "322322": [[1, 170], [267, 1205]], + "322324": [[1, 416]], + "322332": [[37, 1055]], + "322348": [[40, 1505]], + "322355": [[36, 137]], + "322356": [[1, 779]], + "322381": [[45, 577]], + "322407": [[46, 582]], + "322430": [[46, 794]], + "322431": [[1, 53], [59, 1166]], + "322480": [[60, 408]], + "322492": [[1, 1386]], + "322510": [[37, 45]], + "322599": [[43, 294]], + "322602": [[1, 69], [72, 72]], + "322603": [[1, 10]], + "322605": [[1, 280]], + "322617": [[1, 601]], + "322625": [[41, 484], [492, 1167]], + "322633": [[1, 249]], + "323414": [[1, 46]], + "323423": [[1, 136]], + "323470": [[38, 172], [176, 218], [223, 266]], + "323471": [[1, 238]], + "323472": [[1, 64]], + "323473": [[1, 227]], + "323474": [[1, 355]], + "323475": [[1, 77]], + "323487": [[42, 177], [184, 498]], + "323488": [[1, 514], [555, 734], [738, 793]], + "323492": [[1, 33]], + "323493": [[1, 144]], + "323495": [[1, 187]], + "323524": [[25, 561]], + "323525": [[1, 91], [97, 1126]], + "323526": [[1, 248], [253, 466]], + "323693": [[38, 151]], + "323696": [[1, 257]], + "323702": [[1, 808]], + "323725": [[18, 346]], + "323726": [[1, 60]], + "323727": [[1, 83], [88, 677], [682, 813], [819, 822], [826, 987]], + "323755": [ + [27, 815], + [818, 823], + [826, 826], + [828, 830], + [833, 861], + [864, 964] + ], + "323775": [[38, 81], [84, 171]], + "323778": [[1, 934]], + "323790": [[45, 948]], + "323794": [[1, 68]], + "323841": [[46, 510]], + "323857": [[1, 357]], + "323940": [[49, 1567]], + "323954": [[1, 77]], + "323976": [[31, 85]], + "323978": [[1, 73]], + "323980": [[1, 202]], + "323983": [[1, 188]], + "323997": [[1, 498]], + "324021": [[44, 819]], + "324022": [[1, 554]], + "324077": [[54, 710], [712, 753]], + "324201": [[20, 834], [837, 1385]], + "324202": [[1, 240]], + "324205": [[1, 163]], + "324206": [[1, 149]], + "324207": [[1, 34]], + "324209": [[1, 142]], + "324237": [[33, 236]], + "324245": [[23, 1681]], + "324293": [[39, 1440], [1442, 2176], [2178, 2342]], + "324315": [[1, 200], [203, 204]], + "324318": [[1, 332]], + "324420": [[1, 625]], + "324729": [[1, 193]], + "324747": [[63, 1139]], + "324764": [[1, 150]], + "324765": [[1, 481]], + "324769": [[1, 328]], + "324772": [[1, 165]], + "324785": [[77, 664]], + "324791": [[1, 1217]], + "324835": [[40, 230], [302, 369]], + "324840": [[1, 96]], + "324841": [[1, 1347]], + "324846": [[1, 151], [154, 517]], + "324878": [[62, 111], [113, 175], [180, 1800]], + "324897": [[30, 170]], + "324970": [[1, 425], [428, 598], [606, 632], [634, 1529], [1532, 2195]], + "324980": [[39, 917], [919, 954], [956, 968], [1005, 1042], [1044, 2340]], + "324997": [[29, 150]], + "324998": [[1, 368]], + "324999": [[1, 14]], + "325000": [[1, 371]], + "325001": [[1, 105], [108, 171], [173, 595]], + "325022": [[45, 1594]], + "325057": [[42, 383]], + "325097": [[40, 96]], + "325098": [[1, 8]], + "325099": [[1, 394]], + "325100": [[1, 254]], + "325101": [[1, 462], [464, 485]], + "325110": [[1, 21]], + "325117": [[1, 533]], + "325159": [[48, 266]], + "325168": [[1, 21]], + "325169": [[1, 23]], + "325170": [[1, 692], [694, 1205]], + "325172": [[1, 267], [269, 485]] +} \ No newline at end of file diff --git a/TIMBER/data/README.md b/TIMBER/data/README.md index dad4986..b8a952a 100644 --- a/TIMBER/data/README.md +++ b/TIMBER/data/README.md @@ -1,10 +1,11 @@ # Ledger of data files and their sources ## Luminosity "golden" JSONs -| Year | Date added | Source | -|------|------------|--------| -| 2017 | Nov 12, 2020 | [Twiki](https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM#CurRec) | -| 2018 | Nov 12, 2020 | [Twiki](https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM#CurRec) | +| Year | Date added | File | Source | +|------|------------|------|--------| +| 2016 | Apr 19. 2021 | Cert_271036-284044_13TeV_Legacy2016_Collisions16_JSON.txt | [Twiki](https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM#CurRec) | +| 2017 | Apr 19. 2021 | Cert_294927-306462_13TeV_UL2017_Collisions17_GoldenJSON.txt | [Twiki](https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM#CurRec) | +| 2018 | Apr 19. 2021 | Cert_314472-325175_13TeV_Legacy2018_Collisions18_JSON.txt | [Twiki](https://twiki.cern.ch/twiki/bin/view/CMS/TWikiLUM#CurRec) | ## Scale Factors diff --git a/test/test_Analyzer.py b/test/test_Analyzer.py index e16a78b..b23b181 100644 --- a/test/test_Analyzer.py +++ b/test/test_Analyzer.py @@ -14,9 +14,9 @@ def setup_class(cls): cls.a.Define('sublead_vector','hardware::TLvector(Jet_pt[1],Jet_eta[1],Jet_phi[1],Jet_mass[1])') cls.a.Define('invariantMass','hardware::InvariantMass({lead_vector,sublead_vector})') - def test_genEventCount_None(self): - '''Test genEventCount is assigned 0 when branch doesn't exist in test file''' - assert self.a.genEventCount == 0 + def test_genEventSumw_None(self): + '''Test genEventSumw is assigned 0 when branch doesn't exist in test file''' + assert self.a.genEventSumw == 0 def test_lhaid_None(self): '''Test lhaid is assigned 0 when branch doesn't exist in test file''' @@ -54,16 +54,14 @@ def test_snapshot(self): # assert True def test_Correction(self): - c = Correction('testWeight','test/test_weight.cc') + c = Correction('test_weight','test/test_weight.cc') self.a.Define('Jet_pt0','Jet_pt[0]') self.a.AddCorrection(c,{'pt':'Jet_pt0'}) self.a.MakeWeightCols() htemplate = ROOT.TH1F('th1','',100,0,1000) hgroup = self.a.MakeTemplateHistos(htemplate,'Jet_pt0') - print ('TESTING GetWeightName: %s'%(self.a.GetWeightName(c,'up',''))) - print ([hgroup[h].GetName() for h in hgroup.keys()]) + assert self.a.GetWeightName(c,'up','') == 'weight__test_weight_up' self.a.DrawTemplates(hgroup, './') - pass def test_CommonVars(self): assert sorted(self.a.CommonVars(["Muon","Tau"])) == sorted(['phi', 'pt', 'charge', 'eta', 'mass', 'genPartIdx', 'jetIdx'])