14 ecalTBInfo_ = consumes<PEcalTBInfo>(
edm::InputTag(
"EcalTBInfoLabel",
"SimEcalTBG4Object"));
15 produces<EcalTBHodoscopeRawInfo>();
22 delete theTBHodoGeom_;
33 event.getByToken(ecalTBInfo_,theEcalTBInfo);
35 double partXhodo = theEcalTBInfo->
evXbeam();
36 double partYhodo = theEcalTBInfo->
evYbeam();
38 LogDebug(
"EcalTBHodo") <<
"TB frame vertex (X,Y) for hodoscope simulation: \n" 39 <<
"x = " << partXhodo <<
" y = " << partYhodo;
45 int nPlanes = (
int)theTBHodoGeom_->getNPlanes();
46 product->setPlanes(nPlanes);
48 for (
int iPlane = 0 ; iPlane < nPlanes ; ++iPlane) {
50 float theCoord = (
float)partXhodo;
51 if (iPlane == 1 || iPlane == 3) theCoord = (
float)partYhodo;
53 vector<int> firedChannels = theTBHodoGeom_->getFiredFibresInPlane(theCoord, iPlane);
54 unsigned int nChannels = firedChannels.size();
58 planeHit.
addHit(firedChannels[
i]);
61 product->setPlane((
unsigned int)iPlane, planeHit);
65 LogDebug(
"EcalTBHodo") << (*product);
void addHit(unsigned int i)
void produce(edm::Event &event, const edm::EventSetup &eventSetup) override
Produce digis out of raw data.
~FakeTBHodoscopeRawInfoProducer() override
Destructor.
FakeTBHodoscopeRawInfoProducer(const edm::ParameterSet &ps)
Constructor.