modified: MakeVertex.C
This commit is contained in:
parent
2938411c35
commit
601caa3881
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
|
@ -126,5 +126,6 @@
|
|||
"QQQStage2.C": "cpp",
|
||||
"inspect.C": "cpp"
|
||||
},
|
||||
"github-enterprise.uri": "https://fsunuc.physics.fsu.edu"
|
||||
"github-enterprise.uri": "https://fsunuc.physics.fsu.edu",
|
||||
"C_Cpp.default.compilerPath": "/usr/bin/gcc"
|
||||
}
|
||||
173
MakeVertex.C
173
MakeVertex.C
|
|
@ -26,7 +26,8 @@ PW pw_contr;
|
|||
PW pwinstance;
|
||||
TVector3 hitPos;
|
||||
double qqqenergy, qqqtimestamp;
|
||||
class Event {
|
||||
class Event
|
||||
{
|
||||
public:
|
||||
Event(TVector3 p, double e1, double e2, double t1, double t2) : pos(p), Energy1(e1), Energy2(e2), Time1(t1), Time2(t2) {}
|
||||
Event(TVector3 p, double e1, double e2, double t1, double t2, int c1, int c2) : pos(p), Energy1(e1), Energy2(e2), Time1(t1), Time2(t2), ch1(c1), ch2(c2) {}
|
||||
|
|
@ -38,7 +39,6 @@ public:
|
|||
double Energy2 = -1; // Back for QQQ, Cathode for PC
|
||||
double Time1 = -1;
|
||||
double Time2 = -1;
|
||||
|
||||
};
|
||||
|
||||
// Calibration globals
|
||||
|
|
@ -214,11 +214,11 @@ void MakeVertex::Begin(TTree * /*tree*/)
|
|||
|
||||
infile.open("sx3cal/rightgains.dat");
|
||||
if (infile.is_open())
|
||||
while(infile>>clkpos>>frontpos>>temp>>sx3RightGain[clkpos][frontpos]) {
|
||||
while (infile >> clkpos >> frontpos >> temp >> sx3RightGain[clkpos][frontpos])
|
||||
{
|
||||
sx3RightGain[clkpos][frontpos] = TMath::Abs(sx3RightGain[clkpos][frontpos]);
|
||||
}
|
||||
infile.close();
|
||||
|
||||
}
|
||||
std::cout << "aaa" << std::endl;
|
||||
}
|
||||
|
|
@ -325,42 +325,56 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
std::vector<Event> QQQ_Events2; // clustering done
|
||||
|
||||
std::unordered_map<int, std::tuple<int, int, double, double>> qvecr[4], qvecw[4];
|
||||
if(qqq.multi>1) {
|
||||
if (qqq.multi > 1)
|
||||
{
|
||||
// if(qqq.multi>=3) std::cout << "-----" << std::endl;
|
||||
for(int i=0; i<qqq.multi; i++) {
|
||||
for (int i = 0; i < qqq.multi; i++)
|
||||
{
|
||||
// if(qqq.multi>=3) std::cout << std::setprecision(16) << "qqq"<< qqq.id[i] << " " << std::string(qqq.ch[i]/16?"ring":"wedge") << qqq.ch[i]%16 << " " << qqq.e[i] << " " << qqq.t[i] - qqq.t[0] << std::endl;
|
||||
if(qqq.ch[i]/16) {
|
||||
if(qvecr[qqq.id[i]].find(qqq.ch[i])!=qvecr[qqq.id[i]].end()) std::cout << "mayday!" << std::endl;
|
||||
if (qqq.ch[i] / 16)
|
||||
{
|
||||
if (qvecr[qqq.id[i]].find(qqq.ch[i]) != qvecr[qqq.id[i]].end())
|
||||
std::cout << "mayday!" << std::endl;
|
||||
qvecr[qqq.id[i]][qqq.ch[i]] = std::tuple(qqq.id[i], qqq.ch[i], qqq.e[i], qqq.t[i]);
|
||||
} else {
|
||||
if(qvecw[qqq.id[i]].find(qqq.ch[i])!=qvecw[qqq.id[i]].end()) std::cout << "mayday!" << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (qvecw[qqq.id[i]].find(qqq.ch[i]) != qvecw[qqq.id[i]].end())
|
||||
std::cout << "mayday!" << std::endl;
|
||||
qvecw[qqq.id[i]][qqq.ch[i]] = std::tuple(qqq.id[i], qqq.ch[i], qqq.e[i], qqq.t[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool PCQQQTimeCut = false;
|
||||
for (int i = 0; i < qqq.multi; i++) {
|
||||
for (int i = 0; i < qqq.multi; i++)
|
||||
{
|
||||
plotter->Fill2D("QQQ_Index_Vs_Energy", 16 * 8, 0, 16 * 8, 2000, 0, 16000, qqq.index[i], qqq.e[i], "hRawQQQ");
|
||||
|
||||
for (int j = 0; j < qqq.multi; j++) {
|
||||
for (int j = 0; j < qqq.multi; j++)
|
||||
{
|
||||
if (j == i)
|
||||
continue;
|
||||
plotter->Fill2D("QQQ_Coincidence_Matrix", 16 * 8, 0, 16 * 8, 16 * 8, 0, 16 * 8, qqq.index[i], qqq.index[j], "hRawQQQ");
|
||||
}
|
||||
|
||||
for (int k = 0; k < pc.multi; k++) {
|
||||
if (pc.index[k] < 24 && pc.e[k] > 50) {
|
||||
for (int k = 0; k < pc.multi; k++)
|
||||
{
|
||||
if (pc.index[k] < 24 && pc.e[k] > 50)
|
||||
{
|
||||
plotter->Fill2D("QQQ_Vs_Anode_Energy", 400, 0, 4000, 1000, 0, 16000, qqq.e[i], pc.e[k], "hRawQQQ");
|
||||
plotter->Fill2D("QQQ_Vs_PC_Index", 16 * 8, 0, 16 * 8, 24, 0, 24, qqq.index[i], pc.index[k], "hRawQQQ");
|
||||
}
|
||||
else if (pc.index[k] >= 24 && pc.e[k] > 50) {
|
||||
else if (pc.index[k] >= 24 && pc.e[k] > 50)
|
||||
{
|
||||
plotter->Fill2D("QQQ_Vs_Cathode_Energy", 400, 0, 4000, 1000, 0, 16000, qqq.e[i], pc.e[k], "hRawQQQ");
|
||||
}
|
||||
}
|
||||
|
||||
for (int j = i + 1; j < qqq.multi; j++) {
|
||||
if (qqq.id[i] == qqq.id[j]) {
|
||||
for (int j = i + 1; j < qqq.multi; j++)
|
||||
{
|
||||
if (qqq.id[i] == qqq.id[j])
|
||||
{
|
||||
qqqCount++;
|
||||
|
||||
int chWedge = -1;
|
||||
|
|
@ -372,7 +386,8 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
double tRing = 0.0;
|
||||
double tWedge = 0.0;
|
||||
|
||||
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && qqqGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16]) {
|
||||
if (qqq.ch[i] < 16 && qqq.ch[j] >= 16 && qqqGainValid[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16])
|
||||
{
|
||||
chWedge = qqq.ch[i];
|
||||
eWedge = qqq.e[i] * qqqGain[qqq.id[i]][qqq.ch[i]][qqq.ch[j] - 16];
|
||||
chRing = qqq.ch[j] - 16;
|
||||
|
|
@ -380,7 +395,8 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
tRing = static_cast<double>(qqq.t[j]);
|
||||
tWedge = static_cast<double>(qqq.t[i]);
|
||||
}
|
||||
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16 && qqqGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16]) {
|
||||
else if (qqq.ch[j] < 16 && qqq.ch[i] >= 16 && qqqGainValid[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16])
|
||||
{
|
||||
chWedge = qqq.ch[j];
|
||||
eWedge = qqq.e[j] * qqqGain[qqq.id[j]][qqq.ch[j]][qqq.ch[i] - 16];
|
||||
chRing = qqq.ch[i] - 16;
|
||||
|
|
@ -395,11 +411,13 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
plotter->Fill2D("RingE_vs_Index", 16 * 4, 0, 16 * 4, 1000, 0, 16000, chRing + qqq.id[i] * 16, eRing, "hRawQQQ");
|
||||
plotter->Fill2D("WedgeE_vs_Index", 16 * 4, 0, 16 * 4, 1000, 0, 16000, chWedge + qqq.id[i] * 16, eWedge, "hRawQQQ");
|
||||
|
||||
if (qqqCalibValid[qqq.id[i]][chWedge][chRing]) {
|
||||
if (qqqCalibValid[qqq.id[i]][chWedge][chRing])
|
||||
{
|
||||
eWedgeMeV = eWedge * qqqCalib[qqq.id[i]][chWedge][chRing] / 1000;
|
||||
eRingMeV = eRing * qqqCalib[qqq.id[i]][chWedge][chRing] / 1000;
|
||||
|
||||
if(eRingMeV/eWedgeMeV > 3.0 || eRingMeV/eWedgeMeV<1.0/3.0) continue;
|
||||
if (eRingMeV / eWedgeMeV > 3.0 || eRingMeV / eWedgeMeV < 1.0 / 3.0)
|
||||
continue;
|
||||
// if(eRingMeV<4.0 || eWedgeMeV<4.0) continue;
|
||||
|
||||
double theta = -TMath::Pi() / 2 + 2 * TMath::Pi() / 16 / 4. * (qqq.id[i] * 16 + chWedge + 0.5);
|
||||
|
|
@ -412,7 +430,8 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
QQQ_Events_Raw.push_back(qqqeventr);
|
||||
plotter->Fill2D("QQQCartesianPlot", 200, -100, 100, 200, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hCalQQQ");
|
||||
plotter->Fill2D("QQQCartesianPlot" + std::to_string(qqq.id[i]), 200, -100, 100, 200, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hCalQQQ");
|
||||
if (PCQQQTimeCut) {
|
||||
if (PCQQQTimeCut)
|
||||
{
|
||||
plotter->Fill2D("PC_XY_Projection_QQQ_TimeCut" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hPCQQQ");
|
||||
}
|
||||
plotter->Fill2D("PC_XY_Projection_QQQ" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, rho * TMath::Cos(theta), rho * TMath::Sin(theta), "hPCQQQ");
|
||||
|
|
@ -445,12 +464,14 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
}
|
||||
}
|
||||
|
||||
if (pc.index[k] >= 24 && pc.e[k] > 50) {
|
||||
if (pc.index[k] >= 24 && pc.e[k] > 50)
|
||||
{
|
||||
plotter->Fill2D("Timing_Difference_QQQ_PC_Cathode", 500, -2000, 2000, 16, 0, 16, tRing - static_cast<double>(pc.t[k]), chRing, "hTiming");
|
||||
}
|
||||
} // end of pc k loop
|
||||
|
||||
if (!HitNonZero) {
|
||||
if (!HitNonZero)
|
||||
{
|
||||
double theta = -TMath::Pi() / 2 + 2 * TMath::Pi() / 16 / 4. * (qqq.id[i] * 16 + chWedge + 0.5);
|
||||
double rho = 50. + (50. / 16.) * (chRing + 0.5); //"?"
|
||||
double x = rho * TMath::Cos(theta);
|
||||
|
|
@ -473,7 +494,6 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
}
|
||||
}*/
|
||||
|
||||
|
||||
typedef std::unordered_map<int, std::tuple<int, double, double>> WireEvent; // this stores nearest neighbour wire events, or a 'cluster'
|
||||
WireEvent aWireEvents, cWireEvents; // naming for book keeping
|
||||
aWireEvents.clear();
|
||||
|
|
@ -489,7 +509,9 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
if (pc.e[i] > 50)
|
||||
{
|
||||
plotter->Fill2D("PC_Index_Vs_Energy", 48, 0, 48, 2000, 0, 30000, pc.index[i], static_cast<double>(pc.e[i]), "hRawPC");
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -552,33 +574,40 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
double aEMax = 0;
|
||||
int aIDMax = 0;
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < pc.multi; i++) {
|
||||
for (int i = 0; i < pc.multi; i++)
|
||||
{
|
||||
// if (pc.e[i] > 100)
|
||||
{
|
||||
if (pc.index[i] < 24) {
|
||||
if (pc.index[i] < 24)
|
||||
{
|
||||
anodeHits.push_back(std::pair<int, double>(pc.index[i], pc.e[i]));
|
||||
}
|
||||
else if (pc.index[i] >= 24) {
|
||||
else if (pc.index[i] >= 24)
|
||||
{
|
||||
cathodeHits.push_back(std::pair<int, double>(pc.index[i] - 24, pc.e[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(anodeHits.begin(),anodeHits.end(),[](std::pair<int,double> a, std::pair<int,double> b){ return a.first < b.first;});
|
||||
std::sort(cathodeHits.begin(),cathodeHits.end(),[](std::pair<int,double> a, std::pair<int,double> b){ return a.first < b.first;});
|
||||
std::sort(anodeHits.begin(), anodeHits.end(), [](std::pair<int, double> a, std::pair<int, double> b)
|
||||
{ return a.first < b.first; });
|
||||
std::sort(cathodeHits.begin(), cathodeHits.end(), [](std::pair<int, double> a, std::pair<int, double> b)
|
||||
{ return a.first < b.first; });
|
||||
|
||||
// clusters = collection of (collection of wires) where each wire is (index, energy, timestamp)
|
||||
std::vector<std::vector<std::tuple<int, double, double>>> aClusters = pwinstance.Make_Clusters(aWireEvents);
|
||||
std::vector<std::vector<std::tuple<int, double, double>>> cClusters = pwinstance.Make_Clusters(cWireEvents);
|
||||
|
||||
std::vector<std::pair<double, double>> sumE_AC;
|
||||
for(auto aCluster: aClusters) {
|
||||
for(auto cCluster: cClusters) {
|
||||
if(aCluster.size()<=1 && cCluster.size()<=1) continue;
|
||||
for (auto aCluster : aClusters)
|
||||
{
|
||||
for (auto cCluster : cClusters)
|
||||
{
|
||||
// if (aCluster.size() <= 1 && cCluster.size() <= 1)
|
||||
// continue;
|
||||
auto [crossover, alpha, apSumE, cpSumE, apMaxE, cpMaxE, apTSMaxE, cpTSMaxE] = pwinstance.FindCrossoverProperties(aCluster, cCluster);
|
||||
if(alpha!=9999999 && apSumE!=-1) {
|
||||
if (alpha != 9999999 && apSumE != -1)
|
||||
{
|
||||
// Event PCEvent(crossover,apMaxE,cpMaxE,apTSMaxE,cpTSMaxE);
|
||||
// Event PCEvent(crossover,apSumE,cpSumE,apTSMaxE,cpTSMaxE);
|
||||
Event PCEvent(crossover, apSumE, cpMaxE, apTSMaxE, cpTSMaxE); // run12 shows cathode-max and anode-sum provide best dE signals.
|
||||
|
|
@ -591,8 +620,10 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
if (QQQ_Events.size() && PC_Events.size())
|
||||
plotter->Fill2D("PCEv_vs_QQQEv", 20, 0, 20, 20, 0, 20, QQQ_Events.size(), PC_Events.size());
|
||||
|
||||
for(auto pcevent:PC_Events) {
|
||||
for(auto sx3event:sx3Events) {
|
||||
for (auto pcevent : PC_Events)
|
||||
{
|
||||
for (auto sx3event : sx3Events)
|
||||
{
|
||||
plotter->Fill1D("dt_pcA_sx3B" + std::to_string(sx3event.ch2), 640, -2000, 2000, sx3event.Time1 - pcevent.Time1);
|
||||
plotter->Fill1D("dt_pcC_sx3B" + std::to_string(sx3event.ch2), 640, -2000, 2000, sx3event.Time1 - pcevent.Time2);
|
||||
plotter->Fill2D("dE_E_Anodesx3B", 400, 0, 10, 800, 0, 40000, sx3event.Energy1 * 0.001, pcevent.Energy1);
|
||||
|
|
@ -608,8 +639,10 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
}
|
||||
}
|
||||
|
||||
for(auto pcevent: PC_Events) {
|
||||
for(auto qqqevent: QQQ_Events) {
|
||||
for (auto pcevent : PC_Events)
|
||||
{
|
||||
for (auto qqqevent : QQQ_Events)
|
||||
{
|
||||
plotter->Fill1D("dt_pcA_qqqR", 640, -2000, 2000, qqqevent.Time1 - pcevent.Time1);
|
||||
plotter->Fill1D("dt_pcC_qqqW", 640, -2000, 2000, qqqevent.Time2 - pcevent.Time2);
|
||||
plotter->Fill2D("dE_E_AnodeQQQR", 400, 0, 10, 800, 0, 40000, qqqevent.Energy1, pcevent.Energy1);
|
||||
|
|
@ -618,13 +651,40 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
plotter->Fill2D("dE2_E_AnodeQQQR", 400, 0, 10, 800, 0, 40000, qqqevent.Energy1, pcevent.Energy1 * sinTheta);
|
||||
plotter->Fill2D("dE2_E_CathodeQQQR", 400, 0, 10, 800, 0, 10000, qqqevent.Energy2, pcevent.Energy2 * sinTheta);
|
||||
|
||||
if(qqqevent.pos.Phi() <= pcevent.pos.Phi()+TMath::Pi()/4. && qqqevent.pos.Phi() >= pcevent.pos.Phi()-TMath::Pi()/4.) {
|
||||
if (qqqevent.pos.Phi() <= pcevent.pos.Phi() + TMath::Pi() / 4. && qqqevent.pos.Phi() >= pcevent.pos.Phi() - TMath::Pi() / 4.)
|
||||
{
|
||||
plotter->Fill1D("PCZ", 800, -200, 200, pcevent.pos.Z(), "phicut");
|
||||
double pcz_guess = pcrad / TMath::Tan((qqqevent.pos - TVector3(0, 0, vertexpos)).Theta()) + vertexpos; // this is ideally kept to be all QQQ+userinput for calibration of pcz
|
||||
plotter->Fill2D("pczguess_vs_pc", 300, 0, 200, 150, 0, 200, pcz_guess, pcevent.pos.Z(), "phicut");
|
||||
plotter->Fill2D("pczguess_vs_pc_phi=" + std::to_string(qqqevent.pos.Phi() * 180. / M_PI), 300, 0, 200, 150, 0, 200, pcz_guess, pcevent.pos.Z(), "phicut");
|
||||
// plotter->Fill1D("PCZ",800,-200,200,pcevent.pos.Z(),"phicut");
|
||||
}
|
||||
|
||||
if (cClusters.size() == 1)
|
||||
{
|
||||
plotter->Fill1D("pcz_1cCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
else if (cClusters.size() == 2)
|
||||
{
|
||||
plotter->Fill1D("pcz_2cCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
else if (cClusters.size() >= 3)
|
||||
{
|
||||
plotter->Fill1D("pcz_ncCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
|
||||
if (aClusters.size() == 1)
|
||||
{
|
||||
plotter->Fill1D("pcz_1aCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
else if (aClusters.size() == 2)
|
||||
{
|
||||
plotter->Fill1D("pcz_2aCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
else if (aClusters.size() >= 3)
|
||||
{
|
||||
plotter->Fill1D("pcz_naCluster", 600, -300, 300, pcevent.pos.Z(), "hPCzQQQ");
|
||||
}
|
||||
}
|
||||
}
|
||||
// HALFTIME! Can stop here in future versions
|
||||
|
|
@ -696,14 +756,16 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
}
|
||||
bool PCQQQPhiCut = false;
|
||||
// flip the algorithm for cathode 1 multi anode events
|
||||
if ((hitPos.Phi() > (anodeIntersection.Phi() - TMath::PiOver4())) && (hitPos.Phi() < (anodeIntersection.Phi() + TMath::PiOver4()))) {
|
||||
if ((hitPos.Phi() > (anodeIntersection.Phi() - TMath::PiOver4())) && (hitPos.Phi() < (anodeIntersection.Phi() + TMath::PiOver4())))
|
||||
{
|
||||
PCQQQPhiCut = true;
|
||||
}
|
||||
|
||||
for (double Tz = 60; Tz <= 100; Tz += 1.0)
|
||||
{
|
||||
TVector3 TargetPos(0, 0, Tz);
|
||||
if(PCQQQPhiCut && anodeIntersection.Perp()>0 && anodeIntersection.Z()!=0 && cathodeHits.size()>=2) {
|
||||
if (PCQQQPhiCut && anodeIntersection.Perp() > 0 && anodeIntersection.Z() != 0 && cathodeHits.size() >= 2)
|
||||
{
|
||||
plotter->Fill2D("Inttheta_vs_QQQtheta_TC" + std::to_string(PCQQQTimeCut) + "_TZ" + std::to_string(Tz), 400, 0, 180, 90, 0, 90, (anodeIntersection - TargetPos).Theta() * 180. / TMath::Pi(), (hitPos - TargetPos).Theta() * 180. / TMath::Pi(), "TPosVariation");
|
||||
// plotter->Fill2D("R_ratio_to_Z_ratio" + std::to_string(PCQQQTimeCut) + "_TZ" + std::to_string(Tz), 100, -2, 2, 100, -2, 2, (anodeIntersection - TargetPos).Z()/(hitPos-TargetPos).Z(), ((anodeIntersection - TargetPos).Perp()+2.5)/(hitPos-TargetPos).Perp(), "TPosVariation");
|
||||
}
|
||||
|
|
@ -808,27 +870,31 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
vector_closest_to_z = x1 + t_minimum * v;
|
||||
|
||||
plotter->Fill1D("VertexRecon_Z_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -1300, 1300, vector_closest_to_z.Z(), "customVertex");
|
||||
if(vector_closest_to_z.Perp() < 20) {
|
||||
if (vector_closest_to_z.Perp() < 20)
|
||||
{
|
||||
plotter->Fill1D("VertexRecon_RadialCut_Z_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -1300, 1300, vector_closest_to_z.Z(), "customVertex");
|
||||
}
|
||||
|
||||
plotter->Fill2D("VertexRecon_XY_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 100, -100, 100, 100, -100, 100, vector_closest_to_z.X(), vector_closest_to_z.Y(), "customVertex");
|
||||
if(cathodeHits.size()==2) {
|
||||
if (cathodeHits.size() == 2)
|
||||
{
|
||||
plotter->Fill1D("VertexRecon2C_Z_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -1300, 1300, vector_closest_to_z.Z(), "customVertex");
|
||||
if(vector_closest_to_z.Perp() < 20) {
|
||||
if (vector_closest_to_z.Perp() < 20)
|
||||
{
|
||||
plotter->Fill1D("VertexRecon2C_RadialCut_Z_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -1300, 1300, vector_closest_to_z.Z(), "customVertex");
|
||||
}
|
||||
plotter->Fill2D("VertexRecon2C_XY_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 100, -100, 100, 100, -100, 100, vector_closest_to_z.X(), vector_closest_to_z.Y(), "customVertex");
|
||||
plotter->Fill2D("VertexRecon2C_RhoZ_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 100, -100, 100, 600, -1300, 1300, vector_closest_to_z.Perp(), vector_closest_to_z.Z(), "customVertex");
|
||||
plotter->Fill2D("VertexRecon2C_Z_vs_QQQE_TC" + std::to_string(PCQQQTimeCut) + "_PhiC" + std::to_string(PCQQQPhiCut), 600, -1300, 1300, 800, 0, 20000, vector_closest_to_z.Z(), qqqenergy, "customVertex");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (int i = 0; i < qqq.multi; i++)
|
||||
{
|
||||
if(anodeIntersection.Perp() > 0) { //suppress x,y=0,0 events
|
||||
if (PCQQQTimeCut) {
|
||||
if (anodeIntersection.Perp() > 0)
|
||||
{ // suppress x,y=0,0 events
|
||||
if (PCQQQTimeCut)
|
||||
{
|
||||
plotter->Fill2D("PC_XY_Projection_QQQ_TimeCut" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, anodeIntersection.X(), anodeIntersection.Y(), "hPCQQQ");
|
||||
}
|
||||
plotter->Fill2D("PC_XY_Projection_QQQ" + std::to_string(qqq.id[i]), 400, -100, 100, 400, -100, 100, anodeIntersection.X(), anodeIntersection.Y(), "hPCQQQ");
|
||||
|
|
@ -905,14 +971,14 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
// double sinTheta = TMath::Sin((hitPos-TVector3(0,0,30.0)).Theta());
|
||||
// double sinTheta = TMath::Sin(hitPos.Theta());
|
||||
|
||||
if(cathodeHits.size()==2 && PCQQQPhiCut) {
|
||||
if (cathodeHits.size() == 2 && PCQQQPhiCut)
|
||||
{
|
||||
plotter->Fill2D("CalibratedQQQE_RvsCPCE_TC" + std::to_string(PCQQQTimeCut), 400, 0, 10, 400, 0, 30000, eRingMeV, pc.e[k] * sinTheta, "hPCQQQ");
|
||||
plotter->Fill2D("CalibratedQQQE_WvsCPCE_TC" + std::to_string(PCQQQTimeCut), 400, 0, 10, 400, 0, 30000, eWedgeMeV, pc.e[k] * sinTheta, "hPCQQQ");
|
||||
plotter->Fill2D("CalibratedQQQE_RvsPCE_TC" + std::to_string(PCQQQTimeCut), 400, 0, 10, 400, 0, 30000, eRingMeV, pc.e[k], "hPCQQQ");
|
||||
plotter->Fill2D("CalibratedQQQE_WvsPCE_TC" + std::to_string(PCQQQTimeCut), 400, 0, 10, 400, 0, 30000, eWedgeMeV, pc.e[k], "hPCQQQ");
|
||||
plotter->Fill2D("PCQQQ_dTimevsdPhi", 200, -2000, 2000, 80, -200, 200, tRing - static_cast<double>(pc.t[k]), (hitPos.Phi() - anodeIntersection.Phi()) * 180. / TMath::Pi(), "hTiming");
|
||||
}
|
||||
|
||||
}
|
||||
} /// qqq i==j case end
|
||||
} // j loop end
|
||||
|
|
@ -921,7 +987,8 @@ Bool_t MakeVertex::Process(Long64_t entry)
|
|||
TVector3 guessVertex(0, 0, 90.); // for run12, subtract anodeIntersection.Z() by ~74.0 seems to work
|
||||
// rho=40.0 mm is halfway between the cathodes(rho=42) and anodes(rho=37)
|
||||
double pcz_guess = 42.0 / TMath::Tan((hitPos - guessVertex).Theta()) + guessVertex.Z(); // this is ideally kept to be all QQQ+userinput for calibration of pcz
|
||||
if(PCQQQTimeCut && PCQQQPhiCut && hitPos.Perp()>0 && anodeIntersection.Perp()>0 && cathodeHits.size()>=2) {
|
||||
if (PCQQQTimeCut && PCQQQPhiCut && hitPos.Perp() > 0 && anodeIntersection.Perp() > 0 && cathodeHits.size() >= 2)
|
||||
{
|
||||
plotter->Fill2D("pczguess_vs_qqqE", 100, 0, 200, 800, 0, 20, pcz_guess, qqqenergy, "pczguess");
|
||||
double pczoffset = 30.0;
|
||||
// plotter->Fill2D("pczguess_vs_pcz_rad="+std::to_string(hitPos.Perp()),100,0,200,150,0,200,pcz_guess,anodeIntersection.Z(),"pczguess"); //entirely qqq-derived position vs entirely PC derived position
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user