56 const int r_bins_N = 53;
57 double r_bins[r_bins_N + 1];
59 double bin_width = 0.625;
60 for (
int i = 1; i < r_bins_N; i++)
62 if (i == 16) bin_width = 0.9375;
63 if (i > 16) bin_width = 1.25;
64 if (i == 31) bin_width = 1.1562;
65 if (i > 31) bin_width = 1.0624;
67 r_bins[i] = r_bins[i - 1] + bin_width;
83 std::cout <<
"PHG4TpcPadBaselineShift::PHG4TpcPadBaselineShift(const std::string &name) Calling ctor" << std::endl;
88 bool reject_it =
false;
92 int PhiBinsSector = PhiBins / 12;
95 double PhiBinSize = 2.0 * radius *
M_PI / (double) PhiBins;
98 int sector_lo = sector * PhiBinsSector;
99 int sector_hi = sector_lo + PhiBinsSector - 1;
103 if (phibin < sector_lo + sector_fiducial_bins || phibin > sector_hi - sector_fiducial_bins)
113 std::cout <<
"PHG4TpcPadBaselineShift::~PHG4TpcPadBaselineShift() Calling dtor" << std::endl;
131 _rawHits =
new TTree(
"hTree",
"tpc hit tree for base-line shift tests");
132 _rawHits->Branch(
"z", &
_hit_z);
133 _rawHits->Branch(
"r", &
_hit_r);
135 _rawHits->Branch(
"e", &
_hit_e);
155 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
159 std::cout <<
"PHG4TpcPadBaselineShift::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
170 std::cout <<
"PHG4TpcPadBaselineShift::Process_Event" << std::endl;
177 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
182 m_hits = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
185 std::cout <<
PHWHERE <<
"ERROR: Can't find node TRKR_HITSET" << std::endl;
190 m_clusterlist = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
193 std::cout <<
PHWHERE <<
" ERROR: Can't find TRKR_CLUSTER." << std::endl;
198 m_clusterhitassoc = findNode::getClass<TrkrClusterHitAssoc>(topNode,
"TRKR_CLUSTERHITASSOC");
201 std::cout <<
PHWHERE <<
" ERROR: Can't find TRKR_CLUSTERHITASSOC" << std::endl;
206 findNode::getClass<PHG4CylinderCellGeomContainer>(topNode,
"CYLINDERCELLGEOM_SVTX");
209 std::cout <<
PHWHERE <<
"ERROR: Can't find node CYLINDERCELLGEOM_SVTX" << std::endl;
213 m_tGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
214 "ActsTrackingGeometry");
218 <<
"ActsTrackingGeometry not found on node tree. Exiting"
223 m_surfMaps = findNode::getClass<ActsSurfaceMaps>(topNode,
228 <<
"ActsSurfaceMaps not found on node tree. Exiting"
242 hitsetitr != hitsetrange.second;
258 unsigned short NPhiBins = (
unsigned short) layergeom->
get_phibins();
259 unsigned short NPhiBinsSector = NPhiBins / 12;
260 unsigned short NZBins = (
unsigned short) layergeom->
get_zbins();
261 unsigned short NZBinsSide = NZBins / 2;
262 unsigned short NZBinsMin = 0;
263 unsigned short PhiOffset = NPhiBinsSector * sector;
272 NZBinsMin = NZBins / 2;
275 unsigned short ZOffset = NZBinsMin;
278 unsigned short phibins = NPhiBinsSector;
279 unsigned short phioffset = PhiOffset;
280 unsigned short zbins = NZBinsSide;
281 unsigned short zoffset = ZOffset;
282 float sumADC = perPadADC;
291 TF1 *
f1 =
new TF1(
"f1",
"[0]*exp(-(x-[1])/[2])", 0, 1000);
292 f1->SetParameter(0, 0.005);
293 f1->SetParameter(1, 0);
294 f1->SetParameter(2, 60);
299 std::vector<unsigned short> adcval(zbins, 0);
307 float_t fadc = (hitr->second->getAdc());
308 unsigned short adc = 0;
311 adc = (
unsigned short) fadc;
313 if (phibin >= phibins)
continue;
314 if (zbin >= zbins)
continue;
315 adcval[zbin] = (
unsigned short) adc;
320 float ind_charge = -0.5 * sumADC *
_CScale;
330 hit = hitsetitr->second->getHit(hitkey);
335 if (phi_center < 0) phi_center += 2 *
pi;
343 float_t fadc = (hitr->second->getAdc());
376 std::cout <<
"TPC Clusterizer found " <<
m_clusterlist->
size() <<
" Clusters " << std::endl;
377 std::cout <<
"PHG4TpcPadBaselineShift::process_event(PHCompositeNode *topNode) Processing Event" << std::endl;
403 std::cout <<
"PHG4TpcPadBaselineShift::End(PHCompositeNode *topNode) This is the End..." << std::endl;
424 std::cout <<
"PHG4TpcPadBaselineShift::setFileName: Scale factor is set to:" << CScale << std::endl;
429 std::cout <<
"PHG4TpcPadBaselineShift::setFileName: Output file name for PHG4TpcPadBaselineShift is set to:" << filename << std::endl;
434 std::cout <<
"PHG4TpcPadBaselineShift::writeTree: True" << std::endl;