mention goals lots of data not loose speed not fill up too much memory not rely on ROOT for accessing the data make diagram showing original data rebinning binary files arrays filled at the initialization stage reading from arrays at each event run range of the TGraphs: 142195 -- 257830 runs 151817(Apr 20 2002) - 248194(Dec 20, 2008) //9638 bins : first=(151817,151827) last=(248187,248197) //for (Int_t i_run=151817; i_run<=248194; i_run=i_run+10){ bin width = 10 runs so that array index 0 corresponds to [151817,151827) 1 [151827,151837) 2 [151837,151847) ... 9637 [248187,248197) (last run in between) rebin_effect_1.eps these two plots (blue curves show efficiencies that are applied) in these plots bin width = one run, for selected detectors: //L1_1_1_view1 //B1_1_1_view1 //F1_2_3 //H2_2_2 two_binnings.eps two_binnings_zoom_in.eps -- before April 21 use Masato's root file /home/masato/public_html/vineyard/phys/bana/BANA/hdi_mapping/smteffmap_data.root Efficiencies are stored as TGraphAsymmErrors ROOT objects example plot Level of detail: efficiency for each side/view of every SMT detector (L0 ladder, SMT ladder, F-wedge, H-wedge) per narrow run range (11 or 12 runs) TGraph bin# Low High eff(Low) eff(High) ... 7057 225105 225117 0.795 0.803 7058 225117 225129 0.803 0.860 7059 225129 225141 0.860 0.805 7060 225141 225152 0.805 0.837 7061 225152 225164 0.837 0.823 7062 225164 225176 0.823 0.810 7063 225176 225188 0.810 0.796 7064 225188 225199 0.796 0.810 7065 225199 225211 0.810 0.809 7066 225211 225223 0.809 0.808 7067 225223 225235 0.808 0.807 7068 225235 225246 0.807 0.839 7069 225246 225258 0.839 0.839 7070 225258 225270 0.839 0.824 7071 225270 225282 0.824 0.810 7072 225282 225293 0.810 0.796 7073 225293 225305 0.796 0.840 7074 225305 225317 0.840 0.820 7075 225317 225329 0.820 0.812 7076 225329 225340 0.812 0.812 7077 225340 225352 0.812 0.799 7078 225352 225364 0.799 0.821 7079 225364 225376 0.821 0.846 7080 225376 225387 0.846 0.826 7081 225387 225399 0.826 0.806 ... apply these efficiencies in smtdigi(SmtDigiReco) cvs(fwk) package SimSMTHitChunk digitize -> SmtDataChunk -> apply Masato's efficiencies -> (better) SmtDataChunk (both MC simulated HC and overalaid real data ZB event converted to d0gstar output format) use old infrastracture when digitized hits were removed based on bad chips from the overlaid event now remove digitized hits based on data-measured efficiencies rcp-controlled: bool _AppplyDataMeasuredEfficiency_Layer0; bool _AppplyDataMeasuredEfficiency_Barrels; bool _AppplyDataMeasuredEfficiency_Fdisks; bool _AppplyDataMeasuredEfficiency_Hdisks; dump info from Masato's root file into 4 binary files creat these arrays float _L_eff[8][6][9841]; // [barrel index] [ladder index][number_of_run_bins] to read from e.g. L8_1_5_view1 float _B_eff[6][8][12][2][9796]; // [barrel index] [layer index] [ladder index][view index][number_of_runbins] to read from e.g. B6_8_10_view1 and B6_8_10_view2 float _F_eff[12][2][12][9536]; // [disk index] [view index] [wedge index][number_of_run_bins] to read from e.g. F12_2_9 float _H_eff[4][2][24][9623]; // [disk index] [view index] [wedge index][number_of_run_bins] to read from e.g. H4_2_18 to fill them, reading info from binary files, once per run take 62MB of memory= sizeof(float)*(8*6 + 6*8*12*2 + 12*2*12 + 4*2*24)*9796/1024/1024 get runnumber, eventnumber from ZB event runnumber -> find run bin # using linear function run bin determined from root file for each found channel -> data-measured efficiency eventnumber -> use as rnd seed to generate random efficiency number, flat in [0,1] if data-measured efficiency > rnd efficiency keep channel, discard otherwise test from smtdigi code printout efficiencies obtained after reading binary file and using linear function to get run bin# from runnumber, then compare efficiencies for the same detectors/runnumbers running directly on Masato's root file test failed... because everything so far was based on the wrong assumption of "same run number binning for a given detector type, e.g. Layer0" but binning is different from detector to detector: root [1] cout<GetXaxis()->GetNbins()<GetXaxis()->GetNbins()<GetXaxis()->GetNbins()<