Skip to content
Snippets Groups Projects
Commit 904cb175 authored by Adrian A. Weber's avatar Adrian A. Weber Committed by Pierre-Alain Loizeau
Browse files

add a common event reconstruction macro, tested for run 2391, with the required files

parent 589afc83
No related branches found
No related tags found
1 merge request!880Changes from mCBM 2022 prod to mCBM macros and parameters
/* Copyright (C) 2022 UGiessen, Giessen
SPDX-License-Identifier: GPL-3.0-only
Authors: Florian Uhlig, Adrian Weber [committer]*/
#include <TFile.h>
#include <TGeoMatrix.h>
#include <map>
#include <string>
std::pair<std::string, TGeoHMatrix> AlignNode(std::string path, double shiftX, double shiftY, double shiftZ,
double rotX, double rotY, double rotZ)
{
TGeoHMatrix result;
result.SetDx(shiftX);
result.SetDy(shiftY);
result.SetDz(shiftZ);
result.RotateX(rotX);
result.RotateY(rotY);
result.RotateZ(rotZ);
std::cout << "Alignment matrix for node " << path << " is: " << std::endl;
result.Print();
std::cout << std::endl;
return std::pair<std::string, TGeoHMatrix>(path, result);
}
int create_alignment_2022_05_23_nickel()
{
// Define the basic structure which needs to be filled with information
// This structure is stored in the output file and later passed to the
// FairRoot framework to do the (miss)alignment
std::map<std::string, TGeoHMatrix> matrices;
// ---------------- STS ----------------------------//
// Align full STS
// matrices.insert(AlignNode("/cave_1/sts_v22c_mcbm_0", 0.275, -0.89, -.5, 0., 0., 0.));
// Align individual STS Units
// Station 1
// Unit 0
// matrices.insert(AlignNode("/cave_1/sts_v22c_mcbm_0/Station01_1/Ladder09_1", 0.0, 0.045, 0., 0., 0., 0.));
// Unit 1
// matrices.insert(AlignNode("/cave_1/sts_v22c_mcbm_0/Station01_1/Ladder09_2", -0.04, 0.06, 0., 0., 0., 0.));
// Station 2
// Unit 2
// matrices.insert(AlignNode("/cave_1/sts_v22c_mcbm_0/Station02_2/Ladder10_2", 0.0, -0.11, 0., 0., 0., 0.));
// ---------------- TOF ----------------------------//
// Align full Tof
// matrices.insert(AlignNode("/cave_1/tof_v21f_mcbm_0/tof_v21f_mcbmStand_1", 0.0, 0.0, 0.0, 0., 0.0, 0.));
matrices.insert(AlignNode("/cave_1/tof_v21h_mcbm_0/tof_v21h_mcbmStand_1/module_0_0", 0.0, 0.0, 0.0, 0., 0.0, 0.));
matrices.insert(AlignNode("/cave_1/tof_v21h_mcbm_0/tof_v21h_mcbmStand_1/module_0_1", 0.0, 0.0, 0.0, 0., 0.0, 0.));
matrices.insert(AlignNode("/cave_1/tof_v21h_mcbm_0/tof_v21h_mcbmStand_1/module_0_2", 0.0, -10.0, 0.0, 0., 0.0, 0.));
matrices.insert(AlignNode("/cave_1/tof_v21h_mcbm_0/tof_v21h_mcbmStand_1/module_0_3", 0.0, 0.0, 0.0, 0., 0.0, 0.));
matrices.insert(AlignNode("/cave_1/tof_v21h_mcbm_0/tof_v21h_mcbmStand_1/module_0_4", 0.0, 0.0, 0.0, 0., 0.0, 0.));
// --------------- RICH ----------------------------//
// Align full Rich
matrices.insert(AlignNode("/cave_1/rich_v21c_mcbm_0/box_1", 0.0, 0.0, 0.0, 0., 0.0, 0.));
// save matrices to disk
TFile* misalignmentMatrixRootfile = new TFile("AlignmentMatrices_mcbm_beam_2022_05_23_nickel.root", "RECREATE");
if (misalignmentMatrixRootfile->IsOpen()) {
gDirectory->WriteObject(&matrices, "MisalignMatrices");
misalignmentMatrixRootfile->Write();
misalignmentMatrixRootfile->Close();
}
return 0;
}
../../rich/mcbm/beamtime/icd_offset_it_0.data
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment