5 #pragma GCC diagnostic push
6 #pragma GCC diagnostic ignored "-Wshadow"
9 #pragma GCC diagnostic pop
60 const int r_bins_N = 53;
61 double r_bins[r_bins_N + 1];
63 double bin_width = 0.625;
64 for (
int i = 1;
i < r_bins_N;
i++)
66 if (
i == 16) bin_width = 0.9375;
67 if (
i > 16) bin_width = 1.25;
68 if (
i == 31) bin_width = 1.1562;
69 if (
i > 31) bin_width = 1.0624;
71 r_bins[
i] = r_bins[
i - 1] + bin_width;
87 std::cout <<
"PHG4TpcPadBaselineShift::PHG4TpcPadBaselineShift(const std::string &name) Calling ctor" << std::endl;
92 bool reject_it =
false;
96 int PhiBinsSector = PhiBins / 12;
99 double PhiBinSize = 2.0 * radius * M_PI / (
double) PhiBins;
102 int sector_lo = sector * PhiBinsSector;
103 int sector_hi = sector_lo + PhiBinsSector - 1;
107 if (phibin < sector_lo + sector_fiducial_bins || phibin > sector_hi - sector_fiducial_bins)
117 std::cout <<
"PHG4TpcPadBaselineShift::~PHG4TpcPadBaselineShift() Calling dtor" << std::endl;
135 _rawHits =
new TTree(
"hTree",
"tpc hit tree for base-line shift tests");
136 _rawHits->Branch(
"z", &
_hit_z);
137 _rawHits->Branch(
"r", &
_hit_r);
139 _rawHits->Branch(
"e", &
_hit_e);
159 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
163 std::cout <<
"PHG4TpcPadBaselineShift::InitRun(PHCompositeNode *topNode) Initializing for Run XXX" << std::endl;
174 std::cout <<
"PHG4TpcPadBaselineShift::Process_Event" << std::endl;
181 std::cout <<
PHWHERE <<
"DST Node missing, doing nothing." << std::endl;
186 m_hits = findNode::getClass<TrkrHitSetContainer>(topNode,
"TRKR_HITSET");
189 std::cout <<
PHWHERE <<
"ERROR: Can't find node TRKR_HITSET" << std::endl;
194 m_clusterlist = findNode::getClass<TrkrClusterContainer>(topNode,
"TRKR_CLUSTER");
197 std::cout <<
PHWHERE <<
" ERROR: Can't find TRKR_CLUSTER." << std::endl;
202 m_clusterhitassoc = findNode::getClass<TrkrClusterHitAssoc>(topNode,
"TRKR_CLUSTERHITASSOC");
205 std::cout <<
PHWHERE <<
" ERROR: Can't find TRKR_CLUSTERHITASSOC" << std::endl;
210 findNode::getClass<PHG4TpcCylinderGeomContainer>(topNode,
"CYLINDERCELLGEOM_SVTX");
213 std::cout <<
PHWHERE <<
"ERROR: Can't find node CYLINDERCELLGEOM_SVTX" << std::endl;
217 m_tGeometry = findNode::getClass<ActsTrackingGeometry>(topNode,
218 "ActsTrackingGeometry");
222 <<
"ActsTrackingGeometry not found on node tree. Exiting"
227 m_surfMaps = findNode::getClass<ActsSurfaceMaps>(topNode,
232 <<
"ActsSurfaceMaps not found on node tree. Exiting"
246 hitsetitr != hitsetrange.second;
262 unsigned short NPhiBins = (
unsigned short) layergeom->
get_phibins();
263 unsigned short NPhiBinsSector = NPhiBins / 12;
264 unsigned short NZBins = (
unsigned short) layergeom->
get_zbins();
265 unsigned short NZBinsSide = NZBins / 2;
266 unsigned short NZBinsMin = 0;
267 unsigned short PhiOffset = NPhiBinsSector * sector;
276 NZBinsMin = NZBins / 2;
279 unsigned short ZOffset = NZBinsMin;
282 unsigned short phibins = NPhiBinsSector;
283 unsigned short phioffset = PhiOffset;
284 unsigned short zbins = NZBinsSide;
285 unsigned short zoffset = ZOffset;
286 float sumADC = perPadADC;
295 TF1 *
f1 =
new TF1(
"f1",
"[0]*exp(-(x-[1])/[2])", 0, 1000);
296 f1->SetParameter(0, 0.005);
297 f1->SetParameter(1, 0);
298 f1->SetParameter(2, 60);
303 std::vector<unsigned short> adcval(zbins, 0);
311 float_t fadc = (hitr->second->getAdc());
312 unsigned short adc = 0;
315 adc = (
unsigned short) fadc;
317 if (phibin >= phibins)
continue;
318 if (zbin >= zbins)
continue;
319 adcval[zbin] = (
unsigned short) adc;
324 float ind_charge = -0.5 * sumADC *
_CScale;
334 hit = hitsetitr->second->getHit(hitkey);
339 if (phi_center < 0) phi_center += 2 *
pi;
342 if(side == 0)
_hit_z *= -1.0;
348 float_t fadc = (hitr->second->getAdc());
381 std::cout <<
"TPC Clusterizer found " <<
m_clusterlist->
size() <<
" Clusters " << std::endl;
382 std::cout <<
"PHG4TpcPadBaselineShift::process_event(PHCompositeNode *topNode) Processing Event" << std::endl;
408 std::cout <<
"PHG4TpcPadBaselineShift::End(PHCompositeNode *topNode) This is the End..." << std::endl;
429 std::cout <<
"PHG4TpcPadBaselineShift::setFileName: Scale factor is set to:" << CScale << std::endl;
434 std::cout <<
"PHG4TpcPadBaselineShift::setFileName: Output file name for PHG4TpcPadBaselineShift is set to:" << filename << std::endl;
439 std::cout <<
"PHG4TpcPadBaselineShift::writeTree: True" << std::endl;