1 #include "../interface/TrigPrimTask.h" 25 bxBinEdges_{ {1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565} },
64 MEs_.at(
"EtSummaryByLumi").reset();
94 for(EcalTPGTowerStatusMap::const_iterator ttItr(towerMap.begin()); ttItr != towerMap.end(); ++ttItr){
96 if ((*ttItr).second > 0)
100 meTTMaskMap.fill(ttid,1);
104 for(EcalTPGStripStatusMap::const_iterator stItr(stripMap.begin()); stItr != stripMap.end(); ++stItr){
106 if ((*stItr).second > 0)
110 meTTMaskMap.fill(stid,1);
170 template<
typename DigiCollection>
174 for(
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
185 MESet& meEtRealMap(
MEs_.at(
"EtRealMap"));
186 MESet& meEtSummary(
MEs_.at(
"EtSummary"));
187 MESet& meEtSummaryByLumi(
MEs_.at(
"EtSummaryByLumi"));
188 MESet& meLowIntMap(
MEs_.at(
"LowIntMap"));
189 MESet& meMedIntMap(
MEs_.at(
"MedIntMap"));
190 MESet& meHighIntMap(
MEs_.at(
"HighIntMap"));
192 MESet& meTTFlagsVsEt(
MEs_.at(
"TTFlagsVsEt"));
193 MESet& meTTFlags4(
MEs_.at(
"TTFlags4") );
194 MESet& meTTFMismatch(
MEs_.at(
"TTFMismatch"));
199 double nTP[] = {0., 0., 0.};
203 float et(tpItr->compressedEt());
208 else if(ttid.zside() < 0)
215 meEtReal.fill(ttid,
et);
216 meEtRealMap.fill(ttid,
et);
217 meEtSummary.fill(ttid,
et);
218 meEtSummaryByLumi.fill(ttid,
et);
220 int interest(tpItr->ttFlag() & 0x3);
224 meLowIntMap.fill(ttid);
227 meMedIntMap.fill(ttid);
230 meHighIntMap.fill(ttid);
237 float ttF( tpItr->ttFlag() );
238 meTTFlags.fill( ttid, ttF );
239 meTTFlagsVsEt.fill(ttid,
et, ttF);
243 meTTFlags4.fill( ttid );
246 meTTFMismatch.fill(ttid);
256 MESet& meTTMaskMapAll(
MEs_.at(
"TTMaskMapAll"));
261 for( EcalTPGTowerStatusMap::const_iterator ttItr(TTStatusMap.begin()); ttItr != TTStatusMap.end(); ++ttItr ){
263 if ( ttItr->second > 0 )
264 meTTMaskMapAll.setBinContent( ttid,1 );
270 for( EcalTPGStripStatusMap::const_iterator stItr(StripStatusMap.begin()); stItr != StripStatusMap.end(); ++stItr ){
275 if ( stItr->second > 0 )
276 meTTMaskMapAll.setBinContent( ttid,1 );
284 MESet& meEtMaxEmul(
MEs_.at(
"EtMaxEmul"));
285 MESet& meEmulMaxIndex(
MEs_.at(
"EmulMaxIndex"));
286 MESet& meMatchedIndex(
MEs_.at(
"MatchedIndex"));
287 MESet& meEtEmulError(
MEs_.at(
"EtEmulError"));
288 MESet& meFGEmulError(
MEs_.at(
"FGEmulError"));
289 MESet& meRealvEmulEt(
MEs_.at(
"RealvEmulEt"));
294 int et(tpItr->compressedEt());
298 for(
int iDigi(0); iDigi < 5; iDigi++){
299 float sampleEt((*tpItr)[iDigi].compressedEt());
301 if(sampleEt > maxEt){
307 meEtMaxEmul.fill(ttid, maxEt);
309 meEmulMaxIndex.fill(ttid, iMax);
320 int realEt(realItr->compressedEt());
324 int interest(realItr->ttFlag() & 0x3);
327 if(
et != realEt) match =
false;
328 if(tpItr->fineGrain() != realItr->fineGrain()) matchFG =
false;
332 std::vector<int> matchedIndex(0);
335 for(
int iDigi(0); iDigi < 5; iDigi++){
336 if((*tpItr)[iDigi].compressedEt() == realEt) {
339 matchedIndex.push_back(iDigi + 1);
344 matchedIndex.clear();
345 matchedIndex.push_back(3);
350 if(!matchedIndex.size()) matchedIndex.push_back(0);
353 meRealvEmulEt.fill( ttid,realEt,(*tpItr)[2].compressedEt() );
356 for(std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end(); ++matchItr){
357 meMatchedIndex.fill(ttid, *matchItr + 0.5);
372 if(!match) meEtEmulError.fill(ttid);
373 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 beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
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_
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
const std::map< uint32_t, uint16_t > & getMap() const
et
define resolution functions of each parameter
std::array< int, nBXBins+1 > bxBinEdges_
iterator find(key_type k)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::map< uint32_t, uint16_t > EcalTPGStripStatusMap
void push_back(Dependency const &_d)
T const * product() const
Ecal trigger electronics identification [32:20] Unused (so far) [19:13] TCC id [12:6] TT id [5:3] pse...
const_iterator begin() const