1 #include "../interface/TrigPrimTask.h" 25 bxBinEdges_{ {1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565} },
67 MEs_.at(
"EtSummaryByLumi").reset();
68 MEs_.at(
"LHCStatusByLumi").reset(-1);
83 MESet& meLHCStatusByLumi(static_cast<MESet&>(
MEs_.at(
"LHCStatusByLumi")));
110 MESet& meTTMaskMap(
MEs_.at(
"TTMaskMap"));
112 for(EcalTPGTowerStatusMap::const_iterator ttItr(towerMap.begin()); ttItr != towerMap.end(); ++ttItr){
114 if ((*ttItr).second > 0)
118 meTTMaskMap.fill(ttid,1);
122 for(EcalTPGStripStatusMap::const_iterator stItr(stripMap.begin()); stItr != stripMap.end(); ++stItr){
124 if ((*stItr).second > 0)
128 meTTMaskMap.fill(stid,1);
188 template<
typename DigiCollection>
192 for(
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
209 MESet& meEtRealMap(
MEs_.at(
"EtRealMap"));
210 MESet& meEtSummary(
MEs_.at(
"EtSummary"));
211 MESet& meEtSummaryByLumi(
MEs_.at(
"EtSummaryByLumi"));
212 MESet& meLowIntMap(
MEs_.at(
"LowIntMap"));
213 MESet& meMedIntMap(
MEs_.at(
"MedIntMap"));
214 MESet& meHighIntMap(
MEs_.at(
"HighIntMap"));
216 MESet& meTTFlagsVsEt(
MEs_.at(
"TTFlagsVsEt"));
217 MESet& meTTFlags4(
MEs_.at(
"TTFlags4") );
218 MESet& meTTFMismatch(
MEs_.at(
"TTFMismatch"));
223 double nTP[] = {0., 0., 0.};
227 float et(tpItr->compressedEt());
232 else if(ttid.zside() < 0)
239 meEtReal.fill(ttid,
et);
240 meEtRealMap.fill(ttid,
et);
241 meEtSummary.fill(ttid,
et);
242 meEtSummaryByLumi.fill(ttid,
et);
244 int interest(tpItr->ttFlag() & 0x3);
248 meLowIntMap.fill(ttid);
251 meMedIntMap.fill(ttid);
254 meHighIntMap.fill(ttid);
261 int ttF( tpItr->ttFlag() );
262 meTTFlags.fill( ttid, 1.0*ttF );
263 meTTFlagsVsEt.fill(ttid,
et, 1.0*ttF);
267 meTTFlags4.fill( ttid );
270 meTTFMismatch.fill(ttid);
280 MESet& meTTMaskMapAll(
MEs_.at(
"TTMaskMapAll"));
285 for( EcalTPGTowerStatusMap::const_iterator ttItr(TTStatusMap.begin()); ttItr != TTStatusMap.end(); ++ttItr ){
287 if ( ttItr->second > 0 )
288 meTTMaskMapAll.setBinContent( ttid,1 );
294 for( EcalTPGStripStatusMap::const_iterator stItr(StripStatusMap.begin()); stItr != StripStatusMap.end(); ++stItr ){
299 if ( stItr->second > 0 )
300 meTTMaskMapAll.setBinContent( ttid,1 );
308 MESet& meEtMaxEmul(
MEs_.at(
"EtMaxEmul"));
309 MESet& meEmulMaxIndex(
MEs_.at(
"EmulMaxIndex"));
310 MESet& meMatchedIndex(
MEs_.at(
"MatchedIndex"));
311 MESet& meEtEmulError(
MEs_.at(
"EtEmulError"));
312 MESet& meFGEmulError(
MEs_.at(
"FGEmulError"));
313 MESet& meRealvEmulEt(
MEs_.at(
"RealvEmulEt"));
318 int et(tpItr->compressedEt());
322 for(
int iDigi(0); iDigi < 5; iDigi++){
323 float sampleEt((*tpItr)[iDigi].compressedEt());
325 if(sampleEt > maxEt){
331 meEtMaxEmul.fill(ttid, maxEt);
333 meEmulMaxIndex.fill(ttid, iMax);
344 int realEt(realItr->compressedEt());
348 int ttF(realItr->ttFlag());
351 if(
et != realEt) match =
false;
352 if(tpItr->fineGrain() != realItr->fineGrain()) matchFG =
false;
356 std::vector<int> matchedIndex(0);
359 for(
int iDigi(0); iDigi < 5; iDigi++){
360 if((*tpItr)[iDigi].compressedEt() == realEt) {
363 matchedIndex.push_back(iDigi + 1);
368 matchedIndex.clear();
369 matchedIndex.push_back(3);
374 if(matchedIndex.empty()) matchedIndex.push_back(0);
377 meRealvEmulEt.fill( ttid,realEt,(*tpItr)[2].compressedEt() );
380 for(std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end(); ++matchItr){
381 meMatchedIndex.fill(ttid, *matchItr + 0.5);
396 if(!match) meEtEmulError.fill(ttid);
397 if(!matchFG) meFGEmulError.fill(ttid);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getUntrackedParameter(std::string const &, T const &) const
std::map< uint32_t, uint16_t > EcalTPGTowerStatusMap
const BSTRecord & getBST() const
#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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
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
uint16_t const getBeamMode() const
Class to contain information from TCDS FED.
uint32_t rawId() const
get the raw id
edm::EDGetTokenT< TCDSRecord > lhcStatusInfoRecordToken_
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_
void setTokens(edm::ConsumesCollector &) override
edm::ESHandle< EcalTPGStripStatus > StripStatusRcd
void runOnRealTPs(EcalTrigPrimDigiCollection const &)
virtual void fill(DetId const &, double=1., double=1., double=1.)
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
edm::InputTag lhcStatusInfoCollectionTag_