1 #include "../interface/ClusterTask.h"
30 swissCrossMaxThreshold_(3.),
32 trigTypeToME_{0, 1, 2, 3, 4},
33 L1GlobalTriggerReadoutRecordTag_(),
34 L1MuGMTReadoutCollectionTag_(),
35 L1GlobalTriggerReadoutRecordToken_(),
36 L1MuGMTReadoutCollectionToken_()
76 MESetMulti& occupancy(static_cast<MESetMulti&>(
MEs_.at(
"SCSeedOccupancyTrig")));
78 repl[
"trig"] = triggerTypeNames[iT];
116 bool hcal_top =
false;
117 bool hcal_bot =
false;
118 const L1GtPsbWord psb = l1GTHndl->gtPsbWord(0xbb0d, 0);
119 std::vector<int> valid_phi;
120 if((psb.
aData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(4)>>10)&0x1f ); }
121 if((psb.
bData(4)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(4)>>10)&0x1f ); }
122 if((psb.
aData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
aData(5)>>10)&0x1f ); }
123 if((psb.
bData(5)&0x3f) >= 1) {valid_phi.push_back( (psb.
bData(5)>>10)&0x1f ); }
124 std::vector<int>::const_iterator iphi;
125 for(iphi=valid_phi.begin(); iphi!=valid_phi.end(); iphi++) {
126 if(*iphi<9) hcal_top=
true;
127 if(*iphi>8) hcal_bot=
true;
134 std::vector<L1MuGMTReadoutRecord>
const& records(l1MuHndl->getRecords());
136 for(
unsigned iR(0); iR != records.size(); ++iR){
137 if(records[iR].getBxInEvent() != 0)
continue;
142 std::vector<L1MuRegionalCand> dtBXCands(records[iR].getDTBXCands());
143 for(iC = 0; iC != dtBXCands.size(); ++iC)
144 if(!dtBXCands[iC].
empty())
break;
148 std::vector<L1MuRegionalCand> brlRPCCands(records[iR].getBrlRPCCands());
149 for(iC = 0; iC != brlRPCCands.size(); ++iC)
150 if(!brlRPCCands[iC].
empty())
break;
154 std::vector<L1MuRegionalCand> cscCands(records[iR].getCSCCands());
155 for(iC = 0; iC != cscCands.size(); ++iC)
156 if(!cscCands[iC].
empty())
break;
163 MESet& meExclusiveTriggers(
MEs_.at(
"ExclusiveTriggers"));
167 meTriggers.
fill(iT + 0.5);
169 meExclusiveTriggers.fill(iT + 0.5);
185 for(
unsigned iFED(0); iFED !=
nDCC; iFED++){
217 MESet& meBCEMapProjEta(
MEs_.at(
"BCEMapProjEta"));
218 MESet& meBCEMapProjPhi(
MEs_.at(
"BCEMapProjPhi"));
219 MESet& meBCEtMapProjEta(
MEs_.at(
"BCEtMapProjEta"));
220 MESet& meBCEtMapProjPhi(
MEs_.at(
"BCEtMapProjPhi"));
221 MESet& meBCOccupancy(
MEs_.at(
"BCOccupancy"));
222 MESet& meBCOccupancyProjEta(
MEs_.at(
"BCOccupancyProjEta"));
223 MESet& meBCOccupancyProjPhi(
MEs_.at(
"BCOccupancyProjPhi"));
225 MESet& meTrendBCSize(
MEs_.at(
"TrendBCSize"));
226 MESet& meBCSizeMap(
MEs_.at(
"BCSizeMap"));
227 MESet& meBCSizeMapProjEta(
MEs_.at(
"BCSizeMapProjEta"));
228 MESet& meBCSizeMapProjPhi(
MEs_.at(
"BCSizeMapProjPhi"));
238 if(bcItr->caloID().detectors() != 0){
245 DetId id(bcItr->seed());
250 id = subgeom->getClosestCell(gp);
253 if(
id.null() || (
id.subdetId() ==
EcalBarrel && !isBarrel) || (
id.subdetId() ==
EcalEndcap && isBarrel))
continue;
255 float energy(bcItr->energy());
258 float et(
energy / std::cosh(posEta));
264 meBCEMap.fill(
id,
energy);
265 meBCEMapProjEta.fill(posEta,
energy);
266 meBCEMapProjPhi.fill(subdet, posPhi,
energy);
267 meBCEtMapProjEta.fill(posEta, et);
268 meBCEtMapProjPhi.fill(subdet, posPhi, et);
270 meBCOccupancy.fill(
id);
271 meBCOccupancyProjEta.fill(posEta);
272 meBCOccupancyProjPhi.fill(subdet, posPhi);
274 float size(bcItr->size());
276 meBCSize.fill(
id,
size);
279 meBCSizeMap.fill(
id,
size);
280 meBCSizeMapProjEta.fill(posEta,
size);
281 meBCSizeMapProjPhi.fill(subdet, posPhi,
size);
367 MESet& meSCNcrystals(
MEs_.at(
"SCNcrystals"));
368 MESet& meTrendSCSize(
MEs_.at(
"TrendSCSize"));
369 MESet& meSCSeedEnergy(
MEs_.at(
"SCSeedEnergy"));
370 MESet& meSCClusterVsSeed(
MEs_.at(
"SCClusterVsSeed"));
371 MESet& meSCSeedOccupancy(
MEs_.at(
"SCSeedOccupancy"));
372 MESet& meSingleCrystalCluster(
MEs_.at(
"SingleCrystalCluster"));
391 for(reco::SuperClusterCollection::const_iterator scItr(_scs.begin()); scItr != _scs.end(); ++scItr){
392 DetId seedId(scItr->seed()->seed());
400 seedId = subgeom->getClosestCell(gp);
403 if(seedId.null() || (seedId.subdetId() != subdet))
continue;
406 if(seedItr == hits->end())
continue;
410 float energy(scItr->energy());
411 float size(scItr->size());
413 meSCE.fill(seedId,
energy);
414 meSCELow.fill(seedId,
energy);
416 meSCNBCs.fill(seedId, scItr->clustersSize());
417 meSCNcrystals.fill(seedId,
size);
423 meSCSeedEnergy.fill(seedId, seedItr->energy());
424 meSCClusterVsSeed.fill(seedId, seedItr->energy(),
energy);
426 meSCSeedOccupancy.fill(seedId);
429 if(scItr->size() == 1) meSingleCrystalCluster.fill(seedId);
431 float e3x3(EcalClusterTools::e3x3(*scItr->seed(), hits,
getTopology()));
432 meSCR9.fill(seedId, e3x3 /
energy);
439 meSCSeedOccupancyTrig->
fill(seedId);
445 meSCSeedTimeTrigEx->
fill(subdet, seedItr->time());
446 meSCSeedTimeMapTrigEx->fill(seedId, seedItr->time());
450 meSCOccupancyProjEta->fill(subdet, scItr->eta());
451 meSCOccupancyProjPhi->fill(subdet,
phi(scItr->phi()));
454 float e1(EcalClusterTools::eMax(*scItr,
ebHits_));
461 meSCSwissCross->fill(1. - e4 / e1);
478 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
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void runOnBasicClusters(edm::View< reco::CaloCluster > const &, Collections)
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()
static int position[TOTALCHAMBERS][3]
DEFINE_ECALDQM_WORKER(CalibrationSummaryClient)
void beginEvent(edm::Event const &, edm::EventSetup const &) override
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
unsigned trigTypeToME_[nTriggerTypes]
bool filterRunType(short const *) override
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_
const_iterator begin() 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
tuple size
Write out results.
void setParams(edm::ParameterSet const &) override