Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • le.koch/cbmroot
  • patrick.pfistner_AT_kit.edu/cbmroot
  • lena.rossel_AT_stud.uni-frankfurt.de/cbmroot
  • i.deppner/cbmroot
  • fweig/cbmroot
  • karpushkin_AT_inr.ru/cbmroot
  • v.akishina/cbmroot
  • rishat.sultanov_AT_cern.ch/cbmroot
  • l_fabe01_AT_uni-muenster.de/cbmroot
  • pwg-c2f/cbmroot
  • j.decuveland/cbmroot
  • a.toia/cbmroot
  • i.vassiliev/cbmroot
  • n.herrmann/cbmroot
  • o.lubynets/cbmroot
  • se.gorbunov/cbmroot
  • cornelius.riesen_AT_physik.uni-giessen.de/cbmroot
  • zhangqn17_AT_mails.tsinghua.edu.cn/cbmroot
  • bartosz.sobol/cbmroot
  • ajit.kumar/cbmroot
  • computing/cbmroot
  • a.agarwal_AT_vecc.gov.in/cbmroot
  • osingh/cbmroot
  • wielanek_AT_if.pw.edu.pl/cbmroot
  • malgorzata.karabowicz.stud_AT_pw.edu.pl/cbmroot
  • m.shiroya/cbmroot
  • s.roy/cbmroot
  • p.-a.loizeau/cbmroot
  • a.weber/cbmroot
  • ma.beyer/cbmroot
  • d.klein/cbmroot
  • d.smith/cbmroot
  • mvdsoft/cbmroot
  • d.spicker/cbmroot
  • y.h.leung/cbmroot
  • aksharma/cbmroot
  • m.deveaux/cbmroot
  • mkunold/cbmroot
  • h.darwish/cbmroot
  • pk.sharma_AT_vecc.gov.in/cbmroot
  • f_fido01_AT_uni-muenster.de/cbmroot
  • g.kozlov/cbmroot
  • d.emschermann/cbmroot
  • evgeny.lavrik/cbmroot
  • v.friese/cbmroot
  • f.uhlig/cbmroot
  • ebechtel_AT_ikf.uni-frankfurt.de/cbmroot
  • a.senger/cbmroot
  • praisig/cbmroot
  • s.lebedev/cbmroot
  • redelbach_AT_compeng.uni-frankfurt.de/cbmroot
  • p.subramani/cbmroot
  • a_meye37_AT_uni-muenster.de/cbmroot
  • om/cbmroot
  • o.golosov/cbmroot
  • l.chlad/cbmroot
  • a.bercuci/cbmroot
  • d.ramirez/cbmroot
  • v.singhal/cbmroot
  • h.schiller/cbmroot
  • apuntke/cbmroot
  • f.zorn/cbmroot
  • rubio_AT_physi.uni-heidelberg.de/cbmroot
  • p.chudoba/cbmroot
  • apuntke/mcbmroot
  • r.karabowicz/cbmroot
66 results
Show changes
Commits on Source (2)
......@@ -498,6 +498,8 @@ if(NOT CBMROOT_MINIMAL)
"${CMAKE_INSTALL_PREFIX}/include/mvd"
"${CMAKE_INSTALL_PREFIX}/include/littrack"
"${CMAKE_INSTALL_PREFIX}/include/KF"
"${CMAKE_INSTALL_PREFIX}/include/AnalysisTree"
"${CMAKE_INSTALL_PREFIX}/include/AnalysisTreeQA"
)
set(CMAKE_INSTALL_LIBDIR lib)
SET(VMCWORKDIR ${CMAKE_INSTALL_PREFIX}/share/cbmroot)
......
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index ab4c300..765e1db 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -16,7 +16,28 @@ string(REPLACE ".cpp" ".hpp" HEADERS "${SOURCES}")
list(APPEND HEADERS "Constants.hpp" "Detector.hpp")
add_library(AnalysisTreeBase SHARED ${SOURCES} G__AnalysisTreeBase.cxx)
-ROOT_GENERATE_DICTIONARY(G__AnalysisTreeBase ${HEADERS} LINKDEF AnalysisTreeCoreLinkDef.h)
+
+if(${ROOT_VERSION} VERSION_GREATER 6.18.0)
+ message(STATUS "ROOT ${ROOT_VERSION}, use the standard ROOT_GENERATE_DICTIONARY macro.")
+ ROOT_GENERATE_DICTIONARY(G__AnalysisTreeBase ${HEADERS} LINKDEF AnalysisTreeCoreLinkDef.h)
+else()
+ message(STATUS "ROOT ${ROOT_VERSION} has a broken ROOT_GENERATE_DICTIONARY macro, so build the dictionary ourself.")
+ set(dictionary_includes ${HEADERS})
+ set(dictionary_linkdef "AnalysisTreeCoreLinkDef.h")
+ set(dictionary_source "G__AnalysisTreeBase.cxx")
+
+ add_custom_command(OUTPUT ${dictionary_source}
+ COMMAND ${ROOT_rootcling_CMD} -f ${dictionary_source}
+ -rml libAnalysisTreeBase
+ -rmf libAnalysisTreeBase.rootmap
+ -s libAnalysisTreeBase
+ -inlineInputHeader
+ -I${CMAKE_CURRENT_SOURCE_DIR} ${dictionary_includes}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${dictionary_linkdef}
+ DEPENDS ${dictionary_includes} ${dictionary_linkdef}
+ )
+endif()
+
target_link_libraries(AnalysisTreeBase ${ROOT_LIBRARIES} EG)
add_custom_command(TARGET AnalysisTreeBase PRE_BUILD
diff --git a/core/Constants.hpp b/core/Constants.hpp
index ed7b9c6..f9cbcc3 100644
--- a/core/Constants.hpp
+++ b/core/Constants.hpp
@@ -109,4 +109,4 @@ enum EventHeaderFields : ShortInt_t {
}// namespace AnalysisTree
-#endif
\ No newline at end of file
+#endif
diff --git a/core/Module.hpp b/core/Module.hpp
index 9c523aa..c54d17e 100644
--- a/core/Module.hpp
+++ b/core/Module.hpp
@@ -93,4 +93,4 @@ class ModulePosition : public IndexedObject {
};
}// namespace AnalysisTree
-#endif
\ No newline at end of file
+#endif
diff --git a/infra/CMakeLists.txt b/infra/CMakeLists.txt
index ed7bd9b..a63a7b1 100644
--- a/infra/CMakeLists.txt
+++ b/infra/CMakeLists.txt
@@ -30,12 +30,34 @@ add_library(AnalysisTreeInfra SHARED ${SOURCES} G__AnalysisTreeInfra.cxx)
target_compile_definitions(AnalysisTreeInfra PUBLIC
$<$<BOOL:${Boost_FOUND}>:ANALYSISTREE_BOOST_FOUND>)
-ROOT_GENERATE_DICTIONARY(G__AnalysisTreeInfra ${HEADERS}
- LINKDEF AnalysisTreeInfraLinkDef.h
- OPTIONS
- -I${CMAKE_BINARY_DIR}/include
- $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
- )
+if(${ROOT_VERSION} VERSION_GREATER 6.18.0)
+ message(STATUS "ROOT ${ROOT_VERSION}, use the standard ROOT_GENERATE_DICTIONARY macro.")
+ ROOT_GENERATE_DICTIONARY(G__AnalysisTreeInfra ${HEADERS}
+ LINKDEF AnalysisTreeInfraLinkDef.h
+ OPTIONS
+ -I${CMAKE_BINARY_DIR}/include
+ $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
+ )
+else()
+ message(STATUS "ROOT ${ROOT_VERSION} has a broken ROOT_GENERATE_DICTIONARY macro, so build the dictionary ourself.")
+ set(dictionary_includes ${HEADERS})
+ set(dictionary_linkdef "AnalysisTreeInfraLinkDef.h")
+ set(dictionary_source "G__AnalysisTreeInfra.cxx")
+
+ add_custom_command(OUTPUT ${dictionary_source}
+ COMMAND ${ROOT_rootcling_CMD} -f ${dictionary_source}
+ -rml libAnalysisTreeInfra
+ -rmf libAnalysisTreeInfra.rootmap
+ -s libAnalysisTreeInfra
+ -inlineInputHeader
+ -I${CMAKE_CURRENT_SOURCE_DIR} ${dictionary_includes}
+ -I${CMAKE_BINARY_DIR}/include
+ -I${CMAKE_BINARY_DIR}/include/AnalysisTree
+ $<$<BOOL:${Boost_FOUND}>:-DANALYSISTREE_BOOST_FOUND>
+ ${CMAKE_CURRENT_SOURCE_DIR}/${dictionary_linkdef}
+ DEPENDS ${dictionary_includes} ${dictionary_linkdef}
+ )
+endif()
target_link_libraries(AnalysisTreeInfra
PUBLIC
${ROOT_LIBRARIES}
diff --git a/infra/SimpleCut.hpp b/infra/SimpleCut.hpp
index 4ec5458..21fe68c 100644
--- a/infra/SimpleCut.hpp
+++ b/infra/SimpleCut.hpp
@@ -116,4 +116,4 @@ SimpleCut RangeCut(const std::string& variable_name, float lo, float hi, const s
SimpleCut EqualsCut(const std::string& variable_name, int value, const std::string& title = "");
}// namespace AnalysisTree
-#endif//ANALYSISTREE_SIMPLECUT_H
\ No newline at end of file
+#endif//ANALYSISTREE_SIMPLECUT_H
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ee90134..0861bc8 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,11 +20,35 @@ endif ()
#add_dependencies(AnalysisTreeQA ${PROJECT_DEPENDENCIES})
-ROOT_GENERATE_DICTIONARY(G__AnalysisTreeQA
- ${HEADERS}
- LINKDEF AnalysisTreeQALinkDef.h
- OPTIONS -I${CMAKE_BINARY_DIR}/include
- )
+if(${ROOT_VERSION} VERSION_GREATER 6.18.0)
+ message(STATUS "ROOT ${ROOT_VERSION}, use the standard ROOT_GENERATE_DICTIONARY macro.")
+ ROOT_GENERATE_DICTIONARY(G__AnalysisTreeQA
+ ${HEADERS}
+ LINKDEF AnalysisTreeQALinkDef.h
+ OPTIONS -I${CMAKE_BINARY_DIR}/include
+ )
+else()
+ message(STATUS "ROOT ${ROOT_VERSION} has a broken ROOT_GENERATE_DICTIONARY macro, so build the dictionary ourself.")
+ set(dictionary_includes ${HEADERS})
+ set(dictionary_linkdef "AnalysisTreeQALinkDef.h")
+ set(dictionary_source "G__AnalysisTreeQA.cxx")
+
+ add_custom_command(OUTPUT ${dictionary_source}
+ COMMAND ${ROOT_rootcling_CMD} -f ${dictionary_source}
+ -rml libAnalysisTreeQA
+ -rmf libAnalysisTreeQA.rootmap
+ -s libAnalysisTreeQA
+ -inlineInputHeader
+ -I${AnalysisTree_INCLUDE_DIR}
+ -I${CMAKE_CURRENT_SOURCE_DIR}
+ ${dictionary_includes}
+ ${CMAKE_CURRENT_SOURCE_DIR}/${dictionary_linkdef}
+ DEPENDS ${dictionary_includes} ${dictionary_linkdef}
+ )
+endif()
+
+
+
target_link_libraries(AnalysisTreeQA
PUBLIC
AnalysisTreeBase
......@@ -10,6 +10,7 @@ download_project_if_needed(PROJECT AnalysisTree_source
GIT_TAG ${ANALYSISTREE_VERSION}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/AnalysisTree
TEST_FILE CMakeLists.txt
PATCH_COMMAND "patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/AnalysisTree.patch"
)
If(ProjectUpdated)
......
......@@ -9,6 +9,7 @@ download_project_if_needed(PROJECT AnalysisTreeQA_source
GIT_TAG ${ANALYSISTREEQA_VERSION}
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/AnalysisTreeQA
TEST_FILE CMakeLists.txt
PATCH_COMMAND "patch -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/AnalysisTreeQA.patch"
)
If(ProjectUpdated)
......
......@@ -34,21 +34,92 @@ TGeoVolume* ConstructIdealPsd(const char* name, Double_t sizeX, Double_t sizeY,
// ====== Main function =====
// ============================================================================
void create_psdgeo_ideal()
void create_psdgeo_ideal(TString geoTag = "v22a")
{
// ----- Steering variables ---------------------------------------------
const Double_t psdX = 9.65; // x position of PSD in cave (front plane center)
const Double_t psdY = 0.; // y position of PSD in cave (front plane center)
const Double_t psdZ = 800.; // z position of PSD in cave (front plane center)
const Double_t psdRotY = 0.01321; // Rotation of PSD around y axis [rad]
const Double_t holeSize = 20.; // diagonal size of the square shaped hole
// ----- Steering variables ---------------------------------------------
Double_t psdX; // x position (cm) of PSD in cave (front plane center)
Double_t psdY; // y position (cm) of PSD in cave (front plane center)
Double_t psdZ; // z position (cm) of PSD in cave (front plane center)
Double_t psdRotY; // Rotation of PSD around y axis (rad)
Double_t holeSize; // side length of the square shaped hole (cm)
TString comment; // short description
if (geoTag == "v22a") {
psdX = 13.1;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.01335;
holeSize = 0.;
comment = "Position for Au beam at 12A GeV/c and 100% magnetic field strength";
}
else if (geoTag == "v22b") {
psdX = 28.56;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.02906;
holeSize = 0.;
comment = "Position for Au beam at 3.3A GeV/c and 60% magnetic field strength (to fit beam dump)";
}
else if (geoTag == "v20c") {
psdX = 12.95;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.0132;
holeSize = 20.;
}
else if (geoTag == "v20a") {
psdX = 12.95;
psdY = 0.;
psdZ = 1050;
psdRotY = 0.0132;
holeSize = 20.;
}
else if (geoTag == "v20b") {
psdX = 13.75;
psdY = 0.;
psdZ = 1100;
psdRotY = 0.0132;
holeSize = 20.;
}
else if (geoTag == "v18e") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 20.;
}
else if (geoTag == "v18f") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 6.;
}
else if (geoTag == "v18g") {
psdX = 9.65;
psdY = 0.;
psdZ = 800.;
psdRotY = 0.01321;
holeSize = 0.;
}
else if (geoTag == "v18m") {
psdX = 8.9;
psdY = 0.;
psdZ = 1500.;
psdRotY = 0.01321;
holeSize = 20.;
}
else {
cout << "\n\n\nERROR: Unrecognized geoTag! Exiting!\n\n\n";
return;
}
geoTag += "_ideal";
const Double_t bigModuleSize = 20.; // Module size [cm]
const Int_t nModulesX = 8; // Number of modules in a row (x direction)
const Int_t nModulesY = 6; // Number of modules in a row (x direction)
TString geoTag = Form("1mod_hole%icm_xshift%4.2fcm", (int) holeSize, psdX); // Geometry tag
// --------------------------------------------------------------------------
cout << "Number of modules per row and column = " << nModulesX << " " << nModulesY << endl;
......@@ -57,15 +128,16 @@ void create_psdgeo_ideal()
infoFileName = infoFileName + geoTag + ".geo.info";
fstream infoFile;
infoFile.open(infoFileName.Data(), fstream::out);
infoFile << "PSD geometry " << geoTag << " created with create_psdgeo_with_hole.C" << endl << endl;
infoFile << "PSD geometry " << geoTag << " created with create_psdgeo_ideal.C" << endl << endl;
infoFile << "Ideal PSD geometry for performance studies - whole volume as a "
"single module"
<< endl;
infoFile << comment << endl << endl;
infoFile << "Number of modules: " << nModulesX << " x " << nModulesY << endl;
infoFile << "Big module size: " << bigModuleSize << " cm x " << bigModuleSize << " cm" << endl;
infoFile << "PSD front plane center coordinates: (" << psdX << ", " << psdY << ", " << psdZ << ") cm" << endl;
infoFile << "PSD rotation around y axis: " << psdRotY * TMath::RadToDeg() << " degrees" << endl;
infoFile << "Diagonal size of the square shaped hole in PSD center: " << holeSize << " cm" << endl << endl;
infoFile << "Side length of the square shaped hole in PSD center: " << holeSize << " cm" << endl << endl;
// --------------------------------------------------------------------------
......
......@@ -37,9 +37,8 @@ TGeoVolume* ConstructShield(const char* name, Double_t sizeXY, Double_t holesize
// ====== Main function =====
// ============================================================================
void create_psdgeo_with_hole()
void create_psdgeo_with_hole(TString geoTag = "v22a")
{
TString geoTag = "v20c"; // Geometry tag
// ----- Steering variables ---------------------------------------------
Double_t psdX; // x position (cm) of PSD in cave (front plane center)
......@@ -47,8 +46,25 @@ void create_psdgeo_with_hole()
Double_t psdZ; // z position (cm) of PSD in cave (front plane center)
Double_t psdRotY; // Rotation of PSD around y axis (rad)
Double_t holeSize; // side length of the square shaped hole (cm)
TString comment; // short description
if (geoTag == "v20c") {
if (geoTag == "v22a") {
psdX = 13.1;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.01335;
holeSize = 20.;
comment = "Position for Au beam at 12A GeV/c and 100% magnetic field strength";
}
else if (geoTag == "v22b") {
psdX = 28.56;
psdY = 0.;
psdZ = 1010;
psdRotY = 0.02906;
holeSize = 20.;
comment = "Position for Au beam at 3.3A GeV/c and 60% magnetic field strength (to fit beam dump)";
}
else if (geoTag == "v20c") {
psdX = 12.95;
psdY = 0.;
psdZ = 1010;
......@@ -125,6 +141,7 @@ void create_psdgeo_with_hole()
fstream infoFile;
infoFile.open(infoFileName.Data(), fstream::out);
infoFile << "PSD geometry " << geoTag << " created with create_psdgeo_with_hole.C" << endl << endl;
infoFile << comment << endl << endl;
infoFile << "Number of modules: " << nModulesX << " x " << nModulesY << endl;
infoFile << "Big module size: " << bigModuleSize << " cm x " << bigModuleSize << " cm" << endl;
infoFile << "PSD front plane center coordinates: (" << psdX << ", " << psdY << ", " << psdZ << ") cm" << endl;
......