Commit a7fb323d authored by Jin Zhang's avatar Jin Zhang
Browse files

public function name

parent 222a7f2e
......@@ -96,11 +96,11 @@ double Detector::getTimeResolution() const {
}
}
std::string Detector::name() const {
std::string Detector::getName() const {
return m_detectorName;
}
std::string Detector::type() const {
std::string Detector::getType() const {
return m_detectorType;
}
......@@ -126,9 +126,9 @@ void Detector::update() {
this->initialise();
}
Configuration Detector::GetConfiguration() const {
Configuration Detector::getConfiguration() const {
Configuration config(name());
Configuration config(getName());
config.set("type", m_detectorType);
// Store the role of the detector
......
......@@ -91,13 +91,13 @@ namespace corryvreckan {
* @brief Get type of the detector
* @return Type of the detector model
*/
std::string type() const;
std::string getType() const;
/**
* @brief Get name of the detector
* @return Detector name
*/
std::string name() const;
std::string getName() const;
/**
* @brief Check whether detector is registered as reference
......@@ -121,21 +121,21 @@ namespace corryvreckan {
* @brief Retrieve configuration object from detector, containing all (potentially updated) parameters
* @return Configuration object for this detector
*/
Configuration GetConfiguration() const;
Configuration getConfiguration() const;
/**
* @brief Get the total size of the active matrix, i.e. pitch * number of pixels in both dimensions
* @return 2D vector with the dimensions of the pixle matrix in X and Y
* @to do: this is designed for PixelDetector, find a proper interface for other Detector type
*/
virtual XYVector size() const = 0;
virtual XYVector getSize() const = 0;
/**
* @brief Get pitch of a single pixel
* @return Pitch of a pixel
* @to do: this is designed for PixelDetector, find a proper interface for other Detector type
*/
virtual XYVector pitch() const = 0;
virtual XYVector getPitch() const = 0;
/**
* @brief Get intrinsic spatial resolution of the detector
......
......@@ -198,7 +198,7 @@ PositionVector3D<Cartesian3D<double>> PixelDetector::getIntercept(const Track* t
// FIXME: this is else statement can only be temporary
if(track->getType() == "gbl") {
return track->state(name());
return track->state(getName());
} else {
// Get the distance from the plane to the track initial state
double distance = (m_origin.X() - track->state(m_detectorName).X()) * m_normal.X();
......@@ -336,7 +336,7 @@ bool PixelDetector::isWithinROI(Cluster* cluster) const {
return true;
}
XYVector PixelDetector::size() const {
XYVector PixelDetector::getSize() const {
return XYVector(m_pitch.X() * m_nPixels.X(), m_pitch.Y() * m_nPixels.Y());
}
......
......@@ -147,13 +147,13 @@ namespace corryvreckan {
* @brief Get the total size of the active matrix, i.e. pitch * number of pixels in both dimensions
* @return 2D vector with the dimensions of the pixle matrix in X and Y
*/
XYVector size() const override;
XYVector getSize() const override;
/**
* @brief Get pitch of a single pixel
* @return Pitch of a pixel
*/
XYVector pitch() const override { return m_pitch; }
XYVector getPitch() const override { return m_pitch; }
/**
* @brief Get intrinsic spatial resolution of the detector
......
......@@ -14,7 +14,7 @@
using namespace corryvreckan;
InvalidSettingError::InvalidSettingError(const Detector* detector, const std::string& key, const std::string& reason) {
error_message_ = "Setting '" + key + "' of detector '" + detector->name() + "' is not valid";
error_message_ = "Setting '" + key + "' of detector '" + detector->getName() + "' is not valid";
if(!reason.empty()) {
error_message_ += ": " + reason;
}
......
......@@ -117,7 +117,7 @@ void Module::set_ROOT_directory(TDirectory* directory) {
std::shared_ptr<Detector> Module::get_detector(std::string name) {
auto it = find_if(
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->name() == name; });
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->getName() == name; });
if(it == m_detectors.end()) {
throw ModuleError("Device with detector ID " + name + " is not registered.");
}
......@@ -131,7 +131,7 @@ std::shared_ptr<Detector> Module::get_reference() {
bool Module::has_detector(std::string name) {
auto it = find_if(
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->name() == name; });
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->getName() == name; });
if(it == m_detectors.end()) {
return false;
}
......
......@@ -54,7 +54,7 @@ void ModuleManager::load_detectors() {
// Check if we have a duplicate:
if(std::find_if(m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) {
return obj->name() == name;
return obj->getName() == name;
}) != m_detectors.end()) {
throw InvalidValueError(
global_config, "detectors_file", "Detector " + detector_section.getName() + " defined twice");
......@@ -307,7 +307,7 @@ std::vector<std::string> ModuleManager::get_type_vector(char* type_tokens) {
std::shared_ptr<Detector> ModuleManager::get_detector(std::string name) {
auto it = find_if(
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->name() == name; });
m_detectors.begin(), m_detectors.end(), [&name](std::shared_ptr<Detector> obj) { return obj->getName() == name; });
return (it != m_detectors.end() ? (*it) : nullptr);
}
......@@ -401,8 +401,8 @@ ModuleManager::create_detector_modules(void* library, Configuration config, bool
continue;
}
LOG(TRACE) << "Preparing \"name\" instance for " << det->name();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->name(), 0));
LOG(TRACE) << "Preparing \"name\" instance for " << det->getName();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->getName(), 0));
// Save the name (to not instantiate it again later)
module_names.insert(name);
}
......@@ -425,11 +425,11 @@ ModuleManager::create_detector_modules(void* library, Configuration config, bool
}
for(auto& det : m_detectors) {
auto detectortype = det->type();
auto detectortype = det->getType();
std::transform(detectortype.begin(), detectortype.end(), detectortype.begin(), ::tolower);
// Skip all that were already added by name
if(module_names.find(det->name()) != module_names.end()) {
if(module_names.find(det->getName()) != module_names.end()) {
continue;
}
for(auto& type : ctypes) {
......@@ -438,8 +438,8 @@ ModuleManager::create_detector_modules(void* library, Configuration config, bool
continue;
}
LOG(TRACE) << "Preparing \"type\" instance for " << det->name();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->name(), 1));
LOG(TRACE) << "Preparing \"type\" instance for " << det->getName();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->getName(), 1));
}
}
instances_created = !ctypes.empty();
......@@ -448,8 +448,8 @@ ModuleManager::create_detector_modules(void* library, Configuration config, bool
// Create for all detectors if no name / type provided
if(!instances_created) {
for(auto& det : m_detectors) {
LOG(TRACE) << "Preparing \"other\" instance for " << det->name();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->name(), 2));
LOG(TRACE) << "Preparing \"other\" instance for " << det->getName();
instantiations.emplace_back(det, ModuleIdentifier(module_base_name, det->getName(), 2));
}
}
......@@ -465,7 +465,7 @@ ModuleManager::create_detector_modules(void* library, Configuration config, bool
}
// Do not instantiate module if detector type is not mentioned as supported:
auto detectortype = detector->type();
auto detectortype = detector->getType();
std::transform(detectortype.begin(), detectortype.end(), detectortype.begin(), ::tolower);
if(!types.empty() && std::find(types.begin(), types.end(), detectortype) == types.end()) {
LOG(TRACE) << "Skipping instantiation \"" << identifier.getUniqueName() << "\", detector type mismatch";
......@@ -732,7 +732,7 @@ void ModuleManager::finaliseAll() {
ConfigReader final_detectors;
for(auto& detector : m_detectors) {
final_detectors.addConfiguration(detector->GetConfiguration());
final_detectors.addConfiguration(detector->getConfiguration());
}
final_detectors.write(file);
......
......@@ -36,12 +36,12 @@ AlignmentDUTResidual::AlignmentDUTResidual(Configuration config, std::shared_ptr
m_maxAssocClusters = m_config.get<size_t>("max_associated_clusters", 1);
m_maxTrackChi2 = m_config.get<double>("max_track_chi2ndof", 10.);
LOG(INFO) << "Aligning detector \"" << m_detector->name() << "\"";
LOG(INFO) << "Aligning detector \"" << m_detector->getName() << "\"";
}
void AlignmentDUTResidual::initialise() {
auto detname = m_detector->name();
auto detname = m_detector->getName();
std::string title = detname + " Residuals X;x_{track}-x [#mum];events";
residualsXPlot = new TH1F("residualsX", title.c_str(), 1000, -500, 500);
title = detname + " Residuals Y;y_{track}-y [#mum];events";
......@@ -89,7 +89,7 @@ StatusCode AlignmentDUTResidual::run(std::shared_ptr<Clipboard> clipboard) {
// Find the cluster that needs to have its position recalculated
for(auto& associatedCluster : track->associatedClusters()) {
if(associatedCluster->detectorID() != m_detector->name()) {
if(associatedCluster->detectorID() != m_detector->getName()) {
continue;
}
// Local position of the cluster
......@@ -137,7 +137,7 @@ void AlignmentDUTResidual::MinimiseResiduals(Int_t&, Double_t*, Double_t& result
// Apply new alignment conditions
globalDetector->update();
LOG(DEBUG) << "Updated parameters for " << globalDetector->name();
LOG(DEBUG) << "Updated parameters for " << globalDetector->getName();
// The chi2 value to be returned
result = 0.;
......@@ -152,7 +152,7 @@ void AlignmentDUTResidual::MinimiseResiduals(Int_t&, Double_t*, Double_t& result
// Find the cluster that needs to have its position recalculated
for(auto& associatedCluster : track->associatedClusters()) {
if(associatedCluster->detectorID() != globalDetector->name()) {
if(associatedCluster->detectorID() != globalDetector->getName()) {
continue;
}
......@@ -210,7 +210,7 @@ void AlignmentDUTResidual::finalise() {
arglist[1] = 0.001; // tolerance
globalDetector = m_detector;
auto name = m_detector->name();
auto name = m_detector->getName();
size_t n_associatedClusters = 0;
// count associated clusters:
......@@ -273,12 +273,12 @@ void AlignmentDUTResidual::finalise() {
m_detector->rotation(
XYZVector(residualFitter->GetParameter(3), residualFitter->GetParameter(4), residualFitter->GetParameter(5)));
LOG(INFO) << m_detector->name() << "/" << iteration << " dT"
LOG(INFO) << m_detector->getName() << "/" << iteration << " dT"
<< Units::display(m_detector->displacement() - old_position, {"mm", "um"}) << " dR"
<< Units::display(m_detector->rotation() - old_orientation, {"deg"});
}
LOG(STATUS) << m_detector->name() << " new alignment: " << std::endl
LOG(STATUS) << m_detector->getName() << " new alignment: " << std::endl
<< "T" << Units::display(m_detector->displacement(), {"mm", "um"}) << " R"
<< Units::display(m_detector->rotation(), {"deg"});
}
......@@ -55,7 +55,7 @@ void AlignmentMillepede::initialise() {
if(det->isDUT() && m_excludeDUT) {
continue;
}
m_millePlanes[det->name()] = index;
m_millePlanes[det->getName()] = index;
++index;
}
......@@ -105,7 +105,7 @@ void AlignmentMillepede::finalise() {
nPlanes--;
}
if(det->isAuxiliary()) {
LOG(INFO) << "Excluding auxiliary detector " << det->name();
LOG(INFO) << "Excluding auxiliary detector " << det->getName();
nPlanes--;
}
}
......@@ -210,7 +210,7 @@ void AlignmentMillepede::setConstraints(const size_t nPlanes) {
if(det->isDUT() && m_excludeDUT) {
continue;
}
const unsigned int i = m_millePlanes[det->name()];
const unsigned int i = m_millePlanes[det->getName()];
const double sz = (det->displacement().Z() - avgz) / varz;
ftx[i] = 1.0;
fty[i + nPlanes] = 1.0;
......@@ -307,7 +307,7 @@ bool AlignmentMillepede::putTrack(Track* track, const size_t nPlanes) {
const double errx = cluster->errorX();
const double erry = cluster->errorY();
// Get the internal plane index in Millepede.
const unsigned int plane = m_millePlanes[detector->name()];
const unsigned int plane = m_millePlanes[detector->getName()];
// Set the local derivatives for the X equation.
std::vector<double> derlc = {1., zg, 0., 0.};
// Set the global derivatives (see LHCb-2005-101) for the X equation.
......@@ -593,7 +593,7 @@ void AlignmentMillepede::updateGeometry() {
if(det->isDUT() && m_excludeDUT) {
continue;
}
auto plane = m_millePlanes[det->name()];
auto plane = m_millePlanes[det->getName()];
det->displacement(XYZPoint(det->displacement().X() + m_dparm[plane + 0 * nPlanes],
det->displacement().Y() + m_dparm[plane + 1 * nPlanes],
......
......@@ -106,7 +106,7 @@ void AlignmentTrackChi2::MinimiseTrackChi2(Int_t&, Double_t*, Double_t& result,
// Find the cluster that needs to have its position recalculated
for(size_t iTrackCluster = 0; iTrackCluster < trackClusters.size(); iTrackCluster++) {
Cluster* trackCluster = trackClusters[iTrackCluster];
if(globalDetector->name() != trackCluster->detectorID()) {
if(globalDetector->getName() != trackCluster->detectorID()) {
continue;
}
......@@ -165,7 +165,7 @@ void AlignmentTrackChi2::finalise() {
int det = 0;
for(auto& detector : get_detectors()) {
string detectorID = detector->name();
string detectorID = detector->getName();
// Do not align the reference plane
if(detector->isReference() || detector->isDUT() || detector->isAuxiliary()) {
......@@ -233,7 +233,7 @@ void AlignmentTrackChi2::finalise() {
rotZ[detectorID].push_back(
static_cast<double>(Units::convert(detector->rotation().Z() - old_orientation.Z(), "deg")));
LOG(INFO) << detector->name() << "/" << iteration << " dT"
LOG(INFO) << detector->getName() << "/" << iteration << " dT"
<< Units::display(detector->displacement() - old_position, {"mm", "um"}) << " dR"
<< Units::display(detector->rotation() - old_orientation, {"deg"});
......@@ -264,7 +264,7 @@ void AlignmentTrackChi2::finalise() {
continue;
}
LOG(STATUS) << detector->name() << " new alignment: " << std::endl
LOG(STATUS) << detector->getName() << " new alignment: " << std::endl
<< "T" << Units::display(detector->displacement(), {"mm", "um"}) << " R"
<< Units::display(detector->rotation(), {"deg"});
......@@ -272,39 +272,39 @@ void AlignmentTrackChi2::finalise() {
std::vector<double> iterations(nIterations);
std::iota(std::begin(iterations), std::end(iterations), 0);
std::string name = "alignment_correction_displacementX_" + detector->name();
align_correction_shiftX[detector->name()] =
new TGraph(static_cast<int>(shiftsX[detector->name()].size()), &iterations[0], &shiftsX[detector->name()][0]);
align_correction_shiftX[detector->name()]->GetXaxis()->SetTitle("# iteration");
align_correction_shiftX[detector->name()]->GetYaxis()->SetTitle("correction [#mum]");
align_correction_shiftX[detector->name()]->Write(name.c_str());
name = "alignment_correction_displacementY_" + detector->name();
align_correction_shiftY[detector->name()] =
new TGraph(static_cast<int>(shiftsY[detector->name()].size()), &iterations[0], &shiftsY[detector->name()][0]);
align_correction_shiftY[detector->name()]->GetXaxis()->SetTitle("# iteration");
align_correction_shiftY[detector->name()]->GetYaxis()->SetTitle("correction [#mum]");
align_correction_shiftY[detector->name()]->Write(name.c_str());
name = "alignment_correction_rotationX_" + detector->name();
align_correction_rotX[detector->name()] =
new TGraph(static_cast<int>(rotX[detector->name()].size()), &iterations[0], &rotX[detector->name()][0]);
align_correction_rotX[detector->name()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotX[detector->name()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotX[detector->name()]->Write(name.c_str());
name = "alignment_correction_rotationY_" + detector->name();
align_correction_rotY[detector->name()] =
new TGraph(static_cast<int>(rotY[detector->name()].size()), &iterations[0], &rotY[detector->name()][0]);
align_correction_rotY[detector->name()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotY[detector->name()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotY[detector->name()]->Write(name.c_str());
name = "alignment_correction_rotationZ_" + detector->name();
align_correction_rotZ[detector->name()] =
new TGraph(static_cast<int>(rotZ[detector->name()].size()), &iterations[0], &rotZ[detector->name()][0]);
align_correction_rotZ[detector->name()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotZ[detector->name()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotZ[detector->name()]->Write(name.c_str());
std::string name = "alignment_correction_displacementX_" + detector->getName();
align_correction_shiftX[detector->getName()] = new TGraph(
static_cast<int>(shiftsX[detector->getName()].size()), &iterations[0], &shiftsX[detector->getName()][0]);
align_correction_shiftX[detector->getName()]->GetXaxis()->SetTitle("# iteration");
align_correction_shiftX[detector->getName()]->GetYaxis()->SetTitle("correction [#mum]");
align_correction_shiftX[detector->getName()]->Write(name.c_str());
name = "alignment_correction_displacementY_" + detector->getName();
align_correction_shiftY[detector->getName()] = new TGraph(
static_cast<int>(shiftsY[detector->getName()].size()), &iterations[0], &shiftsY[detector->getName()][0]);
align_correction_shiftY[detector->getName()]->GetXaxis()->SetTitle("# iteration");
align_correction_shiftY[detector->getName()]->GetYaxis()->SetTitle("correction [#mum]");
align_correction_shiftY[detector->getName()]->Write(name.c_str());
name = "alignment_correction_rotationX_" + detector->getName();
align_correction_rotX[detector->getName()] =
new TGraph(static_cast<int>(rotX[detector->getName()].size()), &iterations[0], &rotX[detector->getName()][0]);
align_correction_rotX[detector->getName()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotX[detector->getName()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotX[detector->getName()]->Write(name.c_str());
name = "alignment_correction_rotationY_" + detector->getName();
align_correction_rotY[detector->getName()] =
new TGraph(static_cast<int>(rotY[detector->getName()].size()), &iterations[0], &rotY[detector->getName()][0]);
align_correction_rotY[detector->getName()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotY[detector->getName()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotY[detector->getName()]->Write(name.c_str());
name = "alignment_correction_rotationZ_" + detector->getName();
align_correction_rotZ[detector->getName()] =
new TGraph(static_cast<int>(rotZ[detector->getName()].size()), &iterations[0], &rotZ[detector->getName()][0]);
align_correction_rotZ[detector->getName()]->GetXaxis()->SetTitle("# iteration");
align_correction_rotZ[detector->getName()]->GetYaxis()->SetTitle("correction [deg]");
align_correction_rotZ[detector->getName()]->Write(name.c_str());
}
}
......@@ -115,12 +115,12 @@ void AnalysisDUT::initialise() {
new TH1F("clusterWidthColAssociated", "clusterWidthColAssociated;cluster size col; # entries", 30, 0, 30);
// In-pixel studies:
auto pitch_x = static_cast<double>(Units::convert(m_detector->pitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->pitch().Y(), "um"));
auto pitch_x = static_cast<double>(Units::convert(m_detector->getPitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->getPitch().Y(), "um"));
std::string mod_axes = "in-pixel x_{track} [#mum];in-pixel y_{track} [#mum];";
// cut flow histogram
std::string title = m_detector->name() + ": number of tracks discarded by different cuts;cut type;tracks";
std::string title = m_detector->getName() + ": number of tracks discarded by different cuts;cut type;tracks";
hCutHisto = new TH1F("hCutHisto", title.c_str(), 4, 1, 5);
hCutHisto->GetXaxis()->SetBinLabel(1, "High Chi2");
hCutHisto->GetXaxis()->SetBinLabel(2, "Outside DUT area");
......
......@@ -30,16 +30,16 @@ void AnalysisEfficiency::initialise() {
hPixelEfficiency = new TH1D(
"hPixelEfficiency", "hPixelEfficiency; single pixel efficiency; # entries", 201, 0, 1.005); // get 0.5%-wide bins
auto pitch_x = static_cast<double>(Units::convert(m_detector->pitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->pitch().Y(), "um"));
auto pitch_x = static_cast<double>(Units::convert(m_detector->getPitch().X(), "um"));
auto pitch_y = static_cast<double>(Units::convert(m_detector->getPitch().Y(), "um"));
auto nbins_x = static_cast<int>(std::ceil(m_detector->pitch().X() / m_inpixelBinSize));
auto nbins_y = static_cast<int>(std::ceil(m_detector->pitch().Y() / m_inpixelBinSize));
auto nbins_x = static_cast<int>(std::ceil(m_detector->getPitch().X() / m_inpixelBinSize));
auto nbins_y = static_cast<int>(std::ceil(m_detector->getPitch().Y() / m_inpixelBinSize));
if(nbins_x > 1e4 || nbins_y > 1e4) {
throw InvalidValueError(m_config, "inpixel_bin_size", "Too many bins for in-pixel histograms.");
}
std::string title =
m_detector->name() + " Pixel efficiency map;in-pixel x_{track} [#mum];in-pixel y_{track} #mum;efficiency";
m_detector->getName() + " Pixel efficiency map;in-pixel x_{track} [#mum];in-pixel y_{track} #mum;efficiency";
hPixelEfficiencyMap_trackPos = new TProfile2D("pixelEfficiencyMap_trackPos",
title.c_str(),
nbins_x,
......@@ -50,7 +50,7 @@ void AnalysisEfficiency::initialise() {
pitch_y / 2.,
0,
1);
title = m_detector->name() + " Chip efficiency map;x [px];y [px];efficiency";
title = m_detector->getName() + " Chip efficiency map;x [px];y [px];efficiency";
hChipEfficiencyMap_trackPos = new TProfile2D("chipEfficiencyMap_trackPos",
title.c_str(),
m_detector->nPixels().X(),
......@@ -61,18 +61,18 @@ void AnalysisEfficiency::initialise() {
m_detector->nPixels().Y() - 0.5,
0,
1);
title = m_detector->name() + " Global efficiency map;x [mm];y [mm];efficiency";
title = m_detector->getName() + " Global efficiency map;x [mm];y [mm];efficiency";
hGlobalEfficiencyMap_trackPos = new TProfile2D("globalEfficiencyMap_trackPos",
title.c_str(),
300,
-1.5 * m_detector->size().X(),
1.5 * m_detector->size().X(),
-1.5 * m_detector->getSize().X(),
1.5 * m_detector->getSize().X(),
300,
-1.5 * m_detector->size().Y(),
1.5 * m_detector->size().Y(),
-1.5 * m_detector->getSize().Y(),
1.5 * m_detector->getSize().Y(),
0,
1);
title = m_detector->name() + " Chip efficiency map;x [px];y [px];efficiency";
title = m_detector->getName() + " Chip efficiency map;x [px];y [px];efficiency";
hChipEfficiencyMap_clustPos = new TProfile2D("chipEfficiencyMap_clustPos",
title.c_str(),
m_detector->nPixels().X(),
......@@ -83,25 +83,25 @@ void AnalysisEfficiency::initialise() {
m_detector->nPixels().Y() - 0.5,
0,
1);
title = m_detector->name() + " Global efficiency map;x [mm];y [mm];efficiency";
title = m_detector->getName() + " Global efficiency map;x [mm];y [mm];efficiency";
hGlobalEfficiencyMap_clustPos = new TProfile2D("globalEfficiencyMap_clustPos",
title.c_str(),
300,
-1.5 * m_detector->size().X(),
1.5 * m_detector->size().X(),
-1.5 * m_detector->getSize().X(),
1.5 * m_detector->getSize().X(),
300,
-1.5 * m_detector->size().Y(),
1.5 * m_detector->size().Y(),
-1.5 * m_detector->getSize().Y(),
1.5 * m_detector->getSize().Y(),
0,
1);
hDistanceCluster_track = new TH2D("distanceTrack_Hit",
"distance between track and hit; track_x - dut_x [mm]; track_y - dut_y [mm] ",
150,
-1.5 * m_detector->pitch().x(),
1.5 * m_detector->pitch().x(),
-1.5 * m_detector->getPitch().x(),
1.5 * m_detector->getPitch().x(),
150,
-1.5 * m_detector->pitch().y(),
1.5 * m_detector->pitch().y());
-1.5 * m_detector->getPitch().y(),
1.5 * m_detector->getPitch().y());
eTotalEfficiency =
new TEfficiency("eTotalEfficiency", "totalEfficiency; axis has no meaning; total chip efficiency", 1, 0, 1);
totalEfficiency = new TNamed("totalEffiency", "totalEffiency");
......@@ -111,11 +111,11 @@ void AnalysisEfficiency::initialise() {
hTrackTimeToPrevHit_notmatched = new TH1D(
"trackTimeToPrevHit_notmatched", "trackTimeToPrevHit_notmatched;time to prev hit [us];# events", 1e6, 0, 1e6);
title = m_detector->name() + "time difference to previous track (if this has assoc cluster)";
title = m_detector->getName() + "time difference to previous track (if this has assoc cluster)";
hTimeDiffPrevTrack_assocCluster = new TH1D("timeDiffPrevTrack_assocCluster", title.c_str(), 11000, -1000, 10000);
hTimeDiffPrevTrack_assocCluster->GetXaxis()->SetTitle("time diff [#mus]");
hTimeDiffPrevTrack_assocCluster->GetYaxis()->SetTitle("events");
title = m_detector->name() + "time difference to previous track (if this has no assoc cluster)";
title = m_detector->getName() + "time difference to previous track (if this has no assoc cluster)";
hTimeDiffPrevTrack_noAssocCluster = new TH1D("timeDiffPrevTrack_noAssocCluster", title.c_str(), 11000, -1000, 10000);
hTimeDiffPrevTrack_noAssocCluster->GetXaxis()->SetTitle("time diff [#mus]");
hTimeDiffPrevTrack_noAssocCluster->GetYaxis()->SetTitle("events");
......@@ -256,7 +256,7 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
auto ymod = static_cast<double>(Units::convert(inpixel.Y(), "um"));
// Get the DUT clusters from the clipboard
auto clusters = clipboard->getData<Cluster>(m_detector->name());
auto clusters = clipboard->getData<Cluster>(m_detector->getName());
if(clusters == nullptr) {
LOG(DEBUG) << " - no DUT clusters";
} else {
......@@ -329,9 +329,9 @@ StatusCode AnalysisEfficiency::run(std::shared_ptr<Clipboard> clipboard) {
// Before going to the next event, loop over all pixels (all hits incl. noise)
// and fill matrix with timestamps of previous pixels.
auto pixels = clipboard->getData<Pixel>(m_detector->name());
auto pixels = clipboard->getData<Pixel>(m_detector->getName());
if(pixels == nullptr) {
LOG(DEBUG) << "Detector " << m_detector->name() << " does not have any pixels on the clipboard";
LOG(DEBUG) << "Detector " << m_detector->getName() << " does not have any pixels on the clipboard";
return StatusCode::Success;