1 #include "../interface/TrigPrimTask.h"
25 bxBinEdges_{1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565},
87 for(EcalTPGTowerStatusMap::const_iterator ttItr(towerMap.begin()); ttItr != towerMap.end(); ++ttItr){
89 if ((*ttItr).second > 0)
93 meTTMaskMap.fill(ttid,1);
97 for(EcalTPGStripStatusMap::const_iterator stItr(stripMap.begin()); stItr != stripMap.end(); ++stItr){
99 if ((*stItr).second > 0)
103 meTTMaskMap.fill(stid,1);
163 template<
typename DigiCollection>
167 for(
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
178 MESet& meEtRealMap(
MEs_.at(
"EtRealMap"));
179 MESet& meEtSummary(
MEs_.at(
"EtSummary"));
180 MESet& meLowIntMap(
MEs_.at(
"LowIntMap"));
181 MESet& meMedIntMap(
MEs_.at(
"MedIntMap"));
182 MESet& meHighIntMap(
MEs_.at(
"HighIntMap"));
184 MESet& meTTFlags4(
MEs_.at(
"TTFlags4") );
185 MESet& meTTFMismatch(
MEs_.at(
"TTFMismatch"));
190 double nTP[] = {0., 0., 0.};
194 float et(tpItr->compressedEt());
199 else if(ttid.zside() < 0)
203 meEtVsBx.fill(ttid,
bxBin_, et);
206 meEtReal.fill(ttid, et);
207 meEtRealMap.fill(ttid, et);
208 meEtSummary.fill(ttid, et);
210 int interest(tpItr->ttFlag() & 0x3);
214 meLowIntMap.fill(ttid);
217 meMedIntMap.fill(ttid);
220 meHighIntMap.fill(ttid);
227 float ttF( tpItr->ttFlag() );
228 meTTFlags.fill( ttid, ttF );
232 meTTFlags4.fill( ttid );
235 meTTFMismatch.fill(ttid);
245 MESet& meTTMaskMapAll(
MEs_.at(
"TTMaskMapAll"));
250 for( EcalTPGTowerStatusMap::const_iterator ttItr(TTStatusMap.begin()); ttItr != TTStatusMap.end(); ++ttItr ){
252 if ( ttItr->second > 0 )
253 meTTMaskMapAll.setBinContent( ttid,1 );
259 for( EcalTPGStripStatusMap::const_iterator stItr(StripStatusMap.begin()); stItr != StripStatusMap.end(); ++stItr ){
264 if ( stItr->second > 0 )
265 meTTMaskMapAll.setBinContent( ttid,1 );
273 MESet& meEtMaxEmul(
MEs_.at(
"EtMaxEmul"));
274 MESet& meEmulMaxIndex(
MEs_.at(
"EmulMaxIndex"));
275 MESet& meMatchedIndex(
MEs_.at(
"MatchedIndex"));
276 MESet& meEtEmulError(
MEs_.at(
"EtEmulError"));
277 MESet& meFGEmulError(
MEs_.at(
"FGEmulError"));
282 int et(tpItr->compressedEt());
286 for(
int iDigi(0); iDigi < 5; iDigi++){
287 float sampleEt((*tpItr)[iDigi].compressedEt());
289 if(sampleEt > maxEt){
295 meEtMaxEmul.fill(ttid, maxEt);
297 meEmulMaxIndex.fill(ttid, iMax);
308 int realEt(realItr->compressedEt());
312 int interest(realItr->ttFlag() & 0x3);
315 if(et != realEt) match =
false;
316 if(tpItr->fineGrain() != realItr->fineGrain()) matchFG =
false;
320 std::vector<int> matchedIndex(0);
323 for(
int iDigi(0); iDigi < 5; iDigi++){
324 if((*tpItr)[iDigi].compressedEt() == realEt) {
327 matchedIndex.push_back(iDigi + 1);
332 matchedIndex.clear();
333 matchedIndex.push_back(3);
338 if(!matchedIndex.size()) matchedIndex.push_back(0);
341 for(std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end(); ++matchItr){
342 meMatchedIndex.fill(ttid, *matchItr + 0.5);
357 if(!match) meEtEmulError.fill(ttid);
358 if(!matchFG) meFGEmulError.fill(ttid);
T getUntrackedParameter(std::string const &, T const &) const
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
#define DEFINE_ECALDQM_WORKER(TYPE)
int tccId() const
get the DCC (Ecal Local DCC value not global one) id
void beginEvent(edm::Event const &, edm::EventSetup const &) override
void beginRun(edm::Run const &, edm::EventSetup const &) override
void setParams(edm::ParameterSet const &) override
Ecal readout channel identification [32:20] Unused (so far) [19:13] DCC id [12:6] tower [5:3] strip [...
EcalElectronicsMapping const * getElectronicsMap()
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
int bunchCrossing() const
edm::ESHandle< EcalTPGTowerStatus > TTStatusRcd
std::map< uint32_t, unsigned > towerReadouts_
const std::map< uint32_t, uint16_t > & getMap() const
uint32_t rawId() const
get the raw id
void addDependencies(DependencySet &) override
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
int ttId() const
get the tower id
void runOnEmulTPs(EcalTrigPrimDigiCollection const &)
std::vector< DetId > constituentsOf(const EcalTrigTowerDetId &id) const
Get the constituent detids for this tower id.
void runOnDigis(DigiCollection const &)
const_iterator end() const
EcalTrigPrimDigiCollection const * realTps_
int bxBinEdges_[nBXBins+1]
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
T const * product() const
const std::map< uint32_t, uint16_t > & getMap() const
iterator find(key_type k)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
volatile std::atomic< bool > shutdown_flag false
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
void push_back(Dependency const &_d)
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
const_iterator begin() const