hps-java/src/main/java/Utilities
diff -u -r1.1 -r1.2
--- ConvertToStdhep.java 7 Jan 2011 17:15:08 -0000 1.1
+++ ConvertToStdhep.java 10 Feb 2011 19:35:24 -0000 1.2
@@ -41,34 +41,34 @@
static double _ecm = 5.5; //GeV
static StdhepWriter sw;
static int nmax = 500000;
-// static String fileType = "lhe";
- static String fileType="dat";
+ static String fileType = "lhe";
+// static String fileType="dat";
/**
* @param args the command line arguments
* @throws IOException
*/
public static void main(String[] args) throws IOException {
- int nInFiles = 1000;
- aMass = 0.08;
- _ecm = 6.6;
+ int nInFiles = 100;
+ aMass = 0.15;
+ _ecm = 2.2;
_declength = 0;//mm
sigx = 0.02;
- sigy = 0.02;
+ sigy = 0.2;
trident=true;
- String postfix = "_20u_beamspot_gammactau_0cm.stdhep";
+ String postfix = "_20ux200u_beamspot_gammactau_0cm.stdhep";
- // String fDir="/a/surrey10/vol/vol0/g.hps/mgraham/DarkPhoton/tvm/ap2.2gev/";
- // String fileLabel = "ap2.2gev80mevsel";
+// String fDir="/nfs/slac/g/hps/mgraham/DarkPhoton/tvm/testrun/";
+// String fileLabel = "ap2.2gev40mevsel";
- String fDir="/nfs/slac/g/hps/mgraham/DarkPhoton/tvm/trident/full/";
- String fileLabel = "full6.6gev";
+ // String fDir="/nfs/slac/g/hps/mgraham/DarkPhoton/tvm/trident/full/";
+ // String fileLabel = "full6.6gev";
-// String fDir = "/a/surrey10/vol/vol0/g.hps/mgraham/DarkPhoton/MadGraph/Events6pt6FullRadBH/";
-// String fileLabel = "ap6.6gevFullRadBHall";
+ String fDir = "/nfs/slac/g/hps/mgraham/DarkPhoton/MadGraph/Events2pt2Ap150MeV/";
+ String fileLabel = "ap2.2gev150mevall";
- String inLabel = "W6pt6GeV_FullRadBH_";
+ String inLabel = "W2pt2GeV_Ap150MeV_";
String inPost = "_unweighted_events.lhe";
@@ -78,13 +78,16 @@
for (int i = 0; i < nInFiles; i++) {
int fnum = i + 1;
String snum = "_" + fnum;
- if (fnum < 1000) snum = "_0" + fnum;
- if (fnum < 100) snum = "_00" + fnum;
- if (fnum < 10) snum = "_000" + fnum;
+ if (fnum < 10000) snum = "_0" + fnum;
+ if (fnum < 1000) snum = "_00" + fnum;
+ if (fnum < 100) snum = "_000" + fnum;
+ if (fnum < 10) snum = "_0000" + fnum;
String infile = "";
- if (fileType.contains("dat"))
+ if (fileType.contains("dat")){
infile = fDir + fileLabel + snum + ".dat";
+// System.out.println(infile);
+ }
else if (fileType.contains("lhe")) {
infile = fDir + inLabel + i + inPost;
String cmd = "gunzip " + infile + ".gz";
hps-java/src/main/java/org/lcsim/HPSTestv1
diff -u -r1.2 -r1.3
--- TestVertexing.java 21 Jan 2011 16:15:27 -0000 1.2
+++ TestVertexing.java 10 Feb 2011 19:35:24 -0000 1.3
@@ -121,21 +121,21 @@
IHistogramFactory hf = aida.histogramFactory();
- peffFindable = hf.createProfile1D("Findable Efficiency vs p", "", 50, 0., 11.);
+ peffFindable = hf.createProfile1D("Findable Efficiency vs p", "", 50, 0., 2.2);
thetaeffFindable = hf.createProfile1D("Findable Efficiency vs theta", "", 20, 80, 100);
phieffFindable = hf.createProfile1D("Findable Efficiency vs phi", "", 25, -0.25, 0.25);
ctheffFindable = hf.createProfile1D("Findable Efficiency vs cos(theta)", "", 25, -0.25, 0.25);
d0effFindable = hf.createProfile1D("Findable Efficiency vs d0", "", 50, -2., 2.);
z0effFindable = hf.createProfile1D("Findable Efficiency vs z0", "", 50, -2., 2.);
- peffElectrons = hf.createProfile1D("Electrons Efficiency vs p", "", 50, 0., 11.);
+ peffElectrons = hf.createProfile1D("Electrons Efficiency vs p", "", 50, 0., 2.2);
thetaeffElectrons = hf.createProfile1D("Electrons Efficiency vs theta", "", 20, 80, 100);
phieffElectrons = hf.createProfile1D("Electrons Efficiency vs phi", "", 25, -0.25, 0.25);
ctheffElectrons = hf.createProfile1D("Electrons Efficiency vs cos(theta)", "", 25, -0.25, 0.25);
d0effElectrons = hf.createProfile1D("Electrons Efficiency vs d0", "", 20, -1., 1.);
z0effElectrons = hf.createProfile1D("Electrons Efficiency vs z0", "", 20, -1., 1.);
- peffAxial = hf.createProfile1D("Axial Efficiency vs p", "", 50, 0., 11.);
+ peffAxial = hf.createProfile1D("Axial Efficiency vs p", "", 50, 0., 2.2);
thetaeffAxial = hf.createProfile1D("Axial Efficiency vs theta", "", 20, 80, 100);
phieffAxial = hf.createProfile1D("Axial Efficiency vs phi", "", 25, -0.25, 0.25);
ctheffAxial = hf.createProfile1D("Axial Efficiency vs cos(theta)", "", 25, -0.25, 0.25);
@@ -155,7 +155,16 @@
public void process(
EventHeader event) {
-
+ if (nevt == 0)
+ try {
+//open things up
+ fw = new FileWriter(outputTextName);
+ pw = new PrintWriter(fw);
+ } catch (IOException ex) {
+ Logger.getLogger(FastTrackAnalysisDriver.class.getName()).log(Level.SEVERE, null, ex);
+ }
+ // Increment the event counter
+ nevt++;
List<RawTrackerHit> rawHits = event.get(RawTrackerHit.class, "RawTrackerHitMaker_RawTrackerHits");
List<SiTrackerHitStrip1D> stripHits = event.get(SiTrackerHitStrip1D.class, "StripClusterer_SiTrackerHitStrip1D");
@@ -197,17 +206,17 @@
// Create a map between tracks and the associated MCParticle
// List<Track> tracklist = event.getTracks();
List<Track> tracklist = event.get(Track.class, "MatchedTracks");
- List<Track> lltracklist = event.get(Track.class, "LLTracks");
+ // List<Track> lltracklist = event.get(Track.class, "LLTracks");
RelationalTable trktomcAxial = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
aida.cloud1D("Matched Tracks per Event").fill(tracklist.size());
- aida.cloud1D("Long Lived Tracks per Event").fill(lltracklist.size());
+// aida.cloud1D("Long Lived Tracks per Event").fill(lltracklist.size());
aida.cloud1D("HelicalTrackHits per Event").fill(toththits.size());
RelationalTable trktomc = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
// RelationalTable trktomcLL = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
- tracklist.addAll(lltracklist);
+ // tracklist.addAll(lltracklist);
RelationalTable mcHittomcP = new BaseRelationalTable(RelationalTable.Mode.MANY_TO_MANY, RelationalTable.Weighting.UNWEIGHTED);
@@ -497,7 +506,7 @@
aida.histogram1D("BilliorVertex Mass -- UnConstrained", 250, 0.0, 0.25).fill(bvertexUC.getInvMass());
aida.histogram1D("BilliorVertex Mass -- 2nd Pass", 250, 0.0, 0.25).fill(bvertex2ndPass.getInvMass());
- double[] beamsize = {0.001, 0.01, 0.01};
+ double[] beamsize = {0.001, 0.2, 0.02};
BilliorVertex bsconfit = new BilliorVertex(bfield);
bsconfit.setBeamSize(beamsize);
bsconfit.doBeamSpotConstraint(false);
@@ -522,6 +531,35 @@
// Now loop over all MC Particles
List<MCParticle> mclist = event.getMCParticles();
+ pw.format("%d ",nevt );
+
+ for (MCParticle mcp : mclist) {
+ if(mcp.getParents().size()>0){
+ if (mcp.getParents().get(0).getPDGID() == 622) {
+ boolean find= findable.InnerTrackerIsFindable(mcp, nlayers[0]);
+ int ifind=0;
+ if(find)ifind=1;
+ double ch=mcp.getCharge();
+ pw.format("%d %2.0f ",ifind,ch);
+ Set<SimTrackerHit> mchitlist = mcHittomcP.allTo(mcp);
+
+ for(int i=0;i<10;i++){
+ if(mchitlist.size()>i+1){
+ SimTrackerHit sth=(SimTrackerHit) mchitlist.toArray()[i];
+
+ if(sth!=null)
+ pw.format("%d %5.5f %5.5f %5.5f ",sth.getLayer(),sth.getPoint()[1],sth.getPoint()[2],sth.getPoint()[0]);
+ else
+ pw.format("%d %5.5f %5.5f %5.5f ",99,-666,-666,-666);
+ } else {
+ pw.format("%d %5.5f %5.5f %5.5f ",99,-666.6,-666.6,-666.6);
+ }
+ }
+ }
+ }
+
+ }
+ pw.println();
int _nchMCP = 0;
int _nchMCPBar = 0;
for (MCParticle mcp : mclist) {