9 ecalTBInfoLabel_(theEcalTBInfoLabel)
33 std::vector<DetId>::const_iterator idItr =
theDetIds->begin();
34 unsigned int ncount = 0;
37 while ( (ncount < theDetIds->
size()) && !found )
39 EBDetId thisEBdetid(idItr->rawId());
40 if (thisEBdetid.ic() == crysId) {
41 theTargetId = thisEBdetid;
48 throw cms::Exception(
"ObjectNotFound",
"Ecal TB target crystal not found in geometry");
56 int myEta = theTargetId.
ieta();
57 int myPhi = theTargetId.
iphi();
60 for (
int icrysEta = (myEta-(
NCRYMATRIX-1)/2) ; icrysEta <= (myEta+(
NCRYMATRIX-1)/2) ; ++icrysEta ) {
61 for (
int icrysPhi = (myPhi-(
NCRYMATRIX-1)/2) ; icrysPhi <= (myPhi+(
NCRYMATRIX-1)/2) ; ++icrysPhi ) {
71 while ( (ncount < theDetIds->
size()) && !found )
73 EBDetId myEBdetid(idItr->rawId());
74 if ( (myEBdetid.ieta() == icrysEta) && (myEBdetid.iphi() == icrysPhi) ) {
75 thisEBdetid = myEBdetid;
86 LogDebug(
"EcalDigi") <<
"Crystal to be readout: sequential id = " << thisEBdetid.
ic() <<
" eta = " << icrysEta <<
" phi = " << icrysPhi <<
" from TT = " << thisTTdetId;
125 std::cout<<
"%%%%%%% In readOut(), size="<< input.
size() <<std::endl ;
127 for(
unsigned int digis=0; digis<input.
size(); ++digis )
139 ebdf2.frame().begin() );
149 for (
unsigned int digis=0; digis<input.
size(); ++digis)
155 std::vector<EcalTrigTowerDetId>::iterator ttFound
165 eedf2.frame().begin() );
182 int crysId = theEcalTBInfo->nCrystal();
190 readOut( input, output, theTTmap ) ;
206 int crysId = theEcalTBInfo->nCrystal();
214 readOut( input, output, theTTmap) ;
std::vector< EcalTrigTowerDetId > theTTlist_
static const int NCRYMATRIX
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
int iphi() const
get the crystal iphi
EcalTBReadout(const std::string theEcalTBInfoLabel)
void readOut(const EBDigiCollection &input, EBDigiCollection &output, const EcalTrigTowerConstituentsMap &etmap)
read only the digis from the selected TT
int ieta() const
get the crystal ieta
void performReadout(edm::Event &event, const EcalTrigTowerConstituentsMap &theTTmap, const EBDigiCollection &input, EBDigiCollection &output)
master function to be called once per event
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
int ic() const
get ECAL/crystal number inside SM
edm::DataFrame const & frame() const
void push_back(id_type iid, data_type const *idata)
const std::vector< DetId > * theDetIds
void findTTlist(const int &crysId, const EcalTrigTowerConstituentsMap &etmap)
search for the TT to be read
std::string ecalTBInfoLabel_
tuple size
Write out results.