Commit in hps-java/src/main/java/org/lcsim/hps/users/phansson on MAIN
MultScatAnalysis.java+169-21.2 -> 1.3
Added track extrapolation plots

hps-java/src/main/java/org/lcsim/hps/users/phansson
MultScatAnalysis.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- MultScatAnalysis.java	11 Jun 2012 00:03:35 -0000	1.2
+++ MultScatAnalysis.java	11 Jun 2012 23:00:48 -0000	1.3
@@ -56,7 +56,7 @@
     private static int crystalCols;
     private static int crystalRows;
     int ecalClusterSel;
-    boolean hide = true;
+    boolean hide = false;
 
     private String outputPlotFileName = "test.aida";
     private String trackCollectionName = "MatchedTracks";
@@ -291,9 +291,74 @@
         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_ext_entr = af.createPlotterFactory().create();
+        plotter_track_ext_entr.createRegions(2,3,0);
+        plotter_track_ext_entr.setTitle("Track @ 0cm"); 
+        plotterFrame.addPlotter(plotter_track_ext_entr);
+        IHistogram hTrkXAtEntr_t = aida.histogram1D("Top track X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntr_t = aida.histogram1D("Top track Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntr_b = aida.histogram1D("Bottom track X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntr_b = aida.histogram1D("Bottom track Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntr_a = aida.histogram1D("Track X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntr_a = aida.histogram1D("Track Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext_entr.region(0).plot(hTrkXAtEntr_t);
+        plotter_track_ext_entr.region(1).plot(hTrkXAtEntr_b);
+        plotter_track_ext_entr.region(2).plot(hTrkXAtEntr_a);
+        plotter_track_ext_entr.region(3).plot(hTrkYAtEntr_t);
+        plotter_track_ext_entr.region(4).plot(hTrkYAtEntr_b);
+        plotter_track_ext_entr.region(5).plot(hTrkYAtEntr_a);
+        
+        
+        IHistogram hTrkHMXAtEntr_t = aida.histogram1D("Top track Pz>1GeV X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntr_t = aida.histogram1D("Top track Pz>1GeV Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntr_b = aida.histogram1D("Bottom track Pz>1GeV X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntr_b = aida.histogram1D("Bottom track Pz>1GeV Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntr_a = aida.histogram1D("Track Pz>1GeV X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntr_a = aida.histogram1D("Track Pz>1GeV Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext_entr.region(0).plot(hTrkHMXAtEntr_t,"mode=overlay");
+        plotter_track_ext_entr.region(1).plot(hTrkHMXAtEntr_b,"mode=overlay");
+        plotter_track_ext_entr.region(2).plot(hTrkHMXAtEntr_a,"mode=overlay");
+        plotter_track_ext_entr.region(3).plot(hTrkHMYAtEntr_t,"mode=overlay");
+        plotter_track_ext_entr.region(4).plot(hTrkHMYAtEntr_b,"mode=overlay");
+        plotter_track_ext_entr.region(5).plot(hTrkHMYAtEntr_a,"mode=overlay");
+        
+
+        IPlotter plotter_track_ext_coll = af.createPlotterFactory().create();
+        plotter_track_ext_coll.createRegions(2,3,0);
+        plotter_track_ext_coll.setTitle("Track @ -150cm"); 
+        plotterFrame.addPlotter(plotter_track_ext_coll);
+        IHistogram hTrkXAtColl_t = aida.histogram1D("Top track X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkYAtColl_t = aida.histogram1D("Top track Y @ -150cm" , 50, -40, 40);
+        IHistogram hTrkXAtColl_b = aida.histogram1D("Bottom track X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkYAtColl_b = aida.histogram1D("Bottom track Y @ -150cm" , 50, -40, 40);
+        IHistogram hTrkXAtColl_a = aida.histogram1D("Track X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkYAtColl_a = aida.histogram1D("Track Y @ -150cm" , 50, -40, 40);
+        plotter_track_ext_coll.region(0).plot(hTrkXAtColl_t);
+        plotter_track_ext_coll.region(1).plot(hTrkXAtColl_b);
+        plotter_track_ext_coll.region(2).plot(hTrkXAtColl_a);
+        plotter_track_ext_coll.region(3).plot(hTrkYAtColl_t);
+        plotter_track_ext_coll.region(4).plot(hTrkYAtColl_b);
+        plotter_track_ext_coll.region(5).plot(hTrkYAtColl_a);
+        
+        
+        IHistogram hTrkHMXAtColl_t = aida.histogram1D("Top track Pz>1GeV X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtColl_t = aida.histogram1D("Top track Pz>1GeV Y @ -150cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtColl_b = aida.histogram1D("Bottom track Pz>1GeV X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtColl_b = aida.histogram1D("Bottom track Pz>1GeV Y @ -150cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtColl_a = aida.histogram1D("Track Pz>1GeV X @ -150cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtColl_a = aida.histogram1D("Track Pz>1GeV Y @ -150cm" , 50, -40, 40);
+        plotter_track_ext_coll.region(0).plot(hTrkHMXAtColl_t,"mode=overlay");
+        plotter_track_ext_coll.region(1).plot(hTrkHMXAtColl_b,"mode=overlay");
+        plotter_track_ext_coll.region(2).plot(hTrkHMXAtColl_a,"mode=overlay");
+        plotter_track_ext_coll.region(3).plot(hTrkHMYAtColl_t,"mode=overlay");
+        plotter_track_ext_coll.region(4).plot(hTrkHMYAtColl_b,"mode=overlay");
+        plotter_track_ext_coll.region(5).plot(hTrkHMYAtColl_a,"mode=overlay");
 
         
         
+        
+        
         IPlotter plotter_track_ext2 = af.createPlotterFactory().create();
         plotter_track_ext2.createRegions(2,3,0);
         plotter_track_ext2.setTitle("Matched track @ Target ");
@@ -353,6 +418,7 @@
         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);
@@ -368,6 +434,38 @@
         
       
         
+        IPlotter plotter_track_ext4_entr = af.createPlotterFactory().create();
+        plotter_track_ext4_entr.createRegions(2,3,0);
+        plotter_track_ext4_entr.setTitle("Track @ 0cm Pos. Charge");
+        plotterFrame.addPlotter(plotter_track_ext4_entr);
+        IHistogram hTrkXAtEntrqp_t = aida.histogram1D("Top track q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqp_t = aida.histogram1D("Top track q>0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntrqp_b = aida.histogram1D("Bottom track q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqp_b = aida.histogram1D("Bottom track q>0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntrqp_a = aida.histogram1D("Track q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqp_a = aida.histogram1D("Track q>0 Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext4_entr.region(0).plot(hTrkXAtEntrqp_t);
+        plotter_track_ext4_entr.region(1).plot(hTrkXAtEntrqp_b);
+        plotter_track_ext4_entr.region(2).plot(hTrkXAtEntrqp_a);
+        plotter_track_ext4_entr.region(3).plot(hTrkYAtEntrqp_t);
+        plotter_track_ext4_entr.region(4).plot(hTrkYAtEntrqp_b);
+        plotter_track_ext4_entr.region(5).plot(hTrkYAtEntrqp_a);
+        
+        
+        IHistogram hTrkHMXAtEntrqp_t = aida.histogram1D("Top track Pz>1GeV q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqp_t = aida.histogram1D("Top track Pz>1GeV q>0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntrqp_b = aida.histogram1D("Bottom track Pz>1GeV q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqp_b = aida.histogram1D("Bottom track Pz>1GeV q>0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntrqp_a = aida.histogram1D("Track Pz>1GeV q>0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqp_a = aida.histogram1D("Track Pz>1GeV q>0 Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext4_entr.region(0).plot(hTrkHMXAtEntrqp_t,"mode=overlay");
+        plotter_track_ext4_entr.region(1).plot(hTrkHMXAtEntrqp_b,"mode=overlay");
+        plotter_track_ext4_entr.region(2).plot(hTrkHMXAtEntrqp_a,"mode=overlay");
+        plotter_track_ext4_entr.region(3).plot(hTrkHMYAtEntrqp_t,"mode=overlay");
+        plotter_track_ext4_entr.region(4).plot(hTrkHMYAtEntrqp_b,"mode=overlay");
+        plotter_track_ext4_entr.region(5).plot(hTrkHMYAtEntrqp_a,"mode=overlay"); 
+        
+        
         
         IPlotter plotter_track_ext5 = af.createPlotterFactory().create();
         plotter_track_ext5.createRegions(2,3,0);
@@ -399,6 +497,43 @@
         plotter_track_ext5.region(4).plot(hTrkHMYAtConvqm_b,"mode=overlay");
         plotter_track_ext5.region(5).plot(hTrkHMYAtConvqm_a,"mode=overlay");
         
+        
+        IPlotter plotter_track_ext5_entr = af.createPlotterFactory().create();
+        plotter_track_ext5_entr.createRegions(2,3,0);
+        plotter_track_ext5_entr.setTitle("Track @ 0cm Neg. Charge");
+        plotterFrame.addPlotter(plotter_track_ext5_entr);
+        IHistogram hTrkXAtEntrqm_t = aida.histogram1D("Top track q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqm_t = aida.histogram1D("Top track q<0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntrqm_b = aida.histogram1D("Bottom track q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqm_b = aida.histogram1D("Bottom track q<0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkXAtEntrqm_a = aida.histogram1D("Track q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkYAtEntrqm_a = aida.histogram1D("Track q<0 Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext5_entr.region(0).plot(hTrkXAtEntrqm_t);
+        plotter_track_ext5_entr.region(1).plot(hTrkXAtEntrqm_b);
+        plotter_track_ext5_entr.region(2).plot(hTrkXAtEntrqm_a);
+        plotter_track_ext5_entr.region(3).plot(hTrkYAtEntrqm_t);
+        plotter_track_ext5_entr.region(4).plot(hTrkYAtEntrqm_b);
+        plotter_track_ext5_entr.region(5).plot(hTrkYAtEntrqm_a);
+        
+
+        
+                
+        IHistogram hTrkHMXAtEntrqm_t = aida.histogram1D("Top track Pz>1GeV q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqm_t = aida.histogram1D("Top track Pz>1GeV q<0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntrqm_b = aida.histogram1D("Bottom track Pz>1GeV q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqm_b = aida.histogram1D("Bottom track Pz>1GeV q<0 Y @ 0cm" , 50, -40, 40);
+        IHistogram hTrkHMXAtEntrqm_a = aida.histogram1D("Track Pz>1GeV q<0 X @ 0cm" , 50, -100, 100);
+        IHistogram hTrkHMYAtEntrqm_a = aida.histogram1D("Track Pz>1GeV q<0 Y @ 0cm" , 50, -40, 40);
+        plotter_track_ext5_entr.region(0).plot(hTrkHMXAtEntrqm_t,"mode=overlay");
+        plotter_track_ext5_entr.region(1).plot(hTrkHMXAtEntrqm_b,"mode=overlay");
+        plotter_track_ext5_entr.region(2).plot(hTrkHMXAtEntrqm_a,"mode=overlay");
+        plotter_track_ext5_entr.region(3).plot(hTrkHMYAtEntrqm_t,"mode=overlay");
+        plotter_track_ext5_entr.region(4).plot(hTrkHMYAtEntrqm_b,"mode=overlay");
+        plotter_track_ext5_entr.region(5).plot(hTrkHMYAtEntrqm_a,"mode=overlay");
+
+        
+        
+        
            
             
         IPlotter plotter_track_ext6 = af.createPlotterFactory().create();
@@ -1153,35 +1288,67 @@
                         
                 aida.histogram1D("Track " + str + "X @ -67cm").fill(posAtTarget.y());
                 aida.histogram1D("Track " + str + "Y @ -67cm").fill(posAtTarget.z());
-
+                Hep3Vector extPosEntr = ext.extrapolateTrack(-0.0001);
+                aida.histogram1D("Track " + str + "X @ 0cm").fill(extPosEntr.y());
+                aida.histogram1D("Track " + str + "Y @ 0cm").fill(extPosEntr.z());
+                Hep3Vector extPosColl = ext.extrapolateTrack(-1500.0);
+                aida.histogram1D("Track " + str + "X @ -150cm").fill(extPosColl.y());
+                aida.histogram1D("Track " + str + "Y @ -150cm").fill(extPosColl.z());
+//              
+//                double[] extTrkPoints = {-150.0,-67.0,ExtendTrack.DIPOLE_EDGE,ExtendTrack.ECAL_FACE};
+//                for(int iext=0;iext<5;++iext) {
+//                    Hep3Vector extPosEntr = ext.extrapolateTrack(extTrkPoints[iext]);
+//                    aida.cloud2D("Track ext " + str + "X @ " + ((int)extTrkPoints[iext])).fill(extPosEntr.x(),extPosEntr.y());
+//                }
+//               
                 if(trk.getCharge()>0) {
                     aida.histogram1D("Track " + str + "q>0 X @ -67cm").fill(posAtTarget.y());
                     aida.histogram1D("Track " + str + "q>0 Y @ -67cm").fill(posAtTarget.z());
+                    aida.histogram1D("Track " + str + "q>0 X @ 0cm").fill(extPosEntr.y());
+                    aida.histogram1D("Track " + str + "q>0 Y @ 0cm").fill(extPosEntr.z());
                 } else {
                     aida.histogram1D("Track " + str + "q<0 X @ -67cm").fill(posAtTarget.y());
                     aida.histogram1D("Track " + str + "q<0 Y @ -67cm").fill(posAtTarget.z());
+                    aida.histogram1D("Track " + str + "q<0 X @ 0cm").fill(extPosEntr.y());
+                    aida.histogram1D("Track " + str + "q<0 Y @ 0cm").fill(extPosEntr.z());
                 }
 
                 if(side==0) {
                     aida.histogram1D("Top track " + str + "X @ -67cm").fill(posAtTarget.y());
                     aida.histogram1D("Top track " + str + "Y @ -67cm").fill(posAtTarget.z());
+                    aida.histogram1D("Top track " + str + "X @ 0cm").fill(extPosEntr.y());
+                    aida.histogram1D("Top track " + str + "Y @ 0cm").fill(extPosEntr.z());
+                    aida.histogram1D("Top track " + str + "X @ -150cm").fill(extPosColl.y());
+                    aida.histogram1D("Top track " + str + "Y @ -150cm").fill(extPosColl.z());
                     if(trk.getCharge()>0) {
                         aida.histogram1D("Top track " + str + "q>0 X @ -67cm").fill(posAtTarget.y());
                         aida.histogram1D("Top track " + str + "q>0 Y @ -67cm").fill(posAtTarget.z());
+                        aida.histogram1D("Top track " + str + "q>0 X @ 0cm").fill(extPosEntr.y());
+                        aida.histogram1D("Top track " + str + "q>0 Y @ 0cm").fill(extPosEntr.z());
                     } else {
                         aida.histogram1D("Top track " + str + "q<0 X @ -67cm").fill(posAtTarget.y());
                         aida.histogram1D("Top track " + str + "q<0 Y @ -67cm").fill(posAtTarget.z());
+                        aida.histogram1D("Top track " + str + "q<0 X @ 0cm").fill(extPosEntr.y());
+                        aida.histogram1D("Top track " + str + "q<0 Y @ 0cm").fill(extPosEntr.z());
 
                     }
                 } else {
                     aida.histogram1D("Bottom track " + str + "X @ -67cm").fill(posAtTarget.y());
                     aida.histogram1D("Bottom track " + str + "Y @ -67cm").fill(posAtTarget.z());
+                    aida.histogram1D("Bottom track " + str + "X @ 0cm").fill(extPosEntr.y());
+                    aida.histogram1D("Bottom track " + str + "Y @ 0cm").fill(extPosEntr.z());
+                    aida.histogram1D("Bottom track " + str + "X @ -150cm").fill(extPosColl.y());
+                    aida.histogram1D("Bottom track " + str + "Y @ -150cm").fill(extPosColl.z());
                     if(trk.getCharge()>0) {
                         aida.histogram1D("Bottom track " + str + "q>0 X @ -67cm").fill(posAtTarget.y());
                         aida.histogram1D("Bottom track " + str + "q>0 Y @ -67cm").fill(posAtTarget.z());
+                        aida.histogram1D("Bottom track " + str + "q>0 X @ 0cm").fill(extPosEntr.y());
+                        aida.histogram1D("Bottom track " + str + "q>0 Y @ 0cm").fill(extPosEntr.z());
                     } else {
                         aida.histogram1D("Bottom track " + str + "q<0 X @ -67cm").fill(posAtTarget.y());
                         aida.histogram1D("Bottom track " + str + "q<0 Y @ -67cm").fill(posAtTarget.z());
+                        aida.histogram1D("Bottom track " + str + "q<0 X @ 0cm").fill(extPosEntr.y());
+                        aida.histogram1D("Bottom track " + str + "q<0 Y @ 0cm").fill(extPosEntr.z());
 
                     }
                 }
CVSspam 0.2.12


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