224 Double_t maxX = minX + nofBins;
225 fHM->Create1<TH1F>(
"h_PointsInDigi",
"PointsInDigi;Number of Points;Entries", nofBins, minX, maxX);
226 fHM->Create1<TH1F>(
"h_PointsInDigiLog",
"PointsInDigi;Number of Points;Entries", nofBins, minX, maxX);
227 fHM->Create1<TH1F>(
"h_DigisByPoint",
"DigisByPoint;Number of Digis;Entries", nofBins, minX, maxX);
228 fHM->Create1<TH1F>(
"h_DigisByPointLog",
"DigisByPoint;Number of Digis;Entries", nofBins, minX, maxX);
230 fHM->Create1<TH1F>(
"h_DigiCharge",
"DigiCharge;Digi Charge, ADC;Entries", nofBins, 0., Double_t(nofBins));
232 fHM->Create2<TH2F>(Form(
"h_DigisPerChip_Station%i", stationId),
233 Form(
"Digis per Chip, Station %i;x, cm;y, cm", stationId), 400, -50, 50, 200, -50, 50);
234 fHM->Create2<TH2F>(Form(
"h_PointsMap_Station%i", stationId), Form(
"Points Map, Station %i;x, cm;y, cm", stationId),
235 100, -50, 50, 100, -50, 50);
236 fHM->Create2<TH2F>(Form(
"h_MeanAngleMap_Station%i", stationId),
237 Form(
"Mean Angle Map, Station %i;x, cm;y, cm", stationId), 50, -50, 50, 50, -50, 50);
238 fHM->Create2<TH2F>(Form(
"h_RMSAngleMap_Station%i", stationId),
239 Form(
"RMS Angle Map, Station %i;x, cm;y, cm", stationId), 50, -50, 50, 50, -50, 50);
241 Double_t local[3] = {0., 0., 0.};
243 for (
Int_t moduId = 0; moduId <
fSetup->GetNofModules(); moduId++) {
245 TGeoPhysicalNode* node = modu->CbmStsElement::GetDaughter(0)->CbmStsElement::GetPnode();
247 TGeoMatrix* matrix = node->GetMatrix();
248 matrix->LocalToMaster(local, global);
250 fHM->Create1<TH1F>(Form(
"h_ParticleAngles_%s", modu->GetName()),
251 Form(
"Particle Angles (%.0f cm, %.0f cm);Angle, deg;Entries", global[0], global[1]), 90, 0.,
258 if (
fHM->Exists(
"h_NofObjects_Digis"))
260 std::set<Double_t> pointIndexes;
261 std::map<Double_t, Int_t> stations;
262 std::map<Double_t, Int_t> digisByPoint;
263 std::map<Double_t, Int_t>::iterator map_it;
264 pointIndexes.clear();
265 Double_t local[3] = {0., 0., 0.};
277 TGeoPhysicalNode* node = modu->CbmStsElement::GetDaughter(0)->CbmStsElement::GetPnode();
279 TGeoMatrix* matrix = node->GetMatrix();
280 matrix->LocalToMaster(local, global);
284 Int_t iChip = iChan / 128;
292 fHM->H2(Form(
"h_DigisPerChip_Station%i", stationId))
293 ->Fill(global[0] + 50. / 400. * ((iChip - 8.) * 2. - 1.), global[1]);
295 for (
Int_t iLink = 0; iLink < digiMatch->GetNofLinks(); iLink++) {
296 const CbmLink link = digiMatch->GetLink(iLink);
298 pointIndexes.insert(index2);
299 stations.insert(std::pair<Double_t, Int_t>(index2, stationId));
302 Int_t side = channel <
Int_t(nOfChannelsM / 2.) ? 0 : 1;
303 map_it = digisByPoint.find(index2 + (side * 0.00001));
304 if (map_it != digisByPoint.end()) { map_it->second++; }
306 digisByPoint.insert(std::pair<Double_t, Int_t>(index2 + (side * 0.00001), 1));
309 fHM->H1(
"h_NofObjects_Digis_Station")->Fill(stationId);
310 fHM->H1(
"h_PointsInDigi")->Fill(digiMatch->GetNofLinks());
311 fHM->H1(
"h_PointsInDigiLog")->Fill(digiMatch->GetNofLinks());
312 fHM->H1(
"h_DigiCharge")->Fill(stsDigi->GetCharge());
314 fHM->H1(
"h_NofObjects_Points")->Fill(pointIndexes.size());
315 std::set<Double_t>::iterator set_it;
316 for (set_it = pointIndexes.begin(); set_it != pointIndexes.end(); ++set_it) {
317 fHM->H1(
"h_NofObjects_Points_Station")->Fill(stations[*set_it]);
318 fHM->H1(
"h_DigisByPoint")->Fill(digisByPoint[*set_it]);
319 fHM->H1(
"h_DigisByPoint")->Fill(digisByPoint[*set_it + 0.00001]);
320 fHM->H1(
"h_DigisByPointLog")->Fill(digisByPoint[*set_it]);
321 fHM->H1(
"h_DigisByPointLog")->Fill(digisByPoint[*set_it + 0.00001]);
323 if (pointIndexes.size() >
static_cast<size_t>(
fMaxScale))
fMaxScale = pointIndexes.size();
325 Double_t pointX, pointY;
326 Double_t pointPX, pointPZ;
327 for (
Int_t iPoint = 0; iPoint <
points->GetEntriesFast(); iPoint++) {
328 const FairMCPoint* stsPoint =
static_cast<const FairMCPoint*
>(
points->At(iPoint));
330 TGeoPhysicalNode* node = modu->CbmStsElement::GetDaughter(0)->CbmStsElement::GetPnode();
332 TGeoMatrix* matrix = node->GetMatrix();
333 matrix->LocalToMaster(local, global);
335 pointX = stsPoint->GetX();
336 pointY = stsPoint->GetY();
338 pointPX = stsPoint->GetPx();
339 pointPZ = stsPoint->GetPz();
340 Int_t stationId =
fSetup->GetStationNumber(stsPoint->GetDetectorID());
341 fHM->H2(Form(
"h_PointsMap_Station%i", stationId))->Fill(pointX, pointY);
342 fHM->H1(Form(
"h_ParticleAngles_%s", modu->GetName()))
343 ->Fill(TMath::Abs(TMath::ATan(pointPX / pointPZ)) * 180. / 3.1416);
350 Double_t local[3] = {0., 0., 0.};
360 Double_t mean =
fHM->H1(Form(
"h_ParticleAngles_%s", modu->GetName()))->GetMean();
361 Double_t rms =
fHM->H1(Form(
"h_ParticleAngles_%s", modu->GetName()))->GetRMS();
362 TGeoPhysicalNode* node = modu->CbmStsElement::GetDaughter(0)->CbmStsElement::GetPnode();
364 TGeoMatrix* matrix = node->GetMatrix();
365 matrix->LocalToMaster(local, global);
367 fHM->H2(Form(
"h_MeanAngleMap_Station%i", iStation))->Fill(global[0], global[1], mean);
368 fHM->H2(Form(
"h_RMSAngleMap_Station%i", iStation))->Fill(global[0], global[1], rms);