modified: Analyzer.C

modified:   Armory/ClassPW.h edited to account for the 4 wire offset instead of 3 in cathodes. This has been crossreferenced using the alpha source data in QQQ coinincidence to confirm
    the position of the source.
This commit is contained in:
Vignesh Sitaraman 2025-02-21 15:40:52 -05:00
parent 2225b3a942
commit 9225620426
2 changed files with 14 additions and 10 deletions

View File

@ -287,7 +287,7 @@ Bool_t Analyzer::Process(Long64_t entry)
// if(pc.index[j]==4){
hqqqIndexVE->Fill(qqq.index[i], qqq.e[i]);
// }
if (qqq.e[i] > 1600 && qqq.e[i] < 2600)
if (qqq.e[i] > 1600 && qqq.e[i] < 3000)
{
qqqEcut = true;
}
@ -392,7 +392,9 @@ Bool_t Analyzer::Process(Long64_t entry)
//-so that it can be used to sort "good" hits later
Crossover[i][j][1].x = alpha;
Crossover[i][j][1].y = 0;
// printf("AID, CID, Crossover z and alpha are : %d %d %f %f \n", i, j, Crossover[i][j][0].z, Crossover[i][j][1].x /*this is alpha*/);
// if(i==0){
// printf("CID, Crossover z and alpha are : %d %f %f \n", j, Crossover[i][j][0].z, Crossover[i][j][1].x /*this is alpha*/);
// }
}
}
@ -500,7 +502,7 @@ Bool_t Analyzer::Process(Long64_t entry)
std::sort(cathodeHits.begin(), cathodeHits.end(), [](const std::pair<int, double> &a, const std::pair<int, double> &b)
{ return a.second > b.second; });
if (anodeHits.size() >= 1 && cathodeHits.size() >=1)
if (anodeHits.size() >= 1 && cathodeHits.size() >1)
{
for (const auto &anode : anodeHits)
@ -552,6 +554,7 @@ Bool_t Analyzer::Process(Long64_t entry)
for (int j = -4; j < 3; j++)
{
if ((aIDMax + 24 + j) % 24 == 23 - cID) /* the 23-cID is used to accomodate for the fact that the order of the cathodes was reversed relative top the physical geometry */
// if(Crossover[aIDMax][cID][0].z != 9999999)
{
corrcatMax.push_back(std::pair<int, double>(cID, cE));
// printf("Max Anode : %d Correlated Cathode : %d Anode Energy : %f z value : %f \n", aIDMax, cID, cESum, Crossover[aIDMax][cID][1].z /*prints alpha*/);
@ -599,7 +602,7 @@ Bool_t Analyzer::Process(Long64_t entry)
printf("Warning: No valid cathode hits to correlate with anode %d! \n", aIDMax);
}
}
anodeIntersection = TVector3(x, y, z);
if(qqqEcut) anodeIntersection = TVector3(x, y, z);
// std::cout << "Anode Intersection " << anodeIntersection.Z() << " " << x << " " << y << " " << z << std::endl;
}

View File

@ -154,19 +154,20 @@ inline void PW::ConstructGeo()
-zLen / 2);
An.push_back(p1);
// Cathod rotate left-hand
q1.first.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i) + TMath::PiOver2()),
// Cathod rotate left-hand with the 3 wire offset accounted for (+1 from the calculated offset from the PC coincidence spectrum)
q1.first.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i + wireShift + 1) + TMath::PiOver2()),
radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i + wireShift + 1) + TMath::PiOver2()),
zLen / 2);
q1.second.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i - wireShift) + TMath::PiOver2()),
q1.second.SetXYZ(radiusC * TMath::Cos(TMath::TwoPi() / nWire * (i + 1) + TMath::PiOver2()),
radiusC * TMath::Sin(TMath::TwoPi() / nWire * (i + 1) + TMath::PiOver2()),
-zLen / 2);
Ca.push_back(q1);
}
// correcting for the fact that the order of the cathode wires is reversed
std::reverse(Ca.begin(), Ca.end());
// adjusting for the 3 wire offset, the rbegin and rend are used as the rotation of the wires is done in the opposite direction i.e. 1,2,3 -> 3,1,2
std::rotate(Ca.rbegin(), Ca.rbegin() + 3, Ca.rend());
// NOT NECESSARY ANY MORE, HAS BEEN IMCORPORATED INTO THE WIREOFFSET IN THE BEGINNING
// std::rotate(Ca.rbegin(), Ca.rbegin() + 4, Ca.rend());
dAngle = wireShift * TMath::TwoPi() / nWire;
anodeLength = TMath::Sqrt(zLen * zLen + TMath::Power(2 * radiusA * TMath::Sin(dAngle / 2), 2));