28 : tpCollection_(iConfig.getParameter<
edm::
InputTag>(
"TPCollection")),
29 tpEmulatorCollection_(iConfig.getParameter<
edm::
InputTag>(
"TPEmulatorCollection")),
30 digiCollectionEB_(iConfig.getParameter<
edm::
InputTag>(
"DigiCollectionEB")),
31 digiCollectionEE_(iConfig.getParameter<
edm::
InputTag>(
"DigiCollectionEE")),
32 gtRecordCollectionTag_(iConfig.getParameter<
std::
string>(
"GTRecordCollection")),
42 allowTP_(iConfig.getParameter<
bool>(
"ReadTriggerPrimitives")),
43 useEE_(iConfig.getParameter<
bool>(
"UseEndCap")),
46 file_ =
new TFile(
"ECALTPGtree.root",
"RECREATE");
50 tree_ =
new TTree(
"EcalTPGAnalysis",
"EcalTPGAnalysis");
94 map<EcalTrigTowerDetId, towerEner> mapTower;
95 map<EcalTrigTowerDetId, towerEner>::iterator itTT;
115 std::vector<unsigned int> triggerMaskAlgoTrig = l1GtTmAlgo.gtTriggerMask();
121 for (std::vector<bool>::iterator itBit = dWord.begin(); itBit != dWord.end(); ++itBit) {
123 int maskBit = triggerMaskAlgoTrig[iBit] & (1 << iDaq);
139 std::cout <<
"TP collection size=" <<
tp.product()->size() << std::endl;
141 for (
unsigned int i = 0;
i <
tp.product()->size();
i++) {
148 mapTower[TPtowid] = tE;
163 itTT = mapTower.find(TPtowid);
164 if (itTT != mapTower.end())
165 for (
int j = 0;
j < 5;
j++)
166 (itTT->second).tpgEmul_[
j] =
d[
j].raw();
181 itTT = mapTower.find(towid);
182 if (itTT != mapTower.end())
183 (itTT->second).nbXtal_++;
194 itTT = mapTower.find(towid);
195 if (itTT != mapTower.end())
196 (itTT->second).nbXtal_++;
212 for (itTT = mapTower.begin(); itTT != mapTower.end(); ++itTT) {
const edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > eTTMapToken_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
std::ostream & print_(std::ostream &os, value_type const &hash)
int ieta() const
get the tower ieta
const CaloSubdetectorGeometry * theEndcapGeometry_
T const * product() const
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpToken_
const DecisionWord & decisionWord(int bxInEventValue) const
~EcalTPGAnalyzer() override
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
EcalTPGVariables treeVariables_
std::vector< bool > DecisionWord
typedefs
void analyze(edm::Event const &, edm::EventSetup const &) override
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpEmulToken_
const edm::ESGetToken< L1GtTriggerMask, L1GtTriggerMaskAlgoTrigRcd > l1GtMaskToken_
void beginRun(edm::Run const &, edm::EventSetup const &) override
const CaloSubdetectorGeometry * theBarrelGeometry_
const EcalTrigTowerConstituentsMap * eTTmap_
unsigned int nbOfActiveTriggers
void endRun(edm::Run const &, edm::EventSetup const &) override
const edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > eeGeometryToken_
const edm::ESGetToken< CaloSubdetectorGeometry, EcalBarrelGeometryRecord > ebGeometryToken_
const edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > l1GtReadoutRecordToken_
const edm::EDGetTokenT< EEDigiCollection > eeDigiToken_
const edm::EDGetTokenT< EBDigiCollection > ebDigiToken_
int iphi() const
get the tower iphi
EcalTPGAnalyzer(const edm::ParameterSet &)