100 : ecalLSB_(iConfig.getUntrackedParameter<double>(
"ecalLSB", 0.5)),
101 maxCaloTP_(iConfig.getUntrackedParameter<unsigned
int>(
"maxCaloTP", 5760)),
102 maxL1Tower_(iConfig.getUntrackedParameter<unsigned
int>(
"maxL1Tower", 5760)),
103 maxL1Cluster_(iConfig.getUntrackedParameter<unsigned
int>(
"maxL1Cluster", 5760)),
119 tree_ =
fs_->
make<TTree>(
"L1CaloTowerTree",
"L1CaloTowerTree");
120 tree_->Branch(
"CaloTP",
"L1Analysis::L1AnalysisCaloTPDataFormat", &
caloTPData_, 32000, 3);
121 tree_->Branch(
"L1CaloTower",
"L1Analysis::L1AnalysisL1CaloTowerDataFormat", &
l1CaloTowerData_, 32000, 3);
124 tree_->Branch(
"L1CaloCluster",
"L1Analysis::L1AnalysisL1CaloClusterDataFormat", &
l1CaloClusterData_, 32000, 3);
150 for (
const auto& itr : *(ecalTPs.
product())) {
151 short ieta = (short)itr.id().ieta();
155 unsigned short cal_iphi = (
unsigned short)itr.id().iphi();
156 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
157 unsigned short compEt = itr.compressedEt();
159 unsigned short fineGrain = (
unsigned short)itr.fineGrain();
173 edm::LogWarning(
"L1TNtuple") <<
"ECAL TPs not found, branch will not be filled";
177 for (
auto itr : (*hcalTPs.
product())) {
178 int ver = itr.id().version();
179 short ieta = (short)itr.id().ieta();
180 unsigned short absIeta = (
unsigned short)
abs(
ieta);
183 unsigned short cal_iphi = (
unsigned short)itr.id().iphi();
184 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
186 unsigned short compEt = itr.SOI_compressedEt();
189 unsigned short fineGrain = (
unsigned short)itr.SOI_fineGrain();
191 if (compEt > 0 && (absIeta < 29 || ver == 1)) {
203 edm::LogWarning(
"L1TNtuple") <<
"HCAL TPs not found, branch will not be filled";
214 for (
auto itr = l1Towers->
begin(ibx); itr != l1Towers->
end(ibx); ++itr) {
215 if (itr->hwPt() <= 0)
235 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Towerss not found, branch will not be filled";
248 for (
auto itr = l1Clusters->
begin(ibx); itr != l1Clusters->
end(ibx); ++itr) {
249 if (itr->hwPt() <= 0)
266 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Clusters not found, branch will not be filled";
static const std::string kSharedResource
L1CaloTowerTreeProducer(const edm::ParameterSet &)
const edm::EDGetTokenT< EcalTrigPrimDigiCollection > ecalToken_
const unsigned maxL1Tower_
#define DEFINE_FWK_MODULE(type)
const edm::ESGetToken< CaloTPGTranscoder, CaloTPGRecord > decoderToken_
T const * product() const
L1Analysis::L1AnalysisCaloTPDataFormat * caloTPData_
const unsigned maxCaloTP_
const_iterator begin(int bx) const
T getUntrackedParameter(std::string const &, T const &) const
const edm::EDGetTokenT< HcalTrigPrimDigiCollection > hcalToken_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const unsigned maxL1Cluster_
Abs< T >::type abs(const T &t)
edm::Service< TFileService > fs_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void beginJob(void) override
edm::EDGetTokenT< l1t::CaloClusterBxCollection > l1ClusterToken_
BXVector< CaloTower > CaloTowerBxCollection
L1Analysis::L1AnalysisL1CaloClusterDataFormat * l1CaloClusterData_
~L1CaloTowerTreeProducer() override=default
const_iterator end(int bx) const
void analyze(const edm::Event &, const edm::EventSetup &) override
T * make(const Args &...args) const
make new ROOT object
Log< level::Warning, false > LogWarning
L1Analysis::L1AnalysisL1CaloTowerDataFormat * l1CaloTowerData_
virtual double hcaletValue(const int &ieta, const int &iphi, const int &version, const int &compressedValue) const =0
const edm::EDGetTokenT< l1t::CaloTowerBxCollection > l1TowerToken_