Skip to content

Commit

Permalink
Add Ecal simhit rechit position checks in DQM
Browse files Browse the repository at this point in the history
  • Loading branch information
tvami committed Jan 17, 2025
1 parent 9e7f241 commit ea2202d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions DQM/python/dqm.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,15 @@ def __init__(self,name="EcalDigiVerify") :
self.ecalRecHitColl = "EcalRecHits"
self.ecalRecHitPass = "" #use whatever pass is available

self.build1DHistogram( "rec_sim_hit_residual_x" ,
"RecHit X - SimHit X [mm]" , 30 , -15.0 , 15.0 )

self.build1DHistogram( "rec_sim_hit_residual_y" ,
"RecHit Y - SimHit Y [mm]" , 30 , -15.0 , 15.0 )

self.build1DHistogram( "rec_sim_hit_residual_z" ,
"RecHit Z - SimHit Z [mm]" , 40 , -20.0 , 20.0 )

self.build1DHistogram( "num_sim_hits_per_cell" ,
"Number of SimHits per ECal Cell (excluding empty rec cells)" , 20 , -0.5 , 19.5 )

Expand Down
6 changes: 6 additions & 0 deletions DQM/src/DQM/EcalDigiVerifier.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ void EcalDigiVerifier::analyze(const framework::Event &event) {
if (rawID == simHit.getID()) {
numSimHits += simHit.getNumberOfContribs();
totalSimEDep += simHit.getEdep();
auto residualX = recHit.getXPos() - simHit.getPosition()[0];
auto residualY = recHit.getYPos() - simHit.getPosition()[1];
auto residualZ = recHit.getZPos() - simHit.getPosition()[2];
histograms_.fill("rec_sim_hit_residual_x", residualX);
histograms_.fill("rec_sim_hit_residual_y", residualY);
histograms_.fill("rec_sim_hit_residual_z", residualZ);
} else if (rawID < simHit.getID()) {
// later sim hits - all done
break;
Expand Down

0 comments on commit ea2202d

Please sign in to comment.