Skip to content

Commit

Permalink
Working on Fiber digitizer, PDC, tracking, ...
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-heil committed Sep 21, 2020
1 parent 3f21c55 commit c9eefd4
Show file tree
Hide file tree
Showing 38 changed files with 3,486 additions and 3,121 deletions.
2 changes: 1 addition & 1 deletion fi4/R3BFi4.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void R3BFi4::SetSpecialPhysicsCuts()
if (gGeoManager)
{
TGeoMedium* pSi = gGeoManager->GetMedium("silicon");
if (pSi)
if (pSi && 1 == 0)
{
// Setting processes for Si only
gMC->Gstpar(pSi->GetId(), "LOSS", 3);
Expand Down
14 changes: 12 additions & 2 deletions fi4/R3BFi4Digitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ void R3BFi4Digitizer::Exec(Option_t* opt)
if (std::fabs(time_l[i].at(&energyl - energy_l[i].data()) -
time_r[j].at(&energyr - energy_r[j].data())) < 30)
{

Double_t x = (i * 4 + j + .5 - 4) * ((Detector == 6) ? 0.05 : 0.02) *
((Detector == 5) ? 1 : .5) -
((Detector == 6) ? 25. : 20.);
Double_t y = prnd->Gaus((y_l[i].at(&energyl - energy_l[i].data()) +
y_r[j].at(&energyr - energy_r[j].data())) /
2,
ysigma);
cout << "Detector: " << Detector << " x: " << x << " y: " << endl;

new ((*Hits)[Hits->GetEntries()]) R3BFi4HitItem(
(UInt_t)Detector,
(UInt_t)i * 4 + j - 4,
Expand All @@ -290,8 +300,8 @@ void R3BFi4Digitizer::Exec(Option_t* opt)
2,
ysigma),
0,
prnd->Gaus(energyl, esigma),
prnd->Gaus(energyr, esigma),
prnd->Gaus(energyl * 1000., esigma),
prnd->Gaus(energyr * 1000., esigma),
prnd->Gaus(time_l[i].at(&energyl - energy_l[i].data()), tsigma),
prnd->Gaus(time_r[j].at(&energyr - energy_r[j].data()), tsigma));
}
Expand Down
2 changes: 1 addition & 1 deletion fi5/R3BFi5.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void R3BFi5::SetSpecialPhysicsCuts()
if (gGeoManager)
{
TGeoMedium* pSi = gGeoManager->GetMedium("silicon");
if (pSi)
if (pSi && 1 == 0)
{
// Setting processes for Si only
gMC->Gstpar(pSi->GetId(), "LOSS", 3);
Expand Down
2 changes: 1 addition & 1 deletion fi6/R3BFi6.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void R3BFi6::SetSpecialPhysicsCuts()
if (gGeoManager)
{
TGeoMedium* pSi = gGeoManager->GetMedium("silicon");
if (pSi)
if (pSi && 1 == 0)
{
// Setting processes for Si only
gMC->Gstpar(pSi->GetId(), "LOSS", 3);
Expand Down
6 changes: 4 additions & 2 deletions fiber/R3BBunchedFiberCal2Hit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,10 @@ void R3BBunchedFiberCal2Hit::Exec(Option_t* option)
auto tot_mapmt = mapmt_tot.tot_ns;
// s auto tot_spmt = spmt_tot.tot_ns;
Double_t t_mapmt = mapmt_tot.lead_ns;
// s Double_t t_spmt = spmt_tot.lead_ns;

Double_t t_mapmt1 = mapmt_tot.lead->GetTime_ns(); // MAPMT time without subtraction of trigger time

// s Double_t t_spmt = spmt_tot.lead_ns;
// only accept hits which are at the right time:
Bool_t simu = true;
if (!simu)
Expand Down Expand Up @@ -672,7 +674,7 @@ void R3BBunchedFiberCal2Hit::Exec(Option_t* option)
new ((*fHitItems)[fNofHitItems++])
// s R3BBunchedFiberHitData(0, x, y, eloss, t, fiber_id, t_mapmt, t_spmt,
// tot_mapmt, tot_spmt);
R3BBunchedFiberHitData(0, x, y, eloss, t, fiber_id, t_mapmt, 0., tot_mapmt, 0.);
R3BBunchedFiberHitData(0, x, y, eloss, t, fiber_id, t_mapmt1, 0., tot_mapmt, 0.);
// s }
// s }
}
Expand Down
2 changes: 1 addition & 1 deletion fiber/R3BBunchedFiberSPMTTrigMapped2Cal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void R3BBunchedFiberSPMTTrigMapped2Cal::Exec(Option_t* option)
auto fine_ns = par->GetTimeClockTDC(fine_raw);
LOG(DEBUG) << " R3BBunchedFiberSPMTTrigMapped2Cal::Exec: Fine raw=" << fine_raw << " -> ns=" << fine_ns << '.';

if (fine_ns < 0. || fine_ns >= 5)
if (fine_ns < 0. || fine_ns > 5)
{
LOG(ERROR) << "R3BBunchedFiberSPMTTrigMapped2Cal::Exec (" << fName << "): Channel=" << channel
<< ": Bad Tamex fine time (raw=" << fine_raw << ",ns=" << fine_ns << ").";
Expand Down
4 changes: 2 additions & 2 deletions gconfig/SetCuts.C
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void SetCuts()
gMC->SetProcess("MUNU",0); // Muon nuclear interactions
gMC->SetProcess("CKOV",0); // Cerenkov production
gMC->SetProcess("HADR",0); // Hadronic interactions
gMC->SetProcess("LOSS",1); // Energy loss (2=complete fluct.)
gMC->SetProcess("MULS",1); // Multiple scattering
gMC->SetProcess("LOSS",4); // Energy loss (2=complete fluct.)
gMC->SetProcess("MULS",0); // Multiple scattering
gMC->SetProcess("RAYL",0); // Rayleigh scattering
*/
cout << "[SetCuts]: Setting Cuts ..." << endl;
Expand Down
2 changes: 1 addition & 1 deletion gconfig/g4Config.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void Config()
}

auto runConfiguration =
new TG4RunConfiguration("geomRoot", physicsList, "stepLimiter+specialCuts" /*+specialControls"*/);
new TG4RunConfiguration("geomRoot", physicsList, "stepLimiter+specialCuts+specialControls");
auto geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);

auto stack = new R3BStack(1000);
Expand Down
4 changes: 2 additions & 2 deletions gconfig/g4config.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#/mcTracking/saveSecondaries true


#/mcPhysics/setSpecialCuts true
/mcPhysics/setSpecialCuts true
#/mcPhysics/rangeCuts 0.1 mm
/mcPhysics/rangeCutForElectron 0.1 mm
#/mcPhysics/rangeCutForElectron 0.1 mm
#/mcPhysics/printGeneralCuts true


Expand Down
1 change: 0 additions & 1 deletion pdc/R3BGeoPdcPar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
* or submit itself to any jurisdiction. *
******************************************************************************/


#include "R3BGeoPdcPar.h"

#include "FairParamList.h"
Expand Down
Loading

0 comments on commit c9eefd4

Please sign in to comment.