1 #include "../interface/TrigPrimTask.h"
22 bxBinEdges_{1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565},
118 template<
typename DigiCollection>
122 for(
typename DigiCollection::const_iterator digiItr(_digis.begin()); digiItr != _digis.end(); ++digiItr){
133 MESet& meEtRealMap(
MEs_.at(
"EtRealMap"));
134 MESet& meEtSummary(
MEs_.at(
"EtSummary"));
135 MESet& meLowIntMap(
MEs_.at(
"LowIntMap"));
136 MESet& meMedIntMap(
MEs_.at(
"MedIntMap"));
137 MESet& meHighIntMap(
MEs_.at(
"HighIntMap"));
139 MESet& meTTFMismatch(
MEs_.at(
"TTFMismatch"));
144 double nTP[] = {0., 0., 0.};
148 float et(tpItr->compressedEt());
153 else if(ttid.zside() < 0)
157 meEtVsBx.fill(ttid,
bxBin_, et);
160 meEtReal.fill(ttid, et);
161 meEtRealMap.fill(ttid, et);
162 meEtSummary.fill(ttid, et);
164 int interest(tpItr->ttFlag() & 0x3);
168 meLowIntMap.fill(ttid);
171 meMedIntMap.fill(ttid);
174 meHighIntMap.fill(ttid);
180 meTTFlags.fill(ttid,
float(tpItr->ttFlag()));
183 meTTFMismatch.fill(ttid);
194 MESet& meEtMaxEmul(
MEs_.at(
"EtMaxEmul"));
195 MESet& meEmulMaxIndex(
MEs_.at(
"EmulMaxIndex"));
196 MESet& meMatchedIndex(
MEs_.at(
"MatchedIndex"));
197 MESet& meEtEmulError(
MEs_.at(
"EtEmulError"));
198 MESet& meFGEmulError(
MEs_.at(
"FGEmulError"));
203 int et(tpItr->compressedEt());
207 for(
int iDigi(0); iDigi < 5; iDigi++){
208 float sampleEt((*tpItr)[iDigi].compressedEt());
210 if(sampleEt > maxEt){
216 meEtMaxEmul.fill(ttid, maxEt);
218 meEmulMaxIndex.fill(ttid, iMax);
226 int realEt(realItr->compressedEt());
230 int interest(realItr->ttFlag() & 0x3);
233 if(et != realEt) match =
false;
234 if(tpItr->fineGrain() != realItr->fineGrain()) matchFG =
false;
236 std::vector<int> matchedIndex(0);
237 for(
int iDigi(0); iDigi < 5; iDigi++){
238 if((*tpItr)[iDigi].compressedEt() == realEt)
239 matchedIndex.push_back(iDigi + 1);
242 if(!matchedIndex.size()) matchedIndex.push_back(0);
243 for(std::vector<int>::iterator matchItr(matchedIndex.begin()); matchItr != matchedIndex.end(); ++matchItr){
244 meMatchedIndex.fill(ttid, *matchItr + 0.5);
259 if(!match) meEtEmulError.fill(ttid);
260 if(!matchFG) meFGEmulError.fill(ttid);
T getUntrackedParameter(std::string const &, T const &) const
void beginEvent(edm::Event const &, edm::EventSetup const &) override
void setParams(edm::ParameterSet const &) override
std::vector< EcalTriggerPrimitiveDigi >::const_iterator const_iterator
int bunchCrossing() const
std::map< uint32_t, unsigned > towerReadouts_
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
uint32_t rawId() const
get the raw id
void addDependencies(DependencySet &) override
EcalTrigTowerConstituentsMap const * getTrigTowerMap()
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]
void runOnRealTPs(EcalTrigPrimDigiCollection 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
void push_back(Dependency const &_d)
const_iterator begin() const