17 #include <calobase/RawTowerDefs.h>
18 #include <calobase/RawTowerContainer.h>
19 #include <calobase/RawTower.h>
20 #include <calobase/RawTowerGeomContainer.h>
21 #include <calobase/RawTowerGeom.h>
22 #include <calobase/RawClusterContainer.h>
23 #include <calobase/RawCluster.h>
27 #include <HepMC/GenEvent.h>
28 #include <HepMC/GenParticle.h>
29 #include <HepMC/HeavyIon.h>
40 #define TOWER_E_CUT 0.0
49 Double_t
phi = atan2(y,x);
58 Double_t
phi = atan2(y,x);
66 float eta = -log(tan(theta/2.0));
135 RpFinder =
new EpFinder(4,
"EpFinderCorrectionHistograms_OUTPUT.root",
"EpFinderCorrectionHistograms_INPUT.root", 181, 181);
140 rRpFinder =
new EpFinder(4,
"rEpFinderCorrectionHistograms_OUTPUT.root",
"rEpFinderCorrectionHistograms_INPUT.root", 181, 181);
145 RpFinderL =
new EpFinder(4,
"L_EpFinderCorrectionHistograms_OUTPUT.root",
"L_EpFinderCorrectionHistograms_INPUT.root", 181, 181);
150 RpFinderR =
new EpFinder(4,
"R_EpFinderCorrectionHistograms_OUTPUT.root",
"R_EpFinderCorrectionHistograms_INPUT.root", 181, 181);
155 primRpFinder =
new EpFinder(1,
"primEpFinderCorrectionHistograms_OUTPUT.root",
"primEpFinderCorrectionHistograms_INPUT.root");
158 fprimRpFinder =
new EpFinder(1,
"fprimEpFinderCorrectionHistograms_OUTPUT.root",
"fprimEpFinderCorrectionHistograms_INPUT.root",
162 rfprimRpFinder =
new EpFinder(1,
"rfprimEpFinderCorrectionHistograms_OUTPUT.root",
"rfprimEpFinderCorrectionHistograms_INPUT.root",
233 return (
int)(tphi/sphi);
242 float seta = fabs((eta_high-eta_low)/numEtaDivisions);
244 return (
int)((teta-eta_low)/seta);
258 static bool first =
true;
278 for (
int twr_j = 0; twr_j< 181; twr_j++){
279 for (
int twr_k = 0; twr_k< 181; twr_k++){
295 std::pair<int,int> newPair(
i,
j);
299 std::pair<int,int> newPair(
i,
j);
312 PHHepMCGenEventMap *genevent_map = findNode::getClass<PHHepMCGenEventMap>(topNode,
"PHHepMCGenEventMap");
317 HepMC::GenEvent *
event = genevent->
getEvent();
318 HepMC::HeavyIon *hi =
event->heavy_ion();
320 bimpact = hi->impact_parameter();
328 std::vector<EpHit> phits;
331 std::vector<EpHit> fphits;
334 std::vector<EpHit> rfphits;
340 truth_itr != range.second; ++truth_itr) {
353 if ((abs(g4particle->
get_pid()) >= 12) && (abs( g4particle->
get_pid()) <= 16))
continue;
356 if ((g4particle->
get_px() == 0.0) && (g4particle->
get_px() == 0.0))
continue;
359 if ( (partMom.Eta() >= -1.0) &&
360 (partMom.Eta() <= 1.0)) {
365 newHit.
phi = partMom.Phi();
368 phits.push_back(newHit);
371 if ( (partMom.Eta() >= 1.4) &&
372 (partMom.Eta() < 4.0)) {
377 newHit.
phi = partMom.Phi();
382 fphits.push_back(newHit);
385 if ( (partMom.Eta() >= 1.4) &&
386 (partMom.Eta() < 2.4)) {
391 newHit.
phi = partMom.Phi();
396 rfphits.push_back(newHit);
426 std::vector<EpHit> hits;
429 std::vector<EpHit> rhits;
432 std::vector<EpHit> hitsL;
435 std::vector<EpHit> hitsR;
440 for (; itr != begin_end.second; ++itr) {
459 hits.push_back(newHit);
461 hitsL.push_back(newHit);
463 hitsR.push_back(newHit);
467 rhits.push_back(newHit);
533 cout <<
PHWHERE <<
" PHG4TruthInfoContainer node not found on node tree"
538 string towernodename =
"TOWER_CALIB_FEMC";
540 towers = findNode::getClass<RawTowerContainer>(topNode, towernodename.c_str());
543 std::cout <<
PHWHERE <<
": Could not find node " << towernodename.c_str() << std::endl;
547 string towergeomnodename =
"TOWERGEOM_FEMC";
548 towergeom = findNode::getClass<RawTowerGeomContainer>(topNode, towergeomnodename.c_str());
551 cout <<
PHWHERE <<
": Could not find node " << towergeomnodename.c_str() << endl;