Skip to content
Snippets Groups Projects
Commit e451a4cd authored by Sylvester Joosten's avatar Sylvester Joosten
Browse files

Fix new container

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