Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10,070 changes: 10,070 additions & 0 deletions detector-data/detectors/HPS-v2019-3pt7GeV-1mm/HPS-v2019-3pt7GeV-1mm.lcdd

Large diffs are not rendered by default.

10,070 changes: 10,070 additions & 0 deletions detector-data/detectors/HPS-v2019-3pt7GeV-1mm/HPS-v2019-3pt7GeV.lcdd

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
samplingFraction: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
samplingFraction: 1.0
694 changes: 694 additions & 0 deletions detector-data/detectors/HPS-v2019-3pt7GeV-1mm/compact.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: HPS-v2019-3pt7GeV-1mm

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
samplingFraction: 1.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
samplingFraction: 1.0
799 changes: 799 additions & 0 deletions detector-data/detectors/HPS_Nominal_2019SensorSurvey_iter0/compact.xml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: HPS_Nominal_2019SensorSurvey_iter0
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ public static class ModuleL2Bot extends ShortModuleBot {
protected final static double shift_along_uchannel = 0; //positive is downstream
protected final static double shift_across_uchannel = 0.250; //positive is beam right
protected final static double shift_vertically_uchannel = -0.300; //positive is towards beam

// Note the L1 measures are used here
protected final static double cone_to_hole_along_uchannel = HPSTracker2014GeometryDefinition.ModuleL1Bot.cone_to_hole_along_uchannel + shift_along_uchannel;
protected final static double cone_to_hole_across_uchannel = HPSTracker2014v1GeometryDefinition.ModuleL1Bot.cone_to_hole_across_uchannel + shift_across_uchannel; // change x position layer 1 bot
Expand Down Expand Up @@ -551,8 +552,12 @@ public static class ModuleL3Bot extends ModuleL13Bot {
// Note the L2 measures are used here
protected final static double cone_to_hole_along_uchannel = HPSTracker2014GeometryDefinition.ModuleL2Bot.cone_to_hole_along_uchannel;
protected final static double cone_to_hole_vertical_from_uchannel = HPSTracker2014GeometryDefinition.ModuleL2Bot.cone_to_hole_vertical_from_uchannel;
protected final static double L3_new_vertical_shift = 0.7 - 0.012;

//2019 MRSolt survey
//protected final static double L3_new_vertical_shift = 0.7 - 0.012;
//2021 nominal
protected final static double L3_new_vertical_shift = 0.7;

public ModuleL3Bot(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
super(name, mother, alignmentCorrection, ref);
init();
Expand All @@ -572,7 +577,11 @@ public static class ModuleL3Top extends ModuleL13Top {
// Note the L2 measures are used here
protected final static double cone_to_hole_along_uchannel = HPSTracker2014GeometryDefinition.ModuleL2Top.cone_to_hole_along_uchannel;
protected final static double cone_to_hole_vertical_from_uchannel = HPSTracker2014GeometryDefinition.ModuleL2Top.cone_to_hole_vertical_from_uchannel;
protected final static double L3_new_vertical_shift = 0.7 + 0.055;

//2019 MRSolt survey
//protected final static double L3_new_vertical_shift = 0.7 + 0.055;
//2021 nominal
protected final static double L3_new_vertical_shift = 0.7;

public ModuleL3Top(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
super(name, mother, alignmentCorrection, ref);
Expand All @@ -593,7 +602,12 @@ public static class ModuleL4Bot extends ModuleL13Bot {
// Note the L2 measures are used here
protected final static double cone_to_hole_along_uchannel = HPSTracker2014GeometryDefinition.ModuleL3Bot.cone_to_hole_along_uchannel;
protected final static double cone_to_hole_vertical_from_uchannel = HPSTracker2014GeometryDefinition.ModuleL3Bot.cone_to_hole_vertical_from_uchannel;
protected final static double L4_new_vertical_shift = 0.7 + 0.0356;

//2019 MRSolt survey
//protected final static double L4_new_vertical_shift = 0.7 + 0.0356;

//2021 nominal
protected final static double L4_new_vertical_shift = 0.7;

public ModuleL4Bot(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
super(name, mother, alignmentCorrection, ref);
Expand All @@ -614,8 +628,12 @@ public static class ModuleL4Top extends ModuleL13Top {
// Note the L2 measures are used here
protected final static double cone_to_hole_along_uchannel = HPSTracker2014GeometryDefinition.ModuleL3Top.cone_to_hole_along_uchannel;
protected final static double cone_to_hole_vertical_from_uchannel = HPSTracker2014GeometryDefinition.ModuleL3Top.cone_to_hole_vertical_from_uchannel;
protected final static double L4_new_vertical_shift = 0.7 + 0.062;

//2019 MRSolt survey
//protected final static double L4_new_vertical_shift = 0.7 + 0.062;
//2021 nominal
protected final static double L4_new_vertical_shift = 0.7;

public ModuleL4Top(String name, SurveyVolume mother, AlignmentCorrection alignmentCorrection, SurveyVolume ref) {
super(name, mother, alignmentCorrection, ref);
init();
Expand Down Expand Up @@ -1522,7 +1540,10 @@ public static class ShortAxialHoleHalfModuleL0Top extends ShortAxialHalfModule {
protected final static double shift_vertically_to_beam_plane = -20.6658;
protected final static double shift_vertically_to_15mrad = ShortSensor.width / 2.0 + 0.5;

protected final static double survey_shift_x = 0.086; //positive is away from beam (up)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.086; //positive is away from beam (up)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (up)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is downstream shift

Expand Down Expand Up @@ -1554,7 +1575,10 @@ public static class ShortAxialHoleHalfModuleL0Bot extends ShortAxialHalfModule {
protected final static double shift_vertically_to_beam_plane = -20.6658;
protected final static double shift_vertically_to_15mrad = ShortSensor.width / 2.0 + 0.5;

protected final static double survey_shift_x = 0.200; //positive is away from beam (down)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.200; //positive is away from beam (down)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (down)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is upstream shift

Expand Down Expand Up @@ -1586,7 +1610,10 @@ public static class ShortAxialHoleHalfModuleL1Top extends ShortAxialHalfModule {
protected final static double shift_vertically_to_beam_plane = -20.6658;
protected final static double shift_vertically_to_15mrad = ShortSensor.width / 2.0 + 0.5;

protected final static double survey_shift_x = 0.366 - 0.245; //positive is away from beam (up)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.366 - 0.245; //positive is away from beam (up)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (up)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is downstream shift

Expand Down Expand Up @@ -1618,7 +1645,10 @@ public static class ShortAxialHoleHalfModuleL1Bot extends ShortAxialHalfModule {
protected final static double shift_vertically_to_beam_plane = -20.6658;
protected final static double shift_vertically_to_15mrad = ShortSensor.width / 2.0 + 0.5;

protected final static double survey_shift_x = 0.285; //positive is away from beam (down)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.285; //positive is away from beam (down)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (down)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is upstream shift

Expand Down Expand Up @@ -1804,7 +1834,11 @@ protected void stereo_rotation() {

public static class ShortStereoHoleHalfModuleL0Top extends ShortStereoHalfModule {

protected final static double survey_shift_x = 0.113; //positive is away from beam (up)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.113; //positive is away from beam (up)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (up)

protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is downstream shift

Expand Down Expand Up @@ -1922,8 +1956,11 @@ protected void stereo_rotation() {
}

public static class ShortStereoHoleHalfModuleL0Bot extends ShortStereoHalfModule {

protected final static double survey_shift_x = 0.098; //positive is away from beam (down)

//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.098; //positive is away from beam (down)
//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (down)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is upstream shift

Expand Down Expand Up @@ -2042,7 +2079,11 @@ protected void stereo_rotation() {

public static class ShortStereoHoleHalfModuleL1Top extends ShortStereoHalfModule {

protected final static double survey_shift_x = 0.253; //positive is away from beam (up)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.253; //positive is away from beam (up)

//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (up)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is downstream shift

Expand Down Expand Up @@ -2161,7 +2202,11 @@ protected void stereo_rotation() {

public static class ShortStereoHoleHalfModuleL1Bot extends ShortStereoHalfModule {

protected final static double survey_shift_x = 0.231; //positive is away from beam (down)
//2019 MRSolt survey constants
//protected final static double survey_shift_x = 0.231; //positive is away from beam (down)

//2021 nominal
protected final static double survey_shift_x = 0.0; //positive is away from beam (down)
protected final static double survey_shift_y = 0.0; //positive is positive x shift in JLab coordinates (beam left)
protected final static double survey_shift_z = 0.0; //positive is upstream shift

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package org.hps.recon.tracking.gbl;

import java.util.ArrayList;
import java.util.List;
import org.lcsim.detector.tracker.silicon.SiSensor;
import org.lcsim.geometry.Detector;
import org.lcsim.detector.IDetectorElement;
import org.lcsim.util.Driver;
import org.lcsim.event.EventHeader;

public class AlignmentTestDriver extends Driver {

private List<SiSensor> sensors = new ArrayList<SiSensor>();


@Override
protected void startOfData() {
}

@Override
protected void endOfData() {
}


@Override
protected void detectorChanged(Detector detector) {

//Alignment Manager - Get the composite structures.
IDetectorElement detectorElement = detector.getDetectorElement();

// Get the sensors subcomponents // This should be only HpsSiSensors
sensors = detectorElement.findDescendants(SiSensor.class);

System.out.println(":::AlignmentTestDriver:::");
AlignmentStructuresBuilder asb = new AlignmentStructuresBuilder(sensors);

}

protected void process(EventHeader event){}



}
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class SimpleGBLTrajAliDriver extends Driver {
private boolean constrainedD0Fit = false;
private boolean constrainedZ0Fit = false;
private int trackSide = -1;
private boolean doCOMAlignment = true;
private boolean doCOMAlignment = false;
private double seed_precision = 10000; // the constraint on q/p

private GblTrajectoryMaker _gblTrajMaker;
Expand Down Expand Up @@ -417,12 +417,21 @@ protected void process(EventHeader event) {

//Momentum cut: 3.8 - 5.2
Hep3Vector momentum = new BasicHep3Vector(track.getTrackStates().get(0).getMomentum());

int nHitsCut = 5;
//Kalman
if (TrackType == 1)
nHitsCut = 10;


if (momentum.magnitude() < 3 || momentum.magnitude() > 6)
continue;

if (tanLambda < 0.025)
continue;

//Align with tracks with at least 6 hits
if ((tanLambda > 0 && track.getTrackerHits().size() < 5) || (tanLambda < 0 && track.getTrackerHits().size() < 5))
if ((tanLambda > 0 && track.getTrackerHits().size() < nHitsCut) || (tanLambda < 0 && track.getTrackerHits().size() < nHitsCut))
continue;

// ask tracks only on a side
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ private void setupPlots() {
aida.tree().cd("/");

hAngBot = aida.histogram1D("Kalman kink angle bottom", 100, 0., 0.15);
hProjAngBot = aida.histogram1D("Kalman projected kink angle bottom", 100, -0.03, 0.03);
hProjAngBot = aida.histogram1D("Kalman projected kink angle bottom", 100, -0.01, 0.01);
hAngTop = aida.histogram1D("Kalman kink angle top", 100, 0., 0.15);
hProjAngTop = aida.histogram1D("Kalman projected kink angle top", 100, -0.03, 0.03);
hProjAngTop = aida.histogram1D("Kalman projected kink angle top", 100, -0.01, 0.01);
hChiIn = aida.histogram1D("Inner helix chi^2",100,0.,100.);
hDofIn = aida.histogram1D("Inner helix #dof",10,0.,10.);
hChiOut = aida.histogram1D("Outer helix chi^2",100,0.,100.);
Expand Down