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() {
residualsX2pix = new TH1F("residualsX2pix", "residualsX2pix", 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_X = new TH1F("clusterSizeAssociated_X", "clusterSizeAssociated_X", 30, 0, 30);
clusterSizeAssociated_Y = new TH1F("clusterSizeAssociated_Y", "clusterSizeAssociated_Y", 30, 0, 30);
......@@ -224,19 +224,17 @@ StatusCode DUTAnalysis::run(Clipboard* clipboard) {
if(first_track == 0)
clusterToTVersusTime->Fill(Units::convert(cluster->timestamp(), "ns"), cluster->tot());
// Check if the cluster is close in time
if(!m_digitalPowerPulsing && std::abs(cluster->timestamp() - track->timestamp()) > timingCut)
continue;
// Check distance between track and cluster
ROOT::Math::XYZPoint intercept = track->intercept(cluster->globalZ());
double xdistance = intercept.X() - cluster->globalX();
double ydistance = intercept.Y() - cluster->globalY();
if(std::abs(xdistance) > spatialCut)
continue;
if(std::abs(ydistance) > spatialCut)
continue;
auto assocClusters = track->associatedClusters();
if(std::find(assocClusters.begin(), assocClusters.end(), cluster) == assocClusters.end()) {
LOG(DEBUG) << "Cluster not associated with track";
continue;
}
LOG(DEBUG) << "Found associated cluster";
ROOT::Math::XYZPoint intercept = track->intercept(cluster->globalZ());
double xdistance = intercept.X() - cluster->globalX();
double ydistance = intercept.Y() - cluster->globalY();
// We now have an associated cluster! Fill plots
associated = true;
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