Print

Print


Commit in lcsim-contrib/src/main/java/org/lcsim/contrib/sATLAS/UTOPIA7 on MAIN
sATLASOccupancy.java+46added 1.1
TrackAnalysisDriver.java+118-1171.3 -> 1.4
OccupancyDriver.java+45-91.2 -> 1.3
+209-126
1 added + 2 modified, total 3 files
add a driver to just run the occupancy...add some plots to the analysis drivers

lcsim-contrib/src/main/java/org/lcsim/contrib/sATLAS/UTOPIA7
sATLASOccupancy.java added at 1.1
diff -N sATLASOccupancy.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sATLASOccupancy.java	27 Aug 2009 00:59:09 -0000	1.1
@@ -0,0 +1,46 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package org.lcsim.contrib.sATLAS.UTOPIA7;
+
+import org.lcsim.fit.helicaltrack.HelicalTrackHitDriver;
+import org.lcsim.fit.helicaltrack.HelicalTrackHitDriver.HitType;
+import org.lcsim.util.Driver;
+
+/**
+ *
+ * @author mgraham
+ */
+public class sATLASOccupancy extends Driver {
+
+
+    public String oPlotsFile = "myOccupancyPlots.aida";
+    OccupancyDriver occ;
+
+    public sATLASOccupancy() {
+        
+        add(new MakeSensorsDriver());
+        //  Digitization and hit making driver for planar sensors
+        TrackerHitDriver_sATLAS thd = new TrackerHitDriver_sATLAS();
+        add(thd);
+
+        //  Driver to make HelicalTrackHits for tracking
+        HelicalTrackHitDriver hitdriver = new HelicalTrackHitDriver();
+        hitdriver.addCollection(((TrackerHitDriver_sATLAS) thd).getStripHits1DName(), HitType.Digitized);
+        hitdriver.addCollection(((TrackerHitDriver_sATLAS) thd).getPixelHitsName(), HitType.Digitized);
+        hitdriver.OutputCollection("HelicalTrackHits");
+        add(hitdriver);
+
+        occ = new OccupancyDriver();
+        add(occ);
+    }
+
+
+    public void setOPlotsFile(String oPlotsFile) {
+        System.out.println("Will output plots to " + oPlotsFile);
+        occ.setOutputPlots(oPlotsFile);
+    }
+
+}

lcsim-contrib/src/main/java/org/lcsim/contrib/sATLAS/UTOPIA7
TrackAnalysisDriver.java 1.3 -> 1.4
diff -u -r1.3 -r1.4
--- TrackAnalysisDriver.java	20 Aug 2009 17:47:58 -0000	1.3
+++ TrackAnalysisDriver.java	27 Aug 2009 00:59:09 -0000	1.4
@@ -7,7 +7,6 @@
 import java.io.IOException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-//import org.lcsim.contrib.mgraham.sATLASDigi.*;
 import hep.physics.matrix.SymmetricMatrix;
 import hep.physics.vec.BasicHep3Vector;
 import hep.physics.vec.Hep3Vector;
@@ -55,15 +54,15 @@
     private IProfile1D d0eff1;
     private IProfile1D z0eff1;
     private IProfile1D z0eff2;
-    private IProfile1D pTeff1Findable;
-    private IProfile1D pTeff2Findable;
-    private IProfile1D thetaeffFindable;
-    private IProfile1D ctheffFindable;
-    private IProfile1D etaeffFindable;
-    private IProfile1D d0eff1Findable;
-    private IProfile1D d0eff2Findable;
-    private IProfile1D z0eff1Findable;
-    private IProfile1D z0eff2Findable;
+    private IProfile1D pTeff1Muons;
+    private IProfile1D pTeff2Muons;
+    private IProfile1D thetaeffMuons;
+    private IProfile1D ctheffMuons;
+    private IProfile1D etaeffMuons;
+    private IProfile1D d0eff1Muons;
+    private IProfile1D d0eff2Muons;
+    private IProfile1D z0eff1Muons;
+    private IProfile1D z0eff2Muons;
     private IHistogram1D fakes;
     private IHistogram1D nfakes;
     private IProfile1D etafake;
@@ -77,14 +76,26 @@
     int nevt = 0;
     int _nmcTrk = 0;
     double _nrecTrk = 0;
-
-
+    int _nmcTrkBarrel = 0;
+    double _nrecTrkBarrel = 0;
+    int _nmcTrkBarrPixECStrips = 0;
+    double _nrecTrkBarrPixECStrips = 0;
+    int _nmcTrkECPix = 0;
+    double _nrecTrkECPix = 0;
+    int _nmcTrkMu = 0;
+    double _nrecTrkMu = 0;
+    int _nmcTrkBarrelMu = 0;
+    double _nrecTrkBarrelMu = 0;
+    int _nmcTrkBarrPixECStripsMu = 0;
+    double _nrecTrkBarrPixECStripsMu = 0;
+    int _nmcTrkECPixMu = 0;
+    double _nrecTrkECPixMu = 0;
     double ptTrkCut = 1.0; //GeV
     double d0TrkCut = 2.0; //mm
     double z0TrkCut = 200.0; //mm
     double etaTrkCut = 2.5;
     double etaBarrel = 0.97;
-    double etaBarrPixECStrips=1.5;
+    double etaBarrPixECStrips = 1.5;
 
     public TrackAnalysisDriver() {
 
@@ -100,15 +111,15 @@
         z0eff1 = hf.createProfile1D("Efficiency vs z0", "", 50, -50., 50.);
         z0eff2 = hf.createProfile1D("Efficiency vs z0 full", "", 50, -200., 200.);
 
-        pTeff1Findable = hf.createProfile1D("Findable Efficiency vs pT", "", 100, 0., 5.);
-        pTeff2Findable = hf.createProfile1D("Findable Efficiency vs pT full", "", 100, 0., 50.);
-        thetaeffFindable = hf.createProfile1D("Findable Efficiency vs theta", "", 72, 0., 180.);
-        ctheffFindable = hf.createProfile1D("Findable Efficiency vs cos(theta)", "", 50, -1., 1.);
-        etaeffFindable = hf.createProfile1D("Findable Efficiency vs eta", "", 50, -2.5, 2.5);
-        d0eff1Findable = hf.createProfile1D("Findable Efficiency vs d0", "", 50, -0.5, 0.5);
-        d0eff2Findable = hf.createProfile1D("Findable Efficiency vs d0 full", "", 50, -5., 5.);
-        z0eff1Findable = hf.createProfile1D("Findable Efficiency vs z0", "", 50, -50., 50.);
-        z0eff2Findable = hf.createProfile1D("Findable Efficiency vs z0 full", "", 50, -200., 200.);
+        pTeff1Muons = hf.createProfile1D("Muons Efficiency vs pT", "", 100, 0., 5.);
+        pTeff2Muons = hf.createProfile1D("Muons Efficiency vs pT full", "", 100, 0., 50.);
+        thetaeffMuons = hf.createProfile1D("Muons Efficiency vs theta", "", 72, 0., 180.);
+        ctheffMuons = hf.createProfile1D("Muons Efficiency vs cos(theta)", "", 50, -1., 1.);
+        etaeffMuons = hf.createProfile1D("Muons Efficiency vs eta", "", 50, -2.5, 2.5);
+        d0eff1Muons = hf.createProfile1D("Muons Efficiency vs d0", "", 50, -0.5, 0.5);
+        d0eff2Muons = hf.createProfile1D("Muons Efficiency vs d0 full", "", 50, -5., 5.);
+        z0eff1Muons = hf.createProfile1D("Muons Efficiency vs z0", "", 50, -50., 50.);
+        z0eff2Muons = hf.createProfile1D("Muons Efficiency vs z0 full", "", 50, -200., 200.);
 
         fakes = hf.createHistogram1D("Number of mis-matched hits (unnormalized)", "", 10, 0., 10.);
         nfakes = hf.createHistogram1D("Number of mis-matched hits (normalized)", "", 10, 0., 10.);
@@ -191,7 +202,7 @@
         //  Create a map between tracks and the associated MCParticle
         List<Track> tracklist = event.getTracks();
         RelationalTable trktomc = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
-
+        aida.cloud1D("number of reconstructed tracks Event").fill(tracklist.size());
         //  Analyze the tracks in the event
         for (Track track : tracklist) {
 
@@ -266,7 +277,9 @@
                 //  Calculate the helix parameters for this MC particle and pulls in pT, d0
                 HelixParamCalculator helix = new HelixParamCalculator(mcp, bfield);
                 double d0tk = track.getTrackParameter(HelicalTrackFit.dcaIndex);
+                double z0tk = track.getTrackParameter(HelicalTrackFit.z0Index);
                 double d0mc = helix.getDCA();
+                double z0mc = helix.getZ0();
                 double d0err = Math.sqrt(track.getErrorMatrix().diagonal(HelicalTrackFit.dcaIndex));
                 double curv = track.getTrackParameter(HelicalTrackFit.curvatureIndex);
                 double curverr = Math.sqrt(track.getErrorMatrix().diagonal(HelicalTrackFit.curvatureIndex));
@@ -275,6 +288,7 @@
                 double ptpull = (pttk - ptmc) / pterr;
                 double ptresid = (pttk - ptmc);
                 double d0resid = (d0tk - d0mc);
+                double z0resid = (z0tk - z0mc);
                 //  Plot the pt and d0 pulls for various purity intervals
                 if (nbad == 0) {
                     aida.histogram2D(resDir + "pT MC vs pT Reco for 0 Bad Hits",
@@ -285,7 +299,8 @@
                     aida.cloud1D(resDir + "d0 pull for 0 Bad Hits").fill(d0pull);
                     aida.cloud1D(resDir + "pT Residual for 0 Bad Hits").fill(ptresid);
                     aida.cloud1D(resDir + "d0 Residual for 0 Bad Hits").fill(d0resid);
-                    aida.cloud1D(resDir + "1/pT  for 0 Bad Hits").fill(1 / pttk);
+                    aida.cloud1D(resDir + "z0 Residual for 0 Bad Hits").fill(z0resid);
+                    aida.cloud1D(resDir + "pT^-1  for 0 Bad Hits").fill(1 / pttk);
 
                 } else if (purity > 0.5) {
                     aida.histogram2D(resDir + "pT MC vs pT Reco for 0.5 < purity < 1",
@@ -296,7 +311,8 @@
                     aida.cloud1D(resDir + "d0 pull for 0.5 < purity < 1").fill(d0pull);
                     aida.cloud1D(resDir + "pT Residual for 0.5 < purity < 1").fill(ptresid);
                     aida.cloud1D(resDir + "d0 Residual for 0.5 < purity < 1").fill(d0resid);
-                    aida.cloud1D(resDir + "1/pT  for 0.5 < purity < 1").fill(1 / pttk);
+                    aida.cloud1D(resDir + "z0 Residual for 0.5 < purity < 1").fill(z0resid);
+                    aida.cloud1D(resDir + "pT^-1  for 0.5 < purity < 1").fill(1 / pttk);
                 } else if (purity < 0.5) {
                     aida.histogram2D(resDir + "pT MC vs pT Reco for purity <= 0.5",
                             100, 0., 5., 100, 0., 5.).fill(ptmc, pttk);
@@ -306,7 +322,20 @@
                     aida.cloud1D(resDir + "d0 pull for purity <= 0.5").fill(d0pull);
                     aida.cloud1D(resDir + "pT Residual for purity <= 0.5").fill(ptresid);
                     aida.cloud1D(resDir + "d0 Residial for purity <= 0.5").fill(d0resid);
-                    aida.cloud1D(resDir + "1/pT  for purity <= 0.5").fill(1 / pttk);
+                    aida.cloud1D(resDir + "z0 Residial for purity <= 0.5").fill(z0resid);
+                    aida.cloud1D(resDir + "pT^-1  for purity <= 0.5").fill(1 / pttk);
+                }
+                if ((mcp.getPDGID() == 13 || mcp.getPDGID() == -13) && (mcp.getGeneratorStatus() == mcp.FINAL_STATE) && pt > 10) {
+                    aida.cloud1D("Hits for all muons").fill(nhits);
+                    aida.cloud1D("pT for all muons").fill(pt);
+                    aida.cloud1D("cos(theta) for all muons").fill(cth);
+                    aida.cloud1D("d0 for all muons").fill(d0);
+                    aida.cloud1D("z0 for all muons").fill(z0);
+                    aida.cloud1D("eta for all muons").fill(eta);
+                    aida.cloud1D("purity for all muons").fill(purity);
+                    aida.cloud1D("pT Residual for all muons").fill(ptresid);
+                    aida.cloud1D("d0 Residual for all muons").fill(d0resid);
+                    aida.cloud1D("z0 Residual for all muons").fill(z0resid);
                 }
             }
         }
@@ -325,6 +354,7 @@
 
         //  Now loop over all MC Particles
         List<MCParticle> mclist = event.getMCParticles();
+        int _nchMCP = 0;
         for (MCParticle mcp : mclist) {
 
             //  Calculate the pT and polar angle of the MC particle
@@ -348,6 +378,7 @@
             //  Check cases where we have multiple tracks associated with this MC particle
             Set<Track> trklist = trktomc.allTo(mcp);
             int ntrk = trklist.size();
+
 //            if (ntrk > 1) {
             //  Count tracks where the assigned MC particle has more than 1 hit
 //                int nmulthits = 0;
@@ -415,12 +446,14 @@
 //        make the true efficiency plots
 
 //            System.out.println("Final Stat Part? "+mcp.FINAL_STATE+"; pt = "+pt+"; d0 = "+d0);
-            if (pt > ptTrkCut && mcp.getGeneratorStatus() == mcp.FINAL_STATE && Math.abs(d0) < d0TrkCut && Math.abs(eta) < etaTrkCut && Math.abs(z0) < z0TrkCut) {
+            if (pt > ptTrkCut && mcp.getGeneratorStatus() == mcp.FINAL_STATE && Math.abs(d0) < d0TrkCut && Math.abs(eta) < etaTrkCut && Math.abs(z0) < z0TrkCut && mcp.getCharge() != 0) {
+                _nchMCP++;
                 double wgt = 0.0;
                 if (ntrk > 0) {
                     wgt = 1.0;
-//                    System.out.println("found track!");a
+//                
                     System.out.println("Found this track! eta = " + eta + "; pT = " + pt + "; z0 = " + z0 + "; d0 = " + d0);
+
                 } else {
                     System.out.println("Missed this track! eta = " + eta + "; pT = " + pt + "; z0 = " + z0 + "; d0 = " + d0);
                 }
@@ -437,9 +470,57 @@
                     _nmcTrk++;
                     _nrecTrk += wgt;
                 }
+                if (eta < etaBarrel) {
+                    _nmcTrkBarrel++;
+                    _nrecTrkBarrel += wgt;
+                }
+                if (eta < etaBarrPixECStrips && eta > etaBarrel) {
+                    _nmcTrkBarrPixECStrips++;
+                    _nrecTrkBarrPixECStrips += wgt;
+                }
+                if (eta > etaBarrPixECStrips && eta < etaTrkCut) {
+                    _nmcTrkECPix++;
+                    _nrecTrkECPix += wgt;
+                }
+            }
+            //  pick out the muons
+            if ((mcp.getPDGID() == 13 || mcp.getPDGID() == -13) && (mcp.getGeneratorStatus() == mcp.FINAL_STATE) && pt > 10&& Math.abs(eta) < etaTrkCut) {
+                double wgt = 0.0;
+                if (ntrk > 0) {
+                    wgt = 1.0;
+                    System.out.println("Found this MUON! eta = " + eta + "; pT = " + pt + "; z0 = " + z0 + "; d0 = " + d0);
+                } else {
+                    System.out.println("Missed this MUON! eta = " + eta + "; pT = " + pt + "; z0 = " + z0 + "; d0 = " + d0);
+                }
+                pTeff1Muons.fill(pt, wgt);
+                pTeff2Muons.fill(pt, wgt);
+                ctheffMuons.fill(cth, wgt);
+                thetaeffMuons.fill(theta, wgt);
+                etaeffMuons.fill(eta, wgt);
+                d0eff1Muons.fill(d0, wgt);
+                z0eff1Muons.fill(z0, wgt);
+                z0eff2Muons.fill(z0, wgt);
+                if (eta < etaTrkCut) {
+                    _nmcTrkMu++;
+                    _nrecTrkMu += wgt;
+                }
+                if (eta < etaBarrel) {
+                    _nmcTrkBarrelMu++;
+                    _nrecTrkBarrelMu += wgt;
+                }
+                if (eta < etaBarrPixECStrips && eta > etaBarrel) {
+                    _nmcTrkBarrPixECStripsMu++;
+                    _nrecTrkBarrPixECStripsMu += wgt;
+                }
+                if (eta > etaBarrPixECStrips && eta < etaTrkCut) {
+                    _nmcTrkECPixMu++;
+                    _nrecTrkECPixMu += wgt;
+                }
+
             }
 
 
+
             if (mcp.getGeneratorStatus() == mcp.FINAL_STATE) {
                 aida.cloud1D("findable/eta for final state particles").fill(eta);
             }
@@ -469,97 +550,10 @@
             aida.cloud1D("findable/d0 for base MC selection").fill(d0);
             aida.cloud1D("findable/z0 for base MC selection").fill(z0);
             aida.cloud2D("findable/Hits vs eta for base MC selection").fill(eta, nhits);
-        /*
-        //  Make plots for findable tracks
-        if (findable.isFindable(mcp, slist)) {
-        aida.cloud1D("findable/Hits for findable tracks").fill(nhits);
-        aida.cloud1D("findable/pT for findable tracks").fill(pt);
-        aida.cloud1D("findable/cos(theta) for findable tracks").fill(cth);
-        aida.cloud1D("findable/eta for findable tracks").fill(eta);
-        aida.cloud1D("findable/d0 for findable tracks").fill(d0);
-        aida.cloud1D("findable/z0 for findable tracks").fill(z0);
-        aida.cloud2D("findable/Hits vs eta for findable tracks").fill(eta, nhits);
-        continue;
-        }
-
-        //  Create the running list of conditions to ignore
-        List<Ignore> ignores = new ArrayList<Ignore>();
-
-        //  select mc particles that fail on the z0 cut
-
-        ignores.add(Ignore.NoZ0Cut);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for z0 check failures").fill(nhits);
-        aida.cloud1D("findable/pT for z0 check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for z0 check failures").fill(cth);
-        aida.cloud1D("findable/eta for z0 check failures").fill(eta);
-        aida.cloud1D("findable/d0 for z0 check failures").fill(d0);
-        aida.cloud1D("findable/z0 for z0 check failures").fill(z0);
-        continue;
-        }
 
-        //  Select mc particles that fail on the d0 cut
-        ignores.add(Ignore.NoDCACut);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for d0 check failures").fill(nhits);
-        aida.cloud1D("findable/pT for d0 check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for d0 check failures").fill(cth);
-        aida.cloud1D("findable/eta for d0 check failures").fill(eta);
-        aida.cloud1D("findable/d0 for d0 check failures").fill(d0);
-        aida.cloud1D("findable/z0 for d0 check failures").fill(z0);
-        continue;
-        }
-
-        //  select mc particles that fail the confirm check
-        ignores.add(Ignore.NoConfirmCheck);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for confirm check failures").fill(nhits);
-        aida.cloud1D("findable/pT for confir check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for confirm check failures").fill(cth);
-        aida.cloud1D("findable/eta for confirm check failures").fill(eta);
-        aida.cloud1D("findable/d0 for seed confirm failures").fill(d0);
-        aida.cloud1D("findable/z0 for seed confirm failures").fill(z0);
-        continue;
-        }
-
-        //  select mc particles that fail on the seed check
-        ignores.add(Ignore.NoSeedCheck);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for seed check failures").fill(nhits);
-        aida.cloud1D("findable/pT for seed check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for seed check failures").fill(cth);
-        aida.cloud1D("findable/eta for seed check failures").fill(eta);
-        aida.cloud1D("findable/d0 for seed check failures").fill(d0);
-        aida.cloud1D("findable/z0 for seed check failures").fill(z0);
-        continue;
-        }
-
-        //  Select mc particles that fail the number of hit cut
-        ignores.add(Ignore.NoMinHitCut);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for nhit check failures").fill(nhits);
-        aida.cloud1D("findable/pT for nhit check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for nhit check failures").fill(cth);
-        aida.cloud1D("findable/eta for nhit check failures").fill(eta);
-        aida.cloud1D("findable/d0 for nhit check failures").fill(d0);
-        aida.cloud1D("findable/z0 for nhit check failures").fill(z0);
-        continue;
-        }
-
-        //  Select mc particles that fail on the pT cut
-        ignores.add(Ignore.NoPTCut);
-        if (findable.isFindable(mcp, slist, ignores)) {
-        aida.cloud1D("findable/Hits for pT check failures").fill(nhits);
-        aida.cloud1D("findable/pT for pT check failures").fill(pt);
-        aida.cloud1D("findable/cos(theta) for pT check failures").fill(cth);
-        aida.cloud1D("findable/eta for pT check failures").fill(eta);
-        aida.cloud1D("findable/d0 for pT check failures").fill(d0);
-        aida.cloud1D("findable/z0 for pT check failures").fill(z0);
-        } else {
-        System.out.println("MC Particle is not findable with all ignores set!!");
-        }
-         */
         }
+        aida.cloud1D("number of generated charged tracks per Event").fill(_nchMCP);
+        aida.cloud2D("reco tracks vs MC tracks").fill(_nchMCP, tracklist.size());
         return;
     }
 
@@ -571,6 +565,13 @@
             Logger.getLogger(TrackAnalysisDriver.class.getName()).log(Level.SEVERE, null, ex);
         }
         System.out.println("# of reco tracks = " + _nrecTrk + "; # of MC tracks = " + _nmcTrk + "; Efficiency = " + _nrecTrk / _nmcTrk);
+        System.out.println("# of reco tracks(eta<" + etaBarrel + ")= " + _nrecTrkBarrel + "; # of MC tracks(eta<" + etaBarrel + ") = " + _nmcTrkBarrel + "; Efficiency(eta<" + etaBarrel + ")  = " + _nrecTrkBarrel / _nmcTrkBarrel);
+        System.out.println("# of reco tracks(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nrecTrkBarrPixECStrips + "; # of MC tracks(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nmcTrkBarrPixECStrips + "; Efficiency(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nrecTrkBarrPixECStrips / _nmcTrkBarrPixECStrips);
+        System.out.println("# of reco tracks(eta>" + etaBarrPixECStrips + ")= " + _nrecTrkECPix + "; # of MC tracks(eta>" + etaBarrPixECStrips + ") = " + _nmcTrkECPix + "; Efficiency(eta>" + etaBarrPixECStrips + ")  = " + _nrecTrkECPix / _nmcTrkECPix);
+        System.out.println("# of reco Muons = " + _nrecTrkMu + "; # of MC Muons = " + _nmcTrkMu + "; Efficiency = " + _nrecTrkMu / _nmcTrkMu);
+        System.out.println("# of reco Muons(eta<" + etaBarrel + ")= " + _nrecTrkBarrelMu + "; # of MC Muons(eta<" + etaBarrel + ") = " + _nmcTrkBarrelMu + "; Efficiency(eta<" + etaBarrel + ")  = " + _nrecTrkBarrelMu / _nmcTrkBarrelMu);
+        System.out.println("# of reco Muons(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nrecTrkBarrPixECStripsMu + "; # of MC Muons(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nmcTrkBarrPixECStripsMu + "; Efficiency(" + etaBarrel + "<eta<" + etaBarrPixECStrips + ")= " + _nrecTrkBarrPixECStripsMu / _nmcTrkBarrPixECStripsMu);
+        System.out.println("# of reco Muons(eta>" + etaBarrPixECStrips + ")= " + _nrecTrkECPixMu + "; # of MC Muons(eta>" + etaBarrPixECStrips + ") = " + _nmcTrkECPixMu + "; Efficiency(eta>" + etaBarrPixECStrips + ")  = " + _nrecTrkECPixMu / _nmcTrkECPixMu);
     }
 
     public void setOutputPlots(String output) {

lcsim-contrib/src/main/java/org/lcsim/contrib/sATLAS/UTOPIA7
OccupancyDriver.java 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- OccupancyDriver.java	20 Aug 2009 17:30:41 -0000	1.2
+++ OccupancyDriver.java	27 Aug 2009 00:59:09 -0000	1.3
@@ -106,12 +106,13 @@
             //                aida.cloud2D("charge vs SimTrackerHit energy").fill(charge, energy);
             }
              */
-
+//factor of 4 is from running 100 int/event instead of 400
             double occ = 4. * ((double) nhits) / ((double) nchan);
 //              double occ =  ((double) nhits) / ((double) nchan);
 //            if (nhits > 0) {
 //                System.out.println("sensor "+sensor.getName()+" has nhits: " + nhits + " nchan: " + nchan + " occ: " + occ);
 //            }
+            
             Hep3Vector pos = sensor.getGeometry().getPosition();
             double x = pos.x();
             double y = pos.y();
@@ -119,33 +120,68 @@
             double r = Math.sqrt(x * x + y * y);
             int ri = 2 * ((int) Math.round(r / 20));
             int zi = 2 * ((int) Math.round(Math.abs(z) / 20));
-
+            
             boolean barrel = !sensor.getName().toUpperCase().contains("ENDCAP");
-            if (!barrel) {
-                continue;
-            }
+            barrel = barrel && !sensor.getName().toUpperCase().contains("EC");
+//            if (!barrel) {
+//                continue;
+//            }
             String identifier;
             String identifier2;
+            String identifier3;
             if (barrel) {
+            //incredibly kludgy way to get the radii/z positions to display the way I want
+                if(r<40)r=37;
+                else if(r<80)r=75;
+                else if(r<175)r=156.139;
+                else if(r<200)r=195.210;
+                else if(r<400)r=380;
+                else if(r<520)r=501;
+                else if(r<650)r=622;
+                else if(r<800)r=743;
+                else r=1000;
                 identifier = "Barrel at r = " + ri;
                 identifier2 = "Barrel vs r";
+                identifier3 = "Barrel vs z";
             } else {
+                if(z<800)z=709;
+                else if(z<900)z=826;
+                else if(z<1100)z=1068;
+                else if(z<1175)z=1125;
+                else if(z<1250)z=1208;
+                else if(z<1350)z=1310;
+                else if(z<1400)z=1376;
+                else if(z<1600)z=1476;
+                else if(z<1800)z=1744;
+                else if(z<2500)z=2141;
+                else z=2791;
                 identifier = "Endcap at z = " + zi;
                 identifier2 = "Endcap vs z";
+                identifier3 = "Endcap vs r";
             }
 
             if (!occMap.containsKey(identifier)) {
-                occMap.put(identifier, _hf.createProfile1D(identifier, 50, 0., 120.));
+                occMap.put(identifier, _hf.createProfile1D(identifier, 20, 0., 120.));
             }
             if (!occMap.containsKey(identifier2)) {
-                occMap.put(identifier2, _hf.createProfile1D(identifier2, 50, 0., 120.));
+                if (barrel) {
+                    occMap.put(identifier2, _hf.createProfile1D(identifier2, 100, 0., 120.));
+                     occMap.put(identifier3, _hf.createProfile1D(identifier3, 100, 0., 120.));
+                } else {
+                    occMap.put(identifier2, _hf.createProfile1D(identifier2, 100, 50, 300.));
+                    occMap.put(identifier3, _hf.createProfile1D(identifier3, 100, 0, 120.));
+                }
             }
             if (barrel) {
+
                 occMap.get(identifier).fill(zi, occ);
-                occMap.get(identifier2).fill(ri, occ);
+                occMap.get(identifier2).fill(r/10, occ);
+                 occMap.get(identifier3).fill(Math.abs(z)/10, occ);
             } else {
+
                 occMap.get(identifier).fill(ri, occ);
-                occMap.get(identifier2).fill(zi, occ);
+                occMap.get(identifier2).fill(z/10, occ);
+                occMap.get(identifier3).fill(Math.abs(r)/10, occ);
             }
         }
 
CVSspam 0.2.8