Skip to content

Commit

Permalink
Merge pull request #40143 from fabiocos/fc-localrecovalid
Browse files Browse the repository at this point in the history
MTD validation: update monitoring of reconstructed clusters
  • Loading branch information
cmsbuild authored Nov 28, 2022
2 parents 2aca7de + 3f5319c commit 71654b0
Show file tree
Hide file tree
Showing 3 changed files with 170 additions and 160 deletions.
62 changes: 28 additions & 34 deletions Validation/MtdValidation/plugins/BtlLocalRecoValidation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ class BtlLocalRecoValidation : public DQMEDAnalyzer {
MonitorElement* meHitYlocal_;
MonitorElement* meHitZlocal_;

MonitorElement* meHitX_;
MonitorElement* meHitY_;
MonitorElement* meHitZ_;
MonitorElement* meHitPhi_;
MonitorElement* meHitEta_;
Expand Down Expand Up @@ -289,12 +287,10 @@ void BtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS

if (optionalPlots_) {
meLocalOccupancy_->Fill(local_point.x() + recHit.position(), local_point.y());
meHitXlocal_->Fill(local_point.x());
meHitYlocal_->Fill(local_point.y());
meHitZlocal_->Fill(local_point.z());
}
meHitX_->Fill(global_point.x());
meHitY_->Fill(global_point.y());
meHitXlocal_->Fill(local_point.x());
meHitYlocal_->Fill(local_point.y());
meHitZlocal_->Fill(local_point.z());
meHitZ_->Fill(global_point.z());
meHitPhi_->Fill(global_point.phi());
meHitEta_->Fill(global_point.eta());
Expand Down Expand Up @@ -461,17 +457,17 @@ void BtlLocalRecoValidation::analyze(const edm::Event& iEvent, const edm::EventS

meCluZRes_->Fill(z_res);

if (optionalPlots_) {
if (matchClu && comp != nullptr) {
meCluLocalXRes_->Fill(xlocal_res);
meCluLocalYRes_->Fill(ylocal_res);
meCluLocalXPull_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
meCluLocalYPull_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
meCluZPull_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
meCluXLocalErr_->Fill(std::sqrt(comp->localPositionError().xx()));
meCluYLocalErr_->Fill(std::sqrt(comp->localPositionError().yy()));
}
if (matchClu && comp != nullptr) {
meCluLocalXRes_->Fill(xlocal_res);
meCluLocalYRes_->Fill(ylocal_res);
meCluLocalXPull_->Fill(xlocal_res / std::sqrt(comp->localPositionError().xx()));
meCluLocalYPull_->Fill(ylocal_res / std::sqrt(comp->localPositionError().yy()));
meCluZPull_->Fill(z_res / std::sqrt(comp->globalPositionError().czz()));
meCluXLocalErr_->Fill(std::sqrt(comp->localPositionError().xx()));
meCluYLocalErr_->Fill(std::sqrt(comp->localPositionError().yy()));
}

if (optionalPlots_) {
meCluYXLocal_->Fill(local_point.x(), local_point.y());
meCluYXLocalSim_->Fill(cluLocalPosSIM.x(), cluLocalPosSIM.y());
}
Expand Down Expand Up @@ -599,20 +595,18 @@ void BtlLocalRecoValidation::bookHistograms(DQMStore::IBooker& ibook,
meNhits_ = ibook.book1D("BtlNhits", "Number of BTL RECO hits;log_{10}(N_{RECO})", 100, 0., 5.25);

meHitEnergy_ = ibook.book1D("BtlHitEnergy", "BTL RECO hits energy;E_{RECO} [MeV]", 100, 0., 20.);
meHitLogEnergy_ = ibook.book1D("BtlHitLogEnergy", "BTL RECO hits energy;log_{10}(E_{RECO} [MeV])", 25, -1., 1.5);
meHitLogEnergy_ = ibook.book1D("BtlHitLogEnergy", "BTL RECO hits energy;log_{10}(E_{RECO} [MeV])", 16, -0.1, 1.5);
meHitTime_ = ibook.book1D("BtlHitTime", "BTL RECO hits ToA;ToA_{RECO} [ns]", 100, 0., 25.);
meHitTimeError_ = ibook.book1D("BtlHitTimeError", "BTL RECO hits ToA error;#sigma^{ToA}_{RECO} [ns]", 50, 0., 0.1);
meOccupancy_ = ibook.book2D(
"BtlOccupancy", "BTL RECO hits occupancy;Z_{RECO} [cm]; #phi_{RECO} [rad]", 65, -260., 260., 126, -3.2, 3.2);
if (optionalPlots_) {
meLocalOccupancy_ = ibook.book2D(
"BtlLocalOccupancy", "BTL RECO hits local occupancy;X_{RECO} [cm]; Y_{RECO} [cm]", 100, 10., 10., 60, -3., 3.);
meHitXlocal_ = ibook.book1D("BtlHitXlocal", "BTL RECO local X;X_{RECO}^{LOC} [cm]", 100, -10., 10.);
meHitYlocal_ = ibook.book1D("BtlHitYlocal", "BTL RECO local Y;Y_{RECO}^{LOC} [cm]", 60, -3, 3);
meHitZlocal_ = ibook.book1D("BtlHitZlocal", "BTL RECO local z;z_{RECO}^{LOC} [cm]", 10, -1, 1);
}
meHitX_ = ibook.book1D("BtlHitX", "BTL RECO hits X;X_{RECO} [cm]", 60, -120., 120.);
meHitY_ = ibook.book1D("BtlHitY", "BTL RECO hits Y;Y_{RECO} [cm]", 60, -120., 120.);
meHitXlocal_ = ibook.book1D("BtlHitXlocal", "BTL RECO local X;X_{RECO}^{LOC} [cm]", 100, -10., 10.);
meHitYlocal_ = ibook.book1D("BtlHitYlocal", "BTL RECO local Y;Y_{RECO}^{LOC} [cm]", 60, -3, 3);
meHitZlocal_ = ibook.book1D("BtlHitZlocal", "BTL RECO local z;z_{RECO}^{LOC} [cm]", 8, -0.4, 0.4);
meHitZ_ = ibook.book1D("BtlHitZ", "BTL RECO hits Z;Z_{RECO} [cm]", 100, -260., 260.);
meHitPhi_ = ibook.book1D("BtlHitPhi", "BTL RECO hits #phi;#phi_{RECO} [rad]", 126, -3.2, 3.2);
meHitEta_ = ibook.book1D("BtlHitEta", "BTL RECO hits #eta;#eta_{RECO}", 100, -1.55, 1.55);
Expand Down Expand Up @@ -724,16 +718,18 @@ void BtlLocalRecoValidation::bookHistograms(DQMStore::IBooker& ibook,
meCluPhiRes_ =
ibook.book1D("BtlCluPhiRes", "BTL cluster #phi resolution;#phi_{RECO}-#phi_{SIM} [rad]", 100, -0.03, 0.03);
meCluZRes_ = ibook.book1D("BtlCluZRes", "BTL cluster Z resolution;Z_{RECO}-Z_{SIM} [cm]", 100, -0.2, 0.2);
meCluLocalXRes_ =
ibook.book1D("BtlCluLocalXRes", "BTL cluster local X resolution;X_{RECO}-X_{SIM} [cm]", 100, -3.1, 3.1);
meCluLocalYRes_ =
ibook.book1D("BtlCluLocalYRes", "BTL cluster local Y resolution;Y_{RECO}-Y_{SIM} [cm]", 100, -0.2, 0.2);
meCluLocalXPull_ =
ibook.book1D("BtlCluLocalXPull", "BTL cluster local X pull;X_{RECO}-X_{SIM}/sigmaX_[RECO]", 100, -5., 5.);
meCluLocalYPull_ =
ibook.book1D("BtlCluLocalYPull", "BTL cluster local Y pull;Y_{RECO}-Y_{SIM}/sigmaY_[RECO]", 100, -5., 5.);
meCluZPull_ = ibook.book1D("BtlCluZPull", "BTL cluster Z pull;Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
meCluXLocalErr_ = ibook.book1D("BtlCluXLocalErr", "BTL cluster X local error;sigmaX_{RECO,loc} [cm]", 20, 0., 2.);
meCluYLocalErr_ = ibook.book1D("BtlCluYLocalErr", "BTL cluster Y local error;sigmaY_{RECO,loc} [cm]", 20, 0., 0.4);
if (optionalPlots_) {
meCluLocalXRes_ =
ibook.book1D("BtlCluLocalXRes", "BTL cluster local X resolution;X_{RECO}-X_{SIM} [cm]", 100, -3.1, 3.1);
meCluLocalYRes_ =
ibook.book1D("BtlCluLocalYRes", "BTL cluster local Y resolution;Y_{RECO}-Y_{SIM} [cm]", 100, -3.1, 3.1);
meCluLocalXPull_ =
ibook.book1D("BtlCluLocalXPull", "BTL cluster local X pull;X_{RECO}-X_{SIM}/sigmaX_[RECO]", 100, -5., 5.);
meCluLocalYPull_ =
ibook.book1D("BtlCluLocalYPull", "BTL cluster local Y pull;Y_{RECO}-Y_{SIM}/sigmaY_[RECO]", 100, -5., 5.);
meCluZPull_ = ibook.book1D("BtlCluZPull", "BTL cluster Z pull;Z_{RECO}-Z_{SIM}/sigmaZ_[RECO]", 100, -5., 5.);
meCluYXLocal_ = ibook.book2D("BtlCluYXLocal",
"BTL cluster local Y vs X;X^{local}_{RECO} [cm];Y^{local}_{RECO} [cm]",
200,
Expand All @@ -750,8 +746,6 @@ void BtlLocalRecoValidation::bookHistograms(DQMStore::IBooker& ibook,
200,
-2.8,
2.8);
meCluXLocalErr_ = ibook.book1D("BtlCluXLocalErr", "BTL cluster X local error;sigmaX_{RECO,loc} [cm]", 30, 0., 3.);
meCluYLocalErr_ = ibook.book1D("BtlCluYLocalErr", "BTL cluster Y local error;sigmaY_{RECO,loc} [cm]", 30, 0., 0.9);
}
meUnmatchedCluEnergy_ =
ibook.book1D("BtlUnmatchedCluEnergy", "BTL unmatched cluster log10(energy);log10(E_{RECO} [MeV])", 5, -3, 2);
Expand Down
Loading

0 comments on commit 71654b0

Please sign in to comment.