9 : ecalTBInfoLabel_(theEcalTBInfoLabel) {
31 std::vector<DetId>::const_iterator idItr =
theDetIds->begin();
32 unsigned int ncount = 0;
35 while ( (ncount < theDetIds->
size()) && !found )
37 EBDetId thisEBdetid(idItr->rawId());
38 if (thisEBdetid.ic() == crysId) {
39 theTargetId = thisEBdetid;
46 throw cms::Exception(
"ObjectNotFound",
"Ecal TB target crystal not found in geometry");
54 int myEta = theTargetId.
ieta();
55 int myPhi = theTargetId.
iphi();
58 for (
int icrysEta = (myEta-(
NCRYMATRIX-1)/2) ; icrysEta <= (myEta+(
NCRYMATRIX-1)/2) ; ++icrysEta ) {
59 for (
int icrysPhi = (myPhi-(
NCRYMATRIX-1)/2) ; icrysPhi <= (myPhi+(
NCRYMATRIX-1)/2) ; ++icrysPhi ) {
69 while ( (ncount < theDetIds->
size()) && !found )
71 EBDetId myEBdetid(idItr->rawId());
72 if ( (myEBdetid.ieta() == icrysEta) && (myEBdetid.iphi() == icrysPhi) ) {
73 thisEBdetid = myEBdetid;
84 LogDebug(
"EcalDigi") <<
"Crystal to be readout: sequential id = " << thisEBdetid.
ic() <<
" eta = " << icrysEta <<
" phi = " << icrysPhi <<
" from TT = " << thisTTdetId;
122 for (
unsigned int digis=0; digis<input.
size(); ++digis){
134 ebdf2.frame().begin() );
144 for (
unsigned int digis=0; digis<input.
size(); ++digis)
150 std::vector<EcalTrigTowerDetId>::iterator ttFound
160 eedf2.frame().begin() );
173 int crysId = theEcalTBInfo->nCrystal();
181 readOut(input, output, theTTmap);
194 int crysId = theEcalTBInfo->nCrystal();
202 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)
void performReadout(edm::Event &event, const EcalTrigTowerConstituentsMap &theTTmap, EBDigiCollection &input, EBDigiCollection &output)
master function to be called once per event
int iphi() const
get the crystal iphi
EcalTBReadout(const std::string theEcalTBInfoLabel)
int ieta() const
get the crystal ieta
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_
void readOut(EBDigiCollection &input, EBDigiCollection &output, const EcalTrigTowerConstituentsMap &etmap)
read only the digis from the selected TT
tuple size
Write out results.