Skip to content
Snippets Groups Projects
Commit 11dd98ec authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Only do truth track param init.

parent d5ba893f
No related branches found
No related tags found
1 merge request!145Only do truth track param init.
......@@ -96,7 +96,7 @@ rootls -t ${JUGGLER_SIM_FILE}
if [[ -z "${ANALYSIS_ONLY}" ]] ;
then
# Need to figure out how to pass file name to juggler from the commandline
xenv -x ${JUGGLER_INSTALL_PREFIX}/Juggler.xenv gaudirun.py benchmarks/tracking/options/tracker_reconstruction.py
gaudirun.py benchmarks/tracking/options/tracker_reconstruction.py
if [[ "$?" -ne "0" ]] ; then
echo "ERROR running juggler"
exit 1
......
......@@ -85,12 +85,12 @@ ecal_reco = EMCalReconstruction("ecal_reco",
minModuleEdep=0.0*units.MeV,
OutputLevel=WARNING)
simple_cluster = SimpleClustering("simple_cluster",
inputHitCollection="RecEcalBarrelHits",
outputClusters="SimpleClusters",
minModuleEdep=1.0*units.MeV,
maxDistance=50.0*units.cm,
OutputLevel=WARNING)
#simple_cluster = SimpleClustering("simple_cluster",
# inputHitCollection="RecEcalBarrelHits",
# outputClusters="SimpleClusters",
# minModuleEdep=1.0*units.MeV,
# maxDistance=50.0*units.cm,
# OutputLevel=WARNING)
# Tracker and vertex reconstruction
trk_b_reco = TrackerHitReconstruction("trk_b_reco",
......@@ -130,10 +130,10 @@ truth_trk_init = TrackParamTruthInit("truth_trk_init",
outputInitialTrackParameters="InitTrackParams",
OutputLevel=DEBUG)
clust_trk_init = TrackParamClusterInit("clust_trk_init",
inputClusters="SimpleClusters",
outputInitialTrackParameters="InitTrackParamsFromClusters",
OutputLevel=DEBUG)
#clust_trk_init = TrackParamClusterInit("clust_trk_init",
# inputClusters="SimpleClusters",
# outputInitialTrackParameters="InitTrackParamsFromClusters",
# OutputLevel=DEBUG)
#vtxcluster_trk_init = TrackParamVertexClusterInit("vtxcluster_trk_init",
# inputVertexHits="VertexBarrelRecHits",
......@@ -156,18 +156,18 @@ parts_from_fit = ParticlesFromTrackFit("parts_from_fit",
outputTrackParameters="outputTrackParameters",
OutputLevel=DEBUG)
trk_find_alg1 = TrackFindingAlgorithm("trk_find_alg1",
inputSourceLinks = sourcelinker.outputSourceLinks,
inputMeasurements = sourcelinker.outputMeasurements,
inputInitialTrackParameters= "InitTrackParamsFromClusters",
outputTrajectories="trajectories1",
OutputLevel=DEBUG)
parts_from_fit1 = ParticlesFromTrackFit("parts_from_fit1",
inputTrajectories="trajectories1",
outputParticles="ReconstructedParticles1",
outputTrackParameters="outputTrackParameters1",
OutputLevel=DEBUG)
#trk_find_alg1 = TrackFindingAlgorithm("trk_find_alg1",
# inputSourceLinks = sourcelinker.outputSourceLinks,
# inputMeasurements = sourcelinker.outputMeasurements,
# inputInitialTrackParameters= "InitTrackParamsFromClusters",
# outputTrajectories="trajectories1",
# OutputLevel=DEBUG)
#
#parts_from_fit1 = ParticlesFromTrackFit("parts_from_fit1",
# inputTrajectories="trajectories1",
# outputParticles="ReconstructedParticles1",
# outputTrackParameters="outputTrackParameters1",
# OutputLevel=DEBUG)
#trk_find_alg2 = TrackFindingAlgorithm("trk_find_alg2",
# inputSourceLinks = trk_hits_srclnkr.outputSourceLinks,
......@@ -216,11 +216,11 @@ ApplicationMgr(
ecal_digi,
trk_b_digi, trk_ec_digi, vtx_b_digi, vtx_ec_digi,
trk_b_reco, trk_ec_reco, vtx_b_reco, vtx_ec_reco,
ecal_reco, simple_cluster,
ecal_reco,
sourcelinker, #trk_hits_srclnkr,
clust_trk_init, truth_trk_init, #vtxcluster_trk_init,
truth_trk_init, #clust_trk_init, vtxcluster_trk_init,
trk_find_alg, parts_from_fit,
trk_find_alg1, parts_from_fit1,
#trk_find_alg1, parts_from_fit1,
#trk_find_alg2, parts_from_fit2,
out
],
......
......@@ -92,40 +92,40 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
.Define("theta0", "theta_thrown[0]")
.Define("nTracks", "outputTrackParameters.size()")
.Define("p_track", p_track, {"outputTrackParameters"})
.Define("p_track1", p_track, {"outputTrackParameters1"})
//.Define("p_track1", p_track, {"outputTrackParameters1"})
//.Define("p_track2", p_track, {"outputTrackParameters2"})
.Define("delta_p0",delta_p, {"p_track", "p_thrown"})
.Define("delta_p1",delta_p, {"p_track1", "p_thrown"})
//.Define("delta_p1",delta_p, {"p_track1", "p_thrown"})
//.Define("delta_p2",delta_p, {"p_track2", "p_thrown"})
.Define("delta_p_over_p0",delta_p_over_p, {"p_track", "p_thrown"})
.Define("delta_p_over_p1",delta_p_over_p, {"p_track1", "p_thrown"})
//.Define("delta_p_over_p1",delta_p_over_p, {"p_track1", "p_thrown"})
//.Define("delta_p_over_p2",delta_p_over_p, {"p_track2", "p_thrown"})
//.Define("N_VtxBarrelHits",[](std::vector<eic::TrackerHitData> hits) { return hits.size();},{"VertexBarrelRecHits"})
.Define("N_SiBarrelHits", [](std::vector<eic::TrackerHitData> hits) { return hits.size();}, {"TrackerBarrelRecHits"})
.Define("N_SiEndcapHits", [](std::vector<eic::TrackerHitData> hits) { return hits.size();}, {"TrackerEndcapRecHits"})
.Define("N_BarrelHits", [](std::vector<eic::TrackerHitData> hits) { return hits.size();}, {"TrackerBarrelRecHits"})
.Define("N_EndcapHits", [](std::vector<eic::TrackerHitData> hits) { return hits.size();}, {"TrackerEndcapRecHits"})
;
auto h_nTracks = df0.Histo1D({"h_nTracks", "; N tracks ", 10, 0, 10}, "nTracks");
auto h_pTracks = df0.Histo1D({"h_pTracks", "; GeV/c ", 100, 0, 10}, "p_track");
auto h_delta_p0 = df0.Histo1D({"h_delta_p0", "Truth Track Init; GeV/c ", 100, -10, 10}, "delta_p0");
auto h_delta_p1 = df0.Histo1D({"h_delta_p1", "Ecal Cluster Init; GeV/c ", 100, -10, 10}, "delta_p1");
//auto h_delta_p1 = df0.Histo1D({"h_delta_p1", "Ecal Cluster Init; GeV/c ", 100, -10, 10}, "delta_p1");
//auto h_delta_p2 = df0.Histo1D({"h_delta_p2", "Ecal Cluster, innner vtx hit Init; GeV/c ", 100, -10, 10}, "delta_p2");
auto h_delta_p0_over_p = df0.Histo1D({"h_delta_p0_over_p", "Truth Track Init; delta p/p ", 100, -0.1, 0.1}, "delta_p_over_p0");
auto h_delta_p1_over_p = df0.Histo1D({"h_delta_p1_over_p", "Ecal Cluster Init; delta p/p ", 100, -0.1, 0.1}, "delta_p_over_p1");
//auto h_delta_p1_over_p = df0.Histo1D({"h_delta_p1_over_p", "Ecal Cluster Init; delta p/p ", 100, -0.1, 0.1}, "delta_p_over_p1");
//auto h_delta_p2_over_p = df0.Histo1D({"h_delta_p2_over_p", "Ecal Cluster, innner vtx hit Init; delta p/p ", 100, -0.1, 0.1}, "delta_p_over_p2");
auto hSiBarrel_N_vs_theta = df0.Histo1D({"hSiBarrel_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_SiBarrelHits");
auto hSiEndcap_N_vs_theta = df0.Histo1D({"hSiEndcap_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_SiEndcapHits");
auto hBarrel_N_vs_theta = df0.Histo1D({"hBarrel_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_BarrelHits");
auto hEndcap_N_vs_theta = df0.Histo1D({"hEndcap_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_EndcapHits");
//auto hVtxBarrel_N_vs_theta = df0.Histo1D({"hVtxBarrel_N_vs_theta", "; #theta [deg.]", 20, 0, 180 }, "theta0", "N_VtxBarrelHits");
auto hSiBarrel_Nhits = df0.Histo1D({"hSiBarrel_Nhits", "; #theta [deg.]", 20, 0, 20 }, "N_SiBarrelHits");
auto hSiEndcap_Nhits = df0.Histo1D({"hSiEndcap_Nhits", "; #theta [deg.]", 20, 0, 20 }, "N_SiEndcapHits");
auto hBarrel_Nhits = df0.Histo1D({"hBarrel_Nhits", "; #theta [deg.]", 20, 0, 20 }, "N_BarrelHits");
auto hEndcap_Nhits = df0.Histo1D({"hEndcap_Nhits", "; #theta [deg.]", 20, 0, 20 }, "N_EndcapHits");
//auto hVtxBarrel_Nhits = df0.Histo1D({"hVtxBarrel_Nhits", "; #theta [deg.]", 20, 0, 20 }, "N_VtxBarrelHits");
auto hSiBarrel_Ntheta = df0.Histo1D({"hSiBarrel_Ntheta", "; #theta [deg.]", 20, 0, 180 }, "theta0");
auto hSiEndcap_Ntheta = df0.Histo1D({"hSiEndcap_Ntheta", "; #theta [deg.]", 20, 0, 180 }, "theta0");
auto hBarrel_Ntheta = df0.Histo1D({"hBarrel_Ntheta", "; #theta [deg.]", 20, 0, 180 }, "theta0");
auto hEndcap_Ntheta = df0.Histo1D({"hEndcap_Ntheta", "; #theta [deg.]", 20, 0, 180 }, "theta0");
//auto hVtxBarrel_Ntheta = df0.Histo1D({"hVtxBarrel_Ntheta", "; #theta [deg.]", 20, 0, 180 }, "theta0");
auto c = new TCanvas();
......@@ -142,9 +142,9 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
THStack * hs = new THStack("hs_delta_p","; GeV/c ");
TH1D* h1 = (TH1D*) h_delta_p0->Clone();
hs->Add(h1);
h1 = (TH1D*) h_delta_p1->Clone();
h1->SetLineColor(2);
hs->Add(h1);
//h1 = (TH1D*) h_delta_p1->Clone();
//h1->SetLineColor(2);
//hs->Add(h1);
//h1 = (TH1D*) h_delta_p2->Clone();
//h1->SetLineColor(4);
//h1->SetFillStyle(3001);
......@@ -159,9 +159,9 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
hs = new THStack("hs_delta_p_over_p","; delta p/p ");
h1 = (TH1D*) h_delta_p0_over_p->Clone();
hs->Add(h1);
h1 = (TH1D*) h_delta_p1_over_p->Clone();
h1->SetLineColor(2);
hs->Add(h1);
//h1 = (TH1D*) h_delta_p1_over_p->Clone();
//h1->SetLineColor(2);
//hs->Add(h1);
//h1 = (TH1D*) h_delta_p2_over_p->Clone();
//h1->SetLineColor(4);
//h1->SetFillStyle(3001);
......@@ -174,12 +174,12 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
c = new TCanvas();
hs = new THStack("n_hits","; #theta ");
h1 = (TH1D*) hSiBarrel_N_vs_theta->Clone();
auto h2 = (TH1D*) hSiBarrel_Ntheta->Clone();
h1 = (TH1D*) hBarrel_N_vs_theta->Clone();
auto h2 = (TH1D*) hBarrel_Ntheta->Clone();
h1->Divide(h2);
hs->Add(h1);
h1 = (TH1D*) hSiEndcap_N_vs_theta->Clone();
h2 = (TH1D*) hSiEndcap_Ntheta->Clone();
h1 = (TH1D*) hEndcap_N_vs_theta->Clone();
h2 = (TH1D*) hEndcap_Ntheta->Clone();
h1->Divide(h2);
h1->SetLineColor(2);
hs->Add(h1);
......@@ -195,12 +195,12 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
c = new TCanvas();
hs = new THStack("theta","; #theta ");
h1 = (TH1D*) hSiBarrel_N_vs_theta->Clone();
h2 = (TH1D*) hSiBarrel_Ntheta->Clone();
h1 = (TH1D*) hBarrel_N_vs_theta->Clone();
h2 = (TH1D*) hBarrel_Ntheta->Clone();
//h1->Divide(h2);
hs->Add(h2);
h1 = (TH1D*) hSiEndcap_N_vs_theta->Clone();
h2 = (TH1D*) hSiEndcap_Ntheta->Clone();
h1 = (TH1D*) hEndcap_N_vs_theta->Clone();
h2 = (TH1D*) hEndcap_Ntheta->Clone();
//h1->Divide(h2);
h1->SetLineColor(2);
h2->SetLineColor(2);
......@@ -217,9 +217,9 @@ int rec_central_electrons(const char* fname = "topside/rec_central_electrons.roo
c = new TCanvas();
hs = new THStack("hits","; hits ");
h1 = (TH1D*) hSiBarrel_Nhits->Clone();
h1 = (TH1D*) hBarrel_Nhits->Clone();
hs->Add(h1);
h1 = (TH1D*) hSiEndcap_Nhits->Clone();
h1 = (TH1D*) hEndcap_Nhits->Clone();
h1->SetLineColor(2);
h2->SetLineColor(2);
hs->Add(h2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment