| 1 | #!/usr/bin/python
|
|---|
| 2 | #
|
|---|
| 3 | # Werner Lustermann
|
|---|
| 4 | # ETH Zurich
|
|---|
| 5 | #
|
|---|
| 6 | from ROOT import TH1F
|
|---|
| 7 | import pyfact
|
|---|
| 8 |
|
|---|
| 9 | from hist import histogramList
|
|---|
| 10 |
|
|---|
| 11 | class bslHistograms( histogramList ):
|
|---|
| 12 |
|
|---|
| 13 | def book( self ):
|
|---|
| 14 |
|
|---|
| 15 | # print 'bslHistograms::book'
|
|---|
| 16 |
|
|---|
| 17 | self.h1d( "histo_mean","Value of maximal probability",
|
|---|
| 18 | 400, -99.5, 100.5, 'max value (mV)', 'Entries / 0.5 mV')
|
|---|
| 19 |
|
|---|
| 20 | self.h1d("hplt_mean","Value of maximal probability",
|
|---|
| 21 | 1440, -0.5, 1439.5, 'max value in mV', 'Entries / 0.5 mV')
|
|---|
| 22 |
|
|---|
| 23 | self.h1d("histo_rms","RMS in mV",
|
|---|
| 24 | 2000, -99.5, 100.5, 'RMS (mV)', 'Entries / 0.5 mV' )
|
|---|
| 25 |
|
|---|
| 26 | self.h1d( 'hplt_rms', 'Value of maximal probability',
|
|---|
| 27 | 1440, -0.5, 1439.5, 'pixel', 'RMS in mV' )
|
|---|
| 28 |
|
|---|
| 29 | def H1d( name, title, Nbin, first, last, xtitle, ytitle ):
|
|---|
| 30 |
|
|---|
| 31 | h = TH1F( name, title, Nbin, first, last );
|
|---|
| 32 | h.GetXaxis().SetTitle( xtitle );
|
|---|
| 33 | h.GetYaxis().SetTitle( ytitle );
|
|---|
| 34 |
|
|---|
| 35 | return h
|
|---|
| 36 |
|
|---|
| 37 |
|
|---|
| 38 | def BookBslSummaryHistos( list ):
|
|---|
| 39 |
|
|---|
| 40 | list.add( 'hbsl_mean', H1d( "histo_mean","Value of maximal probability",
|
|---|
| 41 | 400, -99.5, 100.5,
|
|---|
| 42 | 'max value (mV)', 'Entries / 0.5 mV') )
|
|---|
| 43 |
|
|---|
| 44 | h = H1d("hplt_mean","Value of maximal probability",
|
|---|
| 45 | 1440, -0.5, 1439.5, 'max value in mV', 'Entries / 0.5 mV')
|
|---|
| 46 | list.add( 'hplt_mean', h )
|
|---|
| 47 |
|
|---|
| 48 | h = H1d("histo_rms","RMS in mV",2000,-99.5,100.5, 'RMS (mV)', 'Entries / 0.5 mV' )
|
|---|
| 49 | list.add( 'hbsl_rms', h )
|
|---|
| 50 |
|
|---|
| 51 | list.add( 'hplt_rms',
|
|---|
| 52 | H1d( 'hplt_rms', 'Value of maximal probability',
|
|---|
| 53 | 1440,-0.5,1439.5, 'pixel', 'RMS in mV' ) )
|
|---|
| 54 |
|
|---|
| 55 | class tcalHistograms( histogramList ):
|
|---|
| 56 |
|
|---|
| 57 | def book( self ):
|
|---|
| 58 |
|
|---|
| 59 | self.h1d("diff_dev", "Differential Deviation", 1024, 0, 1024,
|
|---|
| 60 | "Bin in DRS4 pipeline", "Deviation per bin in ns")
|
|---|
| 61 |
|
|---|
| 62 | self.h1d("int_dev", "Integral Deviation", 1024, 0, 1024,
|
|---|
| 63 | "Bin in DRS4 pipeline", "Total Deviation in ns")
|
|---|
| 64 |
|
|---|
| 65 | self.h1d("start", "distribution of startcells", 1024, 0, 1024,
|
|---|
| 66 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 67 |
|
|---|
| 68 | self.h1d("numxing", "number of crossings", 200, 0, 200,
|
|---|
| 69 | "number of crossings", "counts")
|
|---|
| 70 |
|
|---|
| 71 | self.h1d("lomeanxing", "Distribution of logic Meancrossing", 1024, 0, 1024,
|
|---|
| 72 | "Cell of Meancrossing", "counts")
|
|---|
| 73 |
|
|---|
| 74 | self.h1d("meanxing", "Distribution of physical Meancrossing", 1024, 0, 1024,
|
|---|
| 75 | "Cell of Meancrossing", "counts")
|
|---|
| 76 |
|
|---|
| 77 | self.h1d("corr", "Distribution of positive Corrections", 1024, 0, 1024,
|
|---|
| 78 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 79 |
|
|---|
| 80 | self.h1d("loleftout", "Distribution of left out Crossings", 1024, 0, 1024,
|
|---|
| 81 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 82 |
|
|---|
| 83 | self.h1d("leftout", "Distribution of left our Crossings", 1024, 0, 1024,
|
|---|
| 84 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 85 |
|
|---|
| 86 | self.h1d("period", "Distribution of Period lenght", 10, 0, 10,
|
|---|
| 87 | "number of cells within Period", "counts")
|
|---|
| 88 |
|
|---|
| 89 | self.h1d("freq", "calculated Frequency of the Testwave", 100, 200, 300,
|
|---|
| 90 | "Frequenz", "counts")
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|
| 93 | class tcalsimHistograms( histogramList ):
|
|---|
| 94 |
|
|---|
| 95 | def book( self ):
|
|---|
| 96 |
|
|---|
| 97 | self.h1d("diff_dev", "Differential Deviation", 1024, 0., 1024.,
|
|---|
| 98 | "Bin in DRS4 pipeline", "Deviation per bin in ns")
|
|---|
| 99 |
|
|---|
| 100 | self.h1d("int_dev", "Integral Deviation", 1024, 0., 1024.,
|
|---|
| 101 | "Bin in DRS4 pipeline", "Total Deviation in ns")
|
|---|
| 102 |
|
|---|
| 103 | self.h1d("start", "distribution of startcells", 1024, 0., 1024.,
|
|---|
| 104 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 105 |
|
|---|
| 106 | self.h1d("numxing", "number of crossings", 200, 0, 200,
|
|---|
| 107 | "number of crossings", "counts")
|
|---|
| 108 |
|
|---|
| 109 | self.h1d("lomeanxing", "Distribution of logic Meancrossing", 1024, 0, 1024,
|
|---|
| 110 | "Cell of Meancrossing", "counts")
|
|---|
| 111 |
|
|---|
| 112 | self.h1d("meanxing", "Distribution of physical Meancrossing", 1024, 0, 1024,
|
|---|
| 113 | "Cell of Meancrossing", "counts")
|
|---|
| 114 |
|
|---|
| 115 | self.h1d("loleftout", "Distribution of left out Crossings", 1024, 0, 1024,
|
|---|
| 116 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 117 |
|
|---|
| 118 | self.h1d("leftout", "Distribution of left our Crossings", 1024, 0, 1024,
|
|---|
| 119 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 120 |
|
|---|
| 121 | self.h1d("period", "Distribution of Period lenght", 1000, 2.5, 5.5,
|
|---|
| 122 | "leght of Period", "counts")
|
|---|
| 123 |
|
|---|
| 124 | self.h1d("data", "simulated Data", 1024, 0, 1024,
|
|---|
| 125 | "Bin in DRS4 pipeline", "Data")
|
|---|
| 126 |
|
|---|
| 127 | self.h1d("freq", "calculated Frequency of the Testwave", 100, 200, 300,
|
|---|
| 128 | "Frequenz", "counts")
|
|---|
| 129 |
|
|---|
| 130 | self.h1d("meanfreq", "mean calculated Frequency of the Testwave", 100, 200, 300,
|
|---|
| 131 | "Frequenz", "counts")
|
|---|
| 132 |
|
|---|
| 133 | self.h1d("conv", "Convergence of the Deviation", 200, 0, 200,
|
|---|
| 134 | "Event", "Deviation from the true value")
|
|---|
| 135 |
|
|---|
| 136 | self.h1d("perioddev", "Mean deviation from nominal Period for each Iteration", 1000, 0, 1000,
|
|---|
| 137 | "number of iterations", "mean deviation")
|
|---|
| 138 |
|
|---|
| 139 | self.h1d("perioddevproj", "Distribution of mean nominal Periods for each Iteration", 1000, -0.2, 0.2,
|
|---|
| 140 | "Deviation of Period", "Counts")
|
|---|
| 141 |
|
|---|
| 142 | class tcalanaHistograms( histogramList ):
|
|---|
| 143 |
|
|---|
| 144 | def book( self ):
|
|---|
| 145 |
|
|---|
| 146 | self.h1d("int_dev", "Integral Deviation", 1024, 0, 1024,
|
|---|
| 147 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 148 |
|
|---|
| 149 | self.h1d("diff_dev", "Differential Deviation", 1024, 0, 1024,
|
|---|
| 150 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 151 |
|
|---|
| 152 | self.h1d("diff_dev_true", "True Differential Deviation", 1024, 0, 1024,
|
|---|
| 153 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 154 |
|
|---|
| 155 | self.h1d("int_dev_true", "True Integral Deviation", 1024, 0, 1024,
|
|---|
| 156 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 157 |
|
|---|
| 158 | self.h1d("data", "simulierte Daten", 1024, 0, 1024,
|
|---|
| 159 | "Bin in DRS4 pipeline", "Data")
|
|---|
| 160 |
|
|---|
| 161 | self.h1d("start", "distribution of startcells", 1024, 0., 1024.,
|
|---|
| 162 | "Bin in DRS4 pipeline", "counts")
|
|---|
| 163 |
|
|---|
| 164 |
|
|---|
| 165 | class periodHistograms( histogramList ):
|
|---|
| 166 |
|
|---|
| 167 | def book ( self ):
|
|---|
| 168 |
|
|---|
| 169 | self.h1d("periods", "Lenght of Periods", 2000, 0, 10,
|
|---|
| 170 | "Period in ns", "counts")
|
|---|
| 171 |
|
|---|
| 172 | self.h1d("diff", "PeriodOliver - PeriodRemo", 100, -0.3, 0.3,
|
|---|
| 173 | "difference in ns", "counts")
|
|---|
| 174 |
|
|---|
| 175 | class amplitudesHistograms( histogramList ):
|
|---|
| 176 |
|
|---|
| 177 | def book ( self ):
|
|---|
| 178 |
|
|---|
| 179 | self.h1d("std", "Standard deviation", 20, 0, 20,
|
|---|
| 180 | "Standardabweichung in mV", "count")
|
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 | class jitterHistograms( histogramList ):
|
|---|
| 184 |
|
|---|
| 185 | def book ( self ):
|
|---|
| 186 |
|
|---|
| 187 | self.h1d("diff", "Jitter Calculation", 500, 200, 230,
|
|---|
| 188 | "difference between pulses in ns", "bin content")
|
|---|
| 189 |
|
|---|
| 190 |
|
|---|
| 191 | self.h1d("data0", "Data", 1024, 0, 1024,
|
|---|
| 192 | "Bin in DRS4 pipeline", "Data")
|
|---|
| 193 |
|
|---|
| 194 | self.h1d("data8", "Data", 1024, 0, 1024,
|
|---|
| 195 | "Bin in DRS4 pipeline", "Data")
|
|---|
| 196 |
|
|---|
| 197 | class ftcalappHistograms( histogramList ):
|
|---|
| 198 |
|
|---|
| 199 | def book ( self ):
|
|---|
| 200 |
|
|---|
| 201 | self.h1d("avperiods", "distribution of periods for average data", 1000, 2, 6,
|
|---|
| 202 | "period in ns", "bin content")
|
|---|
| 203 |
|
|---|
| 204 | self.h1d("avperiods0", "distribution of periods at beginning for average data", 400, 2, 6,
|
|---|
| 205 | "period in ns", "bin content")
|
|---|
| 206 |
|
|---|
| 207 | self.h1d("periods", "distribution of periods", 400, 2, 6,
|
|---|
| 208 | "period in ns", "bin content")
|
|---|
| 209 |
|
|---|
| 210 | self.h1d("periods0", "distribution of periods at beginning", 400, 2, 6,
|
|---|
| 211 | "period in ns", "bin content")
|
|---|
| 212 |
|
|---|
| 213 | self.h1d("perioddev", "Mean deviation from nominal Period for each Iteration", 1000, 0, 1000,
|
|---|
| 214 | "number of iterations", "mean deviation")
|
|---|
| 215 |
|
|---|
| 216 | self.h1d("perioddevproj", "Distribution of mean nominal Periods for each Iteration", 1000, -0.2, 0.2,
|
|---|
| 217 | "Deviation of Period", "Counts")
|
|---|
| 218 |
|
|---|
| 219 | self.h1d("int_dev", "integral deviation", 1024, 0., 1024.,
|
|---|
| 220 | "bin in DRS4 pipeline", "total deviation in ns")
|
|---|
| 221 |
|
|---|
| 222 |
|
|---|
| 223 |
|
|---|
| 224 |
|
|---|
| 225 |
|
|---|