,parametervalue>)方法实现的。这是一个例子root[13]TF1f2("f2","[o]*sin([1]*x)/x",0,,19.)root[14]f2SetParameter(o,1)root[15f2SetParameter(1,1);root[16]f2Draw(;当然,这个版本显示的结果与初始版本相同。尝试播放参数并再次绘制函数。TF1关具有大量非常有用的方法,包括积分和区分。要充分利用此类和其他ROOT类,请访问nternet上的文档http://root.cern.ch/drupal/content/reference-guide.Root中的公式使用类FOrmula进行评佔,因此还要查看相关的类文档以获取示例,实现的函数和语法您一定要将本指南下载到您自己的系统,以便随时随地使用要在上面的示例中稍微扩展一下,请考虑一个您想要定义的更复杂的函数。您也可以使用标准C或C++代码执行此操作。考虑下面的示例,该示例计算并显示由落在多个狄缝上的光产生的干涉图案。请不要在ROOT命令行输入以下示例,有·种更简单的方法:桷保磁盘上有文件slits,c,并在shelli中键入rootslits.C这将启动root并使其读取“宏”sis,C,即文件中的所有行将一个接一个地执行。//ExampLedrawingtheinterferencepatternoflight/fallingonagridwithnslitsandratiorofslit//widthoverdistancebetweenslitsautopiTMath:Pi(;functioncodeinCdoublesingle(double*x,double*par)treturnpow(sin(pi*par[0]*x[0])/(pi*par[0]*x[0]),2)doubleslite(double*x,double*par)freturnpow(sin(pipar[1]xlo]/sin(pix[0]),2);doubleslit(double*x,double*par)freturnsingle(x,par)*slite(x,par);/Thisisthemainprogramvoidslits()(floatr,nsj//requestuserinputcout<SetNpx(500);setparameters,asreadinaboveFnslit->SetParameter(o,r)Fnslit->SetParameter(l,ns);//drawtheinterferencepatternforagridwithnsliFnslit->Draw()Fnslit3532,51.505224参数为0.2和2的sitC输出图像该示例首先要求用户输入,即狹缝宽度与狭缝距离的比率和狭缝的数量。输入此信息后,您应该看到如图2.1所示的图形输出这是一个比我们之前看到的更复杂的例子,所以花一些时间仔细分析它,你应该在继续之前理解它。让我们详细介绍一下:第7-18行定义了C一代码中的必要函数,分成三个独立的函数,如所考虑的问题所示完仝干涉图案由函数的乘积给出,该函数取决于狭缝的宽度和距离的比率,并且第二个取决于狄缝的数量。对我们来说更重要的是定义这些函数的接口,使它们可用于ROOT类TF1:第一个参数是指向x的指针,第二个参数指向参数数组。主程序从第21行开始,定义了ⅴoid类型的函数slits()。在询问用户输入之后,使用开头给出的C类型函数定义ROOI函数。我们现在可以使用TF1类的所有方法来控制我们函数的行为-很好,不是吗?如果您愿意,可以在TF1实例中轻松扩展示例以使用函数双单,或具有窄狄缝的网格,区数nsit0来绘制单个狭缝的干涉图案。在这里,我们使用了一个宏,某种轻量级稈序,与ROOT,Cing一起分发的解释器能够执行。这是一个非常特殊的情况,因为C++本身不是一种解释语言!还有很多话要说:章确实是专门用于宏的。-IMDN开发者社群-imdn.cn"> ,parametervalue>)方法实现的。这是一个例子root[13]TF1f2("f2","[o]*sin([1]*x)/x",0,,19.)root[14]f2SetParameter(o,1)root[15f2SetParameter(1,1);root[16]f2Draw(;当然,这个版本显示的结果与初始版本相同。尝试播放参数并再次绘制函数。TF1关具有大量非常有用的方法,包括积分和区分。要充分利用此类和其他ROOT类,请访问nternet上的文档http://root.cern.ch/drupal/content/reference-guide.Root中的公式使用类FOrmula进行评佔,因此还要查看相关的类文档以获取示例,实现的函数和语法您一定要将本指南下载到您自己的系统,以便随时随地使用要在上面的示例中稍微扩展一下,请考虑一个您想要定义的更复杂的函数。您也可以使用标准C或C++代码执行此操作。考虑下面的示例,该示例计算并显示由落在多个狄缝上的光产生的干涉图案。请不要在ROOT命令行输入以下示例,有·种更简单的方法:桷保磁盘上有文件slits,c,并在shelli中键入rootslits.C这将启动root并使其读取“宏”sis,C,即文件中的所有行将一个接一个地执行。//ExampLedrawingtheinterferencepatternoflight/fallingonagridwithnslitsandratiorofslit//widthoverdistancebetweenslitsautopiTMath:Pi(;functioncodeinCdoublesingle(double*x,double*par)treturnpow(sin(pi*par[0]*x[0])/(pi*par[0]*x[0]),2)doubleslite(double*x,double*par)freturnpow(sin(pipar[1]xlo]/sin(pix[0]),2);doubleslit(double*x,double*par)freturnsingle(x,par)*slite(x,par);/Thisisthemainprogramvoidslits()(floatr,nsj//requestuserinputcout<SetNpx(500);setparameters,asreadinaboveFnslit->SetParameter(o,r)Fnslit->SetParameter(l,ns);//drawtheinterferencepatternforagridwithnsliFnslit->Draw()Fnslit3532,51.505224参数为0.2和2的sitC输出图像该示例首先要求用户输入,即狹缝宽度与狭缝距离的比率和狭缝的数量。输入此信息后,您应该看到如图2.1所示的图形输出这是一个比我们之前看到的更复杂的例子,所以花一些时间仔细分析它,你应该在继续之前理解它。让我们详细介绍一下:第7-18行定义了C一代码中的必要函数,分成三个独立的函数,如所考虑的问题所示完仝干涉图案由函数的乘积给出,该函数取决于狭缝的宽度和距离的比率,并且第二个取决于狄缝的数量。对我们来说更重要的是定义这些函数的接口,使它们可用于ROOT类TF1:第一个参数是指向x的指针,第二个参数指向参数数组。主程序从第21行开始,定义了ⅴoid类型的函数slits()。在询问用户输入之后,使用开头给出的C类型函数定义ROOI函数。我们现在可以使用TF1类的所有方法来控制我们函数的行为-很好,不是吗?如果您愿意,可以在TF1实例中轻松扩展示例以使用函数双单,或具有窄狄缝的网格,区数nsit0来绘制单个狭缝的干涉图案。在这里,我们使用了一个宏,某种轻量级稈序,与ROOT,Cing一起分发的解释器能够执行。这是一个非常特殊的情况,因为C++本身不是一种解释语言!还有很多话要说:章确实是专门用于宏的。 - IMDN开发者社群-imdn.cn">
登录
首页 » Others » 高能物理分析软件ROOT的入门使用方法

高能物理分析软件ROOT的入门使用方法

于 2020-06-28 发布
0 257
下载积分: 1 下载次数: 1

代码说明:

root是cern开发的数据分析软件,根据cern官网的A ROOT Guide For Beginners英文版翻译的中文文档,适合初学者了解root软件的使用723存储任意类型的 N-tuples…724处理跨文件的 n-tuple7.2.5对进阶用户:使用送择器即本处理树…547.2.6对干进阶价用户:使用 PROOF lite进行多核处理72.7关于 N-tuples的优化8 ROOT in python:::::::::::t·::::··:598. 1 PYROOT598.1. 1 More Python-less C++8.2自定义代码:从C+到 Python9结束语…64References64摘要ROOT是一个用于数据分析和I/O的软件框架:一个强大的工只,可以应对最先进的科学数据分析的典型任务。它的突出特点包括高级图形用户界面,非常适合交互式分析,C++编程语言的解释器,快速高效的原型设计和C艹+对象的持久性杋制,还用于写入大型强了对撞机实验记录的每年PB级数据(1PB=1024TB译者注)。本入门指南说明了ROOT的主要特征,这些特征与数据分析的典型问题相关:输入和绘制测量数据和分析功能的拟合。原创作者-D. Piparo-G. Quast-M,cisc译者注:本文均是 Google翻译结果,仅对代码和板式作调整,欢迎修改分享软件背景与简介欢迎来到数据分析ROOT!测量与理论模型的比较是实验物理学中的标准仟务之一。在最简单的情况下,“模型”只是提供测量数据预测的函数。通常,模垩取决于参数。这种模型可以简单地表示“电流I与电压U成比例”,并且实验者的任务包括从一组测量中确定电阻R作为第一步,需要数据的可视化。接下来,通常必须应用一些操作,例如,校正或参数转换。通常,这些操作是复杂的,并且应该提供强大的数学函数和程序库-例如,考虑应用于输入光谱的积分或峰值搜索或傅立叶变换以获得模型描述的实际测量偵。实验物理学的一个特点是影响每个测量的不可避免的不确定性,可视化工具必须包括这些。在随后的分析中,必须正确处理错误的统计性质作为最后一步,将测量值与模型进行比较,并且需要在此过程中确定自由模型参数。有关适合数据点的函数(模型)的示例,请参见图1.1。有儿种标准方法可供使用,数据分析工具应能方便地访问其中一种以上。还必须提供量化测量和模型之间一致性水平的方法。通常,要分析的数据量很大-考虑借助计算机累积的细粒度测量。因此,可用工具必须包含易于使用且有效的方法来存储和处理数据在量子力学中,模型通常仅根据许多参数预测测量的概率密度函数(“pdf),并且实验分析的目的是从观察到的频率分布中提取参数,其中观察测量。这种测量需要生成和可视化频率分布的装置,所谓的直方图和严格的统计处理,以从纯粹的统计分布中提取模型参数。预期数据的模拟是数据分析的另一个重要方面。通过重复生成“伪数据”,其以与用于真实数据的预期相同的方式进行分析,可以验证或比较分析过程。在许多情况卜,测量误差的分布并不是精确已知的,并且模拟提供了测试不同假设的景响的可能性。满足上述所有要求的强大软件框架是ROOT,这是个由日内瓦欧洲核了研究中心欧洲核研究组织协调的开源项目ROOT非常灵活,既可以在自己的应用程序中使用编程接口,也可以提供用于交互式数据分析的图腦用户界面。木文档的目的是作为初学者指南,并根据学生实验室中解决的典型问题为您自己的用例提供可扩展的示例。本指南有望为您未来科学工作中更复杂的应用奠定基础,建立在现代,最先进的数据分析上具之上本指南以教程的形式向您介绍ROOT包。根据“边做边学”的原则,这个目标将通过具体的例子来完成。也正因为这个原因,本指南无法涵盖ROOT包的所有复杂性。然而,一日您对以卜章节中介绍的概念有信心,您将能够欣赏ROOT用户指南( The Root Users guide2015)并浏览类参考(根参考指南2013)以査找所有详细信息您可能会感兴。您甚至可以查看代码本身,因为ROOT是一个免费的开源广品。与本教程并行使用这些文档!ROOT数据分析框架本身是编写的,并且在很大程度上依赖于C++编程语言:需要些关于C++的知识。如果您不了解这种语言的含义,Js可以利用有关C++的大量文献。ROOT可用于许多平台( Linux, Mac osx, Windows….),但在本指南中我们将隐含地假设您使用的是 Linux。你需要做的第一件事就是安装ROOT,不是吗?获取最新的ROOT版本非常简单。只需在此网页htp:/ root, cern.ch/ downloading-root上寻找“专业版”。您将找到针对不同体系结构的预编译版木,或者您自凵编译的ROOT源代码。只需拿起您需要的味道并按照安装说明操作即可。让我们深入了解ROOT!ROOT基础既然你凵经安装了ROOT,那么你止在运行的这个交互式 shell是什么?就像这样:ROOT带来了双重功能。它有一个宏的解释器(Cing( What is Cling”2015)),您可以从命令行运行或像应用程序一样运行。但它也是一个可以评估任意语句和表达式的交互式 shell这对于调试,快速黑客攻击和测试非常有用。我们先来看一些非常简单的例子2.1ROOT作为计算器您甚至可以使用ROOT交互式she代替计算器!使用该命令启动ROOT交互式shelroot在你的Liux机器上。提示应该很快出现:root「8让我们来看看这里显示的步骤root [0] 1+1(int)2root[1]2*(4+2)/12(doub1e)1.0000root [2] sqrt(3.( double)1.732051root[3]1>2(bool) falseroot [4] TMath: Pi()( double)3.141593root [5] TMath: Erf( 2)( double).222703不错。您可以看到,ROOT不仅可以输入C++语句,还可以输入存在于 MAth命名空间中的高级数学函数。现在让我们做一些更详尽的事情。一个众所周知的几何系列的数字小例root [6 double X=5(double)0.500000root [7] int N=30(int)30root [8] double geom series=0(doub1e)8.099root [9] for (int i=0; i

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 华为眼图知识good
    华为内部文档——眼图指标介绍,详细分析了眼图的一些指标和问题的分析,适用于光纤通信方面的设计-Huawei internal document - the eye diagram of indicators, the detailed analysis of the eye diagram of a number of indicators and analysis, applied to optical fiber communication design
    2020-11-29下载
    积分:1
  • ST FOC 5.0说明书 快速入门 SDK v5.0.pdf
    ST FOC 5.0说明书 配合 开源库 https://download.csdn.net/download/hxinstar/10322042使用UM2374List of tablesList of tablesTable 1. List of acronymsTable 2Document revision history..23UM2374 Rey 13/24List of figuresUM2374List of figuresFigure 1. ST MC Workbench -Icon and installation folder treeFigure 2. ST MC Workbench-GUI expanded top viewFigure 3. ST Motor Profiler-GUI889Figure 5. ST Motor Profiler-SM-PMSM parameters exampleFigure 4. ST Motor Profiler- Hardware setup list examples1011Figure 6. ST Motor Profiler-l-PMSM parameters exampleFigure 7. ST Motor Profiler-Measurement results12Figure 8. ST Motor Profiler-Save window13Figure 9. ST MC Workbench - New Project window14Figure 10. ST MC Workbench -New Project Info window14Figure 11. ST MC Workbench -Project Settings15Figure 12. ST MC Workbench-Project Settings window.15Figure 13. ST MC Workbench -Project generation button16Figure 14. ST MC Workbench -Workspace selectionFigure 15. ST MC Workbench -Project generation build infoFigure19. ST MC Workbench- Use of the motor control and monitoring.∴、∴,"…,,∴…….17Figure 16. IDE-MC Project view example18Figure 17. STMC Workbench-Motor monitoring button.19Figure 18. ST MC Workbench -Motor monitoring GUI204/24UM2374 Rey 1/UM2374General informationGeneral informationThe Mc sDK is used for the development of motor-control applications running on STM3232-bit microcontrollers based on the arm Cortex-M processorTable 1 presents the definition of acronyms that are relevant for a better understanding ofthis documentTable 1. List of acronymsAcronymDescriptionGUIGraphical user interfaceIDEIntegrated development environmentFOCField-oriented controlFWFirmwareMotor controlMC WBMotor control Workbench(STMicroelectronics sw tool)MPMotor Profiler(STMicroelectronics software tool)PMSMPermanent-magnet synchronous motorPWMPulse-width modulationSDKSoftware development kitVCVector controlMore information about ST MC Workbench is provided in the stm32 motor control SDKv5.0toolsusermanual(um2380)availableatwww.st.comarmUM2374 Rey 15/24Motor control ecosystem setupUM23742Motor control ecosystem setupA suitable ST Motor Control ecosystem environment includesA PC running the needed Mc software toolsA third-party IDEa third-party ANSI C-compilerA JTAG/SWD interface for debugging and programmingAn STMicroelectronics application board with one of the STM32 microcontrollerssupported. It drives the power stage and featuresPWM outputs to gate driverADC channels to measure currentsDC bus voltageA three-phase PMsM motol· A power supplyRefer to the STM32 motor control software development kit(Mc sDk data brief(DB3548)atwww.st.comandtothereleasenoteformoredetails2.1Software tool setupThe STMicroelectronics motor-control ecosystem runs on a pc with Windows7The following Pc software tools are correctly installedST MC Workbench (v5.0.0 or later)STM32CubeMX(v4 24.0 or later)ST-LINK/2(v4.0.0 or later)Any supported IDEIAR Embedded Workbench@ for Arm(v7.80.4Keil MDK tools (v5.24.2 or later)Ac6 System Workbench(v2.3.0 or later)(a)Refer to the respective user manuals for proper installation. STMicroelectronics documentsareavailablefromtheinternetsiteatwwwst.comSTM32 motor control SDK v5.0 tools user manual (UM2380STM32 CubeMX for STM32 configuration and initialization c code generation usermanual (UM1718)STM32 ST-LINK utility software description user manual(UM0892)The AC6 tool framework is not supported in SDK v5.0 but in later versions6/24UM2374 Rey 1/UM2374Motor control ecosystem setup22Hardware setupThe connection of the STMicroelectronics application board to the pc requires a USBType-A connector. Refer to the description of the application board for details on the USBcableA dedicated description card is delivered with each STMicroelectronics application board forproper installation For more details, refer to the user manual of the board available atwww.st.comThe selected hardware can be one of the three setups· The complete MC KitOne of the complete inverter boardsAny STM32 evaluation board combined with one of the ST evaluation power stagesthat include the mc connectorUM2374 Rey 17/24Getting StartedUM23743Getting StartedWarning: Check that the board is correctly configured for the motorcontrol application and supplied with the expected inputvoltageNoteRefer to the user manual of the related hardware to setup the correct configuration, voltagerange, serial communication capabilities, and programming/debugging interface3.1Hardware connectionConnect a uSb cable between the pc and the stmicroelectronics application board andthe JTAG/SWD programming cable if it is different from the USB cable3.2Motor profilingLaunch the ST MC Workbench software tool either byclicking on its iconrunning it directly from the installation folder treeBoth ways of launching the ST MC Workbench are illustrated in Figure 1Figure 1. ST MC Workbench- Icon and installation folder treeI STMicroelectrorics感FOC SDKLv.3.0MotorControlv500WorkBenchST Motor Control Workbenchd ST Motor profileren the st motor profiler tool either byUsing its dedicated button in the St Mc Workbench GUl as illustrated in Figure 2Running it directly from the installation folder tree as illustrated in Figure 1Figure 2. ST MC Workbench-GUl expanded top viewFile Tools Help Documet ta ionNew ProjectLoad Project4 About HelpMotor ProfilRcGert ProJEcts己tdbrsDRpower board8/24UM2374 Rey 1/UM2374Getting StartedClick on the Select Boards button to display the list of supported boards as shown onFigure 3 and select the STMicroelectronics application board setup. Figure 4 on page 10presents examples from this listNoteThe ST Motor Profiler tool may be used only with ST hardware in the list of supportedsetups.Figure 3. ST Motor Profiler-GUI2 ST Motor Profile.l:e augmentedMotor ProfilersPole pairsPe row to detecbeed and Current /mitsMaκSpet1600FPMn7 Select Board∧pk02530pkMagnetic: SM-PMSN○-NSMMechanIcal mode lO CenElectrical modelOW000UM2374 Rey 19/24Getting StartedUM2374Figure 4. ST Motor Profiler-Hardware setup list examplesE ST Motor ProfiY Hideabsolete boarde arch Control board by narSe arch power boac bv nareControl boardower BoardxCancelHide boards with warningNUCLEO-F302R8X-NUCLEO-HMOTM1 3shNUCLEO-F302R8X-NUCLEO-HMOBM1 3shT2F302R8T6L6230PDSTM32F302R8T6STL22ON6FT●Acf8m:m3SELNRV2 Emiol connectorC Product Web PageG Product Web PageC Product Web PageC Product Web PageNUCLEO-F303RESTEVAL-IPMO5F 3ShNUCLEO.F303RESTEVAL-IPM108 3sh●Aiv命Ativ● Ac livSn Ngor ombreI connectorST-LINKV2C Product Web PageC Product Web PageC Product Web PageC Product Web PageClick on the sTmicroelectronics hardware setup to select it and configure the st motorProfiler toolAs an example, Figure 4 shows the selection of the P-NUCLEO-IHM001 motor controlNucleo pack with NucLEo-F302R8 and X-NUCLEO-IHMO7M1After hardware setup selection, fill in the parameter fields with the motor informationThe number of pole pairs of the motor(mandatory fieldThe Max Speed of the motor(optional field)by default, the st Motor Profiler tool searches for the maximum allowed speedmatching the motor and the hardware setup usedThe Max Current allowed by the motor(optional field)By default, it is the maximum peak current deliverable by the hardware setupThe nominal dC bus voltage used by the hardware setup(optional field)By default, it is the power supply stage as either the bus voltage for low voltageapplications(DC voltage), or the RMs value for high voltage application(Ac voltage)The magnetic built-in type(mandatory field)By default, the SM-PMSM is selectedThe Ld/Lq ratio(mandatory field only when l-PMSM built-in is selected as shown inFigure 6 on page 1110/24UM2374 Rey 1/
    2020-11-29下载
    积分:1
  • 基于51单片机的数码管显示时钟电路图与c
    基于51单片机的数码管显示时钟电路图与c程序 有原理图和PCB 源代码 调试成功,保证好用。
    2020-12-03下载
    积分:1
  • python知网爬虫
    python知网爬虫,根据作者,爬取所有paper信息
    2020-11-28下载
    积分:1
  • 缺陷检测数据集2,带定位标签
    缺陷检测数据集,带标签。数据量500+。从网站上下载的。
    2021-05-06下载
    积分:1
  • plecs电力电子仿真软件独立安装包 含crack
    一个电力电子仿真软件,操作类似于matlab但更小巧,支持dsp编程
    2020-12-02下载
    积分:1
  • IEC61850-90-6 配电自动化
    IEC 61850标准第二版新增加的标准,IEC61850-90-6,应用于配电自动化。是个草案,对前五章进行了详细展开。
    2020-12-05下载
    积分:1
  • L298N 原理图+PCB全套!
    这个和淘宝上买的一样,只是我把元件改为DIP元件!方便DIY!
    2020-06-21下载
    积分:1
  • 基于形态学滤波器对心电信号的去噪与识别
    主要叙述了新电信号的发展史 以及涉及的基于数字滤波器及形态学滤波器对心电信号的去噪与识别 本文主要设计了新的滤波器来对心电信号去噪
    2020-12-04下载
    积分:1
  • GNU radio 和USRP入门指导
    该文章可作为软件无线电软件平台GNU radio及硬件平台USRP的入门使用,文中图文并茂的介绍了GNU radio的配置安装及使用,并附有大量的GRC练习实例,是本人一学期研究的结晶!
    2020-12-12下载
    积分:1
  • 696518资源总数
  • 106148会员总数
  • 10今日下载