1 #include "../interface/ClusterTask.h" 30 swissCrossMaxThreshold_(3.),
32 trigTypeToME_{0, 1, 2, 3, 4},
76 MESetMulti& occupancy(static_cast<MESetMulti&>(
MEs_.at(
"SCSeedOccupancyTrig")));
78 repl[
"trig"] = triggerTypeNames[iT];
108 if ( !dWord.empty()) {
118 bool hcal_top =
false;
119 bool hcal_bot =
false;
121 std::vector<int> valid_phi;
122 if((psb.
aData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(4)>>10)&0x1f ); }
123 if((psb.
bData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(4)>>10)&0x1f ); }
124 if((psb.
aData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(5)>>10)&0x1f ); }
125 if((psb.
bData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(5)>>10)&0x1f ); }
126 std::vector<int>::const_iterator iphi;
127 for(iphi=valid_phi.begin(); iphi!=valid_phi.end(); iphi++) {
128 if(*iphi<9) hcal_top=
true;
129 if(*iphi>8) hcal_bot=
true;
136 std::vector<L1MuGMTReadoutRecord>
const& records(l1MuHndl->
getRecords());
138 for(
unsigned iR(0); iR != records.size(); ++iR){
139 if(records[iR].getBxInEvent() != 0)
continue;
144 std::vector<L1MuRegionalCand> dtBXCands(records[iR].getDTBXCands());
145 for(iC = 0; iC != dtBXCands.size(); ++iC)
146 if(!dtBXCands[iC].
empty())
break;
150 std::vector<L1MuRegionalCand> brlRPCCands(records[iR].getBrlRPCCands());
151 for(iC = 0; iC != brlRPCCands.size(); ++iC)
152 if(!brlRPCCands[iC].
empty())
break;
156 std::vector<L1MuRegionalCand> cscCands(records[iR].getCSCCands());
157 for(iC = 0; iC != cscCands.size(); ++iC)
158 if(!cscCands[iC].
empty())
break;
165 MESet& meExclusiveTriggers(
MEs_.at(
"ExclusiveTriggers"));
169 meTriggers.
fill(iT + 0.5);
171 meExclusiveTriggers.fill(iT + 0.5);
187 for(
unsigned iFED(0); iFED !=
nDCC; iFED++){
219 MESet& meBCEMapProjEta(
MEs_.at(
"BCEMapProjEta"));
220 MESet& meBCEMapProjPhi(
MEs_.at(
"BCEMapProjPhi"));
221 MESet& meBCEtMapProjEta(
MEs_.at(
"BCEtMapProjEta"));
222 MESet& meBCEtMapProjPhi(
MEs_.at(
"BCEtMapProjPhi"));
223 MESet& meBCOccupancy(
MEs_.at(
"BCOccupancy"));
224 MESet& meBCOccupancyProjEta(
MEs_.at(
"BCOccupancyProjEta"));
225 MESet& meBCOccupancyProjPhi(
MEs_.at(
"BCOccupancyProjPhi"));
227 MESet& meTrendBCSize(
MEs_.at(
"TrendBCSize"));
228 MESet& meBCSizeMap(
MEs_.at(
"BCSizeMap"));
229 MESet& meBCSizeMapProjEta(
MEs_.at(
"BCSizeMapProjEta"));
230 MESet& meBCSizeMapProjPhi(
MEs_.at(
"BCSizeMapProjPhi"));
240 if(bcItr->caloID().detectors() != 0){
252 id = subgeom->getClosestCell(
gp);
255 if(
id.null() || (
id.subdetId() ==
EcalBarrel && !isBarrel) || (
id.subdetId() ==
EcalEndcap && isBarrel))
continue;
257 float energy(bcItr->energy());
260 float et(energy / std::cosh(posEta));
264 meBCE.fill(
id, energy);
266 meBCEMap.fill(
id, energy);
267 meBCEMapProjEta.fill(posEta, energy);
268 meBCEMapProjPhi.fill(subdet, posPhi, energy);
269 meBCEtMapProjEta.fill(posEta, et);
270 meBCEtMapProjPhi.fill(subdet, posPhi, et);
272 meBCOccupancy.fill(
id);
273 meBCOccupancyProjEta.fill(posEta);
274 meBCOccupancyProjPhi.fill(subdet, posPhi);
276 float size(bcItr->size());
278 meBCSize.fill(
id,
size);
281 meBCSizeMap.fill(
id,
size);
282 meBCSizeMapProjEta.fill(posEta,
size);
283 meBCSizeMapProjPhi.fill(subdet, posPhi,
size);
369 MESet& meSCNcrystals(
MEs_.at(
"SCNcrystals"));
370 MESet& meTrendSCSize(
MEs_.at(
"TrendSCSize"));
371 MESet& meSCSeedEnergy(
MEs_.at(
"SCSeedEnergy"));
372 MESet& meSCClusterVsSeed(
MEs_.at(
"SCClusterVsSeed"));
373 MESet& meSCSeedOccupancy(
MEs_.at(
"SCSeedOccupancy"));
374 MESet& meSingleCrystalCluster(
MEs_.at(
"SingleCrystalCluster"));
378 MESet* meSCSeedOccupancyHighE(
doExtra_ ? &
MEs_.at(
"SCSeedOccupancyHighE") :
nullptr);
379 MESet* meSCSeedOccupancyTrig(
doExtra_ ? &
MEs_.at(
"SCSeedOccupancyTrig") :
nullptr);
381 MESet* meSCSeedTimeMapTrigEx(
doExtra_ ? &
MEs_.at(
"SCSeedTimeMapTrigEx") :
nullptr);
382 MESet* meSCOccupancyProjEta(
doExtra_ ? &
MEs_.at(
"SCOccupancyProjEta") :
nullptr);
383 MESet* meSCOccupancyProjPhi(
doExtra_ ? &
MEs_.at(
"SCOccupancyProjPhi") :
nullptr);
393 for(reco::SuperClusterCollection::const_iterator scItr(_scs.begin()); scItr != _scs.end(); ++scItr){
394 DetId seedId(scItr->seed()->seed());
402 seedId = subgeom->getClosestCell(
gp);
405 if(seedId.null() || (seedId.subdetId() != subdet))
continue;
408 if(seedItr == hits->end())
continue;
412 float energy(scItr->energy());
413 float size(scItr->size());
415 meSCE.fill(seedId, energy);
416 meSCELow.fill(seedId, energy);
418 meSCNBCs.fill(seedId, scItr->clustersSize());
419 meSCNcrystals.fill(seedId,
size);
421 if(
doExtra_) meSCSizeVsEnergy->fill(subdet, energy,
size);
425 meSCSeedEnergy.fill(seedId, seedItr->energy());
426 meSCClusterVsSeed.fill(seedId, seedItr->energy(), energy);
428 meSCSeedOccupancy.fill(seedId);
431 if(scItr->size() == 1) meSingleCrystalCluster.fill(seedId);
433 float e3x3(EcalClusterTools::e3x3(*scItr->seed(),
hits,
getTopology()));
434 meSCR9.fill(seedId, e3x3 / energy);
441 meSCSeedOccupancyTrig->
fill(seedId);
447 meSCSeedTimeTrigEx->
fill(subdet, seedItr->time());
448 meSCSeedTimeMapTrigEx->fill(seedId, seedItr->time());
452 meSCOccupancyProjEta->fill(subdet, scItr->eta());
453 meSCOccupancyProjPhi->fill(subdet,
phi(scItr->phi()));
463 meSCSwissCross->fill(1. - e4 / e1);
480 MEs_.at(
"SCNum").fill(subdet, nSC);
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
T getUntrackedParameter(std::string const &, T const &) const
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
#define DEFINE_ECALDQM_WORKER(TYPE)
void endEvent(edm::Event const &, edm::EventSetup const &) override
edm::LuminosityBlockNumber_t iLumi
void addDependencies(DependencySet &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
EcalRecHitCollection const * ebHits_
std::vector< EcalRecHit >::const_iterator const_iterator
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > L1GlobalTriggerReadoutRecordToken_
void fill(DetId const &_id, double _xyw=1., double _yw=1., double _w=1.) override
CaloGeometry const * getGeometry()
void beginEvent(edm::Event const &, edm::EventSetup const &) override
const_iterator begin() const
CaloTopology const * getTopology()
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
std::vector< std::string > egTriggerAlgos_
std::vector< SuperCluster > SuperClusterCollection
collection of SuperCluser objectr
float swissCrossMaxThreshold_
std::vector< bool > DecisionWord
typedefs
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
unsigned trigTypeToME_[nTriggerTypes]
bool filterRunType(short const *) override
const DecisionWord & decisionWord(int bxInEventValue) const
EcalRecHitCollection const * eeHits_
edm::EDGetTokenT< L1MuGMTReadoutCollection > L1MuGMTReadoutCollectionToken_
void runOnRecHits(EcalRecHitCollection const &, Collections)
XYZPointD XYZPoint
point in space with cartesian internal representation
virtual void fill(DetId const &, double=1., double=1., double=1.)
void setTokens(edm::ConsumesCollector &) override
void runOnSuperClusters(reco::SuperClusterCollection const &, Collections)
edm::InputTag L1GlobalTriggerReadoutRecordTag_
et
define resolution functions of each parameter
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
static int position[264][3]
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
const_iterator end() const
std::bitset< nTriggerTypes > triggered_
edm::InputTag L1MuGMTReadoutCollectionTag_
std::map< std::string, std::string > PathReplacements
void push_back(Dependency const &_d)
double phi(EBDetId const &)
unsigned getIndex(PathReplacements const &) const
void setParams(edm::ParameterSet const &) override