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")),
44 print_(iConfig.getParameter<bool>(
"Print")) {
46 file_ =
new TFile(
"ECALTPGtree.root",
"RECREATE");
50 tree_ =
new TTree(
"EcalTPGAnalysis",
"EcalTPGAnalysis");
92 std::cout <<
"===========" << iEvent.
id() << std::endl;
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;
158 std::cout <<
"TPEmulator collection size=" << tpEmul.product()->size() << std::endl;
160 for (
unsigned int i = 0;
i < tpEmul.product()->size();
i++) {
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();
177 for (
unsigned int i = 0;
i < digiEB.product()->size();
i++) {
181 itTT = mapTower.find(towid);
182 if (itTT != mapTower.end())
183 (itTT->second).nbXtal_++;
190 for (
unsigned int i = 0;
i < digiEE.
product()->size();
i++) {
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_
EventNumber_t event() const
std::ostream & print_(std::ostream &os, value_type const &hash)
const CaloSubdetectorGeometry * theEndcapGeometry_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > tpToken_
int bunchCrossing() const
~EcalTPGAnalyzer() override
EcalTrigTowerDetId towerOf(const DetId &id) const
Get the tower id for this det id (or null if not known)
int ieta() const
get the tower ieta
bool getData(T &iHolder) const
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
int iphi() const
get the tower iphi
void endRun(edm::Run const &, edm::EventSetup const &) override
const EcalTrigTowerDetId & id() const
T const * product() const
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_
EcalTPGAnalyzer(const edm::ParameterSet &)