def __init__(self,filename,debug,data = False): self.commandLine = CommandLineHandler('[TimeWindow] ') self.fileHandler = RootFileHandler(filename) self.fileHandler.printStatus() if( not os.path.exists('plots')): os.mkdir('plots') if( not os.path.exists('plots/efficiencyWithTime')): os.mkdir('plots/efficiencyWithTime') setPlotStyle() self.data = data
gROOT.Reset() from plotting.PlotStyle import setPlotStyle, getLabelCmsPrivateSimulation, getTH2D, calcSigma, setupAxes setPlotStyle() from plotting.RootFileHandler import RootFileHandler if (not os.path.exists('plots')): os.mkdir('plots') if (not os.path.exists('plots/timeCorrelation')): os.mkdir('plots/timeCorrelation') if len(sys.argv) < 2: print 'First argument has to be the file name scheme!' fileHandler = RootFileHandler(sys.argv[1]) fileHandler.printStatus() ''' Calculate the time slew for a given charge ''' def getTimeSlew(charge): if charge < 1: charge = 1 rawDelay = 23.97 - 3.18 * log(charge) timeSlew = 0 if rawDelay < 0 else (np.min([16, rawDelay])) return timeSlew #plot the timing correlation between HO and L1 in general
def createFileHandler(self, filename): fh = RootFileHandler(filename, debug=self.DEBUG) fh.printStatus() return fh