Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions Detectors/ITSMFT/ITS/macros/test/CheckDigits.C
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#include "ITSMFTBase/SegmentationAlpide.h"
#include "ITSMFTSimulation/Hit.h"
#include "MathUtils/Utils.h"
#include "SimulationDataFormat/MCTruthContainer.h"
#include "SimulationDataFormat/ConstMCTruthContainer.h"
#include "SimulationDataFormat/IOMCTruthContainerView.h"
#include "SimulationDataFormat/MCCompLabel.h"
#include "DetectorsBase/GeometryManager.h"

Expand Down Expand Up @@ -60,8 +61,8 @@ void CheckDigits(std::string digifile = "itsdigits.root", std::string hitfile =
std::vector<o2::itsmft::Digit>* digArr = nullptr;
digTree->SetBranchAddress("ITSDigit", &digArr);

o2::dataformats::MCTruthContainer<o2::MCCompLabel>* labels = nullptr;
digTree->SetBranchAddress("ITSDigitMCTruth", &labels);
o2::dataformats::IOMCTruthContainerView* plabels = nullptr;
digTree->SetBranchAddress("ITSDigitMCTruth", &plabels);

int nevD = digTree->GetEntries(); // digits in cont. readout may be grouped as few events per entry

Expand All @@ -83,6 +84,9 @@ void CheckDigits(std::string digifile = "itsdigits.root", std::string hitfile =
int nROFRec = (int)ROFRecordArrrayRef.size();
std::vector<int> mcEvMin(nROFRec, hitTree->GetEntries());
std::vector<int> mcEvMax(nROFRec, -1);
o2::dataformats::ConstMCTruthContainer<o2::MCCompLabel> labels;
plabels->copyandflatten(labels);
delete plabels;

// >> build min and max MC events used by each ROF
for (int imc = MC2ROFRecordArrrayRef.size(); imc--;) {
Expand Down Expand Up @@ -149,7 +153,7 @@ void CheckDigits(std::string digifile = "itsdigits.root", std::string hitfile =
const o2::math_utils::Point3D<float> locD(x, 0., z);

Int_t chipID = (*digArr)[iDigit].getChipIndex();
auto lab = (labels->getLabels(iDigit))[0];
auto lab = (labels.getLabels(iDigit))[0];

int trID = lab.getTrackID();

Expand Down