![]() |
|
|||
File indexing completed on 2025-08-05 08:11:56
0001 #include "/sphenix/user/ChengWei/INTT/INTT_commissioning/INTT_CW/INTT_commissioning/DAC_Scan/InttConversion_new.h" 0002 #include "/sphenix/user/ChengWei/INTT/INTT_commissioning/INTT_CW/INTT_commissioning/DAC_Scan/InttClustering.h" 0003 0004 // struct hit_info { 0005 // int chip_id; 0006 // int chan_id; 0007 // int adc; 0008 // int adc_conv; 0009 // int bco_diff; // note : small_bco - bco_full 0010 // }; 0011 0012 void test() 0013 { 0014 // note : the initiator for the channel position 0015 InttConversion * ch_pos_DB = new InttConversion("full_survey_3.32", 3.32); 0016 0017 // InttClustering::test_func(ch_pos_DB); 0018 pos_str aaa = InttClustering::test_func(ch_pos_DB); 0019 cout<<aaa.x<<" "<<aaa.y<<" "<<aaa.z<<endl; 0020 0021 // vector<clu_info> clu_vec; 0022 // // vector<vector<vector<hit_info>>> single_event_hit_vec(N_server, single_event_hit_ladder_vec); // note : [server][ladder] 0023 // vector<hit_info> single_event_hit_vec; 0024 // single_event_hit_vec.push_back({1,0,0,22,10}); 0025 // single_event_hit_vec.push_back({1,1,1,45,10}); 0026 // clu_vec = InttClustering::clustering(Form("intt0"), 2, single_event_hit_vec, ch_pos_DB); 0027 } 0028 0029 0030 0031 // #include <Eigen/Dense> 0032 // #include <Eigen/Geometry> 0033 // #include <Eigen/LU> 0034 // #include <Eigen/SVD> 0035 // #include <Math/Transform3D.h> 0036 0037 // #include <intt/InttMapping.h> 0038 // R__LOAD_LIBRARY(libintt.so) 0039 0040 0041 0042 // namespace InttConversion 0043 // { 0044 // Intt::RawData_s trial_channel; // note : chip seems to be from 0 to 25 0045 0046 // TTree* ReadTTree() 0047 // { 0048 // TFile * file_in = new TFile(Form("/sphenix/user/ChengWei/INTT/test_build/intt_transforms-1.root"),"read"); 0049 // TTree * tree = (TTree *)file_in->Get("intt_transforms"); 0050 0051 // ROOT::Math::Transform3D * transform_branch = new ROOT::Math::Transform3D(); 0052 // tree -> SetBranchAddress("transform",&transform_branch); 0053 0054 // return tree; 0055 // } 0056 0057 // void func_1 () 0058 // { 0059 // trial_channel.felix_server = 0; 0060 // trial_channel.felix_channel = 0; 0061 // trial_channel.chip = 0; 0062 // trial_channel.channel = 127; // note : chan should be from 0 to 127 0063 0064 // Eigen::Affine3d sensor_trans = Intt::GetTransform(ReadTTree(), ToOffline(trial_channel)); 0065 // Eigen::Vector4d local_trans = Intt::GetLocalPos(ToOffline(trial_channel)); 0066 0067 0068 0069 0070 // // // std::cout<<sensor_trans<<std::endl; 0071 // // // std::cout<<"----------- ----------- -----------"<<std::endl; 0072 // // // std::cout<<local_trans<<std::endl; 0073 // // // std::cout<<sensor_trans * local_trans<<std::endl; 0074 // // // std::cout<<"----------- ----------- -----------"<<std::endl; 0075 // // double test_x = (sensor_trans * local_trans)[0]; 0076 // // std::cout<<test_x<<std::endl; 0077 // // // std::cout<<(sensor_trans * local_trans)[1]<<std::endl; 0078 // // // std::cout<<(sensor_trans * local_trans)[2]<<std::endl; 0079 // // return; 0080 // } 0081 0082 0083 0084 0085 0086 // }
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |