Skip to content

Commit

Permalink
small changes for s454 in analysis and simulations
Browse files Browse the repository at this point in the history
added Fi1a and Fi1b, made changes for new clock-TDC firmware

small changes

added sampler reader

added sampler reader and second los detector

added Sci2, modified sci8, added second LOS for dec2019 beam time, applied modifications for dec2019 beam time, modified fiber hit data according to R3BHit, modified GlobalAnalysis for s454

copied current version of LosReader from A. Kelic

copied current version of TofdCal2Hit from L. Bott

Hans added Rene's Fortran tracker

modified TofdCal2Hit

Added digitizer for Fiber detectors Fi3a, Fi3b, Fi10, Fi11, Fi12, Fi13

changed ditizers of Fi3a, Fi3b, Fi10, Fi11, Fi12, and improved Global Analysis making Rene's Tracker work.

Changes for GlobalAnalysis with Rene's tracker

applying clang-format

TofdDigitizer added.

put back old SetCuts.c
  • Loading branch information
michael-heil committed Jan 8, 2020
1 parent c62cdbd commit c6c9d3c
Show file tree
Hide file tree
Showing 172 changed files with 20,694 additions and 1,765 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
cmake_minimum_required(VERSION 3.11.0 FATAL_ERROR)

# Set name of our project to "R3BROOT". Has to be done after check of cmake version
project(R3BROOT)
project(R3BROOT C CXX Fortran)

if(NOT EXISTS "${PROJECT_SOURCE_DIR}/macros")
message(FATAL_ERROR
Expand Down Expand Up @@ -285,6 +285,7 @@ if(NOT MODULE)
add_subdirectory(neuland)
add_subdirectory(los)
add_subdirectory(rolu)
add_subdirectory(sci2)
add_subdirectory(sci8)
add_subdirectory(mtof)
add_subdirectory(dtof)
Expand All @@ -305,6 +306,7 @@ if(NOT MODULE)
add_subdirectory(compilehelper)
add_subdirectory(tcal)
add_subdirectory(tracking)
add_subdirectory(tracker_rene)
if(GARFIELD_FOUND)
add_subdirectory(actar)
set(LD_LIBRARY_PATH ${GARFIELD_LIBRARY_DIR} ${LD_LIBRARY_PATH})
Expand Down
37 changes: 18 additions & 19 deletions dtof/R3BdTofDigitizer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ void R3BdTofDigitizer::Exec(Option_t* opt)

Reset();

// detector parameter
Int_t number_layers = 2;
Int_t number_paddles = 10; // per layer

Float_t detector_width = 13.500000;
Float_t detector_thickness = 0.500000;
Float_t paddle_width = 1.350000;
Float_t paddle_thickness = 0.250000;

//
vector<R3BdTofPoint*> vPoints[1000];
Int_t n_entries = fdTofPoints->GetEntries();
Expand All @@ -121,7 +112,7 @@ void R3BdTofDigitizer::Exec(Option_t* opt)
Double_t energy_loss = data_element->GetEnergyLoss();

// discard all hits with an energy loss < cut
if (energy_loss < 1.)
if (energy_loss < 0.01)
continue;

// add hits to vector
Expand All @@ -146,38 +137,46 @@ void R3BdTofDigitizer::Exec(Option_t* opt)
{

// energy threshold
if (vPoints[channel].at(point)->GetEnergyLoss() < 1.)
if (vPoints[channel].at(point)->GetEnergyLoss() < 0.01)
continue;
fHist1->Fill(vPoints[channel].at(point)->GetEnergyLoss());

if (0 == point || (vPoints[channel].at(point)->GetTime() - MapOfHits[channel]->GetTime()) > 30)
{ // add new hits

int layer_label;
int paddle_number;
if (channel < number_paddles)
if (channel < 200)
{
layer_label = 0;
// paddle_number = channel - 101;
paddle_number = channel;
}
else
else if (channel < 300)
{
layer_label = 1;
paddle_number = channel - number_paddles * layer_label;
// paddle_number = channel - 201;
paddle_number = channel - 100;
}

X_Pos[channel] =
-detector_width + paddle_width * (1 + layer_label) + paddle_number * (paddle_width * 2 + 0.05);
Y_Pos[channel] = vPoints[channel].at(point)->GetYIn() - 0.523976; // get y-position //local
X_Pos[channel] = -detector_width / 2. + paddle_width / 2. * (1 + layer_label) +
paddle_number * paddle_width + paddle_number * air_gap_paddles;
// X_Pos[channel] =
// -detector_width + paddle_width * (1 + layer_label) + paddle_number *
// (paddle_width * 2 + 0.05);
Y_Pos[channel] = vPoints[channel].at(point)->GetYIn(); // get y-position //local
Time[channel] = vPoints[channel].at(point)->GetTime();
Energy_Loss[channel] = vPoints[channel].at(point)->GetEnergyLoss();

// add to HitData and introduce smearing of y-position, time and energy loss
cout << "Hit Tofd: ch = " << channel << " paddle = " << paddle_number << " x = " << X_Pos[channel]
<< " y = " << Y_Pos[channel] << " t = " << Time[channel] << " eloss = " << Energy_Loss[channel]
<< endl;

MapOfHits.insert(pair<Int_t, R3BTofdHitData*>(
channel,
new R3BTofdHitData(0.,
fRnd->Uniform((X_Pos[channel] - 1.35), (X_Pos[channel] + 1.35)),
// fRnd->Uniform((X_Pos[channel] - 1.35), (X_Pos[channel] + 1.35)),
X_Pos[channel],
fRnd->Gaus(Y_Pos[channel], fsigma_y),
0.,
fRnd->Gaus(Time[channel], fsigma_t),
Expand Down
15 changes: 13 additions & 2 deletions dtof/R3BdTofDigitizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

// dTofDigitzer 07 aug 2017 created by Alicia Wongel

#ifndef R3BDTOFDDIGITISER_H
#define R3BDTOFDDIGITISER_H 1
#ifndef R3BDTOFDIGITIZER_H
#define R3BDTOFDIGITIZER_H 1

#include "FairTask.h"
#include "R3BTofdHitData.h"
Expand Down Expand Up @@ -63,6 +63,17 @@ class R3BdTofDigitizer : public FairTask
Float_t fsigma_t;
Float_t fsigma_ELoss;

// detector parameter
Int_t number_layers = 2;
Int_t number_paddles = 44; // per layer
Float_t paddle_width = 2.70000;
Float_t paddle_thickness = 0.50000;
Float_t air_gap_paddles = 0.04;
Float_t air_gap_layer = 5.;

Float_t detector_width = number_paddles*paddle_width+(number_paddles-1)*air_gap_paddles+paddle_width;
Float_t detector_thickness = (number_layers-1)*air_gap_layer+number_layers*paddle_thickness;

ClassDef(R3BdTofDigitizer, 1);
};

Expand Down
2 changes: 1 addition & 1 deletion fi0/R3BFi0Cal2Hit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "R3BFi0Cal2Hit.h"

R3BFi0Cal2Hit::R3BFi0Cal2Hit(Bool_t a_is_calibrator, Int_t a_verbose)
: R3BBunchedFiberCal2Hit("Fi0", a_verbose, VERTICAL, 1, 256, 0, a_is_calibrator)
: R3BBunchedFiberCal2Hit("Fi0", a_verbose, R3BTCalEngine::CTDC_8_12_FWD_250, VERTICAL, 1, 256, 0, a_is_calibrator)
{
}

Expand Down
4 changes: 2 additions & 2 deletions fi0/R3BFi0Mapped2Cal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#include "R3BFi0Mapped2Cal.h"

R3BFi0Mapped2Cal::R3BFi0Mapped2Cal(Int_t a_verbose)
: R3BBunchedFiberMapped2Cal("Fi0", a_verbose)
R3BFi0Mapped2Cal::R3BFi0Mapped2Cal(Int_t a_verbose, enum R3BTCalEngine::CTDCVariant a_variant)
: R3BBunchedFiberMapped2Cal("Fi0", a_verbose, R3BTCalEngine::CTDC_8_12_FWD_250)
{
}

Expand Down
2 changes: 1 addition & 1 deletion fi0/R3BFi0Mapped2Cal.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class R3BFi0Mapped2Cal : public R3BBunchedFiberMapped2Cal
{
public:
R3BFi0Mapped2Cal(Int_t = 1);
R3BFi0Mapped2Cal(Int_t, enum R3BTCalEngine::CTDCVariant);
virtual ~R3BFi0Mapped2Cal();

ClassDef(R3BFi0Mapped2Cal, 1)
Expand Down
1 change: 1 addition & 0 deletions fi10/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ R3BFi10.cxx
R3BFi10Cal2Hit.cxx
R3BFi10Mapped2Cal.cxx
R3BFi10ContFact.cxx
R3BFi10Digitizer.cxx
)

CHANGE_FILE_EXTENSION(*.cxx *.h HEADERS "${SRCS}")
Expand Down
3 changes: 2 additions & 1 deletion fi10/Fi10LinkDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#pragma link C++ class R3BFi10+;
#pragma link C++ class R3BFi10Cal2Hit+;
#pragma link C++ class R3BFi10Mapped2Cal+;
#pragma link C++ class R3BFi10ContFact;
#pragma link C++ class R3BFi10ContFact+;
#pragma link C++ class R3BFi10Digitizer+;

#endif
2 changes: 1 addition & 1 deletion fi10/R3BFi10.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void R3BFi10::Initialize()
FairDetector::Initialize();

LOG(INFO) << "R3BFi10: initialisation";
LOG(DEBUG) << "R3BFi10: Vol. (McId) " << gMC->VolId("FI101Log");
LOG(DEBUG) << "R3BFi10: Vol. (McId) " << gMC->VolId("FI10Log");
}

void R3BFi10::SetSpecialPhysicsCuts()
Expand Down
4 changes: 2 additions & 2 deletions fi10/R3BFi10Cal2Hit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

#include "R3BFi10Cal2Hit.h"

R3BFi10Cal2Hit::R3BFi10Cal2Hit(Bool_t a_is_calibrator, Int_t a_verbose)
: R3BBunchedFiberCal2Hit("Fi10", a_verbose, VERTICAL, 2, 256, 2, a_is_calibrator)
R3BFi10Cal2Hit::R3BFi10Cal2Hit(enum R3BTCalEngine::CTDCVariant a_variant, Bool_t a_is_calibrator, Int_t a_verbose)
: R3BBunchedFiberCal2Hit("Fi10", a_verbose, a_variant, VERTICAL, 2, 256, 2, a_is_calibrator)
{
}

Expand Down
2 changes: 1 addition & 1 deletion fi10/R3BFi10Cal2Hit.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class R3BFi10Cal2Hit : public R3BBunchedFiberCal2Hit
{
public:
R3BFi10Cal2Hit(Bool_t, Int_t = 1);
R3BFi10Cal2Hit(enum R3BTCalEngine::CTDCVariant, Bool_t, Int_t = 1);
virtual ~R3BFi10Cal2Hit();
UInt_t FixMistake(UInt_t);

Expand Down
Loading

0 comments on commit c6c9d3c

Please sign in to comment.