Commit in hps-java/src/main/java/org/lcsim/hps/users/phansson on MAIN | |||
MultScatAnalysis.java | +1932 | added 1.1 |
1st commit. Terrible analysis driver.
diff -N MultScatAnalysis.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ MultScatAnalysis.java 9 Jun 2012 01:56:51 -0000 1.1 @@ -0,0 +1,1932 @@
+/* + * To change this template, choose Tools | Templates + * and open the template in the editor. + */ +package org.lcsim.hps.users.phansson; + +import hep.aida.*; +import hep.aida.ref.plotter.PlotterRegion; +import hep.physics.vec.BasicHepLorentzVector; +import hep.physics.vec.Hep3Vector; +import hep.physics.vec.HepLorentzVector; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.logging.Level; +import java.util.logging.Logger; +import org.lcsim.detector.identifier.*; +import org.lcsim.event.CalorimeterHit; +import org.lcsim.event.Cluster; +import org.lcsim.event.EventHeader; +import org.lcsim.event.Track; +import org.lcsim.geometry.Detector; +import org.lcsim.geometry.IDDecoder; +import org.lcsim.geometry.Subdetector; +import org.lcsim.hps.evio.TriggerData; +import org.lcsim.hps.monitoring.AIDAFrame; +import org.lcsim.hps.recon.ecal.HPSEcalCluster; +import org.lcsim.hps.recon.ecal.HPSEcalConditions; +import org.lcsim.hps.recon.tracking.EcalTrackMatch; +import org.lcsim.hps.recon.tracking.SvtTrackExtrapolator; +import org.lcsim.util.Driver; +import org.lcsim.util.aida.AIDA; +import org.lcsim.hps.users.omoreno.ExtendTrack; +import org.lcsim.recon.tracking.seedtracker.SeedTrack; + +/** + * + * @author phansson+ + */ +public class MultScatAnalysis extends Driver { + + int nevents = 0; + boolean debug = false; + boolean saveFile = false; + protected IDDecoder dec = null; + protected Subdetector ecal; + private String ecalName = "Ecal"; + String sides[] = {"top","bottom","all"}; + double crystalX; + double crystalY; + double beamGap; + double EcalZPosition; + public static final double TARGETZ = -67.4; //mm + private static int crystalCols; + private static int crystalRows; + int ecalClusterSel; + + private String outputPlotFileName = "test.aida"; + private String trackCollectionName = "MatchedTracks"; + private String ecalClusterCollectionName = "EcalClusters"; + + EcalTrackMatch trkMatchTool; + + private AIDA aida = AIDA.defaultInstance(); + private IAnalysisFactory af = aida.analysisFactory(); + IHistogramFactory hf = aida.histogramFactory(); + private AIDAFrame plotterFrame; + private AIDAFrame plotterFrameTrig; + + IPlotter plotter_trig_tag; + + private int trigger[] = {0,0}; + + + private int refreshRate = 1000; + + + + public void startOfData() { + } + + public void detectorChanged(Detector detector) { + // Get the Subdetector. + ecal = detector.getSubdetector(ecalName); + + // Cache ref to decoder. + dec = ecal.getIDDecoder(); + + //Ecal geometry + crystalX = (13.3 + 16.0) / 2; + crystalY = (13.3 + 16.0) / 2; + beamGap = 20.0; + crystalCols = 46; + crystalRows = 5; + + ecalClusterSel = 1; + + + + plotterFrameTrig = new AIDAFrame(); + plotterFrameTrig.setTitle("Trigger"); + + IPlotter plotter_trig_other = af.createPlotterFactory().create(); + plotter_trig_other.createRegions(3,1,0); + plotter_trig_other.setTitle("Other"); + plotterFrameTrig.addPlotter(plotter_trig_other); + + + IHistogram ht1 = aida.histogram1D("trigger_count" , 7, 0, 7); + IHistogram ht2 = aida.histogram1D("trigger_bank" , 2, 0, 2); + IHistogram ht3 = aida.histogram1D("trigger_list" , 2, 0, 2); + plotter_trig_other.region(0).plot(ht1); + plotter_trig_other.region(1).plot(ht2); + plotter_trig_other.region(2).plot(ht3); + for(int i=0;i<3;++i) { + IPlotterStyle style = plotter_trig_other.region(i).style(); + //style.setParameter("hist2DStyle", "colorMap"); + //style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_trig_other.region(i)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_trig_other.region(i)).getPlot().setAllowPopupMenus(true); + } + + + + + plotter_trig_tag = af.createPlotterFactory().create(); + plotter_trig_tag.createRegions(3,3,0); + plotter_trig_tag.setTitle("Tag&Probe Top"); + plotterFrameTrig.addPlotter(plotter_trig_tag); + IHistogram htag1 = aida.histogram1D("toptrig_cl_ecal_n_top" , 7, 0, 7); + IHistogram htag2 = aida.histogram1D("toptrig_cl_ecal_e_top" , 100, 0, 1500); + IHistogram htag3 = aida.histogram1D("toptrig_cl_ecal_emax_top" , 100, 0, 1500); + IHistogram htag4 = aida.histogram1D("toptrig_cl_ecal_e_bottom" , 100, 0, 1500); + IHistogram htag5 = aida.histogram1D("toptrig_cl_ecal_e_bottom_trig" , 100, 0, 1500); + IHistogram htag6 = aida.histogram1D("toptrigtag_cl_ecal_e_bottom" , 100, 0, 1500); + IHistogram htag7 = aida.histogram1D("toptrigtag_cl_ecal_e_bottom_trig" , 100, 0, 1500); + IHistogram htag8 = aida.histogram1D("toptrig_cl_ecal_e_bottom_trigeff" , 100, 0, 1500); + IHistogram htag9 = aida.histogram1D("toptrigtag_cl_ecal_e_bottom_trigeff" , 100, 0, 1500); + + plotter_trig_tag.region(0).plot(htag1); + plotter_trig_tag.region(3).plot(htag2); + plotter_trig_tag.region(6).plot(htag3); + plotter_trig_tag.region(1).plot(htag4); + plotter_trig_tag.region(2).plot(htag6); + plotter_trig_tag.region(4).plot(htag5); + plotter_trig_tag.region(5).plot(htag7); + plotter_trig_tag.region(7).plot(htag9); + plotter_trig_tag.region(8).plot(htag9); + + for(int i=0;i<9;++i) { + IPlotterStyle style = plotter_trig_tag.region(i).style(); + //style.setParameter("hist2DStyle", "colorMap"); + //style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_trig_tag.region(i)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_trig_tag.region(i)).getPlot().setAllowPopupMenus(true); + } + + + IPlotter plotter_trig_tag2 = af.createPlotterFactory().create(); + plotter_trig_tag2.setTitle("Tag&Probe Top Counts"); + plotterFrameTrig.addPlotter(plotter_trig_tag2); + IHistogram htag10 = aida.histogram1D("toptrig_cl_ecal_n_bottom" , 7, 0, 7); + plotter_trig_tag2.createRegion().plot(htag10); + + plotterFrameTrig.pack(); + plotterFrameTrig.setVisible(true); + + + + + plotterFrame = new AIDAFrame(); + plotterFrame.setTitle("ECal"); + + + + IPlotter plotter_track_mom_pos = af.createPlotterFactory().create(); + plotter_track_mom_pos.createRegions(3,3,0); + plotter_track_mom_pos.setTitle("Track Momentum vs Position"); + plotter_track_mom_pos.style().statisticsBoxStyle().setVisible(false); + plotterFrame.addPlotter(plotter_track_mom_pos); + IHistogram hPzVsX_t = aida.histogram2D("Top track Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsX_b = aida.histogram2D("Bottom track Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsX_a = aida.histogram2D("Track Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqp_t = aida.histogram2D("Top track q>0 Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqp_b = aida.histogram2D("Bottom track q>0 Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqp_a = aida.histogram2D("Track q>0 Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqm_t = aida.histogram2D("Top track q<0 Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqm_b = aida.histogram2D("Bottom track q<0 Pz vs X" , 25, -500,500, 50, 0, 3500); + IHistogram hPzVsXqm_a = aida.histogram2D("Track q<0 Pz vs X" , 25, -500,500, 50, 0, 3500); + plotter_track_mom_pos.region(0).plot(hPzVsX_t); + plotter_track_mom_pos.region(1).plot(hPzVsX_b); + plotter_track_mom_pos.region(2).plot(hPzVsX_a); + plotter_track_mom_pos.region(3).plot(hPzVsXqp_t); + plotter_track_mom_pos.region(4).plot(hPzVsXqp_b); + plotter_track_mom_pos.region(5).plot(hPzVsXqp_a); + plotter_track_mom_pos.region(6).plot(hPzVsXqm_t); + plotter_track_mom_pos.region(7).plot(hPzVsXqm_b); + plotter_track_mom_pos.region(8).plot(hPzVsXqm_a); + for(int i=0;i<9;++i) { + plotter_track_mom_pos.region(i).style().setParameter("hist2DStyle", "colorMap"); + plotter_track_mom_pos.region(i).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_track_mom_pos.region(i)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_track_mom_pos.region(i)).getPlot().setAllowPopupMenus(true); + + } + + + IPlotter plotter_track_mom = af.createPlotterFactory().create(); + plotter_track_mom.createRegions(3,3,0); + plotter_track_mom.setTitle("Track Momentum"); + plotterFrame.addPlotter(plotter_track_mom); + IHistogram hPz_t = aida.histogram1D("Top track Pz" , 50, 0, 3500); + IHistogram hPz_b = aida.histogram1D("Bottom track Pz" , 50, 0, 3500); + IHistogram hPz_a = aida.histogram1D("Track Pz" , 50, 0, 3500); + IHistogram hmPz_t = aida.histogram1D("Matched top track Pz" , 50, 0, 3500); + IHistogram hmPz_b = aida.histogram1D("Matched bottom track Pz" , 50, 0, 3500); + IHistogram hmPz_a = aida.histogram1D("Matched track Pz" , 50, 0, 3500); + IHistogram hmsPz_t = aida.histogram1D("Matched sel top track Pz" , 50, 0, 3500); + IHistogram hmsPz_b = aida.histogram1D("Matched sel bottom track Pz" , 50, 0, 3500); + IHistogram hmsPz_a = aida.histogram1D("Matched sel track Pz" , 50, 0, 3500); + + + plotter_track_mom.region(0).plot(hPz_t); + plotter_track_mom.region(1).plot(hPz_b); + plotter_track_mom.region(2).plot(hPz_a); + plotter_track_mom.region(3).plot(hmPz_t); + plotter_track_mom.region(4).plot(hmPz_b); + plotter_track_mom.region(5).plot(hmPz_a); + plotter_track_mom.region(6).plot(hmsPz_t); + plotter_track_mom.region(7).plot(hmsPz_b); + plotter_track_mom.region(8).plot(hmsPz_a); + + IPlotter plotter_track_mom2 = af.createPlotterFactory().create(); + plotter_track_mom2.createRegions(3,3,0); + plotter_track_mom2.setTitle("Track Momentum Target Outliers X"); + plotterFrame.addPlotter(plotter_track_mom2); + IHistogram hPzTX_t = aida.histogram1D("Top track !target in X Pz" , 50, 0, 3500); + IHistogram hPzTX_b = aida.histogram1D("Bottom track !target in X Pz" , 50, 0, 3500); + IHistogram hPzTX_a = aida.histogram1D("Track !target in X Pz" , 50, 0, 3500); + IHistogram hmPzTX_t = aida.histogram1D("Matched top track !target in X Pz" , 50, 0, 3500); + IHistogram hmPzTX_b = aida.histogram1D("Matched bottom track !target in X Pz" , 50, 0, 3500); + IHistogram hmPzTX_a = aida.histogram1D("Matched track !target in X Pz" , 50, 0, 3500); + IHistogram hmsPzTX_t = aida.histogram1D("Matched sel top track !target in X Pz" , 50, 0, 3500); + IHistogram hmsPzTX_b = aida.histogram1D("Matched sel bottom track !target in X Pz" , 50, 0, 3500); + IHistogram hmsPzTX_a = aida.histogram1D("Matched sel track !target in X Pz" , 50, 0, 3500); + + + plotter_track_mom2.region(0).plot(hPzTX_t); + plotter_track_mom2.region(1).plot(hPzTX_b); + plotter_track_mom2.region(2).plot(hPzTX_a); + plotter_track_mom2.region(3).plot(hmPzTX_t); + plotter_track_mom2.region(4).plot(hmPzTX_b); + plotter_track_mom2.region(5).plot(hmPzTX_a); + plotter_track_mom2.region(6).plot(hmsPzTX_t); + plotter_track_mom2.region(7).plot(hmsPzTX_b); + plotter_track_mom2.region(8).plot(hmsPzTX_a); + + + IPlotter plotter_track_ext = af.createPlotterFactory().create(); + plotter_track_ext.createRegions(2,3,0); + plotter_track_ext.setTitle("Track @ Target"); + plotterFrame.addPlotter(plotter_track_ext); + IHistogram hTrkXAtConv_t = aida.histogram1D("Top track X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConv_t = aida.histogram1D("Top track Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConv_b = aida.histogram1D("Bottom track X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConv_b = aida.histogram1D("Bottom track Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConv_a = aida.histogram1D("Track X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConv_a = aida.histogram1D("Track Y @ -67cm" , 50, -20, 20); + plotter_track_ext.region(0).plot(hTrkXAtConv_t); + plotter_track_ext.region(1).plot(hTrkXAtConv_b); + plotter_track_ext.region(2).plot(hTrkXAtConv_a); + plotter_track_ext.region(3).plot(hTrkYAtConv_t); + plotter_track_ext.region(4).plot(hTrkYAtConv_b); + plotter_track_ext.region(5).plot(hTrkYAtConv_a); + + IHistogram hTrkHMXAtConv_t = aida.histogram1D("Top track Pz>1GeV X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConv_t = aida.histogram1D("Top track Pz>1GeV Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConv_b = aida.histogram1D("Bottom track Pz>1GeV X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConv_b = aida.histogram1D("Bottom track Pz>1GeV Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConv_a = aida.histogram1D("Track Pz>1GeV X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConv_a = aida.histogram1D("Track Pz>1GeV Y @ -67cm" , 50, -20, 20); + plotter_track_ext.region(0).plot(hTrkHMXAtConv_t,"mode=overlay"); + plotter_track_ext.region(1).plot(hTrkHMXAtConv_b,"mode=overlay"); + plotter_track_ext.region(2).plot(hTrkHMXAtConv_a,"mode=overlay"); + plotter_track_ext.region(3).plot(hTrkHMYAtConv_t,"mode=overlay"); + plotter_track_ext.region(4).plot(hTrkHMYAtConv_b,"mode=overlay"); + plotter_track_ext.region(5).plot(hTrkHMYAtConv_a,"mode=overlay"); + + + + IPlotter plotter_track_ext2 = af.createPlotterFactory().create(); + plotter_track_ext2.createRegions(2,3,0); + plotter_track_ext2.setTitle("Matched track @ Target "); + plotterFrame.addPlotter(plotter_track_ext2); + IHistogram hmTrkXAtConv_t = aida.histogram1D("Top matched track X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConv_t = aida.histogram1D("Top matched track Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConv_b = aida.histogram1D("Bottom matched track X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConv_b = aida.histogram1D("Bottom matched track Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConv_a = aida.histogram1D("Matched track X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConv_a = aida.histogram1D("Matched track Y @ -67cm" , 50, -20, 20); + plotter_track_ext2.region(0).plot(hmTrkXAtConv_t); + plotter_track_ext2.region(1).plot(hmTrkXAtConv_b); + plotter_track_ext2.region(2).plot(hmTrkXAtConv_a); + plotter_track_ext2.region(3).plot(hmTrkYAtConv_t); + plotter_track_ext2.region(4).plot(hmTrkYAtConv_b); + plotter_track_ext2.region(5).plot(hmTrkYAtConv_a); + + + + + + + IPlotter plotter_track_ext3 = af.createPlotterFactory().create(); + plotter_track_ext3.createRegions(2,3,0); + plotter_track_ext3.setTitle("Matched sel track @ Target"); + plotterFrame.addPlotter(plotter_track_ext3); + IHistogram hmsTrkXAtConv_t = aida.histogram1D("Top sel matched track X @ -67cm" , 50, -100, 100); + IHistogram hmsTrkYAtConv_t = aida.histogram1D("Top sel matched track Y @ -67cm" , 50, -100, 100); + IHistogram hmsTrkXAtConv_b = aida.histogram1D("Bottom sel matched track X @ -67cm" , 50, -100, 100); + IHistogram hmsTrkYAtConv_b = aida.histogram1D("Bottom sel matched track Y @ -67cm" , 50, -100, 100); + IHistogram hmsTrkXAtConv_a = aida.histogram1D("Matched sel track X @ -67cm" , 50, -100, 100); + IHistogram hmsTrkYAtConv_a = aida.histogram1D("Matched sel track Y @ -67cm" , 50, -100, 100); + plotter_track_ext3.region(0).plot(hmsTrkXAtConv_t); + plotter_track_ext3.region(1).plot(hmsTrkXAtConv_b); + plotter_track_ext3.region(2).plot(hmsTrkXAtConv_a); + plotter_track_ext3.region(3).plot(hmsTrkYAtConv_t); + plotter_track_ext3.region(4).plot(hmsTrkYAtConv_b); + plotter_track_ext3.region(5).plot(hmsTrkYAtConv_a); + + + + + IPlotter plotter_track_ext4 = af.createPlotterFactory().create(); + plotter_track_ext4.createRegions(2,3,0); + plotter_track_ext4.setTitle("Track @ Target Pos. Charge"); + plotterFrame.addPlotter(plotter_track_ext4); + IHistogram hTrkXAtConvqp_t = aida.histogram1D("Top track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqp_t = aida.histogram1D("Top track q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConvqp_b = aida.histogram1D("Bottom track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqp_b = aida.histogram1D("Bottom track q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConvqp_a = aida.histogram1D("Track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqp_a = aida.histogram1D("Track q>0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext4.region(0).plot(hTrkXAtConvqp_t); + plotter_track_ext4.region(1).plot(hTrkXAtConvqp_b); + plotter_track_ext4.region(2).plot(hTrkXAtConvqp_a); + plotter_track_ext4.region(3).plot(hTrkYAtConvqp_t); + plotter_track_ext4.region(4).plot(hTrkYAtConvqp_b); + plotter_track_ext4.region(5).plot(hTrkYAtConvqp_a); + + IHistogram hTrkHMXAtConvqp_t = aida.histogram1D("Top track Pz>1GeV q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqp_t = aida.histogram1D("Top track Pz>1GeV q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConvqp_b = aida.histogram1D("Bottom track Pz>1GeV q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqp_b = aida.histogram1D("Bottom track Pz>1GeV q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConvqp_a = aida.histogram1D("Track Pz>1GeV q>0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqp_a = aida.histogram1D("Track Pz>1GeV q>0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext4.region(0).plot(hTrkHMXAtConvqp_t,"mode=overlay"); + plotter_track_ext4.region(1).plot(hTrkHMXAtConvqp_b,"mode=overlay"); + plotter_track_ext4.region(2).plot(hTrkHMXAtConvqp_a,"mode=overlay"); + plotter_track_ext4.region(3).plot(hTrkHMYAtConvqp_t,"mode=overlay"); + plotter_track_ext4.region(4).plot(hTrkHMYAtConvqp_b,"mode=overlay"); + plotter_track_ext4.region(5).plot(hTrkHMYAtConvqp_a,"mode=overlay"); + + + + + IPlotter plotter_track_ext5 = af.createPlotterFactory().create(); + plotter_track_ext5.createRegions(2,3,0); + plotter_track_ext5.setTitle("Track @ Target Neg. Charge"); + plotterFrame.addPlotter(plotter_track_ext5); + IHistogram hTrkXAtConvqm_t = aida.histogram1D("Top track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqm_t = aida.histogram1D("Top track q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConvqm_b = aida.histogram1D("Bottom track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqm_b = aida.histogram1D("Bottom track q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkXAtConvqm_a = aida.histogram1D("Track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkYAtConvqm_a = aida.histogram1D("Track q<0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext5.region(0).plot(hTrkXAtConvqm_t); + plotter_track_ext5.region(1).plot(hTrkXAtConvqm_b); + plotter_track_ext5.region(2).plot(hTrkXAtConvqm_a); + plotter_track_ext5.region(3).plot(hTrkYAtConvqm_t); + plotter_track_ext5.region(4).plot(hTrkYAtConvqm_b); + plotter_track_ext5.region(5).plot(hTrkYAtConvqm_a); + + IHistogram hTrkHMXAtConvqm_t = aida.histogram1D("Top track Pz>1GeV q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqm_t = aida.histogram1D("Top track Pz>1GeV q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConvqm_b = aida.histogram1D("Bottom track Pz>1GeV q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqm_b = aida.histogram1D("Bottom track Pz>1GeV q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hTrkHMXAtConvqm_a = aida.histogram1D("Track Pz>1GeV q<0 X @ -67cm" , 50, -100, 100); + IHistogram hTrkHMYAtConvqm_a = aida.histogram1D("Track Pz>1GeV q<0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext5.region(0).plot(hTrkHMXAtConvqm_t,"mode=overlay"); + plotter_track_ext5.region(1).plot(hTrkHMXAtConvqm_b,"mode=overlay"); + plotter_track_ext5.region(2).plot(hTrkHMXAtConvqm_a,"mode=overlay"); + plotter_track_ext5.region(3).plot(hTrkHMYAtConvqm_t,"mode=overlay"); + plotter_track_ext5.region(4).plot(hTrkHMYAtConvqm_b,"mode=overlay"); + plotter_track_ext5.region(5).plot(hTrkHMYAtConvqm_a,"mode=overlay"); + + + + IPlotter plotter_track_ext6 = af.createPlotterFactory().create(); + plotter_track_ext6.createRegions(2,3,0); + plotter_track_ext6.setTitle("Matched Track @ Target Pos. Charge"); + plotterFrame.addPlotter(plotter_track_ext6); + IHistogram hmTrkXAtConvqp_t = aida.histogram1D("Top matched track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqp_t = aida.histogram1D("Top matched track q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConvqp_b = aida.histogram1D("Bottom matched track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqp_b = aida.histogram1D("Bottom matched track q>0 Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConvqp_a = aida.histogram1D("Matched track q>0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqp_a = aida.histogram1D("Matched track q>0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext6.region(0).plot(hmTrkXAtConvqp_t); + plotter_track_ext6.region(1).plot(hmTrkXAtConvqp_b); + plotter_track_ext6.region(2).plot(hmTrkXAtConvqp_a); + plotter_track_ext6.region(3).plot(hmTrkYAtConvqp_t); + plotter_track_ext6.region(4).plot(hmTrkYAtConvqp_b); + plotter_track_ext6.region(5).plot(hmTrkYAtConvqp_a); + + IPlotter plotter_track_ext7 = af.createPlotterFactory().create(); + plotter_track_ext7.createRegions(2,3,0); + plotter_track_ext7.setTitle("Matched Track @ Target Neg. Charge"); + plotterFrame.addPlotter(plotter_track_ext7); + IHistogram hmTrkXAtConvqm_t = aida.histogram1D("Top matched track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqm_t = aida.histogram1D("Top matched track q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConvqm_b = aida.histogram1D("Bottom matched track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqm_b = aida.histogram1D("Bottom matched track q<0 Y @ -67cm" , 50, -20, 20); + IHistogram hmTrkXAtConvqm_a = aida.histogram1D("Matched track q<0 X @ -67cm" , 50, -100, 100); + IHistogram hmTrkYAtConvqm_a = aida.histogram1D("Matched track q<0 Y @ -67cm" , 50, -20, 20); + plotter_track_ext7.region(0).plot(hmTrkXAtConvqm_t); + plotter_track_ext7.region(1).plot(hmTrkXAtConvqm_b); + plotter_track_ext7.region(2).plot(hmTrkXAtConvqm_a); + plotter_track_ext7.region(3).plot(hmTrkYAtConvqm_t); + plotter_track_ext7.region(4).plot(hmTrkYAtConvqm_b); + plotter_track_ext7.region(5).plot(hmTrkYAtConvqm_a); + + + + + + IPlotter plotter_track_chi2 = af.createPlotterFactory().create(); + plotter_track_chi2.createRegions(3,3,0); + plotter_track_chi2.setTitle("Track Chi2"); + plotterFrame.addPlotter(plotter_track_chi2); + IHistogram hChi2_t = aida.histogram1D("Top track Chi2" , 50, 0, 15); + IHistogram hChi2_b = aida.histogram1D("Bottom track Chi2" , 50, 0, 15); + IHistogram hChi2_a = aida.histogram1D("Track Chi2" , 50, 0, 15); + IHistogram hmChi2_t = aida.histogram1D("Matched top track Chi2" , 50, 0, 15); + IHistogram hmChi2_b = aida.histogram1D("Matched bottom track Chi2" , 50, 0, 15); + IHistogram hmChi2_a = aida.histogram1D("Matched track Chi2" , 50, 0, 15); + IHistogram hmsChi2_t = aida.histogram1D("Matched sel top track Chi2" , 50, 0, 15); + IHistogram hmsChi2_b = aida.histogram1D("Matched sel bottom track Chi2" , 50, 0, 15); + IHistogram hmsChi2_a = aida.histogram1D("Matched sel track Chi2" , 50, 0, 15); + + plotter_track_chi2.region(0).plot(hChi2_t); + plotter_track_chi2.region(1).plot(hChi2_b); + plotter_track_chi2.region(2).plot(hChi2_a); + plotter_track_chi2.region(3).plot(hmChi2_t); + plotter_track_chi2.region(4).plot(hmChi2_b); + plotter_track_chi2.region(5).plot(hmChi2_a); + plotter_track_chi2.region(6).plot(hmsChi2_t); + plotter_track_chi2.region(7).plot(hmsChi2_b); + plotter_track_chi2.region(8).plot(hmsChi2_a); + + + + IPlotter plotter_track_chi2_2 = af.createPlotterFactory().create(); + plotter_track_chi2_2.createRegions(3,3,0); + plotter_track_chi2_2.setTitle("Track Chi2 Target Outliers X"); + plotterFrame.addPlotter(plotter_track_chi2_2); + IHistogram hChi2TX_t = aida.histogram1D("Top track !target in X Chi2" , 50, 0, 15); + IHistogram hChi2TX_b = aida.histogram1D("Bottom track !target in X Chi2" , 50, 0, 15); + IHistogram hChi2TX_a = aida.histogram1D("Track !target in X Chi2" , 50, 0, 15); + IHistogram hmChi2TX_t = aida.histogram1D("Matched top track !target in X Chi2" , 50, 0, 15); + IHistogram hmChi2TX_b = aida.histogram1D("Matched bottom track !target in X Chi2" , 50, 0, 15); + IHistogram hmChi2TX_a = aida.histogram1D("Matched track !target in X Chi2" , 50, 0, 15); + IHistogram hmsChi2TX_t = aida.histogram1D("Matched sel top track !target in X Chi2" , 50, 0, 15); + IHistogram hmsChi2TX_b = aida.histogram1D("Matched sel bottom track !target in X Chi2" , 50, 0, 15); + IHistogram hmsChi2TX_a = aida.histogram1D("Matched sel track !target in X Chi2" , 50, 0, 15); + + plotter_track_chi2_2.region(0).plot(hChi2TX_t); + plotter_track_chi2_2.region(1).plot(hChi2TX_b); + plotter_track_chi2_2.region(2).plot(hChi2TX_a); + plotter_track_chi2_2.region(3).plot(hmChi2TX_t); + plotter_track_chi2_2.region(4).plot(hmChi2TX_b); + plotter_track_chi2_2.region(5).plot(hmChi2TX_a); + plotter_track_chi2_2.region(6).plot(hmsChi2TX_t); + plotter_track_chi2_2.region(7).plot(hmsChi2TX_b); + plotter_track_chi2_2.region(8).plot(hmsChi2TX_a); + + + + IPlotter plotter_cln = af.createPlotterFactory().create(); + plotter_cln.createRegions(2,3,0); + plotter_cln.setTitle("Cluster multiplicity"); + plotterFrame.addPlotter(plotter_cln); + + IHistogram hsCln_a = aida.histogram1D("Cluster sel multiplicity",5,0,5); + IHistogram hsCln_t = aida.histogram1D("Top cluster sel multiplicity",5,0,5); + IHistogram hsCln_b = aida.histogram1D("Bottom cluster sel multiplicity",5,0,5); + IHistogram hCln_a = aida.histogram1D("Cluster multiplicity",5,0,5); + IHistogram hCln_t = aida.histogram1D("Top cluster multiplicity",5,0,5); + IHistogram hCln_b = aida.histogram1D("Bottom cluster multiplicity",5,0,5); + + plotter_cln.region(2).plot(hCln_a); + plotter_cln.region(0).plot(hCln_t);//,"mode=overlay"); + plotter_cln.region(1).plot(hCln_b);//,"mode=overlay"); + + plotter_cln.region(5).plot(hsCln_a); + plotter_cln.region(3).plot(hsCln_t);//,"mode=overlay"); + plotter_cln.region(4).plot(hsCln_b);//,"mode=overlay"); + + + + + + + + IPlotter plotter_ecal_pos = af.createPlotterFactory().create(); + IPlotter plotter_ecal_e = af.createPlotterFactory().create(); + IPlotter plotter_ecal_hitmap = af.createPlotterFactory().create(); + IPlotter plotter_ecal_cls = af.createPlotterFactory().create(); + IPlotter plotter_ecal_clsx = af.createPlotterFactory().create(); + + IPlotter plotter_cltrkmatch = af.createPlotterFactory().create(); + IPlotter plotter_cltrkmatchE = af.createPlotterFactory().create(); + IPlotter plotter_cltrkmatchEeff = af.createPlotterFactory().create(); + IPlotter plotter_clEoverP = af.createPlotterFactory().create(); + plotter_ecal_e.createRegions(2,3,0); + plotter_ecal_e.setTitle("Ecal e"); + plotter_ecal_hitmap.createRegions(2,3,0); + plotter_ecal_hitmap.setTitle("Ecal hitmap"); + plotter_ecal_hitmap.style().statisticsBoxStyle().setVisible(false); + plotter_ecal_pos.createRegions(2,3,0); + plotter_ecal_pos.setTitle("Ecal hitmap"); + plotter_ecal_pos.style().statisticsBoxStyle().setVisible(false); + plotter_ecal_cls.createRegions(2,3,0); + plotter_ecal_cls.setTitle("Ecal cl size"); + plotter_ecal_clsx.createRegions(2,3,0); + plotter_ecal_clsx.setTitle("Ecal cl sizeX"); + plotter_cltrkmatch.createRegions(3,3,0); + plotter_cltrkmatch.setTitle("Ecal track match"); + plotter_cltrkmatchE.createRegions(3,3,0); + plotter_cltrkmatchE.setTitle("Ecal track match E"); + plotter_cltrkmatchEeff.createRegions(3,3,0); + plotter_cltrkmatchEeff.setTitle("Ecal track match eff E"); + plotter_clEoverP.createRegions(3,3,0); + plotter_clEoverP.setTitle("EoverP"); + + plotterFrame.addPlotter(plotter_ecal_e); + plotterFrame.addPlotter(plotter_ecal_hitmap); + plotterFrame.addPlotter(plotter_ecal_pos); + plotterFrame.addPlotter(plotter_ecal_cls); + plotterFrame.addPlotter(plotter_ecal_clsx); + + plotterFrame.addPlotter(plotter_cltrkmatch); + plotterFrame.addPlotter(plotter_cltrkmatchE); + plotterFrame.addPlotter(plotter_cltrkmatchEeff); + plotterFrame.addPlotter(plotter_clEoverP); + + + + + + + + + + IHistogram hnclmatch_a = aida.histogram1D("Nr of track matched clusters dR<20.0",3,-0.5,2.5); + IHistogram hnclmatch_t = aida.histogram1D("Nr of track matched top clusters dR<20.0" ,3,-0.5,2.5); + IHistogram hnclmatch_b = aida.histogram1D("Nr of track matched bottom clusters dR<20.0" ,3,-0.5,2.5); + IHistogram hnsclmatch_a = aida.histogram1D("Nr of sel track matched clusters dR<20.0",3,-0.5,2.5); + IHistogram hnsclmatch_t = aida.histogram1D("Nr of sel track matched top clusters dR<20.0" ,3,-0.5,2.5); + IHistogram hnsclmatch_b = aida.histogram1D("Nr of sel track matched bottom clusters dR<20.0" ,3,-0.5,2.5); + + + + IPlotter plotter_nclmatch = af.createPlotterFactory().create(); + plotter_nclmatch.createRegions(2,3,0); + plotter_nclmatch.setTitle("Ecal track match # dR<20.0"); + plotterFrame.addPlotter(plotter_nclmatch); + plotter_nclmatch.region(0).plot(hnclmatch_t); + plotter_nclmatch.region(1).plot(hnclmatch_b); + plotter_nclmatch.region(2).plot(hnclmatch_a); + plotter_nclmatch.region(3).plot(hnsclmatch_t); + plotter_nclmatch.region(4).plot(hnsclmatch_b); + plotter_nclmatch.region(5).plot(hnsclmatch_a); + + + IHistogram hnclmatch50_a = aida.histogram1D("Nr of track matched clusters dR<50.0",3,-0.5,2.5); + IHistogram hnclmatch50_t = aida.histogram1D("Nr of track matched top clusters dR<50.0" ,3,-0.5,2.5); + IHistogram hnclmatch50_b = aida.histogram1D("Nr of track matched bottom clusters dR<50.0" ,3,-0.5,2.5); + IHistogram hnsclmatch50_a = aida.histogram1D("Nr of sel track matched clusters dR<50.0",3,-0.5,2.5); + IHistogram hnsclmatch50_t = aida.histogram1D("Nr of sel track matched top clusters dR<50.0" ,3,-0.5,2.5); + IHistogram hnsclmatch50_b = aida.histogram1D("Nr of sel track matched bottom clusters dR<50.0" ,3,-0.5,2.5); + + + IPlotter plotter_nclmatch50 = af.createPlotterFactory().create(); + plotter_nclmatch50.createRegions(2,3,0); + plotter_nclmatch50.setTitle("Ecal track match # dR<50.0"); + plotterFrame.addPlotter(plotter_nclmatch50); + plotter_nclmatch50.region(0).plot(hnclmatch_t); + plotter_nclmatch50.region(1).plot(hnclmatch_b); + plotter_nclmatch50.region(2).plot(hnclmatch_a); + plotter_nclmatch50.region(3).plot(hnsclmatch_t); + plotter_nclmatch50.region(4).plot(hnsclmatch_b); + plotter_nclmatch50.region(5).plot(hnsclmatch_a); + + + + + IHistogram hnclmatchY_a = aida.histogram1D("Nr of track matched clusters dY<20.0",3,-0.5,2.5); + IHistogram hnclmatchY_t = aida.histogram1D("Nr of track matched top clusters dY<20.0" ,3,-0.5,2.5); + IHistogram hnclmatchY_b = aida.histogram1D("Nr of track matched bottom clusters dY<20.0" ,3,-0.5,2.5); + IHistogram hnsclmatchY_a = aida.histogram1D("Nr of sel track matched clusters dY<20.0",3,-0.5,2.5); + IHistogram hnsclmatchY_t = aida.histogram1D("Nr of sel track matched top clusters dY<20.0" ,3,-0.5,2.5); + IHistogram hnsclmatchY_b = aida.histogram1D("Nr of sel track matched bottom clusters dY<20.0" ,3,-0.5,2.5); + + IPlotter plotter_nclmatchY = af.createPlotterFactory().create(); + plotter_nclmatchY.createRegions(2,3,0); + plotter_nclmatchY.setTitle("Ecal track match # dY<20.0"); + plotterFrame.addPlotter(plotter_nclmatchY); + plotter_nclmatchY.region(0).plot(hnclmatchY_t); + plotter_nclmatchY.region(1).plot(hnclmatchY_b); + plotter_nclmatchY.region(2).plot(hnclmatchY_a); + plotter_nclmatchY.region(3).plot(hnsclmatchY_t); + plotter_nclmatchY.region(4).plot(hnsclmatchY_b); + plotter_nclmatchY.region(5).plot(hnsclmatchY_a); + + + IHistogram hnclmatchY50_a = aida.histogram1D("Nr of track matched clusters dY<50.0",3,-0.5,2.5); + IHistogram hnclmatchY50_t = aida.histogram1D("Nr of track matched top clusters dY<50.0" ,3,-0.5,2.5); + IHistogram hnclmatchY50_b = aida.histogram1D("Nr of track matched bottom clusters dY<50.0" ,3,-0.5,2.5); + IHistogram hnsclmatchY50_a = aida.histogram1D("Nr of sel track matched clusters dY<50.0",3,-0.5,2.5); + IHistogram hnsclmatchY50_t = aida.histogram1D("Nr of sel track matched top clusters dY<50.0" ,3,-0.5,2.5); + IHistogram hnsclmatchY50_b = aida.histogram1D("Nr of sel track matched bottom clusters dY<50.0" ,3,-0.5,2.5); + + IPlotter plotter_nclmatchY50 = af.createPlotterFactory().create(); + plotter_nclmatchY50.createRegions(2,3,0); + plotter_nclmatchY50.setTitle("Ecal track match # dY<50.0"); + plotterFrame.addPlotter(plotter_nclmatchY50); + plotter_nclmatchY50.region(0).plot(hnclmatchY50_t); + plotter_nclmatchY50.region(1).plot(hnclmatchY50_b); + plotter_nclmatchY50.region(2).plot(hnclmatchY50_a); + plotter_nclmatchY50.region(3).plot(hnsclmatchY50_t); + plotter_nclmatchY50.region(4).plot(hnsclmatchY50_b); + plotter_nclmatchY50.region(5).plot(hnsclmatchY50_a); + + + + + + IPlotter plotter_clmatchpos = af.createPlotterFactory().create(); + plotter_clmatchpos.createRegions(2,3,0); + plotter_clmatchpos.setTitle("Cluster track match pos"); + plotter_clmatchpos.style().statisticsBoxStyle().setVisible(false); + plotterFrame.addPlotter(plotter_clmatchpos); + + IHistogram hclmatchpos_a = aida.histogram2D("Track matched cluster pos",51,-25.5,25.5,11,-5.5,5.5); + IHistogram hclmatchpos_t = aida.histogram2D("Track matched top cluster pos",51,-25.5,25.5,6,-0.5,5.5); + IHistogram hclmatchpos_b = aida.histogram2D("Track matched bottom cluster pos",51,-25.5,25.5,6,-5.5,0.5); + IHistogram hsclmatchpos_a = aida.histogram2D("Track matched sel cluster pos",51,-25.5,25.5,11,-5.5,5.5); + IHistogram hsclmatchpos_t = aida.histogram2D("Track matched sel top cluster pos",51,-25.5,25.5,6,-0.5,5.5); + IHistogram hsclmatchpos_b = aida.histogram2D("Track matched sel bottom cluster pos",51,-25.5,25.5,6,-5.5,0.5); + + + + plotter_clmatchpos.region(0).plot(hclmatchpos_t); + plotter_clmatchpos.region(1).plot(hclmatchpos_b); + plotter_clmatchpos.region(2).plot(hclmatchpos_a); + plotter_clmatchpos.region(3).plot(hsclmatchpos_t); + plotter_clmatchpos.region(4).plot(hsclmatchpos_b); + plotter_clmatchpos.region(5).plot(hsclmatchpos_a); + + for(int i=0;i<6;++i) { + plotter_clmatchpos.region(i).style().setParameter("hist2DStyle", "colorMap"); + plotter_clmatchpos.region(i).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_clmatchpos.region(i)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_clmatchpos.region(i)).getPlot().setAllowPopupMenus(true); + } + + IPlotter plotter_clunmatchpos = af.createPlotterFactory().create(); + plotter_clunmatchpos.createRegions(2,3,0); + plotter_clunmatchpos.setTitle("Cluster track unmatched pos"); + plotterFrame.addPlotter(plotter_clunmatchpos); + + IHistogram hsclunmatchpos_a = aida.histogram2D("Track unmatched sel cluster pos",50,-500,500,50,-100,100); + IHistogram hsclunmatchpos_t = aida.histogram2D("Track unmatched sel top cluster pos",50,-500,500,50,-100,100); + IHistogram hsclunmatchpos_b = aida.histogram2D("Track unmatched sel bottom cluster pos",50,-500,500,50,-100,100); + plotter_clunmatchpos.region(0).plot(hsclunmatchpos_t); + plotter_clunmatchpos.region(1).plot(hsclunmatchpos_b); + plotter_clunmatchpos.region(2).plot(hsclunmatchpos_a); + + + IHistogram hth = aida.histogram1D("Cluster theta", 100, 0.02, 0.07); + IHistogram hth_t = aida.histogram1D("Top cluster theta", 100, 0.02, 0.07); + IHistogram hth_b = aida.histogram1D("Bottom cluster theta", 100, 0.02, 0.07); + IHistogram hth_ecl = aida.histogram1D("Cluster theta sel", 100, 0.02, 0.07); + IHistogram hth_ecl_t = aida.histogram1D("Top cluster theta sel", 100, 0.02, 0.07); + IHistogram hth_ecl_b = aida.histogram1D("Bottom cluster theta sel", 100, 0.02, 0.07); + IHistogram hth_m = aida.histogram1D("Cluster theta matched trk", 100, 0.02, 0.07); + IHistogram hth_m_t = aida.histogram1D("Top cluster theta matched trk", 100, 0.02, 0.07); + IHistogram hth_m_b = aida.histogram1D("Bottom cluster theta matched trk", 100, 0.02, 0.07); + IHistogram hth_eclm = aida.histogram1D("Cluster sel theta matched trk", 100, 0.02, 0.07); + IHistogram hth_eclm_t = aida.histogram1D("Top cluster sel theta matched trk", 100, 0.02, 0.07); + IHistogram hth_eclm_b = aida.histogram1D("Bottom cluster sel theta matched trk", 100, 0.02, 0.07); + IHistogram hth_mp = aida.histogram1D("Cluster theta matched trk Pz>1000MeV", 100, 0.02, 0.07); + IHistogram hth_mp_t = aida.histogram1D("Top cluster theta matched trk Pz>1000MeV", 100, 0.02, 0.07); + IHistogram hth_mp_b = aida.histogram1D("Bottom cluster theta matched trk Pz>1000MeV", 100, 0.02, 0.07); + + + IPlotter plotter_ecal_cltheta = af.createPlotterFactory().create(); + plotter_ecal_cltheta.createRegions(5,3,0); + plotter_ecal_cltheta.setTitle("Ecal cl theta"); + plotterFrame.addPlotter(plotter_ecal_cltheta); + + plotter_ecal_cltheta.region(0).plot(hth); + plotter_ecal_cltheta.region(1).plot(hth_t); + plotter_ecal_cltheta.region(2).plot(hth_b); + plotter_ecal_cltheta.region(3).plot(hth_ecl); + plotter_ecal_cltheta.region(4).plot(hth_ecl_t); + plotter_ecal_cltheta.region(5).plot(hth_ecl_b); + plotter_ecal_cltheta.region(6).plot(hth_m); + plotter_ecal_cltheta.region(7).plot(hth_m_t); + plotter_ecal_cltheta.region(8).plot(hth_m_b); + plotter_ecal_cltheta.region(9).plot(hth_eclm); + plotter_ecal_cltheta.region(10).plot(hth_eclm_t); + plotter_ecal_cltheta.region(11).plot(hth_eclm_b); + plotter_ecal_cltheta.region(12).plot(hth_mp); + plotter_ecal_cltheta.region(13).plot(hth_mp_t); + plotter_ecal_cltheta.region(14).plot(hth_mp_b); + + + + IHistogram hEoverPX_t = aida.histogram2D("EoverP vs cl X top",51,-25.5,25.5,50,0,2); + IHistogram hEoverPX_b = aida.histogram2D("EoverP vs cl X bottom",51,-25.5,25.5,50,0,2); + + IHistogram hsEoverPX_t = aida.histogram2D("EoverP vs cl X sel top",51,-25.5,25.5,50,0,2); + IHistogram hsEoverPX_b = aida.histogram2D("EoverP vs cl X sel bottom",51,-25.5,25.5,50,0,2); + + IHistogram htsEoverPX_t = aida.histogram2D("EoverP vs cl X Pz>1GeV top",51,-25.5,25.5,50,0,2); + IHistogram htsEoverPX_b = aida.histogram2D("EoverP vs cl X Pz>1GeV bottom",51,-25.5,25.5,50,0,2); + + IPlotter plotter_ep_x = af.createPlotterFactory().create(); + plotter_ep_x.createRegions(3,2,0); + plotter_ep_x.setTitle("E over P vs X"); + plotter_ep_x.style().statisticsBoxStyle().setVisible(false); + plotterFrame.addPlotter(plotter_ep_x); + + plotter_ep_x.region(0).plot(hEoverPX_t); + plotter_ep_x.region(1).plot(hEoverPX_b); + plotter_ep_x.region(2).plot(hsEoverPX_t); + plotter_ep_x.region(3).plot(hsEoverPX_b); + plotter_ep_x.region(4).plot(htsEoverPX_t); + plotter_ep_x.region(5).plot(htsEoverPX_b); + + for(int i=0;i<6;++i) { + plotter_ep_x.region(i).style().setParameter("hist2DStyle", "colorMap"); + plotter_ep_x.region(i).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + } + + + + + String side; + for (int iSide=0;iSide<3;++iSide) { + side = sides[iSide]; + IHistogram h1 = aida.histogram1D("Cluster energy sel " + side , 100, 0, 2500); + + IHistogram h11 = aida.histogram1D("Cluster energy " + side , 100, 0, 2500); + + IHistogram h2,h22,h3,h33; + if(iSide==0) h2 = aida.histogram2D("Cluster hit map sel " + side, 51, -25.5, 25.5, 6, -0.5, 5.5); + else if(iSide==1) h2 = aida.histogram2D("Cluster hit map sel " + side, 51, -25.5, 25.5, 6, -5.5, 0.5); + else h2 = aida.histogram2D("Cluster hit map sel " + side, 51, -25.5, 25.5, 11, -5.5, 5.5); + + if(iSide==0) h3 = aida.histogram2D("Cluster hit pos sel " + side, 25, -400, 400, 25, 0, 100); + else if(iSide==1) h3 = aida.histogram2D("Cluster hit pos sel " + side, 25, -400, 400, 25, -100, 0); + else h3 = aida.histogram2D("Cluster hit pos sel " + side, 25, -400, 400, 25, -100, 100); + + if(iSide==0) h22 = aida.histogram2D("Cluster hit map " + side, 51, -25.5, 25.5, 6, -0.5, 5.5); + else if(iSide==1) h22 = aida.histogram2D("Cluster hit map " + side, 26, -25.5, 0.5, 6, -5.5, 0.5); + else h22 = aida.histogram2D("Cluster hit map " + side, 51, -25.5, 25.5, 11, -5.5, 5.5); + + if(iSide==0) h33 = aida.histogram2D("Cluster hit pos " + side, 25, -400, 400, 25, 0, 100); + else if(iSide==1) h33 = aida.histogram2D("Cluster hit pos " + side, 25, -400, 400, 25, -100, 0); + else h33 = aida.histogram2D("Cluster hit pos " + side, 25, -400, 400, 25, -100, 100); + + + + IHistogram h4 = aida.histogram2D("selcl_ecal_cls_" + side, 100, -500.0, 500.0,8,0,8); + IHistogram h5 = aida.histogram1D("Cluster size " + side, 6, 0.0, 6.0); + + + IHistogram h44 = aida.histogram2D("allcl_ecal_cls_" + side, 50, -400.0, 400.0,8,0,8); + IHistogram h55 = aida.histogram1D("Cluster size sel " + side, 6, 0.0,6); + + + + IHistogram h1111 = aida.histogram1D("allcl_cltrkdr_" + side , 50, -1, 500); + IHistogram h3333 = aida.histogram1D("allcl_cltrkdx_" + side , 50, -500, 500); + IHistogram h4444 = aida.histogram1D("allcl_cltrkdy_" + side , 50, -50, 50); + + + + + IHistogram h2222 = aida.histogram2D("allcl_clEtrkdr_" + side ,25,0,2500, 25, -1, 500); + IHistogram h22221 = aida.histogram2D("allcl_clEtrkdx_" + side ,25,0,2500, 25, -1, 500); + IHistogram h22223 = aida.histogram2D("allcl_clEtrkdy_" + side ,25,0,2500, 25, -1, 50); + + IHistogram h2222eff = aida.histogram1D("allcl_clEtrkdr_eff_" + side ,25,0,2500); + IHistogram h22221eff = aida.histogram1D("allcl_clEtrkdx_eff_" + side ,25,0,2500); + IHistogram h22223eff = aida.histogram1D("allcl_clEtrkdy_eff_" + side ,25,0,2500); + + + IHistogram hEvsP = aida.histogram2D("allcl_clEvsP_" + side ,25,0,2500,25,0,2500); + IHistogram hEoverP = aida.histogram1D("allcl_clEoverP_" + side ,25,0,2); + IHistogram hEoverPsel = aida.histogram1D("selcl_clEoverP_" + side ,25,0,2); + + + + + plotter_ecal_e.region(iSide+3).plot(h1); + plotter_ecal_hitmap.region(iSide).plot(h2); + plotter_ecal_pos.region(iSide).plot(h3); + plotter_ecal_cls.region(iSide).plot(h4); + plotter_ecal_clsx.region(iSide).plot(h5); + + plotter_ecal_e.region(iSide).plot(h11); + plotter_ecal_hitmap.region(iSide+3).plot(h22); + plotter_ecal_pos.region(iSide+3).plot(h33); + plotter_ecal_cls.region(iSide+3).plot(h44); + plotter_ecal_clsx.region(iSide+3).plot(h55); + + + + plotter_cltrkmatch.region(iSide).plot(h3333); + plotter_cltrkmatch.region(iSide+3).plot(h4444); + plotter_cltrkmatch.region(iSide+6).plot(h1111); + + ((PlotterRegion) plotter_cltrkmatch.region(iSide+6)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatch.region(iSide+6)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatch.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatch.region(iSide+3)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatch.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatch.region(iSide)).getPlot().setAllowPopupMenus(true); + + + plotter_cltrkmatchE.region(iSide).plot(h22221); + plotter_cltrkmatchE.region(iSide+3).plot(h22223); + plotter_cltrkmatchE.region(iSide+6).plot(h2222); + + plotter_cltrkmatchE.region(iSide).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchE.region(iSide).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_cltrkmatchE.region(iSide+3).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchE.region(iSide+3).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_cltrkmatchE.region(iSide+6).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchE.region(iSide+6).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + + ((PlotterRegion) plotter_cltrkmatchE.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchE.region(iSide)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatchE.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchE.region(iSide+3)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatchE.region(iSide+6)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchE.region(iSide+6)).getPlot().setAllowPopupMenus(true); + + plotter_cltrkmatchEeff.region(iSide).plot(h22221eff); + plotter_cltrkmatchEeff.region(iSide+3).plot(h22223eff); + plotter_cltrkmatchEeff.region(iSide+6).plot(h2222eff); + plotter_cltrkmatchEeff.region(iSide).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchEeff.region(iSide).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_cltrkmatchEeff.region(iSide+3).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchEeff.region(iSide+3).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_cltrkmatchEeff.region(iSide+6).style().setParameter("hist2DStyle", "colorMap"); + plotter_cltrkmatchEeff.region(iSide+6).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide+3)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide+6)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_cltrkmatchEeff.region(iSide+6)).getPlot().setAllowPopupMenus(true); + + plotter_clEoverP.region(iSide).plot(hEvsP); + plotter_clEoverP.region(iSide+3).plot(hEoverP); + plotter_clEoverP.region(iSide+6).plot(hEoverPsel); + plotter_clEoverP.region(iSide).style().setParameter("hist2DStyle", "colorMap"); + plotter_clEoverP.region(iSide).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_clEoverP.region(iSide+3).style().setParameter("hist2DStyle", "colorMap"); + plotter_clEoverP.region(iSide+3).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + plotter_clEoverP.region(iSide+6).style().setParameter("hist2DStyle", "colorMap"); + plotter_clEoverP.region(iSide+6).style().dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_clEoverP.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_clEoverP.region(iSide)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_clEoverP.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_clEoverP.region(iSide+3)).getPlot().setAllowPopupMenus(true); + ((PlotterRegion) plotter_clEoverP.region(iSide+6)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_clEoverP.region(iSide+6)).getPlot().setAllowPopupMenus(true); + + + + + IPlotterStyle style = plotter_ecal_e.region(iSide).style(); + //style.setParameter("hist2DStyle", "colorMap"); + //style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_e.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_e.region(iSide)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_hitmap.region(iSide).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_hitmap.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_hitmap.region(iSide)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_pos.region(iSide).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_pos.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_pos.region(iSide)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_cls.region(iSide).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_cls.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_cls.region(iSide)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_clsx.region(iSide).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_clsx.region(iSide)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_clsx.region(iSide)).getPlot().setAllowPopupMenus(true); + + + + style = plotter_ecal_e.region(iSide+3).style(); + //style.setParameter("hist2DStyle", "colorMap"); + //style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_e.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_e.region(iSide+3)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_hitmap.region(iSide+3).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_hitmap.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_hitmap.region(iSide+3)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_pos.region(iSide+3).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_pos.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_pos.region(iSide+3)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_cls.region(iSide+3).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_cls.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_cls.region(iSide+3)).getPlot().setAllowPopupMenus(true); + + style = plotter_ecal_clsx.region(iSide+3).style(); + style.setParameter("hist2DStyle", "colorMap"); + style.dataStyle().fillStyle().setParameter("colorMapScheme", "rainbow"); + ((PlotterRegion) plotter_ecal_clsx.region(iSide+3)).getPlot().setAllowUserInteraction(true); + ((PlotterRegion) plotter_ecal_clsx.region(iSide+3)).getPlot().setAllowPopupMenus(true); + + + } + + + + plotterFrame.pack(); + plotterFrame.setVisible(true); + + + + + + + + + } + + public MultScatAnalysis() { + + trkMatchTool = new EcalTrackMatch(debug); + + } + + + + + public void setDebug(boolean flag) { + this.debug = flag; + } + + public void setOutputPlotFileName( String name ) { + this.outputPlotFileName = name; + } + + public void setEcalClusterSel(int id) { + this.ecalClusterSel = id;[truncated at 1000 lines; 936 more skipped]
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1