10 ecalTBInfoLabel_(theEcalTBInfoLabel)
34 std::vector<DetId>::const_iterator idItr =
theDetIds->begin();
35 unsigned int ncount = 0;
38 while ( (ncount < theDetIds->
size()) && !found )
40 EBDetId thisEBdetid(idItr->rawId());
41 if (thisEBdetid.ic() == crysId) {
42 theTargetId = thisEBdetid;
49 throw cms::Exception(
"ObjectNotFound",
"Ecal TB target crystal not found in geometry");
57 int myEta = theTargetId.
ieta();
58 int myPhi = theTargetId.
iphi();
61 for (
int icrysEta = (myEta-(
NCRYMATRIX-1)/2) ; icrysEta <= (myEta+(
NCRYMATRIX-1)/2) ; ++icrysEta ) {
62 for (
int icrysPhi = (myPhi-(
NCRYMATRIX-1)/2) ; icrysPhi <= (myPhi+(
NCRYMATRIX-1)/2) ; ++icrysPhi ) {
72 while ( (ncount < theDetIds->
size()) && !found )
74 EBDetId myEBdetid(idItr->rawId());
75 if ( (myEBdetid.ieta() == icrysEta) && (myEBdetid.iphi() == icrysPhi) ) {
76 thisEBdetid = myEBdetid;
87 LogDebug(
"EcalDigi") <<
"Crystal to be readout: sequential id = " << thisEBdetid.
ic() <<
" eta = " << icrysEta <<
" phi = " << icrysPhi <<
" from TT = " << thisTTdetId;
126 std::cout<<
"%%%%%%% In readOut(), size="<< input.
size() <<std::endl ;
128 for(
unsigned int digis=0; digis<input.
size(); ++digis )
140 ebdf2.frame().begin() );
150 for (
unsigned int digis=0; digis<input.
size(); ++digis)
156 std::vector<EcalTrigTowerDetId>::iterator ttFound
166 eedf2.frame().begin() );
183 int crysId = theEcalTBInfo->nCrystal();
191 readOut( input, output, theTTmap ) ;
207 int crysId = theEcalTBInfo->nCrystal();
215 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)
static std::string const input
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.