Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CaloTriggerSim.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file CaloTriggerSim.cc
1 #include "CaloTriggerSim.h"
2 
3 #include "CaloTriggerInfo.h"
4 #include "CaloTriggerInfov1.h"
5 
6 // sPHENIX includes
7 #include <calobase/RawTowerDefs.h> // for encode_towerid
8 #include <calobase/RawTowerGeom.h>
9 #include <calobase/RawTowerGeomContainer.h>
10 #include <calobase/TowerInfo.h>
11 #include <calobase/TowerInfoContainer.h>
12 
14 #include <fun4all/SubsysReco.h>
15 
16 #include <phool/PHCompositeNode.h>
17 #include <phool/PHIODataNode.h>
18 #include <phool/PHNode.h>
19 #include <phool/PHNodeIterator.h>
20 #include <phool/PHObject.h>
21 #include <phool/getClass.h>
22 #include <phool/phool.h>
23 
24 // standard includes
25 #include <algorithm>
26 #include <cmath>
27 #include <cstdlib>
28 #include <iomanip>
29 #include <iostream>
30 #include <utility>
31 #include <vector>
32 
34  : SubsysReco(name)
35 {
36  return;
37 }
38 
39 double CaloTriggerSim::truncate_8bit(const double raw_E) const
40 {
41  double rawE = std::min(raw_E, 45.0);
42  int counts = std::floor(rawE / (45.0 / 256));
43 
44  return counts * (45.0 / 256);
45 }
47 {
48  return CreateNode(topNode);
49 }
50 
52 {
53  if (Verbosity() > 0)
54  {
55  std::cout << "CaloTriggerSim::process_event: entering" << std::endl;
56  }
57 
58  // pull out the tower containers and geometry objects at the start
59 
60  TowerInfoContainer *towersEM3 = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_CEMC");
61  TowerInfoContainer *towersIH3 = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALIN");
62  TowerInfoContainer *towersOH3 = findNode::getClass<TowerInfoContainer>(topNode, "TOWERINFO_CALIB_HCALOUT");
63 
64  if (Verbosity() > 0)
65  {
66  std::cout << "CaloTriggerSim::process_event: " << towersEM3->size() << " TOWERINFO_CALIB_CEMC towers" << std::endl;
67  std::cout << "CaloTriggerSim::process_event: " << towersIH3->size() << " TOWERINFO_CALIB_HCALIN towers" << std::endl;
68  std::cout << "CaloTriggerSim::process_event: " << towersOH3->size() << " TOWERINFO_CALIB_HCALOUT towers" << std::endl;
69  }
70 
71  RawTowerGeomContainer *geomEM = findNode::getClass<RawTowerGeomContainer>(topNode, "TOWERGEOM_CEMC");
72  RawTowerGeomContainer *geomIH = findNode::getClass<RawTowerGeomContainer>(topNode, "TOWERGEOM_HCALIN");
73  RawTowerGeomContainer *geomOH = findNode::getClass<RawTowerGeomContainer>(topNode, "TOWERGEOM_HCALOUT");
74 
75  // get the binning from the geometry (different for 1D vs 2D...)
76  int geom_etabins = geomEM->get_etabins();
77  int geom_phibins = geomEM->get_phibins();
78 
79  // if internal knowledge of geometry is unset, set it now (should
80  // only happen once, on the first event)
81  if (m_EMCAL_1x1_NETA < 0)
82  {
83  m_EMCAL_1x1_NETA = geom_etabins;
84  m_EMCAL_1x1_NPHI = geom_phibins;
85 
86  // half as many 2x2 windows along each axis as 1x1
87  m_EMCAL_2x2_NETA = geom_etabins / 2;
88  m_EMCAL_2x2_NPHI = geom_phibins / 2;
89 
90  // each 2x2 window defines a 4x4 window for which that 2x2 window
91  // is the upper-left corner, so there are as many 4x4's as 2x2's
92  // (except in eta, where the edge effect means there is 1 fewer)
93  m_EMCAL_4x4_NETA = geom_etabins / 2 - 1;
94  m_EMCAL_4x4_NPHI = geom_phibins / 2;
95 
96  // reset all maps
97  m_EMCAL_1x1_MAP.resize(m_EMCAL_1x1_NETA, std::vector<double>(m_EMCAL_1x1_NPHI, 0));
98  m_EMCAL_2x2_MAP.resize(m_EMCAL_2x2_NETA, std::vector<double>(m_EMCAL_2x2_NPHI, 0));
99  m_EMCAL_4x4_MAP.resize(m_EMCAL_4x4_NETA, std::vector<double>(m_EMCAL_4x4_NPHI, 0));
100 
101  if (Verbosity() > 0)
102  {
103  std::cout << "CaloTriggerSim::process_event: setting number of window in eta / phi,";
104  std::cout << "1x1 are " << m_EMCAL_1x1_NETA << " / " << m_EMCAL_1x1_NPHI << ", ";
105  std::cout << "2x2 are " << m_EMCAL_2x2_NETA << " / " << m_EMCAL_2x2_NPHI << ", ";
106  std::cout << "4x4 are " << m_EMCAL_4x4_NETA << " / " << m_EMCAL_4x4_NPHI << std::endl;
107  }
108  }
109 
110  // reset 1x1 map
111  fill(m_EMCAL_1x1_MAP.begin(), m_EMCAL_1x1_MAP.end(), std::vector<double>(m_EMCAL_1x1_NPHI, 0));
112 
113  // iterate over EMCal towers, constructing 1x1's
114  unsigned int ntowers_EM = towersEM3->size();
115  for (unsigned int channel = 0; channel < ntowers_EM; channel++)
116  {
118 
119  // RawTowerGeom *tower_geom = geomEM->get_tower_geometry(tower->get_key());
120 
121  unsigned int towerkey = towersEM3->encode_key(channel);
122  int this_etabin = towersEM3->getTowerEtaBin(towerkey);
123  int this_phibin = towersEM3->getTowerPhiBin(towerkey);
124  double this_E = tower->get_energy();
125 
126  m_EMCAL_1x1_MAP[this_etabin][this_phibin] += this_E;
127 
128  if (Verbosity() > 1 && tower->get_energy() > 1)
129  {
130  std::cout << "CaloTriggerSim::process_event: EMCal 1x1 tower eta bin / phi bin / E = " << std::setprecision(6) << this_etabin << " / " << this_phibin << " / " << this_E << std::endl;
131  }
132  }
133 
134  // reset 2x2 map and best
135  fill(m_EMCAL_2x2_MAP.begin(), m_EMCAL_2x2_MAP.end(), std::vector<double>(m_EMCAL_2x2_NPHI, 0));
136 
137  m_EMCAL_2x2_BEST_E = 0;
140 
141  // now reconstruct 2x2 map from 1x1 map
142  for (std::vector<double>::size_type ieta = 0; ieta < m_EMCAL_2x2_NETA; ieta++)
143  {
144  for (std::vector<double>::size_type iphi = 0; iphi < m_EMCAL_2x2_NPHI; iphi++)
145  {
146  double this_sum = 0;
147 
148  this_sum += m_EMCAL_1x1_MAP[2 * ieta][2 * iphi];
149  this_sum += m_EMCAL_1x1_MAP[2 * ieta][2 * iphi + 1]; // 2 * iphi + 1 is safe, since m_EMCAL_2x2_NPHI = m_EMCAL_1x1_NPHI / 2
150  this_sum += m_EMCAL_1x1_MAP[2 * ieta + 1][2 * iphi]; // 2 * ieta + 1 is safe, since m_EMCAL_2x2_NETA = m_EMCAL_1x1_NETA / 2
151  this_sum += m_EMCAL_1x1_MAP[2 * ieta + 1][2 * iphi + 1];
152 
154  {
155  this_sum = truncate_8bit(this_sum);
156  }
157 
158  // populate 2x2 map
159  m_EMCAL_2x2_MAP[ieta][iphi] = this_sum;
160 
161  // to calculate the eta, phi position, take the average of that of the 1x1's
162  double this_eta = 0.5 * (geomEM->get_etacenter(2 * ieta) + geomEM->get_etacenter(2 * ieta + 1));
163  double this_phi = 0.5 * (geomEM->get_phicenter(2 * iphi) + geomEM->get_phicenter(2 * iphi + 1));
164  // wrap-around phi (apparently needed for 2D geometry?)
165  if (this_phi > M_PI)
166  {
167  this_phi -= 2 * M_PI;
168  }
169  if (this_phi < -M_PI)
170  {
171  this_phi += 2 * M_PI;
172  }
173 
174  if (Verbosity() > 1 && this_sum > 1)
175  {
176  std::cout << "CaloTriggerSim::process_event: EMCal 2x2 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
177  }
178 
179  if (this_sum > m_EMCAL_2x2_BEST_E)
180  {
181  m_EMCAL_2x2_BEST_E = this_sum;
182  m_EMCAL_2x2_BEST_PHI = this_phi;
183  m_EMCAL_2x2_BEST_ETA = this_eta;
184  }
185  }
186  }
187 
188  if (Verbosity() > 0)
189  {
190  std::cout << "CaloTriggerSim::process_event: best EMCal 2x2 window is at eta / phi = " << m_EMCAL_2x2_BEST_ETA << " / " << m_EMCAL_2x2_BEST_PHI << " and E = " << m_EMCAL_2x2_BEST_E << std::endl;
191  }
192 
193  // reset 4x4 map & best
194  fill(m_EMCAL_4x4_MAP.begin(), m_EMCAL_4x4_MAP.end(), std::vector<double>(m_EMCAL_4x4_NPHI, 0));
195 
196  m_EMCAL_4x4_BEST_E = 0;
199 
200  int emcal_4x4_best_iphi = -1;
201  int emcal_4x4_best_ieta = -1;
202 
203  // now reconstruct (sliding) 4x4 map from 2x2 map
204  for (int ieta = 0; ieta < m_EMCAL_4x4_NETA; ieta++)
205  {
206  for (int iphi = 0; iphi < m_EMCAL_4x4_NPHI; iphi++)
207  {
208  // for eta calculation (since eta distribution is potentially
209  // non-uniform), average positions of all four towers
210  double this_eta = 0.25 * (geomEM->get_etacenter(2 * ieta) + geomEM->get_etacenter(2 * ieta + 1) + geomEM->get_etacenter(2 * ieta + 2) + geomEM->get_etacenter(2 * ieta + 3));
211  // for phi calculation (since phi distribution is uniform), take
212  // first tower and add 1.5 tower widths
213  double this_phi = geomEM->get_phicenter(2 * iphi) + 1.5 * (geomEM->get_phicenter(2 * iphi + 1) - geomEM->get_phicenter(2 * iphi));
214  // wrap-around phi (apparently needed for 2D geometry?)
215  if (this_phi > M_PI)
216  {
217  this_phi -= 2 * M_PI;
218  }
219  if (this_phi < -M_PI)
220  {
221  this_phi += 2 * M_PI;
222  }
223 
224  double this_sum = 0;
225 
226  this_sum += m_EMCAL_2x2_MAP[ieta][iphi];
227  this_sum += m_EMCAL_2x2_MAP[ieta + 1][iphi]; // ieta + 1 is safe, since m_EMCAL_4x4_NETA = m_EMCAL_2x2_NETA - 1
228 
229  if (iphi != m_EMCAL_4x4_NPHI - 1)
230  {
231  // if we are not in the last phi row, can safely access 'iphi+1'
232  this_sum += m_EMCAL_2x2_MAP[ieta][iphi + 1];
233  this_sum += m_EMCAL_2x2_MAP[ieta + 1][iphi + 1];
234  }
235  else
236  {
237  // if we are in the last phi row, wrap back around to zero
238  this_sum += m_EMCAL_2x2_MAP[ieta][0];
239  this_sum += m_EMCAL_2x2_MAP[ieta + 1][0];
240  }
241 
242  m_EMCAL_4x4_MAP[ieta][iphi] = this_sum;
243 
244  if (Verbosity() > 1 && this_sum > 1)
245  {
246  std::cout << "CaloTriggerSim::process_event: EMCal 4x4 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
247  }
248 
249  if (this_sum > m_EMCAL_4x4_BEST_E)
250  {
251  m_EMCAL_4x4_BEST_E = this_sum;
252  m_EMCAL_4x4_BEST_PHI = this_phi;
253  m_EMCAL_4x4_BEST_ETA = this_eta;
254 
255  emcal_4x4_best_iphi = iphi;
256  emcal_4x4_best_ieta = ieta;
257  }
258  }
259  }
260 
264 
265  // find second-largest 4x4 which is > 1 tower away...
266  for (int ieta = 0; ieta < m_EMCAL_4x4_NETA; ieta++)
267  {
268  for (int iphi = 0; iphi < m_EMCAL_4x4_NPHI; iphi++)
269  {
270  int deta = ieta - emcal_4x4_best_ieta;
271  int dphi = (iphi - emcal_4x4_best_iphi) % m_EMCAL_4x4_NPHI;
272 
273  if (abs(deta) < 1.5 && abs(dphi) < 1.5)
274  {
275  continue;
276  }
277 
278  double this_eta = 0.25 * (geomEM->get_etacenter(2 * ieta) + geomEM->get_etacenter(2 * ieta + 1) + geomEM->get_etacenter(2 * ieta + 2) + geomEM->get_etacenter(2 * ieta + 3));
279  double this_phi = geomEM->get_phicenter(2 * iphi) + 1.5 * (geomEM->get_phicenter(2 * iphi + 1) - geomEM->get_phicenter(2 * iphi));
280 
281  if (this_phi > M_PI)
282  {
283  this_phi -= 2 * M_PI;
284  }
285  if (this_phi < -M_PI)
286  {
287  this_phi += 2 * M_PI;
288  }
289 
290  double this_sum = m_EMCAL_4x4_MAP[ieta][iphi];
291 
292  if (this_sum > m_EMCAL_4x4_BEST2_E)
293  {
294  m_EMCAL_4x4_BEST2_E = this_sum;
295  m_EMCAL_4x4_BEST2_PHI = this_phi;
296  m_EMCAL_4x4_BEST2_ETA = this_eta;
297  }
298  }
299  }
300 
301  if (Verbosity() > 0)
302  {
303  std::cout << "CaloTriggerSim::process_event: best EMCal 4x4 window is at eta / phi = " << m_EMCAL_4x4_BEST_ETA << " / " << m_EMCAL_4x4_BEST_PHI << " and E = " << m_EMCAL_4x4_BEST_E << std::endl;
304  std::cout << "CaloTriggerSim::process_event: 2nd best EMCal 4x4 window is at eta / phi = " << m_EMCAL_4x4_BEST2_ETA << " / " << m_EMCAL_4x4_BEST2_PHI << " and E = " << m_EMCAL_4x4_BEST2_E << std::endl;
305  }
306 
307  // begin full calo sim
308 
309  // get the 0.1x0.1 binning from the OHCal geometry
310  int geomOH_etabins = geomOH->get_etabins();
311  int geomOH_phibins = geomOH->get_phibins();
312 
313  // if internal knowledge of geometry is unset, set it now
314  if (m_FULLCALO_0p1x0p1_NETA < 0)
315  {
316  m_FULLCALO_PHI_START = geomOH->get_phibounds(0).first;
317  m_FULLCALO_PHI_END = geomOH->get_phibounds(geomOH_phibins - 1).second;
318 
319  m_FULLCALO_0p1x0p1_NETA = geomOH_etabins;
320  m_FULLCALO_0p1x0p1_NPHI = geomOH_phibins;
321 
322  // half as many 0.2x0.2 windows along each axis as 0.1x0.1
323  m_FULLCALO_0p2x0p2_NETA = geomOH_etabins / 2;
324  m_FULLCALO_0p2x0p2_NPHI = geomOH_phibins / 2;
325 
326  // each 0.2x0.2 window defines a 0.4x0.4 window for which that
327  // 0.2x0.2 window is the upper-left corner, so there are as many
328  // 0.4x0.4's as 0.2x0.2's (except in eta, where the edge effect
329  // means there is 1 fewer)
330  m_FULLCALO_0p4x0p4_NETA = geomOH_etabins / 2 - 1;
331  m_FULLCALO_0p4x0p4_NPHI = geomOH_phibins / 2;
332 
333  // for 0.6x0.6 windows, the above logic applies, except that the
334  // edge effect causes there to be 2 fewer less in eta
335  m_FULLCALO_0p6x0p6_NETA = geomOH_etabins / 2 - 2;
336  m_FULLCALO_0p6x0p6_NPHI = geomOH_phibins / 2;
337 
338  // for 0.8x0.8 windows, the above logic applies, except that the
339  // edge effect causes there to be 3 fewer less in eta
340  m_FULLCALO_0p8x0p8_NETA = geomOH_etabins / 2 - 3;
341  m_FULLCALO_0p8x0p8_NPHI = geomOH_phibins / 2;
342 
343  // for 1.0x1.0 windows, the above logic applies, except that the
344  // edge effect causes there to be 4 fewer less in eta
345  m_FULLCALO_1p0x1p0_NETA = geomOH_etabins / 2 - 4;
346  m_FULLCALO_1p0x1p0_NPHI = geomOH_phibins / 2;
347 
348  // reset all maps
355 
356  if (Verbosity() > 0)
357  {
358  std::cout << "CaloTriggerSim::process_event: determining phi range for 0.1x0.1 full calo map: " << m_FULLCALO_PHI_START << " to " << m_FULLCALO_PHI_END << std::endl;
359  std::cout << "CaloTriggerSim::process_event: setting number of full calo window in eta / phi:" << std::endl;
360  std::cout << " 0.1x0.1 are " << m_FULLCALO_0p1x0p1_NETA << " / " << m_FULLCALO_0p1x0p1_NPHI << ", ";
361  std::cout << "0.2x0.2 are " << m_FULLCALO_0p2x0p2_NETA << " / " << m_FULLCALO_0p2x0p2_NPHI << ", ";
362  std::cout << "0.4x0.4 are " << m_FULLCALO_0p4x0p4_NETA << " / " << m_FULLCALO_0p4x0p4_NPHI << ", ";
363  std::cout << "0.6x0.6 are " << m_FULLCALO_0p6x0p6_NETA << " / " << m_FULLCALO_0p6x0p6_NPHI << ", ";
364  std::cout << "0.8x0.8 are " << m_FULLCALO_0p8x0p8_NETA << " / " << m_FULLCALO_0p8x0p8_NPHI << ", ";
365  std::cout << "1.0x1.0 are " << m_FULLCALO_1p0x1p0_NETA << " / " << m_FULLCALO_1p0x1p0_NPHI << std::endl;
366  }
367  }
368 
369  // reset 0.1x0.1 map
370  fill(m_FULLCALO_0p1x0p1_MAP.begin(), m_FULLCALO_0p1x0p1_MAP.end(), std::vector<double>(m_FULLCALO_0p1x0p1_NPHI, 0));
371 
372  // iterate over EMCal towers, filling in the 0.1x0.1 region they contribute to
373  for (unsigned int channel = 0; channel < ntowers_EM; channel++)
374  {
376  unsigned int towerkey = towersEM3->encode_key(channel);
377  int ieta = towersEM3->getTowerEtaBin(towerkey);
378  int iphi = towersEM3->getTowerPhiBin(towerkey);
380  float this_phi = geomEM->get_tower_geometry(key)->get_phi();
381  float this_eta = geomEM->get_tower_geometry(key)->get_eta();
382 
383  if (this_phi < m_FULLCALO_PHI_START)
384  {
385  this_phi += 2 * M_PI;
386  }
387  if (this_phi > m_FULLCALO_PHI_END)
388  {
389  this_phi -= 2 * M_PI;
390  }
391 
392  // note: look up eta/phi index based on OHCal geometry, since this
393  // defines the 0.1x0.1 regions
394  int this_etabin = geomOH->get_etabin(this_eta);
395  int this_phibin = geomOH->get_phibin(this_phi);
396  double this_E = tower->get_energy();
397 
398  m_FULLCALO_0p1x0p1_MAP[this_etabin][this_phibin] += this_E;
399 
400  if (Verbosity() > 1 && tower->get_energy() > 1)
401  {
402  std::cout << "CaloTriggerSim::process_event: EMCal tower at eta / phi (added to fullcalo map with etabin / phibin ) / E = " << std::setprecision(6) << this_eta << " / " << this_phi << " ( " << this_etabin << " / " << this_phibin << " ) / " << this_E << std::endl;
403  }
404  }
405 
406  // iterate over IHCal towers, filling in the 0.1x0.1 region they contribute to
407 
408  unsigned int ntowers_IH = towersIH3->size();
409  for (unsigned int channel = 0; channel < ntowers_IH; channel++)
410  {
411  TowerInfo *tower = towersIH3->get_tower_at_channel(channel);
412  unsigned int towerkey = towersIH3->encode_key(channel);
413  int ieta = towersIH3->getTowerEtaBin(towerkey);
414  int iphi = towersIH3->getTowerPhiBin(towerkey);
416  float this_phi = geomIH->get_tower_geometry(key)->get_phi();
417  float this_eta = geomIH->get_tower_geometry(key)->get_eta();
418 
419  if (this_phi < m_FULLCALO_PHI_START)
420  {
421  this_phi += 2 * M_PI;
422  }
423  if (this_phi > m_FULLCALO_PHI_END)
424  {
425  this_phi -= 2 * M_PI;
426  }
427 
428  // note: look up eta/phi index based on OHCal geometry, even though I
429  // think it is by construction the same as the IHCal geometry...
430  int this_etabin = geomOH->get_etabin(this_eta);
431  int this_phibin = geomOH->get_phibin(this_phi);
432  double this_E = tower->get_energy();
433 
434  m_FULLCALO_0p1x0p1_MAP[this_etabin][this_phibin] += this_E;
435 
436  if (Verbosity() > 1 && tower->get_energy() > 0.5)
437  {
438  std::cout << "CaloTriggerSim::process_event: IHCal tower at eta / phi (added to fullcalo map with etabin / phibin ) / E = " << std::setprecision(6) << this_eta << " / " << this_phi << " ( " << this_etabin << " / " << this_phibin << " ) / " << this_E << std::endl;
439  }
440  }
441 
442  // iterate over OHCal towers, filling in the 0.1x0.1 region they contribute to
443 
444  unsigned int ntowers_OH = towersOH3->size();
445  for (unsigned int channel = 0; channel < ntowers_OH; channel++)
446  {
447  TowerInfo *tower = towersOH3->get_tower_at_channel(channel);
448  unsigned int towerkey = towersOH3->encode_key(channel);
449  int ieta = towersOH3->getTowerEtaBin(towerkey);
450  int iphi = towersOH3->getTowerPhiBin(towerkey);
452  float this_phi = geomIH->get_tower_geometry(key)->get_phi();
453  float this_eta = geomIH->get_tower_geometry(key)->get_eta();
454 
455  if (this_phi < m_FULLCALO_PHI_START)
456  {
457  this_phi += 2 * M_PI;
458  }
459  if (this_phi > m_FULLCALO_PHI_END)
460  {
461  this_phi -= 2 * M_PI;
462  }
463 
464  // note: use the nominal eta/phi index, since the fullcalo 0.1x0.1
465  // map is defined by the OHCal geometry itself
466  int this_etabin = geomOH->get_etabin(this_eta);
467  int this_phibin = geomOH->get_phibin(this_phi);
468  double this_E = tower->get_energy();
469 
470  m_FULLCALO_0p1x0p1_MAP[this_etabin][this_phibin] += this_E;
471 
472  if (Verbosity() > 1 && tower->get_energy() > 0.5)
473  {
474  std::cout << "CaloTriggerSim::process_event: OHCal tower at eta / phi (added to fullcalo map with etabin / phibin ) / E = " << std::setprecision(6) << this_eta << " / " << this_phi << " ( " << this_etabin << " / " << this_phibin << " ) / " << this_E << std::endl;
475  }
476  }
477 
478  // reset 0.2x0.2 map and best
479  fill(m_FULLCALO_0p2x0p2_MAP.begin(), m_FULLCALO_0p2x0p2_MAP.end(), std::vector<double>(m_FULLCALO_0p2x0p2_NPHI, 0));
480 
484 
485  // now reconstruct (non-sliding) 0.2x0.2 map from 0.1x0.1 map
486  for (std::vector<double>::size_type ieta = 0; ieta < m_FULLCALO_0p2x0p2_NETA; ieta++)
487  {
488  for (std::vector<double>::size_type iphi = 0; iphi < m_FULLCALO_0p2x0p2_NPHI; iphi++)
489  {
490  double this_sum = 0;
491 
492  this_sum += m_FULLCALO_0p1x0p1_MAP[2 * ieta][2 * iphi];
493  this_sum += m_FULLCALO_0p1x0p1_MAP[2 * ieta][2 * iphi + 1]; // 2 * iphi + 1 is safe, since m_FULLCALO_0p2x0p2_NPHI = m_FULLCALO_0p1x0p1_NPHI / 2
494  this_sum += m_FULLCALO_0p1x0p1_MAP[2 * ieta + 1][2 * iphi]; // 2 * ieta + 1 is safe, since m_FULLCALO_0p2x0p2_NETA = m_FULLCALO_0p1x0p1_NETA / 2
495  this_sum += m_FULLCALO_0p1x0p1_MAP[2 * ieta + 1][2 * iphi + 1];
496 
497  // populate 0.2x0.2 map
498  m_FULLCALO_0p2x0p2_MAP[ieta][iphi] = this_sum;
499 
500  // to calculate the eta, phi position, take the average of that
501  // of the contributing 0.1x0.1's (which are defined by the OHCal geometry)
502  double this_eta = 0.5 * (geomOH->get_etacenter(2 * ieta) + geomOH->get_etacenter(2 * ieta + 1));
503  double this_phi = 0.5 * (geomOH->get_phicenter(2 * iphi) + geomOH->get_phicenter(2 * iphi + 1));
504 
505  if (Verbosity() > 1 && this_sum > 1)
506  {
507  std::cout << "CaloTriggerSim::process_event: FullCalo 0.2x0.2 window eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
508  }
509 
510  if (this_sum > m_FULLCALO_0p2x0p2_BEST_E)
511  {
512  m_FULLCALO_0p2x0p2_BEST_E = this_sum;
513  m_FULLCALO_0p2x0p2_BEST_PHI = this_phi;
514  m_FULLCALO_0p2x0p2_BEST_ETA = this_eta;
515  }
516  }
517  }
518 
519  if (Verbosity() > 0)
520  {
521  std::cout << "CaloTriggerSim::process_event: best FullCalo 0.2x0.2 window is at eta / phi = " << m_FULLCALO_0p2x0p2_BEST_ETA << " / " << m_FULLCALO_0p2x0p2_BEST_PHI << " and E = " << m_FULLCALO_0p2x0p2_BEST_E << std::endl;
522  }
523 
524  // reset fullcalo 0.4x0.4 map & best
525  fill(m_FULLCALO_0p4x0p4_MAP.begin(), m_FULLCALO_0p4x0p4_MAP.end(), std::vector<double>(m_FULLCALO_0p4x0p4_NPHI, 0));
526 
530 
531  // now reconstruct (sliding) 0.4x0.4 map from 0.2x0.2 map
532  for (int ieta = 0; ieta < m_FULLCALO_0p4x0p4_NETA; ieta++)
533  {
534  for (int iphi = 0; iphi < m_FULLCALO_0p4x0p4_NPHI; iphi++)
535  {
536  // for eta calculation, use position of corner tower and add 1.5
537  // tower widths
538  double this_eta = geomOH->get_etacenter(2 * ieta) + 1.5 * (geomOH->get_etacenter(1) - geomOH->get_etacenter(0));
539  // for phi calculation, use position of corner tower and add 1.5
540  // tower widths
541  double this_phi = geomOH->get_phicenter(2 * iphi) + 1.5 * (geomOH->get_phicenter(1) - geomOH->get_phicenter(0));
542 
543  double this_sum = 0;
544 
545  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][iphi];
546  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][iphi]; // 2 * ieta + 1 is safe, since m_FULLCALO_0p4x0p4_NETA = m_FULLCALO_0p4x0p4_NETA - 1
547 
548  // add 1 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
549  // in case we have wrapped back around
550  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
551  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
552 
553  m_FULLCALO_0p4x0p4_MAP[ieta][iphi] = this_sum;
554 
555  if (Verbosity() > 1 && this_sum > 2)
556  {
557  std::cout << "CaloTriggerSim::process_event: FullCalo 0.4x0.4 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
558  }
559 
560  if (this_sum > m_FULLCALO_0p4x0p4_BEST_E)
561  {
562  m_FULLCALO_0p4x0p4_BEST_E = this_sum;
563  m_FULLCALO_0p4x0p4_BEST_PHI = this_phi;
564  m_FULLCALO_0p4x0p4_BEST_ETA = this_eta;
565  }
566  }
567  }
568 
569  if (Verbosity() > 0)
570  {
571  std::cout << "CaloTriggerSim::process_event: best FullCalo 0.4x0.4 window is at eta / phi = " << m_FULLCALO_0p4x0p4_BEST_ETA << " / " << m_FULLCALO_0p4x0p4_BEST_PHI << " and E = " << m_FULLCALO_0p4x0p4_BEST_E << std::endl;
572  }
573 
574  // reset fullcalo 0.6x0.6 map & best
575  fill(m_FULLCALO_0p6x0p6_MAP.begin(), m_FULLCALO_0p6x0p6_MAP.end(), std::vector<double>(m_FULLCALO_0p6x0p6_NPHI, 0));
576 
580 
581  // now reconstruct (sliding) 0.6x0.6 map from 0.2x0.2 map
582  for (int ieta = 0; ieta < m_FULLCALO_0p6x0p6_NETA; ieta++)
583  {
584  for (int iphi = 0; iphi < m_FULLCALO_0p6x0p6_NPHI; iphi++)
585  {
586  // for eta calculation, use position of corner tower and add 2.5
587  // tower widths
588  double this_eta = geomOH->get_etacenter(2 * ieta) + 2.5 * (geomOH->get_etacenter(1) - geomOH->get_etacenter(0));
589  // for phi calculation, use position of corner tower and add 2.5
590  // tower widths
591  double this_phi = geomOH->get_phicenter(2 * iphi) + 2.5 * (geomOH->get_phicenter(1) - geomOH->get_phicenter(0));
592 
593  double this_sum = 0;
594 
595  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][iphi];
596  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][iphi]; // ieta + 1 is safe, since m_FULLCALO_0p6x0p6_NETA = m_FULLCALO_0p2x0p2_NETA - 2
597  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][iphi]; // ieta + 2 is safe, since m_FULLCALO_0p6x0p6_NETA = m_FULLCALO_0p2x0p2_NETA - 2
598 
599  // add 1 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
600  // in case we have wrapped back around
601  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
602  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
603  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
604  // add 2 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
605  // in case we have wrapped back around
606  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
607  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
608  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
609 
610  m_FULLCALO_0p6x0p6_MAP[ieta][iphi] = this_sum;
611 
612  if (Verbosity() > 1 && this_sum > 3)
613  {
614  std::cout << "CaloTriggerSim::process_event: FullCalo 0.6x0.6 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
615  }
616 
617  if (this_sum > m_FULLCALO_0p6x0p6_BEST_E)
618  {
619  m_FULLCALO_0p6x0p6_BEST_E = this_sum;
620  m_FULLCALO_0p6x0p6_BEST_PHI = this_phi;
621  m_FULLCALO_0p6x0p6_BEST_ETA = this_eta;
622  }
623  }
624  }
625 
626  if (Verbosity() > 0)
627  {
628  std::cout << "CaloTriggerSim::process_event: best FullCalo 0.6x0.6 window is at eta / phi = " << m_FULLCALO_0p6x0p6_BEST_ETA << " / " << m_FULLCALO_0p6x0p6_BEST_PHI << " and E = " << m_FULLCALO_0p6x0p6_BEST_E << std::endl;
629  }
630 
631  // reset fullcalo 0.8x0.8 map & best
632  fill(m_FULLCALO_0p8x0p8_MAP.begin(), m_FULLCALO_0p8x0p8_MAP.end(), std::vector<double>(m_FULLCALO_0p8x0p8_NPHI, 0));
633 
637 
638  // now reconstruct (sliding) 0.8x0.8 map from 0.2x0.2 map
639  for (int ieta = 0; ieta < m_FULLCALO_0p8x0p8_NETA; ieta++)
640  {
641  for (int iphi = 0; iphi < m_FULLCALO_0p8x0p8_NPHI; iphi++)
642  {
643  // for eta calculation, use position of corner tower and add 3.5
644  // tower widths
645  double this_eta = geomOH->get_etacenter(2 * ieta) + 3.5 * (geomOH->get_etacenter(1) - geomOH->get_etacenter(0));
646  // for phi calculation, use position of corner tower and add 3.5
647  // tower widths
648  double this_phi = geomOH->get_phicenter(2 * iphi) + 3.5 * (geomOH->get_phicenter(1) - geomOH->get_phicenter(0));
649 
650  double this_sum = 0;
651 
652  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][iphi];
653  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][iphi]; // ieta + 1 is safe, since m_FULLCALO_0p8x0p8_NETA = m_FULLCALO_0p2x0p2_NETA - 3
654  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][iphi]; // ieta + 2 is safe, since m_FULLCALO_0p8x0p8_NETA = m_FULLCALO_0p2x0p2_NETA - 3
655  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][iphi]; // ieta + 3 is safe, since m_FULLCALO_0p8x0p8_NETA = m_FULLCALO_0p2x0p2_NETA - 3
656 
657  // add 1 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
658  // in case we have wrapped back around
659  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
660  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
661  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
662  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
663  // add 2 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
664  // in case we have wrapped back around
665  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
666  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
667  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
668  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
669  // add 3 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
670  // in case we have wrapped back around
671  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
672  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
673  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
674  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
675 
676  m_FULLCALO_0p8x0p8_MAP[ieta][iphi] = this_sum;
677 
678  if (Verbosity() > 1 && this_sum > 4)
679  {
680  std::cout << "CaloTriggerSim::process_event: FullCalo 0.8x0.8 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
681  }
682 
683  if (this_sum > m_FULLCALO_0p8x0p8_BEST_E)
684  {
685  m_FULLCALO_0p8x0p8_BEST_E = this_sum;
686  m_FULLCALO_0p8x0p8_BEST_PHI = this_phi;
687  m_FULLCALO_0p8x0p8_BEST_ETA = this_eta;
688  }
689  }
690  }
691 
692  if (Verbosity() > 0)
693  {
694  std::cout << "CaloTriggerSim::process_event: best FullCalo 0.8x0.8 window is at eta / phi = " << m_FULLCALO_0p8x0p8_BEST_ETA << " / " << m_FULLCALO_0p8x0p8_BEST_PHI << " and E = " << m_FULLCALO_0p8x0p8_BEST_E << std::endl;
695  }
696 
697  // reset fullcalo 1.0x1.0 map & best
698  fill(m_FULLCALO_1p0x1p0_MAP.begin(), m_FULLCALO_1p0x1p0_MAP.end(), std::vector<double>(m_FULLCALO_1p0x1p0_NPHI, 0));
699 
703 
704  // now reconstruct (sliding) 1.0x1.0 map from 0.2x0.2 map
705  for (int ieta = 0; ieta < m_FULLCALO_1p0x1p0_NETA; ieta++)
706  {
707  for (int iphi = 0; iphi < m_FULLCALO_1p0x1p0_NPHI; iphi++)
708  {
709  // for eta calculation, use position of corner tower and add 4.5
710  // tower widths
711  double this_eta = geomOH->get_etacenter(2 * ieta) + 4.5 * (geomOH->get_etacenter(1) - geomOH->get_etacenter(0));
712  // for phi calculation, use position of corner tower and add 4.5
713  // tower widths
714  double this_phi = geomOH->get_phicenter(2 * iphi) + 4.5 * (geomOH->get_phicenter(1) - geomOH->get_phicenter(0));
715 
716  double this_sum = 0;
717 
718  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][iphi];
719  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][iphi]; // ieta + 1 is safe, since m_FULLCALO_1p0x1p0_NETA = m_FULLCALO_0p2x0p2_NETA - 4
720  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][iphi]; // ieta + 2 is safe, since m_FULLCALO_1p0x1p0_NETA = m_FULLCALO_0p2x0p2_NETA - 4
721  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][iphi]; // ieta + 3 is safe, since m_FULLCALO_1p0x1p0_NETA = m_FULLCALO_0p2x0p2_NETA - 4
722  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 4][iphi]; // ieta + 4 is safe, since m_FULLCALO_1p0x1p0_NETA = m_FULLCALO_0p2x0p2_NETA - 4
723 
724  // add 1 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
725  // in case we have wrapped back around
726  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
727  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
728  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
729  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
730  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 4][(iphi + 1) % m_FULLCALO_0p2x0p2_NPHI];
731  // add 2 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
732  // in case we have wrapped back around
733  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
734  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
735  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
736  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
737  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 4][(iphi + 2) % m_FULLCALO_0p2x0p2_NPHI];
738  // add 3 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
739  // in case we have wrapped back around
740  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
741  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
742  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
743  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
744  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 4][(iphi + 3) % m_FULLCALO_0p2x0p2_NPHI];
745  // add 4 to phi, but take modulus w.r.t. m_FULLCALO_0p2x0p2_NPHI
746  // in case we have wrapped back around
747  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta][(iphi + 4) % m_FULLCALO_0p2x0p2_NPHI];
748  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 1][(iphi + 4) % m_FULLCALO_0p2x0p2_NPHI];
749  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 2][(iphi + 4) % m_FULLCALO_0p2x0p2_NPHI];
750  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 3][(iphi + 4) % m_FULLCALO_0p2x0p2_NPHI];
751  this_sum += m_FULLCALO_0p2x0p2_MAP[ieta + 4][(iphi + 4) % m_FULLCALO_0p2x0p2_NPHI];
752 
753  m_FULLCALO_1p0x1p0_MAP[ieta][iphi] = this_sum;
754 
755  if (Verbosity() > 1 && this_sum > 5)
756  {
757  std::cout << "CaloTriggerSim::process_event: FullCalo 1.0x1.0 tower eta ( bin ) / phi ( bin ) / E = " << std::setprecision(6) << this_eta << " ( " << ieta << " ) / " << this_phi << " ( " << iphi << " ) / " << this_sum << std::endl;
758  }
759 
760  if (this_sum > m_FULLCALO_1p0x1p0_BEST_E)
761  {
762  m_FULLCALO_1p0x1p0_BEST_E = this_sum;
763  m_FULLCALO_1p0x1p0_BEST_PHI = this_phi;
764  m_FULLCALO_1p0x1p0_BEST_ETA = this_eta;
765  }
766  }
767  }
768 
769  if (Verbosity() > 0)
770  {
771  std::cout << "CaloTriggerSim::process_event: best FullCalo 1.0x1.0 window is at eta / phi = " << m_FULLCALO_1p0x1p0_BEST_ETA << " / " << m_FULLCALO_1p0x1p0_BEST_PHI << " and E = " << m_FULLCALO_1p0x1p0_BEST_E << std::endl;
772  }
773 
774  FillNode(topNode);
775 
776  if (Verbosity() > 0)
777  {
778  std::cout << "CaloTriggerSim::process_event: exiting" << std::endl;
779  }
780 
782 }
783 
785 {
786  PHNodeIterator iter(topNode);
787 
788  // Looking for the DST node
789  PHCompositeNode *dstNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "DST"));
790  if (!dstNode)
791  {
792  std::cout << PHWHERE << "DST Node missing, doing nothing." << std::endl;
794  }
795 
796  // store the trigger stuff under a sub-node directory
797  PHCompositeNode *trigNode = dynamic_cast<PHCompositeNode *>(iter.findFirst("PHCompositeNode", "TRIG"));
798  if (!trigNode)
799  {
800  trigNode = new PHCompositeNode("TRIG");
801  dstNode->addNode(trigNode);
802  }
803 
804  // create the CaloTriggerInfo
805  CaloTriggerInfo *triggerinfo = findNode::getClass<CaloTriggerInfo>(topNode, !m_EmulateTruncationFlag ? "CaloTriggerInfo" : "CaloTriggerInfo_Truncate");
806  if (!triggerinfo)
807  {
808  triggerinfo = new CaloTriggerInfov1();
809  PHIODataNode<PHObject> *TriggerNode = new PHIODataNode<PHObject>(triggerinfo, !m_EmulateTruncationFlag ? "CaloTriggerInfo" : "CaloTriggerInfo_Truncate", "PHObject");
810  trigNode->addNode(TriggerNode);
811  }
812  else
813  {
814  std::cout << PHWHERE << "::ERROR - CaloTriggerInfo pre-exists, but should not" << std::endl;
815  exit(-1);
816  }
817 
819 }
820 
822 {
823  CaloTriggerInfo *triggerinfo = findNode::getClass<CaloTriggerInfo>(topNode, !m_EmulateTruncationFlag ? "CaloTriggerInfo" : "CaloTriggerInfo_Truncate");
824  if (!triggerinfo)
825  {
826  std::cout << " ERROR -- can't find CaloTriggerInfo node after it should have been created" << std::endl;
827  return;
828  }
829  else
830  {
834 
838 
842 
846 
850 
854 
858 
862  }
863 
864  return;
865 }