13 ecalTBInfo_ = consumes<PEcalTBInfo>(
edm::InputTag(
"EcalTBInfoLabel",
"SimEcalTBG4Object"));
14 produces<EcalTBHodoscopeRawInfo>();
27 event.getByToken(ecalTBInfo_, theEcalTBInfo);
29 double partXhodo = theEcalTBInfo->
evXbeam();
30 double partYhodo = theEcalTBInfo->
evYbeam();
32 LogDebug(
"EcalTBHodo") <<
"TB frame vertex (X,Y) for hodoscope simulation: \n" 33 <<
"x = " << partXhodo <<
" y = " << partYhodo;
39 int nPlanes = (
int)theTBHodoGeom_->getNPlanes();
40 product->setPlanes(nPlanes);
42 for (
int iPlane = 0; iPlane < nPlanes; ++iPlane) {
43 float theCoord = (
float)partXhodo;
44 if (iPlane == 1 || iPlane == 3)
45 theCoord = (
float)partYhodo;
47 vector<int> firedChannels = theTBHodoGeom_->getFiredFibresInPlane(theCoord, iPlane);
48 unsigned int nChannels = firedChannels.size();
52 planeHit.
addHit(firedChannels[
i]);
55 product->setPlane((
unsigned int)iPlane, planeHit);
58 LogDebug(
"EcalTBHodo") << (*product);
void addHit(unsigned int i)
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
Produce digis out of raw data.
Namespace of DDCMS conversion namespace.
~FakeTBHodoscopeRawInfoProducer() override
Destructor.
FakeTBHodoscopeRawInfoProducer(const edm::ParameterSet &ps)
Constructor.