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

modified: clustering/barrel_clusters.sh

	modified:   clustering/options/calorimeter_clustering.py
	modified:   clustering/scripts/barrel_clusters.cxx
parent 7452fec6
No related branches found
No related tags found
1 merge request!25Added clustering script
......@@ -52,5 +52,5 @@ mkdir -p results/clustering
root -b -q "clustering/scripts/barrel_clusters.cxx(\"${JUGGLER_DETECTOR}/${JUGGLER_REC_FILE}\")"
#cp topside/${JUGGLER_REC_FILE} results/.
cp topside/${JUGGLER_REC_FILE} results/clustering/.
......@@ -44,7 +44,7 @@ ecdigi = EMCalorimeterDigi("ec_barrel_digi", inputHitCollection="EcalBarrelHits"
crystal_ec_reco = CrystalEndcapsReco("crystal_ec_reco", inputHitCollection="RawDigiEcalHits", outputHitCollection="RecoEcalHits",
minModuleEdep=1.0*units.MeV,OutputLevel=DEBUG)
ecal_reco = EMCalReconstruction("ecal_reco", inputHitCollection="RawEcalBarrelHits", outputHitCollection="RecEcalBarrelHits",
minModuleEdep=5.0*units.MeV,OutputLevel=DEBUG)
minModuleEdep=0.0*units.MeV,OutputLevel=DEBUG)
ec_barrel_cluster = IslandCluster("ec_barrel_cluster",
inputHitCollection="RecEcalBarrelHits",
......
......@@ -76,16 +76,16 @@ void barrel_clusters(const char* in_fname = "topside/rec_barrel_clusters.root")
.Define("thrownEta", eta, {"thrownParticles"})
.Define("thrownTheta", theta, {"thrownP"})
.Define("thrownMomentum", momentum, {"thrownP"})
.Define("delta_E", delta_E, {"thrownP","EcalBarrelClusters"})
.Define("nclusters", "EcalBarrelClusters.size()")
.Define("delta_E", delta_E, {"thrownP","SimpleClusters"})
.Define("nclusters", "SimpleClusters.size()")
.Define("Ecluster",
[](const std::vector<eic::ClusterData>& in) {
std::vector<float> res;
std::vector<double> res;
for (const auto& i : in)
res.push_back(i.energy);
return res;
},
{"EcalBarrelClusters"});
{"SimpleClusters"});
auto d1 = d0.Filter("nclusters==1");
auto c_nclusters1 = d1.Count();
......@@ -95,7 +95,7 @@ void barrel_clusters(const char* in_fname = "topside/rec_barrel_clusters.root")
auto h_theta_thrown = d0.Histo1D({"h_theta_thrown", "; #theta", 100, 30.0, 180.0}, "thrownTheta");
auto h_momentum_thrown = d0.Histo1D({"h_momentum_thrown", "; E [GeV]", 100, 0.0, 30.0}, "thrownMomentum");
auto h_nclusters = d0.Histo1D({"h_nclusters", "; N clusters", 6, 0, 6}, "nclusters");
auto h_Ecluster = d0.Histo1D({"h_Ecluster", "; cluster E [GeV]", 100, 0, 30}, "Ecluster");
auto h_Ecluster = d0.Histo1D({"h_Ecluster", "; cluster E [GeV]", 100, 0, 1}, "Ecluster");
auto h_Ecluster1 = d1.Histo1D({"h_Ecluster1", "One cluster events; cluster E [GeV]", 100, 0, 30}, "Ecluster");
auto h_momentum_thrown1 = d1.Histo1D({"h_momentum_thrown", "; E [GeV]", 100, 0.0, 30.0},"thrownMomentum");
......@@ -122,6 +122,9 @@ void barrel_clusters(const char* in_fname = "topside/rec_barrel_clusters.root")
//h_Ecluster2->DrawCopy("same");
c->SaveAs("results/clustering/barrel_clusters_Ecluster.png");
h_momentum_thrown->DrawCopy();
c->SaveAs("results/clustering/barrel_clusters_momentum_thrown.png");
h_delta_E->DrawCopy();
c->SaveAs("results/clustering/barrel_clusters_delta_E.png");
......
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