Skip to content

Commit

Permalink
Changes from beam time
Browse files Browse the repository at this point in the history
Update R3BScalersOnlineSpectra and R3BTofDOnlineSpectra

Clang-format

Minor change

Clang-format

Clang-format

Clang-format
  • Loading branch information
jose-luis-rs committed Feb 24, 2024
1 parent f8b8463 commit 5051165
Show file tree
Hide file tree
Showing 15 changed files with 808 additions and 72 deletions.
1 change: 1 addition & 0 deletions analysis/AnaLinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,6 @@
#pragma link C++ class R3BIncomingIDOnlineSpectra+;
#pragma link C++ class R3BTofDvsTttxOnlineSpectra+;
#pragma link C++ class R3BOnlineSyncCheck+;
#pragma link C++ class R3BScalersOnlineSpectra+;

#endif
1 change: 1 addition & 0 deletions analysis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ ${R3BROOT_SOURCE_DIR}/r3bdata/footData
${R3BROOT_SOURCE_DIR}/r3bdata/rpcData
${R3BROOT_SOURCE_DIR}/r3bdata/wrData
${R3BROOT_SOURCE_DIR}/r3bdata/synccheckData
${R3BROOT_SOURCE_DIR}/r3bdata/trloiiData
${R3BROOT_SOURCE_DIR}/tracker_rene
${R3BROOT_SOURCE_DIR}/analysis
${R3BROOT_SOURCE_DIR}/analysis/pars
Expand Down
24 changes: 12 additions & 12 deletions analysis/online/R3BIncomingTrackingOnlineSpectra.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ void R3BIncomingTrackingOnlineSpectra::Reset_Histo()

void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
{
double mwpc0x = -300., mwpc0y = -300., zrand = 0.;
double mwpc1x = -300., mwpc1y = -300., zrand = 0.;
double xtarget = -500., ytarget = -500.;

if (fCutIncoming && fFrsHitDataCA)
Expand All @@ -334,18 +334,18 @@ void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
// Fill Mwpc0 Hit data
// if (fMwpc0HitDataCA && fMwpc0HitDataCA->GetEntriesFast() > 0)
{
Int_t nHits = fMwpc0HitDataCA->GetEntriesFast();
Int_t nHits = fMwpc1HitDataCA->GetEntriesFast();
for (Int_t ihit = 0; ihit < nHits; ihit++)
{
auto hit = dynamic_cast<R3BMwpcHitData*>(fMwpc0HitDataCA->At(ihit));
auto hit = dynamic_cast<R3BMwpcHitData*>(fMwpc1HitDataCA->At(ihit));
if (!hit)
continue;
mwpc0x = hit->GetX() + fMw0GeoPar->GetPosX() * 10.; // mm
mwpc0y = hit->GetY() + fMw0GeoPar->GetPosY() * 10.; // mm
mwpc1x = hit->GetX() + fMw1GeoPar->GetPosX() * 10.; // mm
mwpc1y = hit->GetY() + fMw1GeoPar->GetPosY() * 10.; // mm
}

// Fill Mwpc1 Hit data
if (fMwpc1HitDataCA && fMwpc1HitDataCA->GetEntriesFast() > 0 && mwpc0y > -100. && fYearConf == 2022)
/*if (fMwpc1HitDataCA && fMwpc1HitDataCA->GetEntriesFast() > 0 && mwpc1y > -100. && fYearConf == 2022)
{
nHits = fMwpc1HitDataCA->GetEntriesFast();
Float_t mwpc1x = -150.;
Expand Down Expand Up @@ -377,10 +377,10 @@ void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
fh2_angvsposx->Fill(xtarget, angX * 1000.);
fh2_angvsposy->Fill(ytarget, angY * 1000.);
}
}
}*/

// Fill Mwpc2 Hit data
if (fMwpc2HitDataCA && fMwpc2HitDataCA->GetEntriesFast() > 0 && mwpc0y > -100. && fYearConf == 2024)
if (fMwpc2HitDataCA && fMwpc2HitDataCA->GetEntriesFast() > 0 && mwpc1x > -100. && fYearConf == 2024)
{
nHits = fMwpc2HitDataCA->GetEntriesFast();
Float_t mwpc2x = -150.;
Expand All @@ -394,8 +394,8 @@ void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
continue;
mwpc2x = hit->GetX() + fMw2GeoPar->GetPosX() * 10.;
mwpc2y = hit->GetY() + fMw2GeoPar->GetPosY() * 10.;
angX = std::atan((mwpc0x - mwpc2x) / (fMw0GeoPar->GetPosZ() - fMw2GeoPar->GetPosZ()) / 10.);
angY = std::atan((mwpc0y - mwpc2y) / (fMw0GeoPar->GetPosZ() - fMw2GeoPar->GetPosZ()) / 10.);
angX = std::atan((mwpc1x - mwpc2x) / (fMw1GeoPar->GetPosZ() - fMw2GeoPar->GetPosZ()) / 10.);
angY = std::atan((mwpc1y - mwpc2y) / (fMw1GeoPar->GetPosZ() - fMw2GeoPar->GetPosZ()) / 10.);
if (TMath::Abs(angX) < 0.075 && TMath::Abs(angY) < 0.075 && mwpc2x > -150.)
{
zrand = gRandom->Uniform(0., fDist_acelerator_glad);
Expand All @@ -413,7 +413,7 @@ void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
fh2_angvsposy->Fill(ytarget, angY * 1000.);
}
}
else if (fMwpc2HitDataCA && fMwpc2HitDataCA->GetEntriesFast() > 0 && fYearConf == 2024)
/*else if (fMwpc2HitDataCA && fMwpc2HitDataCA->GetEntriesFast() > 0 && fYearConf == 2024)
{
nHits = fMwpc1HitDataCA->GetEntriesFast();
Expand Down Expand Up @@ -463,7 +463,7 @@ void R3BIncomingTrackingOnlineSpectra::Exec(Option_t* /*option*/)
fh2_angvsposy->Fill(ytarget, angY * 1000.);
}
}
}
}*/
}

fNEvents += 1;
Expand Down
Loading

0 comments on commit 5051165

Please sign in to comment.