LISTSERV mailing list manager LISTSERV 16.5

Help for HPS-SVN Archives


HPS-SVN Archives

HPS-SVN Archives


HPS-SVN@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

HPS-SVN Home

HPS-SVN Home

HPS-SVN  April 2016

HPS-SVN April 2016

Subject:

r4341 - in /java/trunk/recon/src/main/java/org/hps/recon: particle/HpsReconParticleDriver.java vertexing/BilliorVertexer.java

From:

[log in to unmask]

Reply-To:

Notification of commits to the hps svn repository <[log in to unmask]>

Date:

Wed, 13 Apr 2016 19:53:03 -0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (125 lines)

Author: [log in to unmask]
Date: Wed Apr 13 12:53:02 2016
New Revision: 4341

Log:
change access

Modified:
    java/trunk/recon/src/main/java/org/hps/recon/particle/HpsReconParticleDriver.java
    java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorVertexer.java

Modified: java/trunk/recon/src/main/java/org/hps/recon/particle/HpsReconParticleDriver.java
 =============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/particle/HpsReconParticleDriver.java	(original)
+++ java/trunk/recon/src/main/java/org/hps/recon/particle/HpsReconParticleDriver.java	Wed Apr 13 12:53:02 2016
@@ -320,7 +320,7 @@
 
             // Generate a candidate vertex and particle.
             BilliorVertex vtxFit = fitVertex(constraint, firstElectronBTrack, secondElectronBTrack);
-            ReconstructedParticle candidate = this.makeReconstructedParticle(topElectron, botElectron, vtxFit);
+            ReconstructedParticle candidate = makeReconstructedParticle(topElectron, botElectron, vtxFit);
 
             // Add the candidate vertex and particle to the
             // appropriate LCIO collection.
@@ -355,7 +355,7 @@
      * @return Returns a reconstructed particle with properties generated from
      * the child particles and vertex given as an argument.
      */
-    private ReconstructedParticle makeReconstructedParticle(ReconstructedParticle electron, ReconstructedParticle positron, BilliorVertex vtxFit) {
+    public static ReconstructedParticle makeReconstructedParticle(ReconstructedParticle electron, ReconstructedParticle positron, BilliorVertex vtxFit) {
 
         // Create a new reconstructed particle to represent the V0
         // candidate and populate it with the electron and positron.
@@ -397,9 +397,8 @@
         ((BaseReconstructedParticle) candidate).setCharge(particleCharge);
 
         // VERBOSE :: Output the fitted momentum data.
-        printDebug("Fitted momentum in tracking frame: " + fittedMomentum.toString());
-        printDebug("Fitted momentum in detector frame: " + fittedMomentum.toString());
-
+//        printDebug("Fitted momentum in tracking frame: " + fittedMomentum.toString());
+//        printDebug("Fitted momentum in detector frame: " + fittedMomentum.toString());
         // Add the ReconstructedParticle to the vertex.
         vtxFit.setAssociatedParticle(candidate);
 

Modified: java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorVertexer.java
 =============================================================================
--- java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorVertexer.java	(original)
+++ java/trunk/recon/src/main/java/org/hps/recon/vertexing/BilliorVertexer.java	Wed Apr 13 12:53:02 2016
@@ -153,7 +153,7 @@
             System.out.println(methodName + "::rk = " + rk);
         }
 
-        BasicMatrix Hk = makeHk(_ntracks, pxtot, pytot, pztot, pointback);
+        BasicMatrix Hk = makeHk(Vx, pxtot, pytot, pztot, pointback);
         if (_debug) {
             System.out.println(methodName + "::Hk = " + Hk);
         }
@@ -226,11 +226,8 @@
 //        if(_debug)System.out.println("Constrained chi^2 = "+_chiSq);
     }
 
-    private BasicMatrix makeHk(int ntracks, double pxtot, double pytot, double pztot, boolean bscon) {
-        double Vx = _vertexPosition.e(0, 0);
-//        double Vy = _vertexPosition.e(1, 0);
-//        double Vz = _vertexPosition.e(2, 0);
-        BasicMatrix Hk = new BasicMatrix(3 * (ntracks + 1), 3);
+    private BasicMatrix makeHk(double Vx, double pxtot, double pytot, double pztot, boolean bscon) {
+        BasicMatrix Hk = new BasicMatrix(3 * (_ntracks + 1), 3);
 //  ok, can set the derivitives wrt to V
         if (bscon) {
             Hk.setElement(0, 0, 0);
@@ -248,7 +245,7 @@
         Hk.setElement(2, 1, 0);
         Hk.setElement(2, 2, 1);
 //ok, loop over tracks again to set the derivitives wrt track momenta (theta,phi,rho)
-        for (int i = 0; i < ntracks; i++) {
+        for (int i = 0; i < _ntracks; i++) {
             BasicMatrix pi = (BasicMatrix) _pFit.get(i);
             double theta = pi.e(0, 0);
             double phiv = pi.e(1, 0);
@@ -262,7 +259,7 @@
             Hk.setElement(3 * (i + 1), 1, 0);
             if (bscon) {
                 Hk.setElement(3 * (i + 1), 2,
-                        -Pt / Math.pow(sin(theta), 2) * Vx);
+                        -Pt / Math.pow(sin(theta), 2) * (Vx - _beamPosition[0]));
             } else {
                 Hk.setElement(3 * (i + 1), 2, 0);
             }
@@ -270,9 +267,9 @@
             Hk.setElement(3 * (i + 1) + 1, 0, 0);
             if (bscon) {
                 Hk.setElement(3 * (i + 1) + 1, 1,
-                        (Pt * Pt * cos(phiv) * sin(phiv) / (pxtot * pxtot)) * Vx);
+                        (Pt * Pt * cos(phiv) * sin(phiv) / (pxtot * pxtot)) * (Vx - _beamPosition[0]));
                 Hk.setElement(3 * (i + 1) + 1, 2,
-                        (Pt * sin(phiv) / (pxtot * pxtot)) * Vx * pztot);
+                        (Pt * sin(phiv) / (pxtot * pxtot)) * (Vx - _beamPosition[0]) * pztot);
             } else {
                 Hk.setElement(3 * (i + 1) + 1, 1, 0);
                 Hk.setElement(3 * (i + 1) + 1, 2, 0);
@@ -285,9 +282,9 @@
 //                    (pztot / pxtot - 1) * (Pt / rho) * (1 / pxtot) * Vx);
             if (bscon) {
                 Hk.setElement(3 * (i + 1) + 2, 1,
-                        (cos(phiv) * pytot / pxtot - sin(phiv)) * (Pt / rho) * (1 / pxtot) * Vx);
+                        (cos(phiv) * pytot / pxtot - sin(phiv)) * (Pt / rho) * (1 / pxtot) * (Vx - _beamPosition[0]));
                 Hk.setElement(3 * (i + 1) + 2, 2,
-                        (cos(phiv) * pztot / pxtot - sin(phiv)) * (Pt / rho) * (1 / pxtot) * Vx);
+                        (cos(phiv) * pztot / pxtot - sin(phiv)) * (Pt / rho) * (1 / pxtot) * (Vx - _beamPosition[0]));
             } else {
                 Hk.setElement(3 * (i + 1) + 2, 1, 0);
                 Hk.setElement(3 * (i + 1) + 2, 2, 0);
@@ -299,7 +296,7 @@
         return Hk;
     }
 
-    public BasicMatrix makeRk(double Vx, double Vy, double Vz, double pxtot, double pytot, double pztot, boolean bscon) {
+    private BasicMatrix makeRk(double Vx, double Vy, double Vz, double pxtot, double pytot, double pztot, boolean bscon) {
         //calculate the position of the A' at X=0
         BasicMatrix rk = new BasicMatrix(3, 1);
         if (_debug) {

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

November 2017
August 2017
July 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use