Commit 5ba32b6c authored by CLICdp user's avatar CLICdp user
Browse files

DUTAnalysis: remove association calculation but use association from track, change histogram range

parent 0b430ca4
...@@ -28,7 +28,7 @@ void DUTAnalysis::initialise() { ...@@ -28,7 +28,7 @@ void DUTAnalysis::initialise() {
residualsX2pix = new TH1F("residualsX2pix", "residualsX2pix", 400, -0.2, 0.2); residualsX2pix = new TH1F("residualsX2pix", "residualsX2pix", 400, -0.2, 0.2);
residualsY = new TH1F("residualsY", "residualsY", 400, -0.2, 0.2); residualsY = new TH1F("residualsY", "residualsY", 400, -0.2, 0.2);
clusterTotAssociated = new TH1F("clusterTotAssociated", "clusterTotAssociated", 2000, 0, 100000); clusterTotAssociated = new TH1F("clusterTotAssociated", "clusterTotAssociated", 10000, 0, 10000);
clusterSizeAssociated = new TH1F("clusterSizeAssociated", "clusterSizeAssociated", 30, 0, 30); clusterSizeAssociated = new TH1F("clusterSizeAssociated", "clusterSizeAssociated", 30, 0, 30);
clusterSizeAssociated_X = new TH1F("clusterSizeAssociated_X", "clusterSizeAssociated_X", 30, 0, 30); clusterSizeAssociated_X = new TH1F("clusterSizeAssociated_X", "clusterSizeAssociated_X", 30, 0, 30);
clusterSizeAssociated_Y = new TH1F("clusterSizeAssociated_Y", "clusterSizeAssociated_Y", 30, 0, 30); clusterSizeAssociated_Y = new TH1F("clusterSizeAssociated_Y", "clusterSizeAssociated_Y", 30, 0, 30);
...@@ -224,19 +224,17 @@ StatusCode DUTAnalysis::run(Clipboard* clipboard) { ...@@ -224,19 +224,17 @@ StatusCode DUTAnalysis::run(Clipboard* clipboard) {
if(first_track == 0) if(first_track == 0)
clusterToTVersusTime->Fill(Units::convert(cluster->timestamp(), "ns"), cluster->tot()); clusterToTVersusTime->Fill(Units::convert(cluster->timestamp(), "ns"), cluster->tot());
// Check if the cluster is close in time auto assocClusters = track->associatedClusters();
if(!m_digitalPowerPulsing && std::abs(cluster->timestamp() - track->timestamp()) > timingCut) if(std::find(assocClusters.begin(), assocClusters.end(), cluster) == assocClusters.end()) {
continue; LOG(DEBUG) << "Cluster not associated with track";
continue;
// Check distance between track and cluster }
ROOT::Math::XYZPoint intercept = track->intercept(cluster->globalZ()); LOG(DEBUG) << "Found associated cluster";
double xdistance = intercept.X() - cluster->globalX();
double ydistance = intercept.Y() - cluster->globalY(); ROOT::Math::XYZPoint intercept = track->intercept(cluster->globalZ());
if(std::abs(xdistance) > spatialCut) double xdistance = intercept.X() - cluster->globalX();
continue; double ydistance = intercept.Y() - cluster->globalY();
if(std::abs(ydistance) > spatialCut)
continue;
// We now have an associated cluster! Fill plots // We now have an associated cluster! Fill plots
associated = true; associated = true;
LOG(TRACE) << "Found associated cluster"; LOG(TRACE) << "Found associated cluster";
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment