125 tree_=
fs_->
make<TTree>(
"L1CaloTowerTree",
"L1CaloTowerTree");
126 tree_->Branch(
"CaloTP",
"L1Analysis::L1AnalysisCaloTPDataFormat", &
caloTPData_, 32000, 3);
127 tree_->Branch(
"L1CaloTower",
"L1Analysis::L1AnalysisL1CaloTowerDataFormat", &
l1CaloTowerData_, 32000, 3);
128 tree_->Branch(
"L1CaloCluster",
"L1Analysis::L1AnalysisL1CaloClusterDataFormat", &
l1CaloClusterData_, 32000, 3);
176 for (
auto itr : *(ecalTPs.
product()) ) {
178 short ieta = (short) itr.id().ieta();
179 unsigned short absIeta = (
unsigned short)
abs(ieta);
180 short sign = ieta/absIeta;
182 unsigned short cal_iphi = (
unsigned short) itr.id().iphi();
183 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
184 unsigned short compEt = itr.compressedEt();
186 if (ecalScale.
isValid()) et = ecalScale->et( compEt, absIeta, sign );
188 unsigned short fineGrain = (
unsigned short) itr.fineGrain();
203 edm::LogWarning(
"L1TNtuple") <<
"HCAL TPs not found, branch will not be filled";
209 for (
auto itr : (*hcalTPs.
product()) ) {
211 short ieta = (short) itr.id().ieta();
212 unsigned short absIeta = (
unsigned short)
abs(ieta);
213 short sign = ieta/absIeta;
215 unsigned short cal_iphi = (
unsigned short) itr.id().iphi();
216 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
221 unsigned short compEt = itr.SOI_compressedEt();
223 if (hcalScale.
isValid()) et = hcalScale->et( compEt, absIeta, sign );
225 unsigned short fineGrain = (
unsigned short) itr.SOI_fineGrain();
240 edm::LogWarning(
"L1TNtuple") <<
"HCAL TPs not found, branch will not be filled";
252 for (
int ibx=l1Towers->getFirstBX(); ibx<=l1Towers->getLastBX(); ++ibx) {
254 for (
auto itr = l1Towers->begin(ibx); itr !=l1Towers->end(ibx); ++itr ) {
256 if (itr->hwPt()<=0)
continue;
278 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Towerss not found, branch will not be filled";
292 for (
int ibx=l1Clusters->getFirstBX(); ibx<=l1Clusters->getLastBX(); ++ibx) {
294 for (
auto itr = l1Clusters->begin(ibx); itr !=l1Clusters->end(ibx); ++itr ) {
296 if (itr->hwPt()<=0)
continue;
315 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Clusters not found, branch will not be filled";
unsigned long long cacheIdentifier() const
L1CaloTowerTreeProducer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
T * make(const Args &...args) const
make new ROOT object
L1Analysis::L1AnalysisCaloTPDataFormat * caloTPData_
~L1CaloTowerTreeProducer()
virtual void beginJob(void)
Abs< T >::type abs(const T &t)
edm::Service< TFileService > fs_
edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalToken_
T const * product() const
edm::EDGetTokenT< l1t::CaloClusterBxCollection > l1ClusterToken_
unsigned long long hcalScaleCacheID_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
L1Analysis::L1AnalysisL1CaloClusterDataFormat * l1CaloClusterData_
edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalToken_
edm::EDGetTokenT< l1t::CaloTowerBxCollection > l1TowerToken_
bool isUninitialized() const
L1Analysis::L1AnalysisL1CaloTowerDataFormat * l1CaloTowerData_
unsigned long long ecalScaleCacheID_
scales