[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-366886-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-366886-en":130,"doc-similar-366886":202},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","mcstas-version-36-user-and-programmers-guide-to-the-neutron-ray-tracing-package","McStas version 3.6 - User and Programmers Guide to the Neutron Ray-Tracing Package","","McStas is a Monte Carlo ray-tracing software package for simulating neutron scattering instruments with high complexity and precision. The manual provides reference documentation for McStas 3.6, describing how to compile and run simulations, the meta-language used to define them, and example simulations. It also explains the automatic compilation pipeline translating high-level instrument descriptions into efficient ISO-C code, enabling optimization, new instrumentation design, and virtual experiments for training, planning, or data analysis.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/mcstas-version-36-user-and-programmers-guide-to-the-neutron-ray-tracing-package/366886/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/mcstas-version-36-user-and-programmers-guide-to-the-neutron-ray-tracing-package/366886.png","ImageObject",300,407,{"name":42,"@type":43},"Alex Sinclair","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-09-23",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is McStas used for?","Question",{"text":63,"@type":64},"McStas carries out Monte Carlo ray-tracing simulations for neutron scattering instruments, supporting optimization of existing equipment, design of new instrumentation, and virtual experiments for planning, training, and data analysis.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How does McStas translate instrument descriptions into executable code?",{"text":68,"@type":64},"It uses an automatic compilation process that converts high-level textual instrument descriptions into efficient ISO-C code, making it straightforward to set up simulations and handle unusual cases.",{"name":70,"@type":61,"acceptedAnswer":71},"What topics are covered in the reference manual for McStas 3.6?",{"text":72,"@type":64},"The manual covers ways to compile and run simulations, the simulation meta-language, and example simulations, along with guidance for installation, running the instrument compiler, and using simulation front-ends.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},366886,1790486390,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145,"preview_page_count":146,"preview_urls":147},1099523882182,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Physics Physics Department, Technical University of Denmark 2800 Kongens Lyngby, Denmark  \nUser and Programmers Guide to the Neutron Ray-Tracing Package McStas,  \nversion 3.6  \nP. Willendrup, E. Farhi, E. Knudsen, U. Filges, K. Lefmann, J. Stein January, 2026  \nThe software package McStas is a tool for carrying out Monte Carlo ray-tracing simulations of neutron scattering instruments with high complexity and precision. The simulations can compute all aspects of the performance of instruments and can thus be used to optimize the use of existing equipment, design new instrumentation, and carry out virtual experiments for [e.g. training](e.g. training), experimental planning or data analysis. McStas is based on a unique design where an automatic compilation process translates high-level textual instrument descriptions into efficient ISO-C code. This design makes it simple to set up typical simulations and also gives essentially unlimited freedom to handle more unusual cases.  \nThis report constitutes the reference manual for McStas, and, together with the manual for the McStas components, it contains documentation of most aspects of the program. It covers the various ways to compile and run simulations, a description of the meta-language used to define simulations, and some example simulations performed with the program.  \nThis report documents McStas version 3.6, released January, 2026  \nThe authors are:  \nPeter Kjær Willendrup \u003C[pkwi@fysik.dtu.dk](pkwi@fysik.dtu.dk)>  \nPhysics Department, Technical University of Denmark, Kongens Lyngby, Denmark  \nEmmanuel Farhi \u003C[emmanuel.farhi@synchrotron-soleil.fr](emmanuel.farhi@synchrotron-soleil.fr)>  \nSynchrotron SOLEIL, Saint-Aubin, France  \nErik Knudsen \u003C[erkn@fysik.dtu.dk](erkn@fysik.dtu.dk)>  \nPhysics Department, Technical University of Denmark, Kongens Lyngby, Denmark  \nJakob Garde \u003C[jaga@fysik.dtu.dk](jaga@fysik.dtu.dk)>  \nPhysics Department, Technical University of Denmark, Kongens Lyngby, Denmark  \nKim Lefmann \u003C[lefmann@fys.ku.dk](lefmann@fys.ku.dk)>  \nNiels Bohr Institute, University of Copenhagen, Denmark  \nJonas Stein \u003C[Jonas.Stein@uni-koeln.de](Jonas.Stein@uni-koeln.de)>  \nInstitute of Physics II, University of Cologne, Germany as well as authors who left the project:  \nPeter Christiansen \u003C[pchristi@hep.lu.se](pchristi@hep.lu.se)>  \nMaterials Research Department, Risø National Laboratory, Roskilde, Denmark  \nPresent address: University of Lund, Lund, Sweden  \nKlaus Lieutenant \u003C[klaus.lieutenant@helmholtz-berlin.de](klaus.lieutenant@helmholtz-berlin.de)>  \nInstitut Laue-Langevin, Grenoble, France  \nPresent address: Helmotlz Zentrum Berlin, Germany  \nKristian Nielsen \u003C[kristian-nielsen@mail.tele.dk](kristian-nielsen@mail.tele.dk)>  \nMaterials Research Department, Risø National Laboratory, Roskilde, Denmark  \nPresently associated with: MySQL AB, Sweden  \nISBN 978–87–550–3679–6 ISSN 0106–2840  \nPhysics Department · DTU · 2026  \nContents  \nPreface and acknowledgments 9  \n1. Introduction to McStas 11  \n1.1. Development of Monte Carlo neutron simulation .............. 11  \n1.2. Scientific background .............................. 12  \n1.2.1. The goals of McStas .......................... 14  \n1.3. The design of McStas ............................. 14  \n1.4. Overview .................................... 16  \n2. Monte Carlo Techniques and simulation strategy 18  \n2.1. Neutron spectrometer simulations ....................... 18  \n2.1.1. Monte Carlo ray tracing simulations ................. 18  \n2.2. The neutron weight ............................... 19  \n2.2.1. Statistical errors of non-integer counts ................ 19  \n2.3. Weight factor transformations during a Monte Carlo choice ........ 20  \n2.3.1. Direction focusing ........................... 21  \n2.4. Adaptive and Stratified sampling ....................... 21  \n2.5. Accuracy of Monte Carlo simulations ..................... 22  \n3. Running McStas 24  \n3.1. Installation and updates ............................ 24  \n3.1.1. Impor","cbCaicy4NOiTW90k","https://ap.wps.com/l/cbCaicy4NOiTW90k","pdf",2379964,130,"English","# Preface and acknowledgments\n# Introduction to McStas\n## Development of Monte Carlo neutron simulation\n## Scientific background\n## The design of McStas\n## Overview\n# Monte Carlo Techniques and simulation strategy\n## Neutron spectrometer simulations\n## The neutron weight\n## Adaptive and Stratified sampling\n## Accuracy of Monte Carlo simulations\n# Running McStas\n## Installation and updates\n## Brief introduction to the graphical user interface\n## Running the instrument compiler\n## Running the simulations","[{\"question\":\"What is McStas used for?\",\"answer\":\"McStas carries out Monte Carlo ray-tracing simulations for neutron scattering instruments, supporting optimization of existing equipment, design of new instrumentation, and virtual experiments for planning, training, and data analysis.\"},{\"question\":\"How does McStas translate instrument descriptions into executable code?\",\"answer\":\"It uses an automatic compilation process that converts high-level textual instrument descriptions into efficient ISO-C code, making it straightforward to set up simulations and handle unusual cases.\"},{\"question\":\"What topics are covered in the reference manual for McStas 3.6?\",\"answer\":\"The manual covers ways to compile and run simulations, the simulation meta-language, and example simulations, along with guidance for installation, running the instrument compiler, and using simulation front-ends.\"}]","McStas version 3.6 - User and Programmers Guide to the Neutron Ray-Tracing Package | PDF",1790168125,328,13,[148,152,156,160,164,168,172,176,180,184,188,193,198],{"page_no":22,"url":149,"width":150,"height":151},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2e48c6c588293878630b1774a59763f9.webp",983,1390,{"page_no":26,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0fb90959d1b62eba4ba53c386d2f7b46.webp",982,1388,{"page_no":30,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/18d964096ab1925a285c0edd39ad6090.webp",981,1387,{"page_no":33,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/01292db78781b7aeb1dbf5dc8dcaf807.webp",980,1385,{"page_no":97,"url":165,"width":166,"height":167},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6983d125f45e53e735dac7d3dd538374.webp",979,1384,{"page_no":102,"url":169,"width":170,"height":171},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/8784019b2c269bc46759443ad237b958.webp",978,1383,{"page_no":55,"url":173,"width":174,"height":175},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/66cc24c40a32988516500778e087148d.webp",977,1381,{"page_no":110,"url":177,"width":178,"height":179},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/6f57667b02fd25d0cd22eda49af93377.webp",976,1380,{"page_no":115,"url":181,"width":182,"height":183},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/c4b64b7c17339e68b9008edb02a9cdbe.webp",975,1378,{"page_no":123,"url":185,"width":186,"height":187},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0f6088781fd98a1697686266bf6986b4.webp",974,1377,{"page_no":189,"url":190,"width":191,"height":192},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/5ded3e54dafa9acdefa6565b755e2d0b.webp",973,1376,{"page_no":194,"url":195,"width":196,"height":197},12,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/3e024658e3f2bd9e74239e0a30b61a1b.webp",972,1374,{"page_no":146,"url":199,"width":200,"height":201},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/47d572b4ce3da3693508a086efb1b414.webp",971,1373,{"list":203,"token":11},[204,210,216,222,229,236,243,250,257,264],{"doc_id":205,"doc_title":206,"file_type":137,"home_preview_img_url":207,"slug":208,"view_count":110,"category_name":29,"create_tm":209},421323,"Physics for Game Programmers - Add Realism to Your Games","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229922587387/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=NEy99om9nlPs1qEa3z9ASWZLfJ0%3D","physics-for-game-programmers-add-realism-to-your-games",1790624614,{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":33,"category_name":29,"create_tm":215},657354,"Planning-software-streamlines-the-devision-process","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229975430298/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=rcP2f11%2BPSvf4VGvKcGiDHVoL5c%3D","planning-software-streamlines-the-decision-process",1792977810,{"doc_id":217,"doc_title":218,"file_type":137,"home_preview_img_url":219,"slug":220,"view_count":146,"category_name":29,"create_tm":221},326888,"Computational Chemistry - A Practical Guide for Applying Techniques to Real-World Problems","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229908460163/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=U5XjqwJO8C53yZ6mEEJAY9OMc4g%3D","computational-chemistry-a-practical-guide-for-applying-techniques-to-real-world-problems",1789975660,{"doc_id":223,"doc_title":224,"file_type":137,"home_preview_img_url":225,"slug":226,"view_count":227,"category_name":29,"create_tm":228},115355,"Claude AI Bible - The Complete Guide to Mastering Claude, Claude Code, Claude Cowork, MCP, AI Agents, Automation & Advanced Prompting","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229831893665/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=%2FnGM%2B6VdD%2B0L6x7noSCDQhC46zw%3D","claude-ai-bible-the-complete-guide-to-mastering-claude-claude-code-claude-cowork-mcp-ai-agents-automation-advanced-prompting",910,1785472614,{"doc_id":230,"doc_title":231,"file_type":137,"home_preview_img_url":232,"slug":233,"view_count":234,"category_name":29,"create_tm":235},185,"XNX Universal Transmitter Installation Manual (Complete Guide) [Honeywell Official]","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693710157/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=QyR3NhCaHTzRO0lKpdeUSKmCJ34%3D","xnx-universal-transmitter-installation-manual",854,1776135954,{"doc_id":237,"doc_title":238,"file_type":137,"home_preview_img_url":239,"slug":240,"view_count":241,"category_name":29,"create_tm":242},299143,"THE CANDLESTICK TRADING BIBLE - Trading Guide","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229905832418/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=CtxSB7D%2BQJwW3vqNd3xp0csnp0Q%3D","the-candlestick-trading-bible-trading-guide",804,1789767270,{"doc_id":244,"doc_title":245,"file_type":137,"home_preview_img_url":246,"slug":247,"view_count":248,"category_name":29,"create_tm":249},176,"Free Fire Proxy Server","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229693709822/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=BROOvIQyHPV%2Bi2LbU9x3vGMdEH4%3D","free-fire-proxy-server",565,1776135932,{"doc_id":251,"doc_title":252,"file_type":137,"home_preview_img_url":253,"slug":254,"view_count":255,"category_name":29,"create_tm":256},129220,"Operations and Supply Chain Management - Eleventh Edition - Dedicated to students and faculty","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229840674154/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=kNZAqeCV%2FAo0THYOTRz9yBRslpM%3D","operations-and-supply-chain-management-eleventh-edition-dedicated-to-students-and-faculty",498,1786012506,{"doc_id":258,"doc_title":259,"file_type":137,"home_preview_img_url":260,"slug":261,"view_count":262,"category_name":29,"create_tm":263},8566,"Trik Ngonten TikTok dari 0 Sampai FYP","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229696842324/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=nkrvZTTgYLm4XtjGdachlUM%2BSeM%3D","tiktok-content-tricks-from-0-to-fyp",489,1776338393,{"doc_id":265,"doc_title":266,"file_type":137,"home_preview_img_url":267,"slug":268,"view_count":269,"category_name":29,"create_tm":270},387603,"Building Applications with AI Agents - Multiagent Systems - Designing and Implementing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229916172328/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796107619&Signature=%2BZnJeg4BW8vxt6CGtw1CaxRgR7s%3D","building-applications-with-ai-agents-multiagent-systems-designing-and-implementing",454,1790287169]