diff --git a/benchmarks/clustering/options/calorimeter_clustering.py b/benchmarks/clustering/options/calorimeter_clustering.py index bb98b16b24476ed8beee0a822459ff7023ef8e84..a45e642a7cc4e694a14dce0cc6cf7aba21a27f3f 100644 --- a/benchmarks/clustering/options/calorimeter_clustering.py +++ b/benchmarks/clustering/options/calorimeter_clustering.py @@ -35,7 +35,7 @@ from Configurables import Jug__Reco__SimpleClustering as SimpleClustering from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG -podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits","EcalBarrelAstroPixHits"], OutputLevel=DEBUG) +podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits","EcalBarrelHits"], OutputLevel=DEBUG) ## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. copier = MCCopier("MCCopier", @@ -49,8 +49,8 @@ emcaldigi = CrystalEndcapsDigi("ecal_digi", inputHitCollection="CrystalEcalHits", outputHitCollection="RawDigiEcalHits") ecdigi = EMCalorimeterDigi("ec_barrel_digi", - inputHitCollection="EcalBarrelAstroPixHits", - outputHitCollection="RawEcalBarrelAstroPixHits") + inputHitCollection="EcalBarrelHits", + outputHitCollection="RawEcalBarrelHits") crystal_ec_reco = CrystalEndcapsReco("crystal_ec_reco", inputHitCollection="RawDigiEcalHits", @@ -58,15 +58,15 @@ crystal_ec_reco = CrystalEndcapsReco("crystal_ec_reco", minModuleEdep=1.0*units.MeV) ecal_reco = EMCalReconstruction("ecal_reco", - inputHitCollection="RawEcalBarrelAstroPixHits", - outputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RawEcalBarrelHits", + outputHitCollection="RecEcalBarrelHits", samplingFraction=0.25, minModuleEdep=0.0*units.MeV) ec_barrel_cluster = IslandCluster("ec_barrel_cluster", - inputHitCollection="RecEcalBarrelAstroPixHits", - outputClusterCollection="EcalBarrelAstroPixClusters", - splitHitCollection="splitEcalBarrelAstroPixHitCollection", + inputHitCollection="RecEcalBarrelHits", + outputClusterCollection="EcalBarrelClusters", + splitHitCollection="splitEcalBarrelHitCollection", minClusterCenterEdep=1*units.MeV, groupRange=2.0, OutputLevel=DEBUG) @@ -78,7 +78,7 @@ crystal_ec_cluster = IslandCluster("crystal_ec_cluster", OutputLevel=DEBUG) simple_cluster = SimpleClustering("simple_cluster", - inputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RecEcalBarrelHits", outputClusters="SimpleClusters", OutputLevel=DEBUG) diff --git a/benchmarks/ecal/options/emcal_barrel_reco.py b/benchmarks/ecal/options/emcal_barrel_reco.py index f43b1d3e7c57b97bb08319d90dd4401c4b2e17ce..63125734b21c886c50d7ffd64a0e0e2cac1e5b0b 100644 --- a/benchmarks/ecal/options/emcal_barrel_reco.py +++ b/benchmarks/ecal/options/emcal_barrel_reco.py @@ -47,7 +47,7 @@ from Configurables import Jug__Reco__SamplingECalHitsMerger as SamplingECalHitsM from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG -podioinput = PodioInput("PodioReader", collections=["mcparticles","EcalBarrelAstroPixHits"], OutputLevel=DEBUG) +podioinput = PodioInput("PodioReader", collections=["mcparticles","EcalBarrelHits"], OutputLevel=DEBUG) # Thrown Information copier = MCCopier("MCCopier", @@ -56,13 +56,13 @@ copier = MCCopier("MCCopier", OutputLevel=DEBUG) # Geant4 Information embarrelcopier = CalCopier("CalBarrelCopier", - inputCollection="EcalBarrelAstroPixHits", - outputCollection="EcalBarrelAstroPixHits2", + inputCollection="EcalBarrelHits", + outputCollection="EcalBarrelHits2", OutputLevel=DEBUG) # Digitization embarreldigi = EcalTungstenSamplingDigi("ecal_barrel_digi", - inputHitCollection="EcalBarrelAstroPixHits", - outputHitCollection="RawEcalBarrelAstroPixHits", + inputHitCollection="EcalBarrelHits", + outputHitCollection="RawEcalBarrelHits", inputEnergyUnit=units.GeV, inputTimeUnit=units.ns, dynamicRangeADC=700*units.keV, @@ -71,8 +71,8 @@ embarreldigi = EcalTungstenSamplingDigi("ecal_barrel_digi", OutputLevel=DEBUG) # Reconstruction embarrelreco = EcalTungstenSamplingReco("ecal_barrel_reco", - inputHitCollection="RawEcalBarrelAstroPixHits", - outputHitCollection="RecoEcalBarrelAstroPixHits", + inputHitCollection="RawEcalBarrelHits", + outputHitCollection="RecoEcalBarrelHits", dynamicRangeADC=700*units.keV, pedestalSigma=40, OutputLevel=DEBUG) @@ -82,23 +82,23 @@ embarrelreco = EcalTungstenSamplingReco("ecal_barrel_reco", # xy_merger sum layers/slices, masking (8+3+4, 8+3+4+5+10-1) embarrelxymerger = SamplingECalHitsMerger("ecal_barrel_xy_merger", cellIDMaskRanges=[(15, 29)], - inputHitCollection="RecoEcalBarrelAstroPixHits", - outputHitCollection="RecoEcalBarrelAstroPixHitsXY") + inputHitCollection="RecoEcalBarrelHits", + outputHitCollection="RecoEcalBarrelHitsXY") # xy_merger sum modules, masking (8+3+4+5+10, 8+3+4+5+10+32-1) embarrelzmerger = SamplingECalHitsMerger("ecal_barrel_z_merger", cellIDMaskRanges=[(30, 61)], - inputHitCollection="RecoEcalBarrelAstroPixHits", - outputHitCollection="RecoEcalBarrelAstroPixHitsZ") + inputHitCollection="RecoEcalBarrelHits", + outputHitCollection="RecoEcalBarrelHitsZ") # Clustering embarrelcluster = IslandCluster("ecal_barrel_cluster", - inputHitCollection="RecoEcalBarrelAstroPixHitsXY", - outputClusterCollection="EcalBarrelAstroPixClusters", + inputHitCollection="RecoEcalBarrelHitsXY", + outputClusterCollection="EcalBarrelClusters", minClusterCenterEdep=0.5*units.MeV, splitCluster=False, groupRanges=[2.0*units.cm, 2.0*units.cm, 2.0*units.cm]) # Reconstruct the cluster with Center of Gravity method embarrelclusterreco = RecoCoG("ecal_barrel_clusterreco", - clusterCollection="EcalBarrelAstroPixClusters", + clusterCollection="EcalBarrelClusters", logWeightBase=6.2) out = PodioOutput("out", filename=output_rec_file) diff --git a/benchmarks/ecal/options/full_em_calorimeter_reco.py b/benchmarks/ecal/options/full_em_calorimeter_reco.py index a0c6d0f2e1633304db3fbf45826f31e57ec76119..42f15da7a2da767ca7f4eab640726bad658ac17d 100644 --- a/benchmarks/ecal/options/full_em_calorimeter_reco.py +++ b/benchmarks/ecal/options/full_em_calorimeter_reco.py @@ -42,7 +42,7 @@ from Configurables import Jug__Reco__CrystalEndcapsReco as CrystalEndcapsReco from Configurables import Jug__Reco__CalorimeterIslandCluster as IslandCluster from Configurables import Jug__Reco__ClusterRecoCoG as RecoCoG -podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits","EcalBarrelAstroPixHits","EcalEndcapHits"], OutputLevel=DEBUG) +podioinput = PodioInput("PodioReader", collections=["mcparticles","CrystalEcalHits","EcalBarrelHits","EcalEndcapHits"], OutputLevel=DEBUG) ## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. copier = MCCopier("MCCopier", @@ -56,13 +56,13 @@ calcopier = CalCopier("CalCopier", OutputLevel=DEBUG) embarrelcopier = CalCopier("CalBarrelCopier", - inputCollection="EcalBarrelAstroPixHits", - outputCollection="EcalBarrelAstroPixHits2", + inputCollection="EcalBarrelHits", + outputCollection="EcalBarrelHits2", OutputLevel=DEBUG) embarreldigi = EcalTungstenSamplingDigi("ecal_barrel_digi", - inputHitCollection="EcalBarrelAstroPixHits", - outputHitCollection="RawEcalBarrelAstroPixHits", + inputHitCollection="EcalBarrelHits", + outputHitCollection="RawEcalBarrelHits", inputEnergyUnit=units.GeV, inputTimeUnit=units.ns, dynamicRangeADC=700*units.keV, diff --git a/benchmarks/ecal/scripts/emcal_barrel_electrons_analysis.cxx b/benchmarks/ecal/scripts/emcal_barrel_electrons_analysis.cxx index f516ec63bc122d179cd152d2b3285291b04cf7dc..cbb586056751b49748c47f5f0e4e2ff9d7f24821 100644 --- a/benchmarks/ecal/scripts/emcal_barrel_electrons_analysis.cxx +++ b/benchmarks/ecal/scripts/emcal_barrel_electrons_analysis.cxx @@ -91,10 +91,10 @@ void emcal_barrel_electrons_analysis(const char* input_fname = "rec_emcal_barrel // Define variables auto d1 = d0.Define("Ethr", Ethr, {"mcparticles2"}) - .Define("ErecXY", ErecXY, {"RecoEcalBarrelAstroPixHitsXY"}) - .Define("ErecZ", ErecZ, {"RecoEcalBarrelAstroPixHitsZ"}) - .Define("ncluster", ncluster, {"EcalBarrelAstroPixClusters"}) - .Define("Ecluster", Ecluster, {"EcalBarrelAstroPixClusters"}) + .Define("ErecXY", ErecXY, {"RecoEcalBarrelHitsXY"}) + .Define("ErecZ", ErecZ, {"RecoEcalBarrelHitsZ"}) + .Define("ncluster", ncluster, {"EcalBarrelClusters"}) + .Define("Ecluster", Ecluster, {"EcalBarrelClusters"}) .Define("fsam", fsam, {"Ecluster","Ethr"}) ; diff --git a/benchmarks/ecal/scripts/emcal_barrel_pions_analysis.cxx b/benchmarks/ecal/scripts/emcal_barrel_pions_analysis.cxx index c5c6f4421173a8bf169d8fcc8cb011835300072d..1cbc054da73cbca37539100e9a53708b19aa4faf 100644 --- a/benchmarks/ecal/scripts/emcal_barrel_pions_analysis.cxx +++ b/benchmarks/ecal/scripts/emcal_barrel_pions_analysis.cxx @@ -6,22 +6,22 @@ #include "ROOT/RDataFrame.hxx" #include <iostream> -#include "dd4pod/Geant4ParticleCollection.h" #include "dd4pod/CalorimeterHitCollection.h" +#include "dd4pod/Geant4ParticleCollection.h" #include "dd4pod/TrackerHitCollection.h" -#include "eicd/RawCalorimeterHitCollection.h" -#include "eicd/RawCalorimeterHitData.h" #include "eicd/CalorimeterHitCollection.h" #include "eicd/CalorimeterHitData.h" #include "eicd/ClusterCollection.h" #include "eicd/ClusterData.h" +#include "eicd/RawCalorimeterHitCollection.h" +#include "eicd/RawCalorimeterHitData.h" #include "TCanvas.h" -#include "TStyle.h" -#include "TMath.h" -#include "TH1.h" #include "TF1.h" +#include "TH1.h" #include "TH1D.h" +#include "TMath.h" +#include "TStyle.h" using ROOT::RDataFrame; using namespace ROOT::VecOps; @@ -45,37 +45,38 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni // Thrown Energy [GeV] auto Ethr = [](std::vector<dd4pod::Geant4ParticleData> const& input) { std::vector<double> result; - result.push_back(TMath::Sqrt(input[2].psx*input[2].psx + input[2].psy*input[2].psy + input[2].psz*input[2].psz + input[2].mass*input[2].mass)); - return result; + result.push_back(TMath::Sqrt(input[2].psx * input[2].psx + input[2].psy * input[2].psy + + input[2].psz * input[2].psz + input[2].mass * input[2].mass)); + return result; }; // Reconstructed Energy [GeV] in XY merger - auto ErecXY = [] (const std::vector<eic::CalorimeterHitData> & evt) { + auto ErecXY = [](const std::vector<eic::CalorimeterHitData>& evt) { std::vector<double> result; - auto total_eng = 0.0; - for (const auto& i: evt) + auto total_eng = 0.0; + for (const auto& i : evt) total_eng += i.energy; result.push_back(total_eng / 1.e+3); return result; }; // Reconstructed Energy [GeV] in Z merger - auto ErecZ = [] (const std::vector<eic::CalorimeterHitData> & evt) { + auto ErecZ = [](const std::vector<eic::CalorimeterHitData>& evt) { std::vector<double> result; - auto total_eng = 0.0; - for (const auto& i: evt) + auto total_eng = 0.0; + for (const auto& i : evt) total_eng += i.energy; result.push_back(total_eng / 1.e+3); return result; }; // Number of Clusters - auto ncluster = [] (const std::vector<eic::ClusterData>& evt) {return (int) evt.size(); }; + auto ncluster = [](const std::vector<eic::ClusterData>& evt) { return (int)evt.size(); }; // Cluster Energy [GeV] - auto Ecluster = [] (const std::vector<eic::ClusterData>& evt) { + auto Ecluster = [](const std::vector<eic::ClusterData>& evt) { std::vector<double> result; - for (const auto& i: evt) + for (const auto& i : evt) result.push_back(i.energy / 1.e+3); return result; }; @@ -85,34 +86,35 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni std::vector<double> result; for (const auto& E1 : thrown) { for (const auto& E2 : sampled) - result.push_back(E2/E1); + result.push_back(E2 / E1); } return result; }; // Define variables - auto d1 = d0.Define("Ethr", Ethr, {"mcparticles2"}) - .Define("ErecXY", ErecXY, {"RecoEcalBarrelAstroPixHitsXY"}) - .Define("ErecZ", ErecZ, {"RecoEcalBarrelAstroPixHitsZ"}) - .Define("ncluster", ncluster, {"EcalBarrelAstroPixClusters"}) - .Define("Ecluster", Ecluster, {"EcalBarrelAstroPixClusters"}) - .Define("fsam", fsam, {"Ecluster","Ethr"}) - ; + auto d1 = d0.Define("Ethr", Ethr, {"mcparticles2"}) + .Define("ErecXY", ErecXY, {"RecoEcalBarrelHitsXY"}) + .Define("ErecZ", ErecZ, {"RecoEcalBarrelHitsZ"}) + .Define("ncluster", ncluster, {"EcalBarrelClusters"}) + .Define("Ecluster", Ecluster, {"EcalBarrelClusters"}) + .Define("fsam", fsam, {"Ecluster", "Ethr"}); // Define Histograms - auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 6.5}, "Ethr"); - auto hErecXY = d1.Histo1D({"hErecXY", "Reconstructed Energy in XY merger; Reconstructed Energy [GeV]; Events", 100, 0.0, 6.5}, "ErecXY"); - auto hErecZ = d1.Histo1D({"hErecZ", "Reconstructed Energy in Z merger; Reconstructed Energy [GeV]; Events", 100, 0.0, 6.5}, "ErecZ"); - auto hNCluster = d1.Histo1D({"hNCluster", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "ncluster"); - auto hEcluster = d1.Histo1D({"hEcluster", "Cluster Energy; Cluster Energy [GeV]; Events", 100, 0.0, 6.5}, "Ecluster"); - auto hfsam = d1.Histo1D({"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1}, "fsam"); + auto hEthr = d1.Histo1D({"hEthr", "Thrown Energy; Thrown Energy [GeV]; Events", 100, 0.0, 6.5}, "Ethr"); + auto hErecXY = d1.Histo1D( + {"hErecXY", "Reconstructed Energy in XY merger; Reconstructed Energy [GeV]; Events", 100, 0.0, 6.5}, "ErecXY"); + auto hErecZ = d1.Histo1D( + {"hErecZ", "Reconstructed Energy in Z merger; Reconstructed Energy [GeV]; Events", 100, 0.0, 6.5}, "ErecZ"); + auto hNCluster = d1.Histo1D({"hNCluster", "Number of Clusters; # of Clusters; Events", 100, 0.0, 100.0}, "ncluster"); + auto hEcluster = d1.Histo1D({"hEcluster", "Cluster Energy; Cluster Energy [GeV]; Events", 100, 0.0, 6.5}, "Ecluster"); + auto hfsam = d1.Histo1D({"hfsam", "Sampling Fraction; Sampling Fraction; Events", 100, 0.0, 0.1}, "fsam"); // Event Counts - auto nevents_thrown = d1.Count(); + auto nevents_thrown = d1.Count(); std::cout << "Number of Thrown Events: " << (*nevents_thrown) << "\n"; // Draw Histograms - TCanvas *c1 = new TCanvas("c1", "c1", 700, 500); + TCanvas* c1 = new TCanvas("c1", "c1", 700, 500); c1->SetLogy(1); hEthr->GetYaxis()->SetTitleOffset(1.4); hEthr->SetLineWidth(2); @@ -121,7 +123,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni c1->SaveAs("results/emcal_barrel_pions_Ethr.png"); c1->SaveAs("results/emcal_barrel_pions_Ethr.pdf"); - TCanvas *c2 = new TCanvas("c2", "c2", 700, 500); + TCanvas* c2 = new TCanvas("c2", "c2", 700, 500); c2->SetLogy(1); hErecXY->GetYaxis()->SetTitleOffset(1.4); hErecXY->SetLineWidth(2); @@ -130,17 +132,17 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni c2->SaveAs("results/emcal_barrel_pions_ErecXY.png"); c2->SaveAs("results/emcal_barrel_pions_ErecXY.pdf"); - TCanvas *c3 = new TCanvas("c3", "c3", 700, 500); + TCanvas* c3 = new TCanvas("c3", "c3", 700, 500); c3->SetLogy(1); hErecZ->GetYaxis()->SetTitleOffset(1.4); hErecZ->SetLineWidth(2); hErecZ->SetLineColor(kBlue); hErecZ->DrawClone(); - c3->SaveAs("results/emal_pions_ErecZ.png"); + c3->SaveAs("results/emal_pions_ErecZ.png"); c3->SaveAs("results/emal_pions_ErecZ.pdf"); - TCanvas *c4 = new TCanvas("c4", "c4", 700, 500); - c4->SetLogy(1); + TCanvas* c4 = new TCanvas("c4", "c4", 700, 500); + c4->SetLogy(1); hNCluster->GetYaxis()->SetTitleOffset(1.6); hNCluster->SetLineWidth(2); hNCluster->SetLineColor(kBlue); @@ -148,7 +150,7 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni c4->SaveAs("results/emcal_barrel_pions_ncluster.png"); c4->SaveAs("results/emcal_barrel_pions_ncluster.pdf"); - TCanvas *c5 = new TCanvas("c5", "c5", 700, 500); + TCanvas* c5 = new TCanvas("c5", "c5", 700, 500); c5->SetLogy(1); hEcluster->GetYaxis()->SetTitleOffset(1.4); hEcluster->SetLineWidth(2); @@ -157,14 +159,15 @@ void emcal_barrel_pions_analysis(const char* input_fname = "rec_emcal_barrel_uni c5->SaveAs("results/emcal_barrel_pions_Ecluster.png"); c5->SaveAs("results/emcal_barrel_pions_Ecluster.pdf"); - TCanvas *c6 = new TCanvas("c6", "c6", 700, 500); + TCanvas* c6 = new TCanvas("c6", "c6", 700, 500); c6->SetLogy(1); hfsam->GetYaxis()->SetTitleOffset(1.4); hfsam->SetLineWidth(2); hfsam->SetLineColor(kBlue); - hfsam->Fit("gaus","","",0.01,0.1); - hfsam->GetFunction("gaus")->SetLineWidth(2); - hfsam->GetFunction("gaus")->SetLineColor(kRed); + hfsam->Fit("gaus", "", "", 0.01, 0.1); + // Commented out for now as giving issues with new container (S. Joosten) + // hfsam->GetFunction("gaus")->SetLineWidth(2); + // hfsam->GetFunction("gaus")->SetLineColor(kRed); hfsam->DrawClone(); c6->SaveAs("results/emcal_barrel_pions_fsam.png"); c6->SaveAs("results/emcal_barrel_pions_fsam.pdf"); diff --git a/benchmarks/tracking/options/tracker_reconstruction.py b/benchmarks/tracking/options/tracker_reconstruction.py index c587f4301ef751c99f7ef9f2eb19f613c311230c..ede59d4f5d5e2f6b65af85f50d97ad734574623c 100644 --- a/benchmarks/tracking/options/tracker_reconstruction.py +++ b/benchmarks/tracking/options/tracker_reconstruction.py @@ -46,7 +46,7 @@ from Configurables import Jug__Reco__SimpleClustering as SimpleClustering podioinput = PodioInput("PodioReader", - collections=["mcparticles","SiTrackerEndcapHits","SiTrackerBarrelHits","EcalBarrelAstroPixHits"])#, OutputLevel=DEBUG)"SiVertexBarrelHits", + collections=["mcparticles","SiTrackerEndcapHits","SiTrackerBarrelHits","EcalBarrelHits"])#, OutputLevel=DEBUG)"SiVertexBarrelHits", ## copiers to get around input --> output copy bug. Note the "2" appended to the output collection. copier = MCCopier("MCCopier", @@ -57,8 +57,8 @@ trkcopier = TrkCopier("TrkCopier", outputCollection="SiTrackerBarrelHits2") ecal_digi = EMCalorimeterDigi("ecal_digi", - inputHitCollection="EcalBarrelAstroPixHits", - outputHitCollection="RawEcalBarrelAstroPixHits") + inputHitCollection="EcalBarrelHits", + outputHitCollection="RawEcalBarrelHits") ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiTrackerBarrelHits", @@ -76,13 +76,13 @@ ufsd_digi2 = UFSDTrackerDigi("ufsd_digi2", ecal_reco = EMCalReconstruction("ecal_reco", - inputHitCollection="RawEcalBarrelAstroPixHits", - outputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RawEcalBarrelHits", + outputHitCollection="RecEcalBarrelHits", minModuleEdep=0.0*units.MeV, OutputLevel=WARNING) simple_cluster = SimpleClustering("simple_cluster", - inputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RecEcalBarrelHits", outputClusters="SimpleClusters", minModuleEdep=1.0*units.MeV, maxDistance=50.0*units.cm, diff --git a/options/tracker_reconstruction.py b/options/tracker_reconstruction.py index 8fe85264697772791ed5e238527da7956f9da344..87130a7c491ea444ab5243e76c556b8e9d62c2cf 100644 --- a/options/tracker_reconstruction.py +++ b/options/tracker_reconstruction.py @@ -51,7 +51,7 @@ from Configurables import Jug__Reco__SimpleClustering as SimpleClustering podioinput = PodioInput("PodioReader", - collections=["mcparticles","SiTrackerEndcapHits","SiTrackerBarrelHits","EcalBarrelAstroPixHits"])#, OutputLevel=DEBUG) + collections=["mcparticles","SiTrackerEndcapHits","SiTrackerBarrelHits","EcalBarrelHits"])#, OutputLevel=DEBUG) #"SiVertexBarrelHits", dummy = MC2DummyParticle("MC2Dummy", @@ -67,8 +67,8 @@ trkcopier = TrkCopier("TrkCopier", outputCollection="SiTrackerBarrelHits2") ecal_digi = EMCalorimeterDigi("ecal_digi", - inputHitCollection="EcalBarrelAstroPixHits", - outputHitCollection="RawEcalBarrelAstroPixHits") + inputHitCollection="EcalBarrelHits", + outputHitCollection="RawEcalBarrelHits") ufsd_digi = UFSDTrackerDigi("ufsd_digi", inputHitCollection="SiTrackerBarrelHits", @@ -88,13 +88,13 @@ ufsd_digi2 = UFSDTrackerDigi("ufsd_digi2", ecal_reco = EMCalReconstruction("ecal_reco", - inputHitCollection="RawEcalBarrelAstroPixHits", - outputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RawEcalBarrelHits", + outputHitCollection="RecEcalBarrelHits", minModuleEdep=0.0*units.MeV) #OutputLevel=DEBUG) simple_cluster = SimpleClustering("simple_cluster", - inputHitCollection="RecEcalBarrelAstroPixHits", + inputHitCollection="RecEcalBarrelHits", outputClusters="SimpleClusters", minModuleEdep=1.0*units.MeV, maxDistance=50.0*units.cm) diff --git a/util/build_detector.sh b/util/build_detector.sh index 39376e21b6ac2d72f204826a5425dd8d6493d5ab..2497d8800e12e200fa484a8a7661171925699844 100755 --- a/util/build_detector.sh +++ b/util/build_detector.sh @@ -27,28 +27,35 @@ source options/env.sh pushd ${DETECTOR_PREFIX} ## We need an up-to-date copy of the detector -if [ ! -d ${JUGGLER_DETECTOR} ]; then - echo "Fetching ${JUGGLER_DETECTOR}" - git clone -b ${JUGGLER_DETECTOR_VERSION} https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git -else - echo "Updating ${JUGGLER_DETECTOR}" - pushd ${JUGGLER_DETECTOR} - git branch - git fetch origin - git checkout ${JUGGLER_DETECTOR_VERSION} - popd +## start clean to avoid issues... +if [ -d ${JUGGLER_DETECTOR} ]; then + echo "cleaning up ${JUGGLER_DETECTOR}" + rm -rf ${JUGGLER_DETECTOR} fi +echo "Fetching ${JUGGLER_DETECTOR}" +git clone -b ${JUGGLER_DETECTOR_VERSION} https://eicweb.phy.anl.gov/EIC/detectors/${JUGGLER_DETECTOR}.git +#else + #echo "Updating ${JUGGLER_DETECTOR}" + #pushd ${JUGGLER_DETECTOR} + #git branch + #git fetch origin + #git checkout ${JUGGLER_DETECTOR_VERSION} + #popd +#fi ## We also need an up-to-date copy of the accelerator. For now this is done ## manually. Down the road we could maybe automize this with cmake if [ ! -d accelerator ]; then - echo "Fetching accelerator" - git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git -else - echo "Updating accelerator" - pushd accelerator - git pull --ff-only - popd + echo "cleaning up accelerator" + rm -rf accelerator fi +echo "Fetching accelerator" +git clone https://eicweb.phy.anl.gov/EIC/detectors/accelerator.git +#else +# echo "Updating accelerator" +# pushd accelerator +# git pull --ff-only +# popd +#fi ## Now symlink the accelerator definition into the detector definition echo "Linking accelerator definition into detector definition" ln -s -f ${DETECTOR_PREFIX}/accelerator/eic ${DETECTOR_PATH}/eic @@ -59,7 +66,7 @@ echo "Building and installing the ${JUGGLER_DETECTOR} package" mkdir -p ${DETECTOR_PREFIX}/build pushd ${DETECTOR_PREFIX}/build -cmake ${DETECTOR_PATH} -DCMAKE_INSTALL_PREFIX=${LOCAL_PREFIX} && make -j30 install +cmake ${DETECTOR_PATH} -DCMAKE_INSTALL_PREFIX=${LOCAL_PREFIX} -DCMAKE_CXX_STANDARD=17 && make -j30 install || exit 1 ## ============================================================================= ## Step 3: That's all!