hits){
8 |
9 | _hits = hits;
10 |
11 | _state.push_back(0);
12 |
13 | _children.clear();
14 | _parents.clear();
15 |
16 | _active = true;
17 |
18 | _layer=0;
19 | }
20 |
21 |
22 |
23 | Segment::Segment( IHit* hit){
24 |
25 | _hits.push_back( hit) ;
26 | _state.push_back(0);
27 | _children.clear();
28 | _parents.clear();
29 |
30 | _active = true;
31 |
32 | _layer=0;
33 | }
34 |
35 |
36 |
37 | void Segment::resetState(){
38 |
39 |
40 | for ( unsigned i = 0; i <_state.size(); i++){
41 |
42 | _state[i] = 0;
43 |
44 | }
45 |
46 | }
47 |
48 | std::string Segment::getInfo(){
49 |
50 |
51 | std::stringstream info;
52 |
53 | for( unsigned i=0; i<_hits.size(); i++ ) info << _hits[i]->getPositionInfo();
54 |
55 | info << "[";
56 | for( unsigned i=0; i+1<_state.size(); i++ ) info << _state[i] << ",";
57 | info << _state.back() << "]";
58 |
59 | return info.str();
60 |
61 |
62 | }
63 |
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/Utilities/KiTrack/src/Tools/KiTrackMarlinCEDTools.h:
--------------------------------------------------------------------------------
1 | #ifndef KiTrackMarlinCEDTools_h
2 | #define KiTrackMarlinCEDTools_h
3 |
4 | #include "KiTrack/Automaton.h"
5 | #include "KiTrack/ITrack.h"
6 |
7 | using namespace KiTrack;
8 |
9 | namespace KiTrackMarlin{
10 |
11 |
12 |
13 | /**
14 | * Draws the segments of an automaton.
15 | * Segments will be colored according to their state.
16 | * Also the higher the state, the thicker the line.
17 | */
18 | void drawAutomatonSegments( const Automaton& automaton );
19 |
20 | /**
21 | * Draws a track by making straight lines between the hits
22 | */
23 | void drawTrack( ITrack* track, int color = 0x00ff00 );
24 |
25 | /** Draw a track in a random color, but not too bright */
26 | void drawTrackRandColor( ITrack* track );
27 |
28 | }
29 |
30 | #endif
31 |
32 |
--------------------------------------------------------------------------------
/Utilities/KiTrack/src/Tools/Timer.h:
--------------------------------------------------------------------------------
1 | #ifndef dataharvester_Timer_H_
2 | #define dataharvester_Timer_H_
3 |
4 | namespace KiTrackMarlin {
5 | class Timer {
6 | public:
7 | /**
8 | * A fast, precise timer
9 | * Works on linux only
10 | *
11 | * Author: Wolfgang Waltenberger
12 | */
13 | static void start_counter();
14 |
15 | /// Return what the harvester thinks is the CPU frequency.
16 | static double cpuMHz();
17 | static double lap(); //< lapsed time, in seconds.
18 | static double ticks(); //< lapsed time, in clock ticks.
19 | };
20 | }
21 |
22 | #endif // dataharvester_Timer_H_
23 |
--------------------------------------------------------------------------------
/cmake/CEPCSWConfig.cmake:
--------------------------------------------------------------------------------
1 | include(CMakeFindDependencyMacro)
2 | find_dependency(podio REQUIRED)
3 | find_dependency(Gaudi REQUIRED)
4 | find_dependency(k4FWCore REQUIRED)
5 | find_dependency(EDM4HEP REQUIRED)
6 | find_dependency(ROOT REQUIRED)
7 |
8 | # - Include the targets file to create the imported targets that a client can
9 | # link to (libraries) or execute (programs)
10 | include("${CMAKE_CURRENT_LIST_DIR}/CEPCSWTargets.cmake")
11 |
12 | get_property(TEST_CEPCSW_LIBRARY TARGET CEPCSW::GeomSvc PROPERTY LOCATION)
13 | find_package_handle_standard_args(CEPCSW DEFAULT_MSG CMAKE_CURRENT_LIST_FILE TEST_CEPCSW_LIBRARY)
14 |
--------------------------------------------------------------------------------
/cmake/CEPCSWDependencies.cmake:
--------------------------------------------------------------------------------
1 | #[[
2 |
3 | Find all the dependencies here, so in each package user don't need to find the packages again.
4 |
5 | - CLHEP
6 | - DD4hep
7 | - EDM4hep
8 | - Garfiel++/Garfieldpp
9 | - Gaudi
10 | - Geant4
11 | - GEAR
12 | - GSL
13 | - HepMC
14 | - k4FWCore
15 | - LCContent
16 | - LCIO
17 | - PandoraSDK
18 | - podio
19 | - ROOT
20 | #]]
21 |
22 | find_package(CLHEP REQUIRED;CONFIG)
23 | find_package(DD4hep COMPONENTS DDCore DDG4 DDParsers DDRec REQUIRED)
24 | find_package(EDM4HEP REQUIRED)
25 | #find_package(Garfield REQUIRED)
26 | find_package(Garfield)
27 | find_package(Geant4 REQUIRED ui_all vis_all)
28 | find_package(GEAR REQUIRED)
29 | find_package(GSL REQUIRED)
30 | find_package(HepMC)
31 | find_package(k4FWCore REQUIRED)
32 | find_package(LCContent REQUIRED)
33 | find_package(LCIO REQUIRED)
34 | find_package(PandoraSDK REQUIRED)
35 | find_package(podio REQUIRED)
36 | find_package(ROOT COMPONENTS EG Graf Graf3d Gpad MathCore Net RIO Tree TreePlayer REQUIRED)
37 | find_package(GenFit)
38 |
--------------------------------------------------------------------------------
/cmake/CEPCSWEnv.cmake:
--------------------------------------------------------------------------------
1 | # This variable will be used by GaudiToolbox.cmake to generate the cepcswenv.sh
2 |
3 | set(RUN_SCRIPT_EXTRA_COMMANDS "${RUN_SCRIPT_EXTRA_COMMANDS}
4 | export CEPCSW_ROOT=${CMAKE_SOURCE_DIR}
5 |
6 | export DETCEPCV4ROOT=${CMAKE_SOURCE_DIR}/Detector/DetCEPCv4
7 | export DETCRDROOT=${CMAKE_SOURCE_DIR}/Detector/DetCRD
8 | export DETDRIFTCHAMBERROOT=${CMAKE_SOURCE_DIR}/Detector/DetDriftChamber
9 | ")
10 |
--------------------------------------------------------------------------------
/cmake/FindOnnxRuntime.cmake:
--------------------------------------------------------------------------------
1 | # Find the ONNX Runtime include directory and library.
2 | #
3 | # This module defines the `onnxruntime` imported target that encodes all
4 | # necessary information in its target properties.
5 |
6 | find_library(
7 | OnnxRuntime_LIBRARY
8 | NAMES onnxruntime
9 | PATH_SUFFIXES lib lib32 lib64
10 | DOC "The ONNXRuntime library")
11 |
12 | if(NOT OnnxRuntime_LIBRARY)
13 | message(FATAL_ERROR "onnxruntime library not found")
14 | endif()
15 |
16 | find_path(
17 | OnnxRuntime_INCLUDE_DIR
18 | NAMES core/session/onnxruntime_cxx_api.h
19 | PATH_SUFFIXES include include/onnxruntime
20 | DOC "The ONNXRuntime include directory")
21 |
22 | if(NOT OnnxRuntime_INCLUDE_DIR)
23 | message(FATAL_ERROR "onnxruntime includes not found")
24 | endif()
25 |
26 | include(FindPackageHandleStandardArgs)
27 | find_package_handle_standard_args(
28 | OnnxRuntime
29 | REQUIRED_VARS OnnxRuntime_LIBRARY OnnxRuntime_INCLUDE_DIR)
30 |
31 | add_library(OnnxRuntime SHARED IMPORTED)
32 | set_property(TARGET OnnxRuntime PROPERTY IMPORTED_LOCATION ${OnnxRuntime_LIBRARY})
33 | set_property(TARGET OnnxRuntime PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${OnnxRuntime_INCLUDE_DIR})
34 |
35 | mark_as_advanced(OnnxRuntime_FOUND OnnxRuntime_INCLUDE_DIR OnnxRuntime_LIBRARY)
36 |
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | ## CEPCSW
2 |
3 | * [Quickstart](quickstart.md)
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | theme: jekyll-theme-slate
--------------------------------------------------------------------------------
/docs/_includes/nav.html:
--------------------------------------------------------------------------------
1 |
2 | |
3 | Home |
4 | Quickstart |
5 | Tutorial |
6 |
7 |
--------------------------------------------------------------------------------
/docs/quickstart.md:
--------------------------------------------------------------------------------
1 | # Quick start
2 |
3 | ## Start development environment in lxslc7 (CentOS 7)
4 |
5 | ```
6 | $ ssh -Y USERNAME@lxslc7.ihep.ac.cn
7 | ```
8 |
9 | ## Manage code using git
10 |
11 | Fork the CEPCSW into your own repo. For an example:
12 | * https://github.com/*USERNAME*/CEPCSW
13 |
14 | Get the source code from your own repo:
15 | ```
16 | $ git clone git@github.com:USERNAME/CEPCSW.git
17 | $ cd CEPCSW
18 | ```
19 |
20 | Add the upstream repo:
21 | ```
22 | $ git remote add cepc https://github.com/cepc/CEPCSW.git
23 | ```
24 |
25 | Sync and merge the upstream repo:
26 | ```
27 | $ git remote update
28 | $ git merge cepc/master
29 | ```
30 |
31 | ## Setup and build
32 |
33 | ```
34 | $ source setup.sh
35 | $ ./build.sh
36 | ```
37 |
38 | ## Run a simple test
39 |
40 | ```
41 | $ ./run.sh Examples/options/tut_detsim_SDT.py
42 | ```
43 |
44 |
--------------------------------------------------------------------------------
/docs/tutorial.md:
--------------------------------------------------------------------------------
1 | # Tutorial
2 |
3 | * [CEPCSW Tutorial and detector study, IHEP, 17-18 Sept 2020](https://indico.ihep.ac.cn/event/12341/)
4 |
--------------------------------------------------------------------------------