diff --git a/Detector/DetCEPCv4/compact/tpc10_01.xml b/Detector/DetCEPCv4/compact/tpc10_01.xml
index 539e06577a621ecf4a610af491c9d9c564a036c2..cef34c70fe00ce6688ef56683195c92355838388 100644
--- a/Detector/DetCEPCv4/compact/tpc10_01.xml
+++ b/Detector/DetCEPCv4/compact/tpc10_01.xml
@@ -86,7 +86,7 @@
<readouts>
<readout name="TPCCollection">
- <id>system:5,side:-2,layer:9,module:8,sensor:8</id>
+ <id>system:5,side:-2,layer:13,module:8,sensor:8</id>
</readout>
</readouts>
diff --git a/Detector/Identifier/include/Identifier/CEPCConf.h b/Detector/Identifier/include/Identifier/CEPCConf.h
index 2dceac7e12193b6aebdbe1f3fbc746dcd5db7093..95544ffcfecc175327192a43c41482eb62ed4829 100644
--- a/Detector/Identifier/include/Identifier/CEPCConf.h
+++ b/Detector/Identifier/include/Identifier/CEPCConf.h
@@ -45,5 +45,19 @@ namespace CEPCConf{
static const int DOUBLE_HIT_CANDIDATE = 28;
static const int GOOD = 27;
};
+
+ struct DetEncoderString{
+ static const int system = 5;
+ static const int side = -2;
+ static const int layer = 13;
+ static const int module = 6;
+ static const int sensor = 6;
+ static std::string getStringRepresentation() {
+ std::stringstream ss;
+ ss << "system:" << system << ",side:" << side << ",layer:" << layer << ",module:" << module << ",sensor:" << sensor;
+ return ss.str();
+ }
+ };
+
}
#endif
diff --git a/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp b/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
index c6057e548414e27ed26ac1c683964a15bb497c60..091ccff2dfb98dda848a1d28b666374494d063ad 100644
--- a/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
+++ b/Digitisers/SimpleDigi/src/TPCDigiAlg.cpp
@@ -33,6 +33,7 @@
#include <gear/BField.h>
//
#include "UTIL/ILDConf.h"
+#include "Identifier/CEPCConf.h"
#define TRKHITNCOVMATRIX 6
@@ -512,7 +513,9 @@ StatusCode TPCDigiAlg::execute()
return StatusCode::SUCCESS;
}
- _cellid_encoder = new UTIL::BitField64( lcio::ILDCellID0::encoder_string ) ;
+ // _cellid_encoder = new UTIL::BitField64( lcio::ILDCellID0::encoder_string ) ;
+ // _cellid_encoder = new UTIL::BitField64( "system:5,side:-2,layer:13,module:6,sensor:6" ) ;
+ _cellid_encoder = new UTIL::BitField64( CEPCConf::DetEncoderString::getStringRepresentation() ) ;
//int det_id = 0 ;
//if ( (STHcol != nullptr) && (STHcol->size()>0) ) {
// auto SimTHit = STHcol->at( 0 ) ;
diff --git a/Reconstruction/Tracking/include/Tracking/TrackingHelper.h b/Reconstruction/Tracking/include/Tracking/TrackingHelper.h
index 6235b3fb25e6a06ed8d6d8ceee9e8127ad370f71..7dd90d7869bb0b49cb299f05634c42ae89ed0783 100644
--- a/Reconstruction/Tracking/include/Tracking/TrackingHelper.h
+++ b/Reconstruction/Tracking/include/Tracking/TrackingHelper.h
@@ -6,6 +6,7 @@
#include "UTIL/BitField64.h"
#include "UTIL/CellIDDecoder.h"
#include "UTIL/ILDConf.h"
+#include "Identifier/CEPCConf.h"
#include "lcio.h"
#include <array>
@@ -55,7 +56,9 @@ inline float getPhi(const edm4hep::Track &track) {
inline int getLayer(const edm4hep::TrackerHit hit) {
- UTIL::BitField64* _encoder = new UTIL::BitField64(lcio::ILDCellID0::encoder_string);
+ // UTIL::BitField64* _encoder = new UTIL::BitField64(lcio::ILDCellID0::encoder_string);
+ // UTIL::BitField64* _encoder = new UTIL::BitField64( "system:5,side:-2,layer:13,module:6,sensor:6" );
+ UTIL::BitField64* _encoder = new UTIL::BitField64( CEPCConf::DetEncoderString::getStringRepresentation() );
_encoder->setValue(hit.getCellID());
int layer = (*_encoder)[lcio::ILDCellID0::layer];
delete _encoder;
diff --git a/Reconstruction/Tracking/src/Clupatra/ClupatraAlg.cpp b/Reconstruction/Tracking/src/Clupatra/ClupatraAlg.cpp
index 937adba6ab52508fd907b5ece1c64ca6a0b703c6..40a4f3960db9012d1461f7f01db87f867ef02b21 100644
--- a/Reconstruction/Tracking/src/Clupatra/ClupatraAlg.cpp
+++ b/Reconstruction/Tracking/src/Clupatra/ClupatraAlg.cpp
@@ -930,6 +930,9 @@ StatusCode ClupatraAlg::execute() {
// flag the segments so they can be ignored for final list
// FIXME I need to set type
+ int type = trk.getType();
+ type |= (1<<lcio::ILDTrackTypeBit::SEGMENT);
+ trk.setType(type) ;
// trk->setType( lcio::ILDTrackTypeBit::SEGMENT ) ;
// add old segments to new track
diff --git a/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp b/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp
index 17a8dcbb43eae981f3341775b1e3ed363c4459f8..ee11aba6d764feb53dc7114eb2ccd156e71d92a2 100644
--- a/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp
+++ b/Reconstruction/Tracking/src/Clupatra/clupatra_new.cpp
@@ -4,6 +4,7 @@
#include <UTIL/BitField64.h>
#include <UTIL/ILDConf.h>
+#include <Identifier/CEPCConf.h>
#include <UTIL/BitSet32.h>
///---- GEAR ----
@@ -287,7 +288,9 @@ namespace clupatra_new{
unsigned step = 0 ;
- UTIL::BitField64 encoder( UTIL::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( UTIL::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( "system:5,side:-2,layer:13,module:6,sensor:6" );
+ UTIL::BitField64 encoder( CEPCConf::DetEncoderString::getStringRepresentation() );
encoder[UTIL::ILDCellID0::subdet] = UTIL::ILDDetID::TPC ;
#if PODIO_BUILD_VERSION < PODIO_VERSION(0, 17, 4)
@@ -499,7 +502,9 @@ namespace clupatra_new{
IMarlinTrack* trk = MarTrkof(clu) ;
- UTIL::BitField64 encoder( UTIL::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( UTIL::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( "system:5,side:-2,layer:13,module:6,sensor:6" );
+ UTIL::BitField64 encoder( CEPCConf::DetEncoderString::getStringRepresentation() );
encoder[ UTIL::ILDCellID0::subdet ] = detectorID ;
encoder[ UTIL::ILDCellID0::layer ] = layer ;
@@ -1314,7 +1319,10 @@ start:
edm4hep::MutableTrack PLCIOTrackConverter::operator() (CluTrack* c) {
- static lcio::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ;
+ // static lcio::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ;
+ // static UTIL::BitField64 encoder( "system:5,side:-2,layer:13,module:6,sensor:6" );
+ static UTIL::BitField64 encoder( CEPCConf::DetEncoderString::getStringRepresentation() );
+
edm4hep::MutableTrack trk;
diff --git a/Utilities/KalDet/src/ild/tpc/ILDTPCKalDetector.cc b/Utilities/KalDet/src/ild/tpc/ILDTPCKalDetector.cc
index 61af3eedbd6421b78c3d9189de7daea2d203160a..18aaa5934cbc2ce611c337c1df563c91a46340d4 100644
--- a/Utilities/KalDet/src/ild/tpc/ILDTPCKalDetector.cc
+++ b/Utilities/KalDet/src/ild/tpc/ILDTPCKalDetector.cc
@@ -24,6 +24,7 @@
#include <UTIL/BitField64.h>
#include <UTIL/ILDConf.h>
+#include "../../../../../Detector/Identifier/include/Identifier/CEPCConf.h"
// #include "streamlog/streamlog.h"
@@ -124,7 +125,9 @@ TVKalDetector(250) // SJA:FIXME initial size, 250 looks reasonable for ILD, thou
// create measurement layers
Double_t r = rmin;
- UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( lcio::ILDCellID0::encoder_string ) ;
+ // UTIL::BitField64 encoder( "system:5,side:-2,layer:13,module:6,sensor:6" );
+ UTIL::BitField64 encoder( CEPCConf::DetEncoderString::getStringRepresentation() );
for (Int_t layer = 0; layer < nlayers; layer++) {