Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HGCAL] EDAnalyzer for TICL tracksters validation #33360

Merged
merged 52 commits into from Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
35c625a
Add TICLTrackstersValidation to HGCal Validation
felicepantaleo Jul 31, 2020
84a03a5
Fix input tracksters collection labels
felicepantaleo Aug 3, 2020
b168ddf
Create TICL Tracksters Validation configuration
felicepantaleo Aug 3, 2020
14595ba
Add TICL Tracksters Validation to the main Validation sequence
felicepantaleo Aug 3, 2020
dfdfa02
Add rechitTools
felicepantaleo Aug 3, 2020
1021cf6
Creating subfolders for trackster iterations histograms
felicepantaleo Aug 3, 2020
5daf7d3
Add energy plots to Trackster-Edge Validation
rovere Aug 13, 2020
7e590f2
Add angles plots to TICL Trackster validation
rovere Aug 18, 2020
03f9412
Update plots
rovere Aug 18, 2020
bafef43
Do not extend layer number in TICLTrackstersValidation
rovere Aug 19, 2020
ad3c4ea
Add more plots to Trackster Validation
rovere Aug 20, 2020
bb677d9
Fix rechittools initialization
rovere Aug 20, 2020
6478b3f
Add doublet link multiplicity plots
rovere Aug 21, 2020
594f8ff
Add fraction of associated energy
rovere Sep 2, 2020
f38a7f8
Add number of Trackster plot
rovere Sep 2, 2020
e4c4de3
Add energy-weighted histograms
rovere Sep 7, 2020
d5f329b
Fix squares bug
lecriste Sep 30, 2020
8fb5b5b
Add all TICLDebugger histograms
lecriste Oct 8, 2020
509e494
Produce TICLDebugger plots by default
lecriste Oct 9, 2020
f7a54f6
Add kaons0Long
lecriste Oct 28, 2020
bd1c9d8
Add TrkEM iteration to validation
lecriste Nov 3, 2020
e4d1f72
Final fixing
ebrondol Nov 9, 2020
3c6f736
Script to run makeHGCalValidationPlots for multiple samples
ebrondol Nov 9, 2020
12447d1
Explore/extend CaloParticle validation
ebrondol Nov 19, 2020
2656e41
Update script to run directly on several folders
ebrondol Nov 19, 2020
c890b4a
Clean up and add CaloPart to makeHGCalValidationPlots all
ebrondol Nov 20, 2020
8b8814e
Add raw vs reg energy in TICLTrackstersValidation
ebrondol Nov 20, 2020
f5da041
Add 2D plotting for multiple files
ebrondol Nov 23, 2020
0a551f9
Axes names
ebrondol Nov 23, 2020
5eecec5
Adding CaloPart en hits sum
ebrondol Nov 26, 2020
d572a64
Fix list_2D_all
ebrondol Nov 29, 2020
b809d80
Separate option in run_makeHGCalValidationPlots
ebrondol Nov 30, 2020
f1c8707
Fix separate plots for 2D
ebrondol Dec 1, 2020
8dc7b9d
Group cosBeta plots
lecriste Dec 2, 2020
b6124ca
Improve visualization
lecriste Dec 3, 2020
56cf298
Add missing sample
lecriste Dec 3, 2020
506032a
Add energy plots with at least one LC
lecriste Dec 11, 2020
db28b2d
Improve code
lecriste Dec 11, 2020
a01519b
Remove sqrt
lecriste Nov 23, 2020
5a90c3d
Non-uniform energy binning
lecriste Jan 20, 2021
cb67710
Fix rebasing
ebrondol Mar 5, 2021
3fc13c0
Fix HGCalValidator to compile and run
ebrondol Mar 19, 2021
c420c27
Debug printout in HGVHistoProducerAlgo
ebrondol Mar 19, 2021
4603b5b
Remove run_makeHGCalValidationPlots script
ebrondol Mar 19, 2021
51724ef
Change DQM plots folders
ebrondol Mar 23, 2021
47ed97f
Revert back the sq computation of minCos
ebrondol Apr 1, 2021
23a4abc
Renaming to TracksterEdges
ebrondol Apr 1, 2021
5f09a59
Add ID prob plot
ebrondol Apr 1, 2021
3ebb5cf
Clean up
ebrondol Apr 1, 2021
6c1185e
Make TICLTrackstersEdgesValidation not to run by default
ebrondol Apr 6, 2021
7eaab9e
Renaming to TracksterEdges in python
ebrondol Apr 6, 2021
d87de01
Fix deprecated EventSetup handle
ebrondol Apr 8, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions RecoHGCal/TICL/plugins/HGCDoublet.cc
Expand Up @@ -110,9 +110,10 @@ int HGCDoublet::areAligned(double xi,
auto minCosPointing_sq = minCosPointing * minCosPointing;
bool isWithinLimitsPointing = (dot_pointing_sq > minCosPointing_sq * mag_pointing_sq * mag2sq);
if (debug) {
LogDebug("HGCDoublet") << "-- Are Aligned -- dot_pointing_sq: " << dot_pointing * dot_pointing
LogDebug("HGCDoublet") << "Pointing direction: " << pointingDir << std::endl;
LogDebug("HGCDoublet") << "-- Are Aligned -- dot_pointing_sq: " << dot_pointing_sq
<< " mag_pointing_sq: " << mag_pointing_sq << " mag2sq: " << mag2sq
<< " isWithinLimits: " << isWithinLimitsPointing << std::endl;
<< " isWithinLimitsPointing: " << isWithinLimitsPointing << std::endl;
}
// by squaring cosTheta and multiplying by the squares of the magnitudes
// an equivalent comparison is made without the division and square root which are costly FP ops.
Expand Down
5 changes: 5 additions & 0 deletions Validation/Configuration/python/hgcalSimValid_cff.py
Expand Up @@ -17,6 +17,9 @@
from Validation.HGCalValidation.ticlPFValidation_cfi import ticlPFValidation
hgcalTiclPFValidation = cms.Sequence(ticlPFValidation)

from Validation.HGCalValidation.ticlTrackstersEdgesValidation_cfi import ticlTrackstersEdgesValidation
hgcalTiclTrackstersEdgesValidationSequence = cms.Sequence(ticlTrackstersEdgesValidation)

hgcalValidatorSequence = cms.Sequence(hgcalValidator)
hgcalPFJetValidation = _hgcalPFJetValidation.clone(BenchmarkLabel = 'PFJetValidation/HGCAlCompWithGenJet',
VariablePtBins=[10., 30., 80., 120., 250., 600.],
Expand All @@ -38,6 +41,8 @@
+ hgcalHitValidationSequence
+ hgcalValidatorSequence
+ hgcalTiclPFValidation
#Currently commented out until trackster edges are saved
# + hgcalTiclTrackstersEdgesValidationSequence
+ hgcalPFJetValidation)

_hfnose_hgcalAssociatorsTask = hgcalAssociators.copy()
Expand Down
7 changes: 4 additions & 3 deletions Validation/HGCalValidation/interface/HGCalValidator.h
Expand Up @@ -60,16 +60,17 @@ class HGCalValidator : public DQMGlobalEDAnalyzer<HGCalValidatorHistograms> {
std::unordered_map<DetId, const HGCRecHit*> const&) const;

protected:
edm::ESGetToken<CaloGeometry, CaloGeometryRecord> caloGeomToken_;
edm::InputTag label_lcl;
std::vector<edm::InputTag> label_mcl;
edm::InputTag associator_;
edm::InputTag associatorSim_;
const bool SaveGeneralInfo_;
const bool doCaloParticlePlots_;
const bool doCaloParticleSelection_;
const bool dosimclustersPlots_;
const bool dolayerclustersPlots_;
const bool domulticlustersPlots_;
const bool doSimClustersPlots_;
const bool doLayerClustersPlots_;
const bool doMultiClustersPlots_;
std::vector<edm::InputTag> label_clustersmask;
const edm::FileInPath cummatbudinxo_;

Expand Down
Expand Up @@ -149,6 +149,7 @@ struct HGVHistoProducerAlgoHistograms {
std::vector<dqm::reco::MonitorElement*> h_numMerge_multicl_phi;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_multicl2caloparticle;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_caloparticle2multicl;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_caloparticle2multicl_assoc;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_multicl2caloparticle_vs_eta;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_multicl2caloparticle_vs_phi;
std::vector<dqm::reco::MonitorElement*> h_sharedenergy_caloparticle2multicl_vs_eta;
Expand Down
24 changes: 12 additions & 12 deletions Validation/HGCalValidation/plugins/HGCalValidator.cc
Expand Up @@ -9,16 +9,17 @@ using namespace std;
using namespace edm;

HGCalValidator::HGCalValidator(const edm::ParameterSet& pset)
: label_lcl(pset.getParameter<edm::InputTag>("label_lcl")),
: caloGeomToken_(esConsumes<CaloGeometry, CaloGeometryRecord>()),
label_lcl(pset.getParameter<edm::InputTag>("label_lcl")),
label_mcl(pset.getParameter<std::vector<edm::InputTag>>("label_mcl")),
associator_(pset.getUntrackedParameter<edm::InputTag>("associator")),
associatorSim_(pset.getUntrackedParameter<edm::InputTag>("associatorSim")),
SaveGeneralInfo_(pset.getUntrackedParameter<bool>("SaveGeneralInfo")),
doCaloParticlePlots_(pset.getUntrackedParameter<bool>("doCaloParticlePlots")),
doCaloParticleSelection_(pset.getUntrackedParameter<bool>("doCaloParticleSelection")),
dosimclustersPlots_(pset.getUntrackedParameter<bool>("dosimclustersPlots")),
dolayerclustersPlots_(pset.getUntrackedParameter<bool>("dolayerclustersPlots")),
domulticlustersPlots_(pset.getUntrackedParameter<bool>("domulticlustersPlots")),
doSimClustersPlots_(pset.getUntrackedParameter<bool>("doSimClustersPlots")),
doLayerClustersPlots_(pset.getUntrackedParameter<bool>("doLayerClustersPlots")),
doMultiClustersPlots_(pset.getUntrackedParameter<bool>("doMultiClustersPlots")),
label_clustersmask(pset.getParameter<std::vector<edm::InputTag>>("LayerClustersInputMask")),
cummatbudinxo_(pset.getParameter<edm::FileInPath>("cummatbudinxo")) {
//In this way we can easily generalize to associations between other objects also.
Expand Down Expand Up @@ -115,7 +116,7 @@ void HGCalValidator::bookHistograms(DQMStore::IBooker& ibook,
}

//Booking histograms concerning with simclusters
if (dosimclustersPlots_) {
if (doSimClustersPlots_) {
ibook.cd();
ibook.setCurrentFolder(dirName_ + "simClusters/ClusterLevel");
histoProducerAlgo_->bookSimClusterHistos(
Expand Down Expand Up @@ -149,7 +150,7 @@ void HGCalValidator::bookHistograms(DQMStore::IBooker& ibook,
} //if for simcluster plots

//Booking histograms concerning with hgcal layer clusters
if (dolayerclustersPlots_) {
if (doLayerClustersPlots_) {
ibook.cd();
ibook.setCurrentFolder(dirName_ + "hgcalLayerClusters/ClusterLevel");
histoProducerAlgo_->bookClusterHistos_ClusterLevel(ibook,
Expand Down Expand Up @@ -192,7 +193,7 @@ void HGCalValidator::bookHistograms(DQMStore::IBooker& ibook,
ibook.setCurrentFolder(dirName);

//Booking histograms concerning for hgcal multi clusters
if (domulticlustersPlots_) {
if (doMultiClustersPlots_) {
histoProducerAlgo_->bookMultiClusterHistos(ibook, histograms.histoProducerAlgo, totallayers_to_monitor_);
}
} //end of booking multiclusters loop
Expand Down Expand Up @@ -241,8 +242,7 @@ void HGCalValidator::dqmAnalyze(const edm::Event& event,
event.getByToken(label_cp_effic, caloParticleHandle);
std::vector<CaloParticle> const& caloParticles = *caloParticleHandle;

edm::ESHandle<CaloGeometry> geom;
setup.get<CaloGeometryRecord>().get(geom);
edm::ESHandle<CaloGeometry> geom = setup.getHandle(caloGeomToken_);
tools_->setGeometry(*geom);
histoProducerAlgo_->setRecHitTools(tools_);

Expand Down Expand Up @@ -310,7 +310,7 @@ void HGCalValidator::dqmAnalyze(const edm::Event& event,
// ##############################################
// fill simcluster histograms
// ##############################################
if (dosimclustersPlots_) {
if (doSimClustersPlots_) {
histoProducerAlgo_->fill_simcluster_histos(
histograms.histoProducerAlgo, simclusters, totallayers_to_monitor_, thicknesses_to_monitor_);

Expand Down Expand Up @@ -347,7 +347,7 @@ void HGCalValidator::dqmAnalyze(const edm::Event& event,
// fill layercluster histograms
// ##############################################
int w = 0; //counter counting the number of sets of histograms
if (dolayerclustersPlots_) {
if (doLayerClustersPlots_) {
histoProducerAlgo_->fill_generic_cluster_histos(histograms.histoProducerAlgo,
w,
clusterHandle,
Expand Down Expand Up @@ -377,7 +377,7 @@ void HGCalValidator::dqmAnalyze(const edm::Event& event,
// fill multicluster histograms
// ##############################################
for (unsigned int wml = 0; wml < label_mclTokens.size(); wml++) {
if (domulticlustersPlots_) {
if (doMultiClustersPlots_) {
edm::Handle<std::vector<reco::HGCalMultiCluster>> multiClusterHandle;
event.getByToken(label_mclTokens[wml], multiClusterHandle);
const std::vector<reco::HGCalMultiCluster>& multiClusters = *multiClusterHandle;
Expand Down