55 using namespace cmsdt;
79 static constexpr
float bxspacing = 25.0;
80 static constexpr
float timeshift = 400.0;
81 static constexpr
float flatcalib = 325.0;
90 dtDigisToken = consumes<DTDigiCollection>(
dtDigiTag);
101 produces<DTDigiCollection>();
117 theSync->setES(iSetup);
118 iEvent.getByToken(dtDigisToken, DTDigiHandle);
121 for (
const auto& dtLayerIt : *DTDigiHandle) {
122 const DTLayerId& layerId = dtLayerIt.first;
125 DTWireId wireId(layerId, (*digiIt).wire());
126 float digiTime = (*digiIt).time();
127 int wire = (*digiIt).
wire();
128 int number = (*digiIt).number();
130 if (flat_calib_ != 0)
131 newTime = digiTime - flatcalib + bxspacing *
iEvent.eventAuxiliary().bunchCrossing() +
float(timeOffset_);
134 newTime = digiTime + bxspacing * timeshift;
138 newTime = digiTime - theSync->offset(wireId) + bxspacing *
iEvent.eventAuxiliary().bunchCrossing() +
142 mydigis.insertDigi(layerId, newDigi);
145 auto CorrectedDTDigiCollection = std::make_unique<DTDigiCollection>(mydigis);
CalibratedDigis(const edm::ParameterSet &)
T getParameter(std::string const &) const
void produce(edm::Event &, const edm::EventSetup &) override
int wire() const
Return the wire number.
#define DEFINE_FWK_MODULE(type)
std::unique_ptr< DTTTrigBaseSync > theSync
edm::EDGetTokenT< DTDigiCollection > dtDigisToken
edm::Handle< DTDigiCollection > DTDigiHandle
std::vector< DigiType >::const_iterator const_iterator
~CalibratedDigis() override