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);
129 if (storeCaloClusters_)
130 tree_->Branch(
"L1CaloCluster",
"L1Analysis::L1AnalysisL1CaloClusterDataFormat", &
l1CaloClusterData_, 32000, 3);
171 for (
auto itr : *(ecalTPs.
product()) ) {
173 short ieta = (short) itr.id().ieta();
177 unsigned short cal_iphi = (
unsigned short) itr.id().iphi();
178 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
179 unsigned short compEt = itr.compressedEt();
181 unsigned short fineGrain = (
unsigned short) itr.fineGrain();
196 edm::LogWarning(
"L1TNtuple") <<
"ECAL TPs not found, branch will not be filled";
202 for (
auto itr : (*hcalTPs.
product()) ) {
204 int ver = itr.id().version();
205 short ieta = (short) itr.id().ieta();
206 unsigned short absIeta = (
unsigned short)
abs(ieta);
209 unsigned short cal_iphi = (
unsigned short) itr.id().iphi();
210 unsigned short iphi = (72 + 18 - cal_iphi) % 72;
212 unsigned short compEt = itr.SOI_compressedEt();
213 double et = decoder->hcaletValue(itr.id(), itr.t0());
215 unsigned short fineGrain = (
unsigned short) itr.SOI_fineGrain();
217 if (compEt > 0 && (absIeta<29 || ver==1)) {
230 edm::LogWarning(
"L1TNtuple") <<
"HCAL TPs not found, branch will not be filled";
242 for (
int ibx=l1Towers->getFirstBX(); ibx<=l1Towers->getLastBX(); ++ibx) {
244 for (
auto itr = l1Towers->begin(ibx); itr !=l1Towers->end(ibx); ++itr ) {
246 if (itr->hwPt()<=0)
continue;
268 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Towerss not found, branch will not be filled";
283 for (
int ibx=l1Clusters->getFirstBX(); ibx<=l1Clusters->getLastBX(); ++ibx) {
285 for (
auto itr = l1Clusters->begin(ibx); itr !=l1Clusters->end(ibx); ++itr ) {
287 if (itr->hwPt()<=0)
continue;
306 edm::LogWarning(
"L1TNtuple") <<
"L1 Calo Clusters not found, branch will not be filled";
L1CaloTowerTreeProducer(const edm::ParameterSet &)
T getUntrackedParameter(std::string const &, T const &) const
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
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_
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_