import ROOT, glob, math, sys, os from ROOT import std ROOT.gROOT.ProcessLine(".x rootlogon.C") tDiff = 100 tInt = 50 tSig = 2 tMax = 1000 nBins = 1000 Shapes = ROOT.TH1D("shape", "shape", nBins, 0, tMax) sT2K = ROOT.TpcT2KPulseshape(tDiff) lineT2K = ROOT.TPolyLine(nBins) lineT2K.SetLineColor(3) sCRRC = ROOT.TpcCRRCPulseshape(tDiff,tInt,tSig) lineCRRC = ROOT.TPolyLine(nBins) lineCRRC.SetLineColor(2) for i in range (0,nBins) : t = float(i)/float(nBins+1) * tMax valT2K = sT2K.value(t, 1, 0) lineT2K.SetPoint(i, t, valT2K) valCRRC = sCRRC.value(t, 1, 0) lineCRRC.SetPoint(i, t, valCRRC) Shapes.Draw() lineT2K.Draw("same") lineCRRC.Draw("same") input()