modified: MakeVertex.C adapted from Sudarsan's pushes
modified: TrackRecon.C dithering was not inclded ;-;
This commit is contained in:
parent
f7248f6a4e
commit
7861cc496c
4357
MakeVertex.C
4357
MakeVertex.C
File diff suppressed because it is too large
Load Diff
46
TrackRecon.C
46
TrackRecon.C
|
|
@ -1367,6 +1367,9 @@ void protonAlphaHistograms(HistPlotter *plotter, std::vector<Event> QQQ_Events,
|
||||||
void PCSX3ClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, std::vector<Event> SX3_Events, std::vector<Event> PC_Events,
|
void PCSX3ClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, std::vector<Event> SX3_Events, std::vector<Event> PC_Events,
|
||||||
const std::vector<std::vector<std::tuple<int, double, double>>> &aClusters, const std::vector<std::vector<std::tuple<int, double, double>>> &cClusters)
|
const std::vector<std::vector<std::tuple<int, double, double>>> &aClusters, const std::vector<std::vector<std::tuple<int, double, double>>> &cClusters)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
static TRandom3 rand(0);
|
||||||
|
|
||||||
for (auto pcevent : PC_Events)
|
for (auto pcevent : PC_Events)
|
||||||
{
|
{
|
||||||
bool PCSX3TimeCut = false;
|
bool PCSX3TimeCut = false;
|
||||||
|
|
@ -1539,6 +1542,7 @@ void PCSX3ClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, s
|
||||||
// SX3 hit's phi, with the same quality cuts as miscHistograms_oneWire
|
// SX3 hit's phi, with the same quality cuts as miscHistograms_oneWire
|
||||||
auto [apwire_bm, apSumE_bm, apMaxE_bm, apTSMaxE_bm] = pwinstance.GetPseudoWire(aCl, "ANODE");
|
auto [apwire_bm, apSumE_bm, apMaxE_bm, apTSMaxE_bm] = pwinstance.GetPseudoWire(aCl, "ANODE");
|
||||||
TVector3 pc_anodeOnly = pwinstance.getClosestWirePosAtWirePhi(apwire_bm, sx3event.pos.Phi());
|
TVector3 pc_anodeOnly = pwinstance.getClosestWirePosAtWirePhi(apwire_bm, sx3event.pos.Phi());
|
||||||
|
pc_anodeOnly.SetZ(rand.Gaus(pc_anodeOnly.Z(), 8.0));
|
||||||
TVector3 vtx_anodeOnly = vertexFromPCPoint(pc_anodeOnly);
|
TVector3 vtx_anodeOnly = vertexFromPCPoint(pc_anodeOnly);
|
||||||
bool anodeOnlyGood = vtx_anodeOnly.Perp() <= 6.0 && vtx_anodeOnly.Z() >= -173.6 && vtx_anodeOnly.Z() <= 100 && phicut;
|
bool anodeOnlyGood = vtx_anodeOnly.Perp() <= 6.0 && vtx_anodeOnly.Z() >= -173.6 && vtx_anodeOnly.Z() <= 100 && phicut;
|
||||||
|
|
||||||
|
|
@ -1546,19 +1550,11 @@ void PCSX3ClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, s
|
||||||
{
|
{
|
||||||
fillSuite("A1C2", pcz_ref, vtx_ref); // baseline with identical binning
|
fillSuite("A1C2", pcz_ref, vtx_ref); // baseline with identical binning
|
||||||
|
|
||||||
// ---- A1C1 emulation: crossover with only the max-E cathode wire (Cmax),
|
double pcz_dith = rand.Gaus(pcevent.pos.Z(), 8.0);
|
||||||
// used directly with no z-model ----
|
|
||||||
auto cMaxWire = *std::max_element(cCl.begin(), cCl.end(),
|
TVector3 vtx_a1c1 = vertexFromPCPoint(TVector3(pcevent.pos.X(), pcevent.pos.Y(), pcz_dith));
|
||||||
[](const std::tuple<int, double, double> &w1, const std::tuple<int, double, double> &w2)
|
fillSuite("A1C1", pcz_dith, vtx_a1c1);
|
||||||
{ return std::get<1>(w1) < std::get<1>(w2); });
|
fillVsRef("A1C1", pcz_dith, vtx_a1c1, pcz_ref, vtx_ref);
|
||||||
std::vector<std::tuple<int, double, double>> cOne = {cMaxWire};
|
|
||||||
auto [xo_a1c1, alpha_a1c1, apSumE1, cpSumE1, apMaxE1, cpMaxE1, apTSMaxE1, cpTSMaxE1] = pwinstance.FindCrossoverProperties(aCl, cOne);
|
|
||||||
if (alpha_a1c1 != 9999999 && apSumE1 != -1)
|
|
||||||
{
|
|
||||||
TVector3 vtx_a1c1 = vertexFromPCPoint(xo_a1c1);
|
|
||||||
fillSuite("A1C1", xo_a1c1.Z(), vtx_a1c1);
|
|
||||||
fillVsRef("A1C1", xo_a1c1.Z(), vtx_a1c1, pcz_ref, vtx_ref);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---- A1C0 emulation: oneWire method, cathodes ignored ----
|
// ---- A1C0 emulation: oneWire method, cathodes ignored ----
|
||||||
if (anodeOnlyGood)
|
if (anodeOnlyGood)
|
||||||
|
|
@ -1586,6 +1582,8 @@ void PCSX3ClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, s
|
||||||
void PCQQQClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, std::vector<Event> SX3_Events, std::vector<Event> PC_Events,
|
void PCQQQClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, std::vector<Event> SX3_Events, std::vector<Event> PC_Events,
|
||||||
const std::vector<std::vector<std::tuple<int, double, double>>> &aClusters, const std::vector<std::vector<std::tuple<int, double, double>>> &cClusters)
|
const std::vector<std::vector<std::tuple<int, double, double>>> &aClusters, const std::vector<std::vector<std::tuple<int, double, double>>> &cClusters)
|
||||||
{
|
{
|
||||||
|
static TRandom3 rand(0);
|
||||||
|
|
||||||
for (auto pcevent : PC_Events)
|
for (auto pcevent : PC_Events)
|
||||||
{
|
{
|
||||||
for (auto qqqevent : QQQ_Events)
|
for (auto qqqevent : QQQ_Events)
|
||||||
|
|
@ -1753,6 +1751,7 @@ void PCQQQClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, s
|
||||||
// QQQ hit's phi, with the same quality cuts as miscHistograms_oneWire
|
// QQQ hit's phi, with the same quality cuts as miscHistograms_oneWire
|
||||||
auto [apwire_bm, apSumE_bm, apMaxE_bm, apTSMaxE_bm] = pwinstance.GetPseudoWire(aCl, "ANODE");
|
auto [apwire_bm, apSumE_bm, apMaxE_bm, apTSMaxE_bm] = pwinstance.GetPseudoWire(aCl, "ANODE");
|
||||||
TVector3 pc_anodeOnly = pwinstance.getClosestWirePosAtWirePhi(apwire_bm, qqqevent.pos.Phi());
|
TVector3 pc_anodeOnly = pwinstance.getClosestWirePosAtWirePhi(apwire_bm, qqqevent.pos.Phi());
|
||||||
|
pc_anodeOnly.SetZ(rand.Gaus(pc_anodeOnly.Z(), 8.0));
|
||||||
TVector3 vtx_anodeOnly = vertexFromPCPoint(pc_anodeOnly);
|
TVector3 vtx_anodeOnly = vertexFromPCPoint(pc_anodeOnly);
|
||||||
bool anodeOnlyGood = vtx_anodeOnly.Perp() <= 6.0 && vtx_anodeOnly.Z() >= -173.6 && vtx_anodeOnly.Z() <= 100 && phicut;
|
bool anodeOnlyGood = vtx_anodeOnly.Perp() <= 6.0 && vtx_anodeOnly.Z() >= -173.6 && vtx_anodeOnly.Z() <= 100 && phicut;
|
||||||
|
|
||||||
|
|
@ -1762,17 +1761,16 @@ void PCQQQClusterAnalysis(HistPlotter *plotter, std::vector<Event> QQQ_Events, s
|
||||||
|
|
||||||
// ---- A1C1 emulation: crossover with only the max-E cathode wire (Cmax),
|
// ---- A1C1 emulation: crossover with only the max-E cathode wire (Cmax),
|
||||||
// used directly with no z-model ----
|
// used directly with no z-model ----
|
||||||
auto cMaxWire = *std::max_element(cCl.begin(), cCl.end(),
|
if (!phicut)
|
||||||
[](const std::tuple<int, double, double> &w1, const std::tuple<int, double, double> &w2)
|
continue;
|
||||||
{ return std::get<1>(w1) < std::get<1>(w2); });
|
if (pcevent.Time1 - qqqevent.Time1 < -150 || pcevent.Time1 - qqqevent.Time1 > 850)
|
||||||
std::vector<std::tuple<int, double, double>> cOne = {cMaxWire};
|
continue;
|
||||||
auto [xo_a1c1, alpha_a1c1, apSumE1, cpSumE1, apMaxE1, cpMaxE1, apTSMaxE1, cpTSMaxE1] = pwinstance.FindCrossoverProperties(aCl, cOne);
|
|
||||||
if (alpha_a1c1 != 9999999 && apSumE1 != -1)
|
double pcz_dith = rand.Gaus(pcevent.pos.Z(), 8.0);
|
||||||
{
|
|
||||||
TVector3 vtx_a1c1 = vertexFromPCPoint(xo_a1c1);
|
TVector3 vtx_a1c1 = vertexFromPCPoint(TVector3(pcevent.pos.X(), pcevent.pos.Y(), pcz_dith));
|
||||||
fillSuite("A1C1", xo_a1c1.Z(), vtx_a1c1);
|
fillSuite("A1C1", pcz_dith, vtx_a1c1);
|
||||||
fillVsRef("A1C1", xo_a1c1.Z(), vtx_a1c1, pcz_ref, vtx_ref);
|
fillVsRef("A1C1", pcz_dith, vtx_a1c1, pcz_ref, vtx_ref);
|
||||||
}
|
|
||||||
|
|
||||||
// ---- A1C0 emulation: oneWire method, cathodes ignored ----
|
// ---- A1C0 emulation: oneWire method, cathodes ignored ----
|
||||||
if (anodeOnlyGood)
|
if (anodeOnlyGood)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user