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) ;
void push_back(const Digi &digi)
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
int ic() const
get ECAL/crystal number inside SM
constexpr iterator begin()
edm::DataFrame const & frame() const
void push_back(const Digi &digi)
const std::vector< DetId > * theDetIds
void findTTlist(const int &crysId, const EcalTrigTowerConstituentsMap &etmap)
search for the TT to be read
std::string ecalTBInfoLabel_