diff --git a/macro/beamtime/cosy2019/cosy2019_process.C b/macro/beamtime/cosy2019/cosy2019_process.C index c2a8c82f284717481f6f916825cd7fe0f7779461..e75beb250c480d2970848e93af7b3537c34b5c14 100644 --- a/macro/beamtime/cosy2019/cosy2019_process.C +++ b/macro/beamtime/cosy2019/cosy2019_process.C @@ -8,13 +8,14 @@ // -------------------------------------------------------------------------- -void cosy2019_process() { - +void cosy2019_process() +{ + Int_t nTimeslices = -1; - TString inFile = "unp_cosy_0025.root"; - TString parFile = "unp_cosy_params_0025.root"; - TString outFile = "0025.rec.root"; - TString geoFile = "sts_hodo_v19a_cosy_geo.root"; + TString inFile = "unp_cosy_0025.root"; + TString parFile = "unp_cosy_params_0025.root"; + TString outFile = "0025.rec.root"; + TString geoFile = "sts_hodo_v19a_cosy_geo.root"; // --- Logger settings ---------------------------------------------------- @@ -78,62 +79,62 @@ void cosy2019_process() { CbmRecoSts* recoSts = new CbmRecoSts(); recoSts->SetTimeCutDigisAbs(20); // cluster finder: time cut in ns recoSts->SetTimeCutClustersAbs(20.); // hit finder: time cut in ns - + // ---- Here we define the sensor parameters since they are not available // ----- from the runtimeDb.(#hateRuntimeDb) - + // ---- Hodoscope "sensor" CbmStsParSensor hodoSensPar(CbmStsSensorClass::kDssdOrtho); - hodoSensPar.SetPar(0, 6.5); // extension in x - hodoSensPar.SetPar(1, 6.5); // extension in y - hodoSensPar.SetPar(2, 0.4); // extension in z - hodoSensPar.SetPar(3, 6.4); // active size in y - hodoSensPar.SetPar(4, 64); // number of strips front side - hodoSensPar.SetPar(5, 64); // number of strips back side - hodoSensPar.SetPar(6, 0.1); // strip pitch front side - hodoSensPar.SetPar(7, 0.1); // strip pitch back side - - // ---- STS sensor (DUT) + hodoSensPar.SetPar(0, 6.5); // extension in x + hodoSensPar.SetPar(1, 6.5); // extension in y + hodoSensPar.SetPar(2, 0.4); // extension in z + hodoSensPar.SetPar(3, 6.4); // active size in y + hodoSensPar.SetPar(4, 64); // number of strips front side + hodoSensPar.SetPar(5, 64); // number of strips back side + hodoSensPar.SetPar(6, 0.1); // strip pitch front side + hodoSensPar.SetPar(7, 0.1); // strip pitch back side + + // ---- STS sensor (DUT) CbmStsParSensor stsSensPar(CbmStsSensorClass::kDssdStereo); - stsSensPar.SetPar(0, 6.2092); // extension in x - stsSensPar.SetPar(1, 6.2000); // extension in y - stsSensPar.SetPar(2, 0.0300); // extension in z - stsSensPar.SetPar(3, 5.9600); // active size in y - stsSensPar.SetPar(4, 1024); // number of strips front side - stsSensPar.SetPar(5, 1024); // number of strips back side + stsSensPar.SetPar(0, 6.2092); // extension in x + stsSensPar.SetPar(1, 6.2000); // extension in y + stsSensPar.SetPar(2, 0.0300); // extension in z + stsSensPar.SetPar(3, 5.9600); // active size in y + stsSensPar.SetPar(4, 1024); // number of strips front side + stsSensPar.SetPar(5, 1024); // number of strips back side stsSensPar.SetPar(6, 0.0058); // strip pitch front side - stsSensPar.SetPar(7, 0.0058); // strip pitch back side - stsSensPar.SetPar(8, -7.5); // strip pitch front side - stsSensPar.SetPar(9, 0.0); // strip pitch back side - + stsSensPar.SetPar(7, 0.0058); // strip pitch back side + stsSensPar.SetPar(8, -7.5); // strip pitch front side + stsSensPar.SetPar(9, 0.0); // strip pitch back side + // --- Addresses for sensors // --- They are defined in each station as sensor 1, module 1, halfladderD (2), ladder 1 - Int_t hodo1Address = CbmStsAddress::GetAddress(0, 0, 1, 0, 0); // station 1 - Int_t stsAddress = CbmStsAddress::GetAddress(1, 0, 1, 0, 0); // station 2 - Int_t hodo2Address = CbmStsAddress::GetAddress(2, 0, 1, 0, 0); // station 3 + Int_t hodo1Address = CbmStsAddress::GetAddress(0, 0, 1, 0, 0); // station 1 + Int_t stsAddress = CbmStsAddress::GetAddress(1, 0, 1, 0, 0); // station 2 + Int_t hodo2Address = CbmStsAddress::GetAddress(2, 0, 1, 0, 0); // station 3 std::cout << "Hodo 1 address " << std::dec << hodo1Address << " " << std::hex << hodo1Address << std::endl; std::cout << "STS address " << std::dec << stsAddress << " " << std::hex << stsAddress << std::endl; std::cout << "Hodo 2 address " << std::dec << hodo2Address << " " << std::hex << hodo2Address << std::endl; // --- Now we can define the sensor parameter set and tell recoSts to use it - auto sensorParSet = new CbmStsParSetSensor("CbmStsParSetSensor", - "STS sensor parameters" "cosy2019"); + auto sensorParSet = new CbmStsParSetSensor("CbmStsParSetSensor", "STS sensor parameters" + "cosy2019"); sensorParSet->SetParSensor(hodo1Address, hodoSensPar); sensorParSet->SetParSensor(stsAddress, stsSensPar); sensorParSet->SetParSensor(hodo2Address, hodoSensPar); recoSts->UseSensorParSet(sensorParSet); - + // --- Next we define the module and ASIC parameters. The same can be used for all sensors. - CbmStsParAsic asicPar(32, 75000., 3000., 5., 800., 1000., 3.9789e-3); + CbmStsParAsic asicPar(32, 75000., 3000., 5., 800., 1000., 3.9789e-3); auto modulePar = new CbmStsParModule(2048, 128); modulePar->SetAllAsics(asicPar); recoSts->UseModulePar(modulePar); - + // --- We also need the sensor conditions, although they are of no relevance here // --- without magnetic field (they are used to determine the Lorentz shift). auto sensorCond = new CbmStsParSensorCond(70., 140., 268., 17.5, 1.); recoSts->UseSensorCond(sensorCond); - + run->AddTask(recoSts); std::cout << "-I- : Added task " << recoSts->GetName() << std::endl; // ------------------------------------------------------------------------