17 produces<EcalTBHodoscopeRawInfo>();
21 myThreshold = 0.05E-3;
25 delete theTBHodoGeom_;
35 event.getByLabel(
"g4SimHits",
"EcalTBH4BeamHits", pCaloHit);
38 LogDebug(
"EcalTBHodo") <<
"total # caloHits: " << caloHits->size() ;
40 edm::LogError(
"EcalTBHodo") <<
"Error! can't get the caloHitContainer " ;
42 if (!caloHits){
return; }
46 std::map<unsigned int, double> energyMap;
49 for(edm::PCaloHitContainer::const_iterator itch = caloHits->begin(); itch != caloHits->end(); ++itch) {
51 double thisHitEne = itch->energy();
53 std::map<unsigned int,double>::iterator itmap = energyMap.find(itch->id());
54 if ( itmap == energyMap.end() )
55 energyMap.insert(pair<unsigned int, double>( itch->id(), thisHitEne));
57 (*itmap).second+=thisHitEne;
65 int nPlanes=theTBHodoGeom_->getNPlanes();
66 int nFibers=theTBHodoGeom_->getNFibres();
67 product->setPlanes(nPlanes);
69 bool firedChannels[4][64];
70 for (
int iPlane = 0 ; iPlane < nPlanes ; ++iPlane)
71 for (
int iFiber = 0; iFiber < nFibers ; ++iFiber)
72 firedChannels[iPlane][iFiber] = 0.;
74 for(std::map<unsigned int,double>::const_iterator itmap=energyMap.begin();itmap!=energyMap.end();itmap++)
75 if ( (*itmap).second > myThreshold ){
77 firedChannels[myHodoDetId.
planeId()][myHodoDetId.
fibrId()] = 1;
80 for (
int iPlane = 0 ; iPlane < nPlanes ; ++iPlane) {
83 for (
int iFiber = 0; iFiber < nFibers ; ++iFiber)
84 planeHit.
setHit(iFiber,firedChannels[iPlane][iFiber]);
86 product->setPlane((
unsigned int)iPlane, planeHit);
89 LogDebug(
"EcalTBHodo") << (*product);
std::vector< PCaloHit > PCaloHitContainer
void setHit(unsigned int i, bool status)
virtual ~TBHodoActiveVolumeRawInfoProducer()
Destructor.
TBHodoActiveVolumeRawInfoProducer(const edm::ParameterSet &ps)
Constructor.
void produce(edm::Event &event, const edm::EventSetup &eventSetup)
Produce digis out of raw data.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
T const * product() const