GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Creating a new Detector out of 2 or more detectors
Creating a new Detector out of 2 or more detectors [message #13129] Fri, 02 March 2012 19:53 Go to previous message
Raghav Kunnawalkam is currently offline  Raghav Kunnawalkam
Messages: 63
Registered: February 2012
Location: Stony Brook, New York
continuous participant
From: *physics.sunysb.edu
Hi All

My goal is to create the EIC detector and for it, i have individually created all the required detectors like (Hcal, Ecal, Tpc, etc..) and their geometries. and built them and got the respective libraries (libFairDircDet, etc..)
Now i am having the problem of linking them in the same macro.

My directory structure: ~/Fairroot/examples/ - has the following.
CMakeLists.txt HcalDet TrsDet geometry mcstack
DircDet HtckDet Tutorial1 geometry_eic passive
EmlfDet SitDet Tutorial2 geometry_old rutherford
FgtDet TpcDet gconfig geometry_v2 simpletracker

the macro that i am using is inside simpletracker/macros/run_simpletracker.C

I have also linked the libraries inside the cmakefile in simpletracker/src/CMakeLists.txt

...
set(INCLUDE_DIRECTORIES
${ROOT_INCLUDE_DIR}
#put here all directories where header files are located
${FAIRROOT_SOURCE_DIR}/fairtools
${FAIRROOT_SOURCE_DIR}/base
${FAIRROOT_SOURCE_DIR}/parbase
${FAIRROOT_SOURCE_DIR}/geobase
${FAIRROOT_SOURCE_DIR}/example/mcstack
${FAIRROOT_SOURCE_DIR}/example/simpletracker/src
${FAIRROOT_SOURCE_DIR}/example/DircDet/src
${FAIRROOT_SOURCE_DIR}/example/EmlfDet/src
${FAIRROOT_SOURCE_DIR}/example/FgtDet/src
${FAIRROOT_SOURCE_DIR}/example/HcalDet/src
${FAIRROOT_SOURCE_DIR}/example/HtckDet/src
${FAIRROOT_SOURCE_DIR}/example/SitDet/src
${FAIRROOT_SOURCE_DIR}/example/TpcDet/src
${FAIRROOT_SOURCE_DIR}/example/TrsDet/src
)

include_directories( ${INCLUDE_DIRECTORIES})
...

Even still inside my macro, when i do

FairDetector* Dirc = new FairDircDet("DIRC", kFALSE);
Dirc->SetGeometryFileName("dirc.geo");
run->AddModule(Dirc);

Root tells me that :

Error: Symbol FairDircDet is not defined in current scope run_simpletracker.C:118:
Error: type FairDircDet not defined FILE:/Users/raghav/fairroot/example/simpletracker/macros/./run_simpletra cker.C LINE:118

I cannot find a tutorial or a link on the website telling me how to link 2 detectors.

Any help will be greatly appreciated.
Thanks a lot
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Creating geometry for a new detector
Next Topic: FairMCPoint
Goto Forum:
  


Current Time: Tue Oct 26 08:34:26 CEST 2021

Total time taken to generate the page: 0.02142 seconds