30 std::vector<DetId>::const_iterator idItr =
theDetIds->begin();
31 unsigned int ncount = 0;
34 while ((ncount < theDetIds->
size()) && !
found) {
35 EBDetId thisEBdetid(idItr->rawId());
36 if (thisEBdetid.ic() == crysId) {
37 theTargetId = thisEBdetid;
44 throw cms::Exception(
"ObjectNotFound",
"Ecal TB target crystal not found in geometry");
52 int myEta = theTargetId.
ieta();
53 int myPhi = theTargetId.
iphi();
55 for (
int icrysEta = (myEta - (
NCRYMATRIX - 1) / 2); icrysEta <= (myEta + (
NCRYMATRIX - 1) / 2); ++icrysEta) {
56 for (
int icrysPhi = (myPhi - (
NCRYMATRIX - 1) / 2); icrysPhi <= (myPhi + (
NCRYMATRIX - 1) / 2); ++icrysPhi) {
65 while ((ncount < theDetIds->
size()) && !
found) {
66 EBDetId myEBdetid(idItr->rawId());
67 if ((myEBdetid.ieta() == icrysEta) && (myEBdetid.iphi() == icrysPhi)) {
68 thisEBdetid = myEBdetid;
78 LogDebug(
"EcalDigi") <<
"Crystal to be readout: sequential id = " << thisEBdetid.
ic() <<
" eta = " << icrysEta
79 <<
" phi = " << icrysPhi <<
" from TT = " << thisTTdetId;
116 std::cout <<
"%%%%%%% In readOut(), size=" <<
input.size() << std::endl;
118 for (
unsigned int digis = 0; digis <
input.size(); ++digis) {
135 for (
unsigned int digis = 0; digis <
input.size(); ++digis) {
160 int crysId = theEcalTBInfo->
nCrystal();
181 int crysId = theEcalTBInfo->
nCrystal();
int iphi() const
get the crystal iphi
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 ieta() const
get the crystal ieta
EcalTBReadout(const std::string theEcalTBInfoLabel)
void readOut(const EBDigiCollection &input, EBDigiCollection &output, const EcalTrigTowerConstituentsMap &etmap)
read only the digis from the selected TT
int ic() const
get ECAL/crystal number inside SM
void performReadout(edm::Event &event, const EcalTrigTowerConstituentsMap &theTTmap, const EBDigiCollection &input, EBDigiCollection &output)
master function to be called once per event
Log< level::Info, false > LogInfo
constexpr iterator begin()
edm::DataFrame const & frame() const
const std::vector< DetId > * theDetIds
void findTTlist(const int &crysId, const EcalTrigTowerConstituentsMap &etmap)
search for the TT to be read
std::string ecalTBInfoLabel_