-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Energy threshold update for new MTD geometry #31654
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
Changes from 6 commits
2390bc2
ce31890
7f999d4
506a52f
1814869
cb56598
98c389f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,12 +3,16 @@ | |
| #include "RecoLocalFastTime/Records/interface/MTDTimeCalibRecord.h" | ||
| #include "RecoLocalFastTime/FTLCommonAlgos/interface/MTDTimeCalib.h" | ||
|
|
||
| #include "Geometry/MTDNumberingBuilder/interface/MTDTopology.h" | ||
| #include "Geometry/MTDCommonData/interface/MTDTopologyMode.h" | ||
| #include <iostream> | ||
|
|
||
| class MTDRecHitAlgo : public MTDRecHitAlgoBase { | ||
| public: | ||
| /// Constructor | ||
| MTDRecHitAlgo(const edm::ParameterSet& conf, edm::ConsumesCollector& sumes) | ||
| : MTDRecHitAlgoBase(conf, sumes), | ||
| thresholdToKeep_(conf.getParameter<double>("thresholdToKeep")), | ||
| thresholdToKeep_(conf.getParameter<std::vector<double>>("thresholdToKeep")), | ||
| calibration_(conf.getParameter<double>("calibrationConstant")) {} | ||
|
|
||
| /// Destructor | ||
|
|
@@ -22,14 +26,19 @@ class MTDRecHitAlgo : public MTDRecHitAlgoBase { | |
| FTLRecHit makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const final; | ||
|
|
||
| private: | ||
| double thresholdToKeep_, calibration_; | ||
| std::vector<double> thresholdToKeep_; | ||
| double calibration_; | ||
| const MTDTimeCalib* time_calib_; | ||
| const MTDTopology* topology_; | ||
| }; | ||
|
|
||
| void MTDRecHitAlgo::getEventSetup(const edm::EventSetup& es) { | ||
| edm::ESHandle<MTDTimeCalib> pTC; | ||
| es.get<MTDTimeCalibRecord>().get("MTDTimeCalib", pTC); | ||
| time_calib_ = pTC.product(); | ||
| edm::ESHandle<MTDTopology> topologyHandle; | ||
| es.get<MTDTopologyRcd>().get(topologyHandle); | ||
| topology_ = topologyHandle.product(); | ||
| } | ||
|
|
||
| FTLRecHit MTDRecHitAlgo::makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32_t& flags) const { | ||
|
|
@@ -39,6 +48,11 @@ FTLRecHit MTDRecHitAlgo::makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32 | |
| float energy = 0.; | ||
| float time = 0.; | ||
|
|
||
| // MTD topology | ||
| unsigned int index_topology = 0; //1Disks geometry | ||
|
||
| if (topology_->getMTDTopologyMode() > static_cast<int>(MTDTopologyMode::Mode::barphiflat)) | ||
|
||
| index_topology = 1; //2Disk geometry | ||
|
|
||
| /// position and positionError in unit cm | ||
| float position = -1.f; | ||
| float positionError = -1.f; | ||
|
|
@@ -80,7 +94,7 @@ FTLRecHit MTDRecHitAlgo::makeRecHit(const FTLUncalibratedRecHit& uRecHit, uint32 | |
|
|
||
| // Now fill flags | ||
| // all rechits from the digitizer are "good" at present | ||
| if (energy > thresholdToKeep_) { | ||
| if (energy > thresholdToKeep_[index_topology]) { | ||
| flags = FTLRecHit::kGood; | ||
| rh.setFlag(flags); | ||
| } else { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this include should not be needed, because cout is not allowed.