diff --git a/Ecal/include/Ecal/Event/EcalVetoResult.h b/Ecal/include/Ecal/Event/EcalVetoResult.h index 63803884c..985157920 100644 --- a/Ecal/include/Ecal/Event/EcalVetoResult.h +++ b/Ecal/include/Ecal/Event/EcalVetoResult.h @@ -80,8 +80,11 @@ class EcalVetoResult { /** Checks if the event passes the Ecal veto. */ bool passesVeto() const { return passesVeto_; } + float getDisc() const { return discValue_; } + bool getFiducial() const { return fiducial_; } + int getDeepestLayerHit() const { return deepestLayerHit_; } int getNReadoutHits() const { return nReadoutHits_; } @@ -208,6 +211,7 @@ class EcalVetoResult { void setVetoResult(bool passesVeto) { passesVeto_ = passesVeto; } void setDiscValue(float discValue) { discValue_ = discValue; } + void setFiducial(bool fiducial) { fiducial_ = fiducial; } /** Return the momentum of the recoil at the Ecal face. */ const std::vector getRecoilMomentum() const { @@ -301,8 +305,12 @@ class EcalVetoResult { std::vector> oContLayerMean_; std::vector> oContLayerStd_; + /** discriminator value from the BDT */ float discValue_{0}; + /** is the recoil electron fiducial in ECAL?*/ + bool fiducial_{false}; + /** px of recoil electron at the Ecal face. */ double recoilPx_{-9999}; @@ -320,7 +328,7 @@ class EcalVetoResult { std::vector ecalLayerEdepReadout_; - ClassDef(EcalVetoResult, 6); + ClassDef(EcalVetoResult, 7); }; } // namespace ldmx diff --git a/Ecal/src/Ecal/EcalVetoProcessor.cxx b/Ecal/src/Ecal/EcalVetoProcessor.cxx index 54b680970..33e25f0fd 100644 --- a/Ecal/src/Ecal/EcalVetoProcessor.cxx +++ b/Ecal/src/Ecal/EcalVetoProcessor.cxx @@ -771,7 +771,8 @@ void EcalVetoProcessor::produce(framework::Event &event) { ldmx_log(debug) << "====== END OF Tracking hit list ======"; } - float cellWidth = 8.7; + // in v14 that this is 2*4.17 mm + float cellWidth = 2 * geometry_->getCellMinR(); for (int iHit = 0; iHit < trackingHitList.size(); iHit++) { // list of hit numbers in track (34 = maximum theoretical length) int track[34]; @@ -919,7 +920,8 @@ void EcalVetoProcessor::produce(framework::Event &event) { } nStraightTracks_ = track_list.size(); // print the track list - ldmx_log(info) << "Straight tracks found (after merge): " << nStraightTracks_; + ldmx_log(debug) << "Straight tracks found (after merge): " + << nStraightTracks_; for (int track_i = 0; track_i < track_list.size(); track_i++) { ldmx_log(debug) << "Track " << track_i << ":"; for (int hit_i = 0; hit_i < track_list[track_i].size(); hit_i++) { @@ -932,8 +934,8 @@ void EcalVetoProcessor::produce(framework::Event &event) { // ------------------------------------------------------ // Linreg tracking: - ldmx_log(info) << "Finding linreg tracks from " << trackingHitList.size() - << " hits"; + ldmx_log(debug) << "Finding linreg tracks from " << trackingHitList.size() + << " hits"; for (int iHit = 0; iHit < trackingHitList.size(); iHit++) { int track[34]; @@ -1091,6 +1093,9 @@ void EcalVetoProcessor::produce(framework::Event &event) { result.setDiscValue(pred); ldmx_log(debug) << " The pred > bdtCutVal = " << (pred > bdtCutVal_); + // Persist in the event if the recoil ele is fiducial + result.setFiducial(inside); + // If the event passes the veto, keep it. Otherwise, // drop the event. if (result.passesVeto() && inside) {