text:
## Turing Machine Simulation in C#

### Introduction

Alan Turing’s idea of building a universal computing machine was truly revolutionary and it changed the face of the world. One extraordinarily simple machine capable of carrying out any computation seems impossible. This blog post is a laconic look at the history and operation of the Universal Turing Machine. The goal is to whet the appetite of the uninitiated and inspire them to seek out a deeper understanding of computation.

### History

In 1936, Alan Turing published his famous “On Computable Numbers” paper. It was not his intention to invent a computer. In fact, the machine outlined in the paper was not initially meant to be implemented mechanically. The Automatic Computing Machine (now known as Universal Turing Machine), as he termed it, was nothing more than a mathematic concept. Turing did all of his computation with a fountain pen and paper.

Turing’s true ambition was to solve the famous “Entscheidungsproblem”. In a nutshell, he used the concept of an automatic computing machine to prove that there are some sequences of numbers that are impossible to compute. His proof is closely tied to the notorious Halting Problem.

In Turing’s time, the word computer had a very different meaning. Computer was a job description. Mathematicians painstakingly wrote out precise directions for computers. This way, a person with little background in arithmetic could perform computation without really understanding the overall implications of what they were doing. These instructions are what inspired Turing and they are reflected in the implementation of his automatic computing machine.

What’s most amazing about Turing’s contemplation of the automatic computing machine is that more than eighty years later, we’ve yet to come up with a more powerful computational model. We have more efficient means of computation, but none of them can solve any problems that the original machine could not. Extraordinary to say the least!

### Universal Turing Machine

The Universal Turing Machine is elementary. If you’ve ever built a state machine, this will all start to look very familiar. The machine only has 4 components.

1. Paper Tape
2. Printer
3. Scanner
4. Transition Table

The paper tape is a theoretically infinite piece of paper sectioned off into squares. Each square is meant to hold a single character. The printer and scanner are mounted together on a head that move as a unit. The printer can print a single character to the tape and the scanner can read a single character from the tape. The head can only move one square of tape at a time. The real magic happens in the transition table, or “table of states of mind” as Turing called them (remember Turing’s idea of a computer was a human). The table is a list of instructions in the form of: If the machine is in state A and the scanner reads character B, print character C, move the head in D direction and place the machine in state E. ABCDE are all variables.

In order to perform a computation, information goes on the tape, the machine gets an initial state, the transition table is loaded, and it’s “off to the races” following the instructions in the transition table. Once the machine reaches its’ final state, the tape will hold the computed answer. That is all that is required to perform any computation. Such exquisite simplicity!

### Programmability

Turing’s was not the first computation machine. In fact, many had come before him. However, his machine had something truly exceptional: programmability. A physical machine could conceivably contain a single physical transition table. Turing created a physical transition table that could read any number of logical transition tables from the tape. This was truly the “Hello World” of computer programming.

Turing used something he coined “Standard Description” to create an initial transition table capable of reading any other transition table from the tape. Many consider this to be the world’s first programming language. Concepts extracted from his work such as symbol tables and m-functions are still in use today.

The notion of a machine that can emulate any other machine is known as Turing Completeness. The ramifications of this are seemingly endless. The whole of the computer industry is built on this concept. The sheer power and simplicity are mind boggling.

### Simulation

Now comes the fun part! Let’s build a Turing machine simulation in C#. Please take note that this is only a thought experiment to demonstrate the basic structure of a Turing machine. Some of the more convoluted details such as e-tape/f-tape, encoding, and reading instructions from the tape are left out for the sake of brevity. That being said, with an infinite amount of time it’s entirely possible to compute any possible computation using this simulation and a proper initial transition table.

I’m only giving a short synopsis of the code below. Everything is written in a somewhat functional style with no mutation. I’m sure this could be up for debate, but if you choose to debate it you’re missing the point of the post… If you have any questions or comments, feel free to comment or contact me directly. I’d love to speak with you about it. The full code is available on github: https://github.com/dalealleshouse/TuringMachine

First, we have a Head that consists of the tape, printer, and scanner. The tape is just an IEnumerable of characters that automatically grows as needed (fun fact: Turing was also instrumental in the idea of recursive enumeration). Each character in the IEnumerable represents a single square on the paper tape. The class has methods that read from the tape (scanner), write to the tape (printer), and move the head position. One special thing to note is the override of the ToString method which will return the data on the tape in a human readable form.

using System;
using System.Collections.Generic;
using System.Linq;

namespace TuringMachine
{
{
public const char Blank = '_';

{
if (tape == null) throw new ArgumentNullException(nameof(tape));

var safeData = tape as char[] ?? tape.ToArray();

Tape = safeData;
}

public IEnumerable Tape { get; }

public int HeadPosition { get; }

? new Head(new[] { Blank }.Concat(Tape), 0)

{
switch (direction)
{
return MoveLeft();
return this;
return MoveRight();
default:
throw new ArgumentOutOfRangeException(nameof(direction), direction, null);
}
}

public override string ToString() => $@"Tape: {Tape.Select(GetChar).Aggregate((agg, next) => agg + next)}"; private string GetChar(char c, int index) => index == HeadPosition ?$"({c})" : c.ToString();
}
}

Next, let’s turn our attention to the transition table. Below is a POCO to hold transition data. A transition table is an IEnumerable of transition objects. State is an integer value and HeadPostion is an Enum composed of Left, No Move, and Right.

namespace TuringMachine
{
public class Transition
{
{
InitialState = initialState;
Write = write;
NextState = nextState;
}

public int InitialState { get; }

public char Read { get; }

public char Write { get; }

public int NextState { get; }
}
}

The last piece of the puzzle is the machine itself. A machine is initialized with a state, a Head object, and a transition table. The interesting part of this class is the step method. For our purposes, I’ve defined any state less than 0 to denote a special stop state (error or halt). If the machine is in a stop state, it will no longer process transitions. If the machine is unable to find a suitable transition, it goes into an error state (fun fact: the fact that this machine can go into an error state makes it an undeterministic machine as opposed to a deterministic machine). If it finds a suitable transition, it applies the defined data and returns a reconfigured machine.

using System;
using System.Collections.Generic;
using System.Linq;

namespace TuringMachine
{
public class Machine
{
{
if (transitionTable == null) throw new ArgumentNullException(nameof(transitionTable));

State = state;
TransitionTable = transitionTable;
}

public int State { get; }

public IEnumerable TransitionTable { get; }

public Machine Step()
{
if (State < 0) return this;

return
TransitionTable
TuringMachine.State.Error))
.Select(
.First();
}

public Machine Run()
{
var m = this;

while (m.State >= 0)
m = m.Step();

return m;
}
}
}

That’s all we need! Let’s start off easy by declaring a transition table that will add two positive numbers. We’ll represent the numbers on the tape by a series of “1” characters separated by a blank. Our transition table is below.

using System.Collections.Generic;
using System.Resources;

namespace TuringMachine
{
public static class TransitionTableGenerator
{
public static IEnumerable Addition() => new[]
{
new Transition(0, Tape.Blank, Tape.Blank, HeadDirection.Right, 0),
new Transition(0, '1', '1', HeadDirection.Right, 1),
new Transition(1, Tape.Blank, '1', HeadDirection.Right, 2),
new Transition(1, '1', '1', HeadDirection.Right, 1),
new Transition(2, Tape.Blank, Tape.Blank, HeadDirection.Left, 3),
new Transition(2, '1', '1', HeadDirection.Right, 2),
new Transition(3, Tape.Blank, Tape.Blank, HeadDirection.Left, 3),
new Transition(3, '1', Tape.Blank, HeadDirection.Left, 4),
new Transition(4, Tape.Blank, Tape.Blank, HeadDirection.NoMove, State.Halt),
new Transition(4, '1', '1', HeadDirection.Left, 4)
};
}
}

The test below shows the machine in action adding 3 and 2. I highly recommend stepping through the code in order to really grok all of this. The answer is returned on the tape as a series of 5 “1” characters.

[TestMethod]
{
const string expected = "Head: (_)11111__";
var sut = new TuringMachine.Machine(
0,

var result = sut.Run();
}

OK, that’s not exactly an impressive result. Let’s see if we can do something slightly more complicated. Using the same input, let’s multiply the two numbers. All we need is a different transition table.

using System.Collections.Generic;
using System.Resources;

namespace TuringMachine
{
public static class TransitionTableGenerator
{
public static IEnumerable Multiplication() => new[]
{
new Transition(0, Tape.Blank, Tape.Blank, HeadDirection.Right, 1),
new Transition(0, '1', Tape.Blank, HeadDirection.Right, 2),
new Transition(1, Tape.Blank, Tape.Blank, HeadDirection.Right, 14),
new Transition(1, '1', Tape.Blank, HeadDirection.Right, 2),
new Transition(2, Tape.Blank, Tape.Blank, HeadDirection.Right, 3),
new Transition(2, '1', '1', HeadDirection.Right, 2),
new Transition(3, Tape.Blank, Tape.Blank, HeadDirection.Left, 15),
new Transition(3, '1', Tape.Blank, HeadDirection.Right, 4),
new Transition(4, Tape.Blank, Tape.Blank, HeadDirection.Right, 5),
new Transition(4, '1', '1', HeadDirection.Right, 4),
new Transition(5, Tape.Blank, '1', HeadDirection.Left, 6),
new Transition(5, '1', '1', HeadDirection.Right, 5),
new Transition(6, Tape.Blank, Tape.Blank, HeadDirection.Left, 7),
new Transition(6, '1', '1', HeadDirection.Left, 6),
new Transition(7, Tape.Blank, '1', HeadDirection.Left, 9),
new Transition(7, '1', '1', HeadDirection.Left, 8),
new Transition(8, Tape.Blank, '1', HeadDirection.Right, 3),
new Transition(8, '1', '1', HeadDirection.Left, 8),
new Transition(9, Tape.Blank, Tape.Blank, HeadDirection.Left, 10),
new Transition(9, '1', '1', HeadDirection.Left, 9),
new Transition(10, Tape.Blank, Tape.Blank, HeadDirection.Right, 12),
new Transition(10, '1', '1', HeadDirection.Left, 11),
new Transition(11, Tape.Blank, Tape.Blank, HeadDirection.Right, 0),
new Transition(11, '1', '1', HeadDirection.Left, 11),
new Transition(12, Tape.Blank, Tape.Blank, HeadDirection.Right, 12),
new Transition(12, '1', Tape.Blank, HeadDirection.Right, 13),
new Transition(13, Tape.Blank, Tape.Blank, HeadDirection.NoMove, State.Halt),
new Transition(13, '1', Tape.Blank, HeadDirection.Right, 13),
new Transition(14, Tape.Blank, Tape.Blank, HeadDirection.NoMove, State.Halt),
new Transition(14, '1', Tape.Blank, HeadDirection.Right, 14),
new Transition(15, Tape.Blank, Tape.Blank, HeadDirection.Left, 16),
new Transition(15, '1', Tape.Blank, HeadDirection.Left, 15),
new Transition(16, Tape.Blank, Tape.Blank, HeadDirection.NoMove, State.Halt),
new Transition(16, '1', Tape.Blank, HeadDirection.Left, 16)

};
}
}

Below is the multiplication test. The answer is indicated by a string of 6 “1” characters on the tape.

[TestMethod]
public void MultiplyTwoNumbers()
{
const string expected = "Head: ______(_)111111";
var sut = new TuringMachine.Machine(
0,
TransitionTableGenerator.Multiplication());

var result = sut.Run();
}

### Conclusion

I hope you enjoyed this whirlwind tour of Turing machines as much as I enjoyed writing it. There are much deeper concepts just under the surface and I hope I’ve piqued your interest enough to make you hungry for more. My ambition is that this post sends you on a journey into the exciting world of computability. Don’t be satisfied with merely knowing enough to write programs; keep digging until you master the domain. I’ll leave you with a couple book recommendations that I’m sure you’ll find invigorating.

• Understanding Computation: From Simple Machines to Impossible Programs - Tom Stuart
• Introduction to Automata Theory, Languages, and Computation - John E. Hopcroft , Rajeev Motwani, Jeffrey D. Ullman

If there is enough interest, I may do a follow up to this post on how to do pattern matching and some simple regular expression parsing using the Turing machine simulation.

As always, thanks for reading and I would love to hear from you.

## Easy Immutable Objects in C#

Aristotle said, “Change in all things is sweet.” With all due respect to the great philosopher, he obviously never had to write software…

Head on over to Stack Overflow and search for “Immutable Object Patterns in C#” and you will see that this is a point of contention for many developers. Creating immutable objects in C# is cumbersome at best. What if I told you there is a practically effortless way to accomplish this with about one quarter of the code that is used in typical examples. I knew that would get your attention! Hang on tight while I walk you through an exciting demonstration!

As a side note, I’m not going to try to sell anyone on immutability in this post. There are countless other articles out there with that purpose. From here forward, I’m going to assume the reader understands why and when they need immutable objects.

### The Problem

It’s a typical Friday night, when the phone rings. It’s NASA again (sigh…), and they need another brilliant celestial program in the key of C#. So much for relaxing, duty calls… After contemplating the specs, it’s obvious that an immutable planet class is a requirement. Let’s get started.

### Typical C# Solution

In order to create the planet object in C#, you must create a constructor that accepts all property values and then sets those property values in the constructor body. This is a fairly recent addition to C#. In older versions you also had to create backing fields for each property. Additionally, it’s wise to override the equals method because by default C# uses reference equality. This could be a topic for debate and your mileage may vary; however, for the sake of argument let’s just assume we want value equality for planet objects. Another debatable topic may be whether to use a struct or a class. This example uses a class because C# will always create default parameterless constructors for structs. It doesn’t really make sense to have an instance of a planet that cannot change and is initialized without values. The result is the code below.

public class Planet
{
public Planet(
string name,
decimal massKg,
decimal equatorialDiameterKm,
decimal polarDiameterKm,
decimal equatorialCircumferenceKm,
decimal orbitalDistanceKm,
decimal orbitPeriodEarthDays,
decimal minSurfaceTemperatureCelsius,
decimal maxSurfaceTemperatureCelsius)
{
this.Name = name;
this.MassKg = massKg;
this.EquatorialDiameterKm = equatorialDiameterKm;
this.PolarDiameterKm = polarDiameterKm;
this.EquatorialCircumferenceKm = equatorialCircumferenceKm;
this.OrbitalDistanceKm = orbitalDistanceKm;
this.OrbitPeriodEarthDays = orbitPeriodEarthDays;
this.MinSurfaceTemperatureCelsius = minSurfaceTemperatureCelsius;
this.MaxSurfaceTemperatureCelsius = maxSurfaceTemperatureCelsius;
}

public string Name { get; }

public decimal MassKg { get; }

public decimal EquatorialDiameterKm { get; }

public decimal PolarDiameterKm { get; }

public decimal EquatorialCircumferenceKm { get; }

public decimal OrbitalDistanceKm { get; }

public decimal OrbitPeriodEarthDays { get; }

public decimal MinSurfaceTemperatureCelsius { get; }

public decimal MaxSurfaceTemperatureCelsius { get; }

public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj))
{
return false;
}

if (ReferenceEquals(this, obj))
{
return true;
}

return obj.GetType() == this.GetType() && this.Equals((Planet)obj);
}

protected bool Equals(Planet other)
=>
string.Equals(this.Name, other.Name) && this.MassKg == other.MassKg && this.EquatorialDiameterKm == other.EquatorialDiameterKm
&& this.PolarDiameterKm == other.PolarDiameterKm && this.EquatorialCircumferenceKm == other.EquatorialCircumferenceKm
&& this.OrbitalDistanceKm == other.OrbitalDistanceKm && this.OrbitPeriodEarthDays == other.OrbitPeriodEarthDays
&& this.MinSurfaceTemperatureCelsius == other.MinSurfaceTemperatureCelsius && this.MaxSurfaceTemperatureCelsius == other.MaxSurfaceTemperatureCelsius;

public override int GetHashCode()
{
unchecked
{
var hashCode = (this.Name?.GetHashCode() ?? 0);
hashCode = (hashCode * 397) ^ this.MassKg.GetHashCode();
hashCode = (hashCode * 397) ^ this.EquatorialDiameterKm.GetHashCode();
hashCode = (hashCode * 397) ^ this.PolarDiameterKm.GetHashCode();
hashCode = (hashCode * 397) ^ this.EquatorialCircumferenceKm.GetHashCode();
hashCode = (hashCode * 397) ^ this.OrbitalDistanceKm.GetHashCode();
hashCode = (hashCode * 397) ^ this.OrbitPeriodEarthDays.GetHashCode();
hashCode = (hashCode * 397) ^ this.MinSurfaceTemperatureCelsius.GetHashCode();
hashCode = (hashCode * 397) ^ this.MaxSurfaceTemperatureCelsius.GetHashCode();
return hashCode;
}
}
}

Wow, that’s a lot of code. Looking ahead, let’s imagine what it will take to add a new property in the future. All the following changes are required:

1. Constructor arguments
2. Constructor body
3. Properties
4. Equals method
5. GetHashCode method

That’s a ton of changes with several opportunities for error. All that typing! My fingers are sore!

### A Better Way

Fortunately, there is a better way to create the planet class! The answer is, use F#. I know what you’re thinking, “Wait, hold the presses! Look at the title of this blog post!”. Hold on, allow me to elucidate. I’ll first put you at ease by telling you that you don’t even need to learn F# to use this solution. You just need to create a simple F# project and reference it from your C# project. Because F# is a dot net language, F# libraries are entirely accessible to C#.

F# has a construct known as a record type that mimics the behavior of the C# class shown above. The best part is that record types are effortless to define. Below is the code required to create a planet class that behaves identically to the C# class defined above.

type Planet = { Name: string; MassKg: decimal; EquatorialDiameterKm: decimal; PolarDiameterKm: decimal; EquatorialCircumferenceKm: decimal; OrbitalDistanceKm: decimal; OrbitPeriodEarthDays: decimal; MinSurfaceTemperatureCelsius: decimal; MaxSurfaceTemperatureCelsius: decimal }

You don’t get much more concise and maintainable than that! Adding new properties is a relative breeze.

What I like most about this solution is that it acts as a “gateway drug”. There are many situations where F# offers significant advantages. However, many developers are intimidated by taking a big leap into a new language. How do you sell it to your boss? Where do you begin? This is a very pain free way to get your F# “foot in door”.

### Conclusion

Using an F# library for immutable objects reduces required code by an amazing amount. Additionally, it eradicates error prone maintenance. With this new weapon in our arsenal, we can knock out that program for NASA and be done in time to curl up on the couch with a cigar and scotch before bed. Yay for humanity!

If you need more concrete examples, I encourage you to go have a look at the accompanying github repository: https://github.com/dalealleshouse/ImmutableExample. Download the source code, and notice that there are 4 projects. A C# domain project, an F# domain project, a C# planet repository project, and a test project. Change the reference in the planet repository project back and forth from the C# and F# projects in order to demonstrate the solution.

I hope this solution saves you as much time and trouble as it has me. As always, thank you for reading and feel free to contact me with any questions.

## Recursion – Good, Bad, or Indifferent?

For developers using imperative languages (C, C++, C#, Java, Python, etc…), recursion can seem arcane. It’s just not something encountered regularly. However, recursion is a staple of functional programming. Given the functional programming renaissance, it may be time to “bone up”. Even if you have no interest in learning a functional language, functional concepts have many benefits that can be applied to imperative programming (i.e. LINQ, yeah, who doesn’t LOVE that). This blog post is meant to give a very broad overview of recursion for developers who don’t use it much.

### WTF is Recursion?

In order to understand recursion one must first understand recursion. Yeah, I know, that’s a really old joke. Moving on…

There are heaps of rather byzantine definitions floating around. However, for our purposes we are going to say that a recursive method is one that calls back to itself. This is best demonstrated via example. Consider the following function that calculates the greatest common divisor of 2 numbers.

private int GreatestCommonDivisor(int x, int y)
{
return y == 0 ? x : GreatestCommonDivisor(y, x % y);
}

Make sure you fully grok that function before reading on. There is a lot happening in those few lines of code.

Most recursive functions can also be written iteratively. In other words, recursive functions can be rewritten using looping constructs (while, for, etc…). See the example below.

private int GreatestCommonDivisor(int x, int y)
{
while (true)
{
if (y == 0) break;

var remainder = x % y;
x = y;
y = remainder;
}

return x;
}

The two functions above are commensurate. So, why would one choose one over the other? Read on! More about this in the next section.

In imperative programming languages, recursive functions should be avoided in most cases (please, no hate mail about how this isn’t true 100% of the time). Recursive functions are less efficient than their iterative counterparts. Additionally, they are subject to the perils of stack overflows. Why is this true? I’m glad you asked. Let’s consider a greatly simplified version of what happens when a function is invoked.

1. function arguments, variables, and return address are pushed on the stack
2. control jumps to the function
3. function code runs
4. function results are copied into the return value
5. stack is rewound to it’s previous position (memory is reclaimed)
6. control jumps back to the caller

Often times, all of the above consumes more resources than looping. Therefore, recursive method calls are less performant.

The bigger problem is that the call stack is allocated a relatively meager amount of memory (varies wildly depending on the platform). Exceeding this causes the dreaded stack overflow exception to rear it’s ugly head. Each function call eats up space on the stack like a donkey eating a waffle. That space isn’t reclaimed until the function returns. As a total SWAG, I wouldn’t trust a recursion depth of more than about a thousand. Of course, this number varies wildly depending on the platform and amount of stack space the function consumes.

Methods that employ iteration do not suffer from any of the problems outlined in this section. In spite of that, there are still some good reasons to use recursion. Read on my friend!

### The Good

As demonstrated above, recursive functions are generally shorter and more elegant. In the words of the great Donald Knuth, “premature optimization is the root of all evil”. Unless your application is extremely performance critical, chances are you will never notice the few extra microseconds. The added benefit of terse and expressive code far outweighs the performance hit. Obviously, stack overflow exceptions aren’t going away. However, if the estimated recursion depth is modest there is no reason to avoid recursion. Put succinctly, if your use case is not performance critical and the estimated recursion depth is reasonable, it’s a good candidate for recursion.

Now wait a minute, I said that stack overflows aren’t going away but I also said that recursion is a staple for functional programming. How can both of these statements be true? Three words: tail call optimization. Many functional languages employ this witchery. In a nutshell, here’s what happens. If a function’s return expression is a result of a function call, the stack frame is reused instead of pushing a new one on the call stack. That’s all there is to it! Wouldn’t it be wondrous if imperative languages did this? Maybe, someday…

Recursion is a useful technique for making code terse and comprehensible. However, it is less performant and breeds stack overflow exceptions in non tail call optimized languages. Carefully scrutinize your use case when choosing between recursive and iterative functions.

## Constructing the SUT (System Under Test) – Eradicating Brittle Unit Tests

I’m not going to proselytize unit testing in this blog post, there are hoards of articles on the internet for that already. Let’s just agree, for arguments sake, that they do awesome things for any software project. In spite of this majesty, brittle unit tests can suck the life out of programmers. There are many reasons for test frailty (a topic for another time), but the main one I’m going after in this piece is adding dependencies. In short, adding a new dependency to any class makes the existing tests fail. Is there anyway of getting around this? Yes there is!

As a side note: In a perfect world, software would be architected so elegantly that adding dependencies would be unnecessary. Unfortunately, I don’t live in that world. If you know how to get there please send me directions! That being said, adding dependencies may be a sign that you aren’t adhering to the single responsibility principal. Just something to keep in mind… Regardless, the pattern laid out below has made my life easier.

The Developer and the Brittle Test

Once upon a time, in a land far far away, our hero, writes the following really interesting service.

public class ReallyInterstingService
{

public ReallyInterstingService(IDoSomethingAwesome doSomethingAwesome)
{
this._doSomethingAwesome = doSomethingAwesome;
}

public string InterstingMethod()
{
return this._doSomethingAwesome.ToString();
}
}

This really interesting service needs tests. Our hero, being a true hero, used TDD so he wrote the tests below before ever writing the service. Problem solved!

[TestClass]
public class ReallyInterstingServiceShould
{
[TestMethod]
public void ReturnString()
{
var awesomeMock = new Mock<IDoSomethingAwesome>();

var sut = new ReallyInterstingService(awesomeMock.Object);
var result = sut.InterstingMethod();

Assert.IsInstanceOfType(result, typeof(string));
}
}

The tests are fantastic! Anyone can refractor without fear. Life is good! However, as with any great story, along comes the antagonist: the evil manager. Management demands our hero to befoul really interesting service with some inanity. After a long battle, our hero concedes and makes the modifications below.

public class ReallyInterstingService
{

public ReallyInterstingService(IDoSomethingAwesome doSomethingAwesome, IDeathToAwesome deathToAwesome)
{
this._doSomethingAwesome = doSomethingAwesome;
this._deathToAwesome = deathToAwesome;
}

public string InterstingMethod()
{
return this._doSomethingAwesome.ToString();
}

{
return this._deathToAwesome.ToString();
}
}

As you can see, a new dependency was added and now all the beautiful tests have failed. Woe to the kingdom. Our hero is vexed! How could he have foreseen this tragedy? What can he do to protect the program against such calamity in the future?

After a long quest our hero stumbles upon the humble author’s DotNetTestHelper open source project. It’s an incredibly simple library still in it’s infancy, but it has something wonderful: SutBuilder! He refractors the test as follows.

[TestClass]
public class ReallyInterstingServiceShould
{
[TestMethod]
public void ReturnString()
{
var awesomeMock = new Mock<IDoSomethingAwesome>();

var sut = new SutBuilder<ReallyInterstingService>()
.Build();
var result = sut.InterstingMethod();

Assert.IsNotNull(result);
Assert.IsInstanceOfType(result, typeof(string));
}
}

What wizardry is this say you? The SUT was constructed without the added dependency! The test is also protected against added dependencies in the future. The kingdom is saved! They lived happily ever after.

The End

Ok Ok Ok, that was a bit absurd. Anyway…

SutBuilder is a utility I wrote as part of an open source project of dot net testing utilities. The full source code is available here. What it does is simple: it constructs an instance of the generic type parameter. See the code below.

// These two statements have identical results
sut = new ReallyInterstingService(
new Mock<IDoSomethingAwesome>().Object,
new Mock<IDeathToAwesome>().Object);

sut = new SutBuilder<ReallyInterstingService>().Build();

Note: I’m using Moq to create mocks. I really dig that framework! It’s free and easy to use.

SutBuilder finds the constructor with the most arguments and uses it for instantiation. For each constructor argument, SutBuilder determines if an object of the argument type was passed in via the AddDependency method. If it was, it will pass that object to the constructor, otherwise it will pass an empty Moq mock of that type. AddDependency returns an instance of SutBuilder to provide a nice fluent API. See the code below.

IDoSomethingAwesome somethingAwesome = new DoSomethingAwesome();

// These two statements have identical results
sut = new ReallyInterstingService(
somethingAwesome,
new Mock<IDeathToAwesome>().Object);

sut = new SutBuilder<ReallyInterstingService>().AddDependency(somethingAwesome).Build();

All the magic happens in the Build method where It returns the created instance. That’s all there is to it!

As mentioned above, DotNetTestHelper is in it’s infancy. I will entertain any and all pull requests!

I’ve recently talked to several experienced developers that struggle with the async/await keywords introduced in .NET 4.5. There are literally hundred of good articles out there on the topic; however, they continue to struggle with two misconceptions. The first is that the async keyword is just another way to do multithreading. The other is that multithreading and asynchrony are meant to improve performance. This blog post will give some history and dispel these fallacies.

I may be dating myself here, but I remember working with 16 bit windows (when I was a young humpback freak). Back then, the OS would hand over the CPU to an application. The application completely controlled the CPU and would relinquish control once it ran to completion. The OS had no way of breaking into the application process. Therefore, fatal exceptions or infinite loops would cause the machine to become unresponsive and the only way to regain control was a reboot. In order to combat this problem, threads were introduced.

In a nutshell, a thread is a virtualization of the CPU. Threads are provisioned by the OS and scheduled to run for a quantum (slice of time). At the end of each quantum, the OS performs a context switch. A context switch consists of storing away the current state of the registers and restoring the registers for the next thread. Threads are scheduled by the OS in a round robin fashion. This is how OS can do more than one thing at a time. If an application gets caught in an infinite loop, the OS can kill it from a different thread.

The main take away concept here is that, although very efficient, new threads and context switches are not free. The more threads there are, the more context switches, and the less time each thread has on the CPU. When you introduce threading, the overall system performance goes DOWN. Threading was introduced to make the OS fault tolerant against application errors. Any time you can perform work in a single thread, that is preferred.

The most common use of multithreading is to keep an UI responsive. A UI thread needs to be available to respond to user input; therefore, work needs to be done in different threads.

Now, it’s time to make a seemingly contradictory statement: multithreading can make your programs run faster. Raw performance and overall application processing time are two different things. Today, many machines come equipped with multiple CPUs. If you have CPU bound work (see the next section), you can reduce application processing time by scheduling multiple CPUs to do work at the same time. This assumes that the OS does not have the CPUs busy doing other things…

Although the two concepts are somewhat related (you can do multithreading with the async/await keywords), they are very different. Asynchronous calls do pretty much the opposite of multithreading; they make a single thread do more. This is accomplished by not holding a thread hostage waiting on I/O bound work. Before we continue, lets define I/O bound verses CPU bound work.

I/O bound work – The OS makes a request to a device driver (network card, printer, hard drive, etc…). The device performs some work and returns data back to the OS.

CPU bound work – Actual processor cycles (long loops, calculations, etc…)

In reality, there is very little CPU bound work. Yes, it does exist but the majority of time intensive tasks fall into the I/O bound category.

When your application makes a request to a device driver (via the OS), it does not return data immediately. The OS sends the request to the device and then forgets about it until the device sends an interrupt indicating that it’s done. If your application is not using an asynchronous method call, the thread will just hang doing nothing while the device is doing it’s thing. An asynchronous method call will return the thread back to the OS so it can do other work. Once the OS receives the “I'm done” interrupt, the OS will schedule the work to resume. In this way, the OS avoids the overhead of creating new threads.

The above is an greatly simplified version of things; however, I hope it gave you enough of a conceptual understanding to enable you to use async/await in the right way. There are plenty of computer science resources out there if you want a deeper dive…

Thank you for reading! As always, feel free to hit me up with any questions.


text:
Indico search will be reestablished in the next version upgrade of the software: https://getindico.io/roadmap/

# Neutrino 2020

June 22, 2020 to July 2, 2020
US/Central timezone

## Model-independent way to test the CPT violation using NOvA, T2K and INO experiments

Not scheduled
10m
Poster

### Speaker

Dr Daljeet Kaur (SGTB Khalsa college, University of Delhi)

### Description

Charge-Parity-Time (CPT) symmetry governs that the oscillation parameters for neutrinos and anti-neutrinos are to be identical. Different mass and mixing parameters for these particles may give us a possible hint for CPT violation in the neutrino sector. Using this approach, we discuss the ability of long-baseline and atmospheric neutrino experiments to determine the difference between mass squared splittings ($\Delta m^{2}_{32}-\Delta\bar{m}^{2}_{32}$) and atmospheric mixing angles ($\sin^{2}\theta_{23}-\sin^{2}\bar{\theta}_{23}$) of neutrinos and anti-neutrinos. We show the joint sensitivity of the T2K, NOvA and INO experiments to such CPT violating observables in different possible combinations of octant for neutrinos and anti-neutrinos.

### Mini-abstract

Model-independent way to test the CPT violation using NOvA, T2K and INO experiments

### Primary author

Dr Daljeet Kaur (SGTB Khalsa college, University of Delhi)

### Presentation Materials

 daljeet_nu2020.mp4 poster_landscape.pdf

format: plain


text:
Calculating SNR from Frequency Domain

As I am newbie to signals, I have collected an appliance signal in frequency domain as follows:

(PSD- Power Spectral Density). So, I need to calculate the SNR (Signal to Noise Ratio) and BER (Bit Error Rate) caused by this signal in Powerline Calculation. So, I have made these codes in Matlab, but what I am stuck with is calculating the SNR and BER.

bits=10000; %number of bit
b=randi([0,1],1,bits); % generate random [0,1]
t=0:1/30:1-1/30; % Time period allocated for the signal

carrier_signa_l= sin(2*pi*t);
E1=sum(carrier_signa_l.^2);
carrier_signa_l=carrier_signa_l/sqrt(E1); %unit energy
carrier_signal_0 =0 * sin(2*pi*t); % zeros for 0 bits in the carrier signal

%MODULATION
for i=1:bits
if b(i)==1 % If bit = 1
else
end
end

• 1) You have to give the waveform of the "noise"; i.e. turn the appliance off. Or if the noise is part of the appliance then a more in-depth analysis must be done. – rrogers Aug 7 '18 at 19:26
• @rrogers I think the noise waveform can be as a white Gaussian noise. I don't know if this is what you meant by noise waveform. could you please elaborate more? – debugging XD Aug 8 '18 at 14:46
• Well, what does the frequency spectrum look like; signal bandwidth and noise bandwidth? Does it have 1/f noise or "pink noise"? What do you consider "signal". Actually, there is a difference between: "real noise" due to electronics, interfering signals/events. Interferences are things like things banging because of the appliance operation. External things are probably not useful whereas things banging inside the appliance would be pertinent. What I picture is a microphone on an "appliance". Is this wrong? But it doesn't make sense to worry about BER in that case? – rrogers Aug 9 '18 at 18:09

If it is a sinusoidal signal, there will be peak (among the frequency bins) in the frequency spectrum corresponding to the tone's frequency.

Ratio of the magnitude of this peak to the sum of the magnitudes of all other bins (which are noise) correspond to Signal to Noise Ratio.

But when its a non sinusoidal signal (like the one in your plot) you have to consider the relevant band of the signal instead of a single peak. you can quantify it by specifying a frequency bin corresponding to the mojor frquency component in the signal plus some leakage (related to bandwidth) into the nearby bins.

Please take a look in the following matlab code.

N               = 8192; % FFT length
leak            = 50;
% considering a leakage of signal energy to 50 bins on either side of major freq component

fft_s           = fft(inptSignal,N); % analysing freq spectrum
abs_fft_s       = abs(fft_s);

[~,p]           = max(abs_fft_s(1:N/2));
% Finding the peak in the freq spectrum

sigpos          = [p-leak:p+leak N-p-leak:N-p+leak];
% finding the bins corresponding to the signal around the major peak
% including leakage

sig_pow         = sum(abs_fft_s(sigpos)); % signal power = sum of magnitudes of bins conrresponding to signal
abs_fft_s([sigpos]) = 0; % making all bins corresponding to signal zero:==> what ever that remains is noise
noise_pow       = sum(abs_fft_s); % sum of rest of componenents == noise power

SNR             = 10*log10(sig_pow/noise_pow);

• thanks for your response, I was trying to understand the relation between sig_pow  and noise_pow. So is the inputSignal the appliance noise on the graph? or is it carrier_signa_l in my code? because I couldn't find the relation between them. The noise for me is the appliance on the graph above, while the signal power is my carrier_signa_l. – debugging XD Aug 12 '18 at 23:20
• also, if I create a random gaussian noise to my channel, can I calculate SNR to the signal as follows? for snr_deg=1:20 askn=awgn(ask,snr_deg); for i=1:bits fft_noise = fft(askn,N); % analysing noise freq spectrum abs_fft_noise= abs(fft_noise); [~,peak_noise] = max(abs_fft_noise(1:N/2)); noisepos = [peak_noise-leak:peak_noise+leak N-peak_noise-leak:N-peak_noise+leak]; abs_fft_noise([noisepos]) = 0; noise_power = sum(abs_fft_noise); SNR = 10*log10(sig_pow/noise_power ); end – debugging XD Aug 12 '18 at 23:58
• I know I have too many questions, but bear with me please, How can I detect BER from the given SNR? – debugging XD Aug 12 '18 at 23:59


text:
This topic is 679 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all,

I'm trying to 'extrude' 4 sides of a cube, from a linestrip with 4 vertices.

After playing around I think I'm almost there, but I'm missing something crucial.

This is what I do:

- create 4 vertices (VTX buffer)

- draw them as a linestrip

- execute my Geometry Shader, taking line[2] as input and a trianglestream as output

The result so far is that 2 of the 4 sides of the extracted cube (without 'caps'/ top-bottom) are drawn correct.

It might be something with the normals, not sure.

Here's the code, can someone help me out?

[maxvertexcount(4)]
void GSStrip(line VertexOut gin[2], inout TriangleStream<GeoOut> stream)
{
/* 4 vertices as input, 1 linestrip

1	.-----------.	2		0 = -1, 0, -1
|			|			1 = -1, 0,  1
|			|			2 =  1, 0,  1
|			|			3 =  1, 0, -1
0	.-----------.	3

create 4 new vertices 'above' 0 to 3 and draw sides of the cube using trianglestrips
the input linestrip is dimension[2] -> meaning the GS processes 'per line' / 2 connected vertices

2 .---------. 3
|			|		Y = up (2 and 3 are XZ == 0 and 1)
|			|
0 .---------. 1

Strip1: 2, 3, 0
Strip2: 3, 0, 1

*/
float4 v[4];
v[0] = float4(gin[0].CenterW, 1.0f);
v[1] = float4(gin[1].CenterW, 1.0f);

v[2] = v[0];
v[2].y = 15.0f;

v[3] = v[1];
v[3].y = 15.0f;

GeoOut gout;
[unroll]

for(int i = 0;i<4;++i)
{
gout.PosH     = mul(v[i], gViewProj);
gout.PosW     = v[i].xyz;
gout.NormalW  = float3(-1.0f, 0.0f, 0.0f);
gout.Tex      = gTexC[i];

stream.Append(gout);
}
//	stream.RestartStrip();
}

// in the code, creating the vtx buffer
vertices[0].Pos = XMFLOAT3(-5.0, 0.0f, -5.0f);
vertices[1].Pos = XMFLOAT3(-5.0, 0.0f, 5.0f);
vertices[2].Pos = XMFLOAT3(5.0, 0.0f, 5.0f);
vertices[3].Pos = XMFLOAT3(5.0, 0.0f, -5.0f);

##### Share on other sites

Been thinking about it, could it be that the Geometry shader executes per 2 vertices, not knowing the others.

That could explain that sharing vertices will not work.

If so, wouldn't a linestrip be able to solve this in the first place?

##### Share on other sites

Sharing verts should work fine. Are you using an indexed line strip? Otherwise what are you doing to connect v0 to v3? Normal attributes being wrong won't stop the side from rendering unless you're discarding in your ps.

If you're using a line list then yeah it will use two verts at a time.

Edited by Dingleberry

##### Share on other sites
I'm not entirely sure, but it looks like you problem could be the winding order of your output. With triangle strips you have to swap the order for every other triangle. You can also just output as a triangle list by restarting your strip after every three vertices (but you will have to output 6 instead of 4). Here is some more info on topology in direct3d msdn.

You can also test this by turning off back face culling and seeing if all of your geometry becomes visible.

##### Share on other sites
Thanks both, I'll do the check on culling tonight.

In the meantime I double checked, input type line is for both line lists and strips. In my code I've set the topology to linestrip, so I don't know where I might have accidentally used 'line list'

##### Share on other sites

I've tried disabling culling, now 3 out of 4 sides turn up.

The same result I achieve when drawing using 2 triangle lists (and a RestartStrip in between), with maxvertexcount[6].

Fixing the winding order for the strip also gives we 3 out of 4 sides of the cube now.

One conclusion of this is that the drawing order can indeed be an issue, I've tacked this now (using the initial Strip approach).

There's just one thing I don't understand, where's the 4th side?

Maybe I need to have the 1st vertex twice in the vtx buffer and use 5 vertices (ending with the one I started with).

Update: this does work. It seems all good now.

Now I should be able to change the 4 (/5) vertices into a list of vertices making up a circle. Using the same GS, that will finish the exercise I'm doing :)

Thanks for helping out

Edited by cozzie

##### Share on other sites

This topic is 679 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.


text:
# How do you solve \frac { 16} { 4} = \frac { 12} { x }?

Jul 4, 2017

$x = 3$

#### Explanation:

1. Cross multiply.

Multiply the numerator of the first fraction by the denominator of the second fraction, and set that equal to the numerator of the second fraction times the denominator of the first fraction. For example:

$\frac{a}{b} = \frac{c}{d}$

$a d = b c$

$\frac{16}{4} = \frac{12}{x}$

$16 x = 12 \left(4\right)$

$16 x = 48$

2. Divide both sides by 16 to find x.

$\frac{\cancel{16} x}{\cancel{16}} = \frac{48}{16}$

$x = 3$


text:
Lemma 15.9.4. Let $A \to B$ be a ring map and $J \subset B$ an ideal. If $A \to B$ is étale at every prime of $V(J)$, then there exists a $g \in B$ mapping to an invertible element of $B/J$ such that $A' = B_ g$ is étale over $A$.

Proof. The set of points of $\mathop{\mathrm{Spec}}(B)$ where $A \to B$ is not étale is a closed subset of $\mathop{\mathrm{Spec}}(B)$, see Algebra, Definition 10.143.1. Write this as $V(J')$ for some ideal $J' \subset B$. Then $V(J') \cap V(J) = \emptyset$ hence $J + J' = B$ by Algebra, Lemma 10.17.2. Write $1 = f + g$ with $f \in J$ and $g \in J'$. Then $g$ works. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).


text:
svfjmvqzrvpthsgvtbsjcmnxvcvhzcwk.pdf (2.11 MB)

# Reconfigurable Broadband Metasurface with Switchable Functionalities in the Visible Range

preprint
posted on 2023-03-17, 15:33 authored by Ehsanul Karim, Sajid Choudhury
In this article, we propose a broadband reconfigurable multifunctional meta-structure for the first time in the visible range. This device can be reconfigured between an achromatic metalens and a broadband absorber by switching the state of the phase change material (VO₂). Our designed VO₂ based novel multistage meta-atoms helped us overcome the inherent limitation of small optical contrast between PCM states in the visible regime, which hinders the realization of reconfigurable multifunctional devices in this band. We have used the finite-difference time-domain (FDTD) technique to characterize the designed multifunctional device. The structure showed a maximum switching ratio of 21.1dB between the on and off states, the highest among previously reported broadband metalens-absorber systems in any design band. A small focal length shift within $\pm5\%$ in the on state within the 678nm to 795nm band verifies the achromatic focusing characteristics. Our device proves the feasibility of reconfigurable metasurfaces with switchable functionalities in the visible band and has the prospects to bring about a revolution in next-generation integrated photonic platforms.

103194

## Exports

figshare. credit for all your research.


text:
Change the chapter
Question
There are particles called bottom mesons or $B^-$ mesons. One of them is the $B^-$ meson, which has a single negative charge; its baryon number is zero, as are its strangeness, charm, and topness. It has a bottomness of −1 . What is its quark configuration?
$\textrm{b}\overline{\textrm{u}}$
Solution Video

# OpenStax College Physics for AP® Courses Solution, Chapter 33, Problem 40 (Problems & Exercises) (1:40)

#### Sign up to view this solution video!

Rating

No votes have been submitted yet.

Video Transcript
This is College Physics Answers with Shaun Dychko. We are told that the B minus meson has a negative 1 charge, a bottomness of negative 1 and a baryon number, strangeness, charm and topness all of 0 and being a meson means it can have only two quarks in it and the question is what are those two quarks? So to have a bottomness of negative 1, it will certainly need to have a bottom regular matter quark and so that's why we wrote b here and then we need to add some other quark that will not introduce any strangeness, charm, bottomness or topness to the mix and so that precludes everything up until this up and down options and now we need to look at baryon numbers say... if we want a baryon number of 0, we need something that will offset the positive one-third baryon number from the bottom quark and so we will need a negative one-third baryon number from these particles and that means it has to be either an anti-up or an anti-down quark based on that and then we need to also consider the fact that it has to have a negative 1 charge and we have negative one-third in the bottom quark and so we need to further negative two-thirds to turn that into a total of negative 1 and so that means it has to be the up anti-quark in order to fit the bill with a negative 1 charge and a bottomness of negative 1 and all these other things being 0.


text:
# What is the HCF of 867 and 255 using the Euclid theorem?A.50B.51C.52D.53

Verified
125.6k+ views
Hint: HCF of two numbers is the largest number exactly dividing the two numbers. We are going to use the step by step procedure of Euclid's division algorithm using the division lemma.
According to Euclid’s division lemma, the HCF of any two positive integers $a$ and $b$, with $a > b$, is obtained as follows:
Step 1: Apply the division lemma to find $q$ and $r$ where $a = bq + r$ ,$0 \leqslant r < b$.
Step 2: if $r = 0$, the HCF is $b$. If $r \ne 0$, apply Euclid’s lemma to $b$ and $r$.
Step 3: Continue the process till the remainder is zero. The divisor at this stage will be the HCF of $a$ and $b$.

The largest positive integer which divides two or more integers without any remainder is called the Highest Common Factor (HCF) or Greatest Common Divisor or Greatest Common Factor (GCF).

We can find the HCF of two numbers using Euclid’s division algorithm.
Given the problem, we need to find HCF of $867$ and $255$ using Euclid's division algorithm.
Using the above steps with $a = 867$ and $b = 255$ because $867 > 255$, hence $a > b$.
Using division lemma on $a = 867$, we get
$867 = bq + r = 255 \times 3 + 102$, here $b = 255,q = 3,r = 102$ Remainder is not zero. So, we proceed further till $r=0$.
Applying Euclid’s lemma to $b$ and $r$, we get
$255 = 102 \times 2 + 51$, $b = 102,q = 2,r = 51$
Again, since $r \ne 0$, applying Euclid’s lemma to $b$ and $r$ and continuing the same step till we get $r = 0$.
$102 = 51 \times 2 + 0 = bq + r$
$\Rightarrow b = 51,q = 2,r = 0$ Here Remainder $r=0$, so, we stop the procedure here and check HCF which is $b = 51$.

Hence by Euclid’s division algorithm, $51$ is the HCF of $867$ and $255$. Hence option (B) is correct.

Note: HCF of two prime numbers is equal to one as a prime number has only two factors, one and the number itself. Always apply the division lemma to the largest number of the two while using Euclid’s division algorithm to calculate HCF. HCF of the two numbers will always be less than equal to the smaller of the numbers of which HCF is being calculated.


text:
# Haut PDF Measurement of the Z boson differential cross-section in transverse momentum in the electron-positron channel with the ATLAS detector at LHC.

### Measurement of the Z boson differential cross-section in transverse momentum in the electron-positron channel with the ATLAS detector at LHC.

Sampling 3 1.5 < |η| < 2.5 0.05 × 0.025 Table 3.1: Detailed granularity and pseudorapidity coverage of the ATLAS ECAL. 3.2.1 ECAL readout system The LAr calorimeter (ECAL, HEC, and FCAL) has an uniform readout architecture, whose block diagram is shown in figure 3.8 [ 37 ]. The electric signals produced in the cells are processed by electronic boards called ”front end boards” (FEB), which are mounted directly on the detector cryostat. Each of the 1524 FEBs processes the signal from up to 128 channels. The original triangular-shaped pulse produced in the electrodes is first amplified by a preamplifier array. The output of the preamplifier is then shaped and amplified again, splitting it into three gain scales (1-10-100). The signal is then sampled and stored during the LVL1 latency (up to 25 ns). When a positive LVL1 decision arrives, the signal is digitized in a 12 bits analog to digital converter (ADC), and the data sent via an optical link to the readout drivers electronic boards (ROD) [ 38 ].
En savoir plus

### Measurement of the double-differential high-mass Drell-Yan cross section in pp collisions at $\sqrt{s}$ = 8 TeV with the ATLAS detector

equation ( 1 ) now corresponds to electrons that pass the loose requirements but fail the requirement on the matching between track and cluster, instead of failing the full identification and isolation requirements. In addition, two alternative background-enriched samples are obtained using a tag-and-probe technique on the jet-triggered sample and on the sample triggered by the default analysis triggers, requiring the tag to fail certain aspects of the electron identification depending on the trigger. Furthermore, the event should have a missing transverse momentum smaller than 25 GeV, the probe needs to have the same charge as the tag and the invariant mass of the tag-and-probe pair needs to be outside the Z mass window from 71 to 111 GeV.
En savoir plus

### Measurement of the transverse momentum distribution of Z/gamma* bosons in proton-proton collisions at sqrt(s)=7 TeV with the ATLAS detector

T values in the range of 10 GeV to 40 GeV and slightly lower above 40 GeV. The Alpgen [ 19 ] and Sherpa [ 20 ] generators consider processes with up to five additional hard partons associ- ated with the produced boson and give a good descrip- tion of the entire measured spectrum, up to large p Z T , with χ 2 /d.o.f. of 31.9/19 and 16.8/19, respectively. Here, the enhancement of the cross section compared to the O(α 2 S ) prediction can be attributed to processes with large parton multiplicities [ 52 ], which correspond to tree-level diagrams of higher order in the strong coupling. Sherpa v1.2.3 and Alpgen v2.13 are used, with the latter being interfaced to Herwig v6.510 [ 16 ] for parton shower and fragmentation into particles, and to Jimmy v4.31 [ 32 ] to model underly- ing event contributions. For Alpgen, the CTEQ6L1 [ 53 ] PDF set is employed and the factorization scale is set to µ 2
En savoir plus

### Measurement of the associated production of a Higgs boson decaying into $b$-quarks with a vector boson at high transverse momentum in $pp$ collisions at $\sqrt{s} = 13$ TeV with the ATLAS detector

Table 1: Signal and background processes with the corresponding generators used for the nominal samples. If not specified, the order of the cross-section calculation refers to the expansion in the strong coupling constant (𝛼 S ). (★) The events were generated using the first PDF in the NNPDF3.0NLO set and subsequently reweighted to the PDF4LHC15NLO set [ 38 ] using the internal algorithm in Powheg-Box v2. (†) The NNLO(QCD)+NLO(EW) cross-section calculation for the 𝑝 𝑝 → 𝑍 𝐻 process already includes the 𝑔𝑔 → 𝑍 𝐻 contribution. The 𝑞𝑞 → 𝑍 𝐻 process is normalised using the cross-section for the 𝑝 𝑝 → 𝑍 𝐻 process, after subtracting the 𝑔𝑔 → 𝑍 𝐻 contribution. An additional scale factor is applied to the 𝑞𝑞 → 𝑉 𝐻 processes as a function of the transverse momentum of the vector boson, to account for electroweak (EW) corrections at NLO. This makes use of the 𝑉 𝐻 differential cross-section computed with Hawk [ 39 , 40 ].
En savoir plus

### Measurements of the production cross-section for a $Z$ boson in association with $b$-jets in proton-proton collisions at $\sqrt{s} = 13$ TeV with the ATLAS detector

The measurements are compared with predictions from a variety of Monte Carlo generators. In general, 5-flavour number scheme (5FNS) calculations at NLO accuracy predict the inclusive cross-sections well, while inclusive 4-flavour number scheme (4FNS) LO calculations largely underestimate the data. Predictions of Z bb at NLO accuracy agree with data only in the two-b-jets case, and underestimate the data in the case of events with at least one b-jet. Overall, Sherpa 5FNS (NLO), a 5FNS generator with matrix elements at NLO for up to two partons and matrix elements at LO for up to four partons, describes the various differential distributions within the experimental uncertainties. A significant discrepancy, common to all generators, is found for large values of m bb . The Sherpa Fusing 4FNS+5FNS (NLO) simulation, which combines 4FNS with 5FNS at NLO accuracy using a novel technique, agrees with Sherpa 5FNS (NLO), showing that in general at the scales tested by this measurement the effects of this merging are minor. A disagreement of about 20 30% is observed for large values of the leading b-jet transverse momentum, and for small angular separations between the Z boson and the leading b-jet. The 5FNS simulation with matrix elements for up to four partons at LO, as implemented in MGaMC + Py8 (LO), describes the data within the experimental uncertainties in most cases. In some cases this simulation is even better than predictions from MGaMC + Py8 5FNS (NLO), which has matrix elements with only one parton at NLO. This indicates the importance of simulations with several partons in the matrix element for a fair description of the data. The pure Z bb simulation at NLO in the 4FNS, as generated by Sherpa and MGaMC, shows significant deviations from the data even in the two-b-jets configuration, and this is more pronounced in MGaMC.
En savoir plus

### Measurement of the production cross-section of a single top quark in association with a Z boson in proton–proton collisions at 13 TeV with the ATLAS detector

3 Data and simulation samples The pp collision data sample used in this measurement was collected with the ATLAS detector at the LHC during the 2015 and 2016 data-taking periods, corresponding to integrated luminosities of 3.3 fb −1 and 32.8 fb −1 , respectively, for a total of 36.1 fb −1 , after requiring that the detector is fully operational. Events are considered if they were accepted by at least one of the single-muon or single-electron triggers [ 17 , 18 ]. The electron triggers select a cluster in the calorimeter matched to a track. Electrons must then satisfy identification criteria based on a multivariate technique using a likelihood discriminant. In 2015, electrons had to satisfy a ‘medium’ identification requirement and have a transverse energy of E T > 24 GeV. In 2016, electrons had to satisfy a ‘tight’ identification together with an isolation criterion and have E T > 26 GeV. To avoid efficiency loss due to isolation at high E T , an additional trigger was used, selecting ‘medium’ electrons with E T > 60 GeV. Muons are triggered on by matching tracks reconstructed in the muon spectrometer and in the inner detector. In 2015, muons had to satisfy a ‘loose’ isolation requirement and have a transverse momentum of p T > 20 GeV. In 2016, the isolation criteria were tightened and the threshold increased to p T = 26 GeV. In both years, another muon trigger without any isolation requirement was used, selecting muons with p T > 50 GeV.
En savoir plus

### Measurements of the production cross section of a $Z$ boson in association with jets in pp collisions at $\sqrt{s} = 13$ TeV with the ATLAS detector

The systematic uncertainties on the multijet background are derived by varying the mass range and bin width of the nominal fit, using the lepton transverse impact parameter d 0 as the fitting variable instead of the invariant mass, using alternative simulation samples for the templates, allowing the normalisations of the non-multijet components to vary independently or within a wider range, and varying the lepton resolution and energy/momentum scales. In addition, given the multiple sources of multijet background in the electron channel, an alternative template is constructed by requiring that the electrons fail to meet an isolation criterion instead of failing to meet the nominal signal selection electron identification cri- terion.
En savoir plus

### Contributions to a first measurement of the W-boson mass in the electron channel with the ATLAS detector

In soft scattering events, one or two protons dissociate into a system of particles with low trans- verse momentum. They are dominant processes at the LHC and include diffraction, Multiple- Partonic Interactions (MPI), soft initial- and final-state radiation (ISR /FSR), and beam-beam remnants. These phenomena are grouped according to experimental trigger. For example, min- imum bias interactions are the processes that are selected with a loose trigger intended to select inelastic collisions with as little bias as possible. The Underlying Event (UE) is the collection of all the soft processes that accompany a high-transverse momentum interaction of interest. It is typically studied as a function of the highest-transverse momentum particle in the event. On the other hand, in the hard scattering events, like Drell-Yan processes, Higgs production, etc., high transverse momentum particles are produced. The rates and properties for the hard pro- cesses can be predicted with good precision using the perturbation theory, due to the asymptotic freedom property where quarks interact as free particles at large energy scales.
En savoir plus

### Measurement of the cross section of high transverse momentum $Z\rightarrow b\bar{b}$ production in proton--proton collisions at $\sqrt{s}=8 TeV$ with the ATLAS Detector

1. Introduction High transverse momentum (p T ), hadronically decaying, electroweak-scale bosons have already been used in searches at the LHC [1–5], and are expected to play an increasingly signif- icant role as the LHC moves to higher centre-of-mass energies in 2015. Therefore it is important to study them directly. This Letter presents the observation of a high-p T Z → bb signal in a fully hadronic final state, and a measurement of its production cross section. The measurement is compared to the next-to- leading-order (NLO) matrix element plus parton-shower pre- dictions of POWHEG [6–9] and aMC@NLO [10], where the parton-shower, hadronisation and underlying-event modelling are provided by Pythia-8.165 [11] and Herwig++ [12] respec- tively. This first measurement of a high-p T electroweak-scale boson in an all-hadronic final state at the LHC demonstrates the validity of both the analysis techniques used and of the state-of-the-art NLO plus parton-shower particle-level predic- tions for electroweak-scale bosons decaying to bb. It is there- fore of great relevance for the search for the H → bb signal in the (most sensitive) high Higgs boson p T range [13], as well as for searches for TeV-scale resonances decaying to bbbb via
En savoir plus

### Measurement of the production cross section of jets in association with a Z boson in pp collisions at sqrt(s) = 7 TeV with the ATLAS detector

Exclusive jet multiplicities at the LHC are expected to be described by means of two benchmark patterns, ‘staircase scaling’ with R (n+1)/n constant and ‘Poisson scaling’ with R (n+1)/n inversely proportional to n [ 3 , 45 ], which provide limiting cases for certain kine- matic conditions. While for high multiplicities a flat exclusive jet multiplicity ratio is derived from the non-abelian nature of QCD FSR, at low multiplicity the jet multiplicity ratio is flat due to the combined effect of a Poisson-distributed multiplicity distribution and parton density suppression [ 3 ]. The emission of the first parton should be suppressed more strongly than the subsequent parton emissions. The underlying Poisson scaling is expected to emerge after introducing large scale differences between the core process (Z (+1 jet)) and the p jet T of the second leading jet. Two selections are chosen to test the two benchmark scenarios: (a) the standard Z + jets selection and (b) events where the leading jet has a transverse momentum in excess of 150 GeV.
En savoir plus

### Measurement of the $W^{\pm}Z$ boson pair-production cross section in $pp$ collisions at $\sqrt{s}=13$ TeV with the ATLAS Detector

certainties in the scale and resolution of the electron energy, muon momentum, jet energy and E miss T , as well as uncertainties in the scale factors applied to the simulation in order to reproduce the trigger, re- construction, identification and isolation efficiencies measured in data. The uncertainties in the jet energy scale are obtained from √ s = 13 TeV simulations and in situ measurements, similar to the ones described in Ref. [ 43 ]. The uncertainty in the jet energy resolution is derived by extrapolating measurements in Run-1 data to √ s = 13 TeV. The uncertainty in the E T miss is estimated by propagating the uncertainties in the transverse momenta of hard physics objects and by applying momentum scale and resolution uncer- tainties to the track-based soft term. The uncertainty associated with pile-up modelling is of the order of 1% and can reach up to 2.9% in the 0-jet bin of the unfolded jet multiplicity distribution. For the measure- ments of the W charge-dependent cross sections, an uncertainty arising from the charge misidentification of leptons is also considered. It a ffects only electrons and leads to an uncertainty of less than 0.05% in the ratio of W + Z to W − Z integrated cross sections determined by combining the four decay channels. The dominant contribution among the experimental systematic uncertainties in the eee and µee channels is due to the uncertainty in the electron identification e fficiency, contributing at most 1.4% uncertainty to the integrated cross section, while in the eµµ and µµµ channels it originates from the muon reconstruction efficiency and is at most 1.1%. The systematic uncertainties in the measured cross sections are determined by repeating the analysis after applying appropriate variations for each source of systematic uncertainty to the simulated samples.
En savoir plus

### Measurement of the differential cross-section of highly boosted top quarks as a function of their transverse momentum in $\sqrt{s}$ = 8 TeV proton-proton collisions using the ATLAS detector

an integrated luminosity of 20.3 fb −1 collected by the ATLAS detector at the LHC. Boosted hadronic- ally decaying top quarks with p T > 300 GeV are reconstructed within large-R jets and identified using jet substructure techniques. The measured p T spectrum is extended in this analysis relative to previous measurements. A particle-level cross-section is measured in a fiducial region that closely follows the event selection. The measurement uncertainty ranges from 13% to 29% and is generally dominated by the uncertainty on the jet energy scale of large-R jets. A parton-level cross-section is also reported, with larger systematic uncertainties due to its greater reliance on t¯t MC generators to correct the data. The measured cross-sections are compared to the predictions of several NLO and LO matrix-element generators normalized to NNLO+NNLL QCD calculations, and using various PDF sets. Previous measurements suggest that the top quark p T spectrum is well predicted at low p T by NLO and matrix-
En savoir plus

### Measurement of the cross-section for W boson production in association with b-jets in pp collisions at sqrt(s) = 7 TeV with the ATLAS detector

be on the efficiency plateau for the respective triggers. The selection efficiency of electrons and muons in simulated events, as well as their energy and momentum scale and resolution, are adjusted to reproduce those observed in Z →  events in data [ 29 – 31 ]. In order to reduce the large background from multijet production, lepton candidates are required to be isolated from neighbouring tracks within ∆R = 0.4 of their direction, as well as from other calorimeter energy depositions, corrected for pile-up contributions, within ∆R = 0.2. In the muon case, the sum of transverse momenta of neighbouring tracks must be less than 2 GeV, while the sum of the calorimeter transverse energies must be less than 1 GeV. In the electron case, these requirements range between 1.35 GeV and 3.15 GeV depending on p T and η in order to yield a constant efficiency across momentum ranges and detector regions. Additionally, leptons are required to be consistent with originating from the PV. Their longitudinal impact parameter (|z 0 |) with respect to the PV must be smaller
En savoir plus

### Measurement of Z boson Production in Pb+Pb Collisions at sqrt(s_NN)=2.76 TeV with the ATLAS Detector

We thank CERN for the very successful operation of the LHC, as well as the support staff from our institutions without whom ATLAS could not be operated efficiently. We acknowledge the support of ANPCyT, Ar- gentina; YerPhI, Armenia; ARC, Australia; BMWF and FWF, Austria; ANAS, Azerbaijan; SSTC, Be- larus; CNPq and FAPESP, Brazil; NSERC, NRC and CFI, Canada; CERN; CONICYT, Chile; CAS, MOST and NSFC, China; COLCIENCIAS, Colombia; MSMT CR, MPO CR and VSC CR, Czech Republic; DNRF, DNSRC and Lundbeck Foundation, Denmark; EPLANET and ERC, European Union; IN2P3-CNRS, CEA-DSM/IRFU, France; GNSF, Georgia; BMBF, DFG, HGF, MPG and AvH Foundation, Germany; GSRT, Greece; ISF, MINERVA, GIF, DIP and Benoziyo Center, Israel; INFN, Italy; MEXT and JSPS, Japan; CNRST, Morocco; FOM and NWO, Netherlands; BRF and RCN, Norway; MNiSW, Poland; GRICES and FCT, Portugal; MERYS (MECTS), Romania; MES of Rus- sia and ROSATOM, Russian Federation; JINR; MSTD, Serbia; MSSR, Slovakia; ARRS and MVZT, Slovenia; DST/NRF, South Africa; MICINN, Spain; SRC and Wallenberg Foundation, Sweden; SER, SNSF and Can- tons of Bern and Geneva, Switzerland; NSC, Taiwan; TAEK, Turkey; STFC, the Royal Society and Lever- hulme Trust, United Kingdom; DOE and NSF, United States of America.
En savoir plus

### Measurement of the $t\bar{t}$ production cross-section as a function of jet multiplicity and jet transverse momentum in 7 TeV proton-proton collisions with the ATLAS detector

Acknowledgments We thank CERN for the very successful operation of the LHC, as well as the support staff from our institutions without whom ATLAS could not be operated efficiently. We acknowledge the support of ANPCyT, Argentina; YerPhI, Armenia; ARC, Aus- tralia; BMWF and FWF, Austria; ANAS, Azerbaijan; SSTC, Belarus; CNPq and FAPESP, Brazil; NSERC, NRC and CFI, Canada; CERN; CONICYT, Chile; CAS, MOST and NSFC, China; COLCIENCIAS, Colombia; MSMT CR, MPO CR and VSC CR, Czech Republic; DNRF, DNSRC and Lundbeck Foundation, Denmark; EPLANET, ERC and NSRF, European Union; IN2P3-CNRS, CEA-DSM/IRFU, France; GNSF, Georgia; BMBF, DFG, HGF, MPG and AvH Foundation, Germany; GSRT and NSRF, Greece; ISF, MIN- ERVA, GIF, I-CORE and Benoziyo Center, Israel; INFN, Italy; MEXT and JSPS, Japan; CNRST, Morocco; FOM and NWO, Netherlands; BRF and RCN, Norway; MNiSW and NCN, Poland; GRICES and FCT, Portugal; MNE/IFA, Romania; MES of Russia and ROSATOM, Russian Federation; JINR; MSTD, Serbia; MSSR, Slovakia; ARRS and MIZŠ, Slovenia; DST/NRF, South Africa; MINECO, Spain; SRC and Wallenberg Foundation, Sweden; SER, SNSF and Cantons of Bern and Geneva, Switzerland; NSC, Taiwan; TAEK, Turkey; STFC, the Royal Society and Leverhulme Trust, United Kingdom; DOE and NSF, United States of America.
En savoir plus

### Observation of electroweak production of two jets and a $Z$-boson pair with the ATLAS detector at the LHC

M. Campanelli 95 , A. Camplani 40 , A. Campoverde 151 , V. Canale 70a,70b , A. Canesse 104 , M. Cano Bret 60c , J. Cantero 130 , T. Cao 161 , Y. Cao 173 , M.D.M. Capeans Garrido 36 , M. Capua 41b,41a , R. Cardarelli 74a , F. Cardillo 149 , G. Carducci 41b,41a , I. Carli 143 , T. Carli 36 , G. Carlino 70a , B.T. Carlson 139 , E.M. Carlson 176,168a , L. Carminati 69a,69b , R.M.D. Carney 153 , S. Caron 119 , E. Carquin 147d , S. Carrá 46 , J.W.S. Carter 167 , M.P. Casado 14,e , A.F. Casha 167 , R. Castelijn 120 , F.L. Castillo 174 , L. Castillo Garcia 14 , V. Castillo Gimenez 174 , N.F. Castro 140a,140e , A. Catinaccio 36 , J.R. Catmore 134 , A. Cattai 36 , V. Cavaliere 29 , E. Cavallaro 14 , M. Cavalli-Sforza 14 , V. Cavasinni 72a,72b , E. Celebi 12b , L. Cerda Alberich 174 , K. Cerny 131 , A.S. Cerqueira 81a , A. Cerri 156 , L. Cerrito 74a,74b , F. Cerutti 18 , A. Cervelli 23b,23a , S.A. Cetin 12b , Z. Chadi 35a , D. Chakraborty 121 , J. Chan 181 , W.S. Chan 120 , W.Y. Chan 91 , J.D. Chapman 32 , B. Chargeishvili 159b , D.G. Charlton 21 , T.P. Charman 93 , C.C. Chau 34 , S. Che 127 , S. Chekanov 6 , S.V. Chekulaev 168a , G.A. Chelkov 80 , B. Chen 79 , C. Chen 60a , C.H. Chen 79 , H. Chen 29 , J. Chen 60a , J. Chen 39 , J. Chen 26 , S. Chen 137 , S.J. Chen 15c , X. Chen 15b , Y-H. Chen 46 , H.C. Cheng 63a , H.J. Cheng 15a , A. Cheplakov 80 , E. Cheremushkina 123 , R. Cherkaoui El Moursli 35e , E. Cheu 7 , K. Cheung 64 , T.J.A. Chevalérias 145 , L. Chevalier 145 , V. Chiarella 51 , G. Chiarelli 72a , G. Chiodini 68a , A.S. Chisholm 21 , A. Chitan 27b , I. Chiu 163 , Y.H. Chiu 176 , M.V. Chizhov 80 , K. Choi 11 , A.R. Chomont 73a,73b , S. Chouridou 162 , Y.S. Chow 120 ,
En savoir plus

### Measurement of differential production cross-sections for a $Z$ boson in association with $b$-jets in 7 TeV proton-proton collisions with the ATLAS detector

C. Hsu 146c , P.J. Hsu 82 , S.-C. Hsu 139 , D. Hu 35 , X. Hu 25 , Y. Huang 42 , Z. Hubacek 30 , F. Hubaut 84 , F. Huegging 21 , T.B. Huffman 119 , E.W. Hughes 35 , G. Hughes 71 , M. Huhtinen 30 , T.A. H¨ ulsing 82 , M. Hurwitz 15 , N. Huseynov 64,b , J. Huston 89 , J. Huth 57 , G. Iacobucci 49 , G. Iakovidis 10 , I. Ibragimov 142 , L. Iconomidou-Fayard 116 , E. Ideal 177 , P. Iengo 103a , O. Igonkina 106 , T. Iizawa 172 , Y. Ikegami 65 , K. Ikematsu 142 , M. Ikeno 65 , Y. Ilchenko 31,o , D. Iliadis 155 , N. Ilic 159 , Y. Inamaru 66 , T. Ince 100 , P. Ioannou 9 , M. Iodice 135a , K. Iordanidou 9 , V. Ippolito 57 , A. Irles Quiles 168 , C. Isaksson 167 , M. Ishino 67 , M. Ishitsuka 158 , R. Ishmukhametov 110 , C. Issever 119 , S. Istin 19a , J.M. Iturbe Ponce 83 , R. Iuppa 134a,134b , J. Ivarsson 80 , W. Iwanski 39 , H. Iwasaki 65 , J.M. Izen 41 , V. Izzo 103a , B. Jackson 121 , M. Jackson 73 , P. Jackson 1 , M.R. Jaekel 30 , V. Jain 2 , K. Jakobs 48 , S. Jakobsen 30 , T. Jakoubek 126 , J. Jakubek 127 , D.O. Jamin 152 , D.K. Jana 78 , E. Jansen 77 , H. Jansen 30 , J. Janssen 21 , M. Janus 171 , G. Jarlskog 80 , N. Javadov 64,b , T. Jav˚ urek 48 , L. Jeanty 15 , J. Jejelava 51a ,p , G.-Y. Jeng 151 , D. Jennens 87 , P. Jenni 48,q , J. Jentzsch 43 , C. Jeske 171 , S. J´ez´equel 5 , H. Ji 174 , J. Jia 149 , Y. Jiang 33b , M. Jimenez Belenguer 42 , S. Jin 33a , A. Jinaru 26a , O. Jinnouchi 158 , M.D. Joergensen 36 , K.E. Johansson 147a,147b , P. Johansson 140 , K.A. Johns 7 , K. Jon-And 147a,147b , G. Jones 171 , R.W.L. Jones 71 , T.J. Jones 73 , J. Jongmanns 58a , P.M. Jorge 125a,125b , K.D. Joshi 83 , J. Jovicevic 148 , X. Ju 174 , C.A. Jung 43 , R.M. Jungst 30 , P. Jussel 61 , A. Juste Rozas 12,n , M. Kaci 168 , A. Kaczmarska 39 , M. Kado 116 , H. Kagan 110 , M. Kagan 144 , E. Kajomovitz 45 , C.W. Kalderon 119 , S. Kama 40 , A. Kamenshchikov 129 , N. Kanaya 156 , M. Kaneda 30 , S. Kaneti 28 , V.A. Kantserov 97 , J. Kanzaki 65 , B. Kaplan 109 , A. Kapliy 31 , D. Kar 53 , K. Karakostas 10 , N. Karastathis 10 , M. Karnevskiy 82 , S.N. Karpov 64 , Z.M. Karpova 64 , K. Karthik 109 , V. Kartvelishvili 71 , A.N. Karyukhin 129 , L. Kashif 174 , G. Kasieczka 58b , R.D. Kass 110 , A. Kastanas 14 , Y. Kataoka 156 , A. Katre 49 , J. Katzy 42 , V. Kaushik 7 , K. Kawagoe 69 , T. Kawamoto 156 , G. Kawamura 54 , S. Kazama 156 , V.F. Kazanin 108 , M.Y. Kazarinov 64 , R. Keeler 170 , R. Kehoe 40 , M. Keil 54 , J.S. Keller 42 , J.J. Kempster 76 , H. Keoshkerian 5 , O. Kepka 126 , B.P. Kerˇsevan 74 , S. Kersten 176 , K. Kessoku 156 ,
En savoir plus

### Measurement of the isolated diphoton cross section in pp collisions at sqrt(s) = 7 TeV with the ATLAS detector

E.B. Klinkby 35 , T. Klioutchnikova 29 , P.F. Klok 104 , S. Klous 105 , E.-E. Kluge 58a , T. Kluge 73 , P. Kluit 105 , S. Kluth 99 , E. Kneringer 62 , J. Knobloch 29 , E.B.F.G. Knoops 83 , A. Knue 54 , B.R. Ko 44 , T. Kobayashi 155 , M. Kobel 43 , M. Kocian 143 , A. Kocnar 113 , P. Kodys 126 , K. K¨ oneke 29 , A.C. K¨ onig 104 , S. Koenig 81 , L. K¨opke 81 , F. Koetsveld 104 , P. Koevesarki 20 , T. Koffas 29 , E. Koffeman 105 , F. Kohn 54 , Z. Kohout 127 , T. Kohriki 66 , T. Koi 143 , T. Kokott 20 , G.M. Kolachev 107 , H. Kolanoski 15 , V. Kolesnikov 65 , I. Koletsou 89a , J. Koll 88 , D. Kollar 29 , M. Kollefrath 48 , S.D. Kolya 82 , A.A. Komar 94 , J.R. Komaragiri 142 , Y. Komori 155 , T. Kondo 66 , T. Kono 41,o , A.I. Kononov 48 , R. Konoplich 108,p , N. Konstantinidis 77 , A. Kootz 174 , S. Koperny 37 , S.V. Kopikov 128 , K. Korcyl 38 , K. Kordas 154 , V. Koreshev 128 , A. Korn 14 , A. Korol 107 , I. Korolkov 11 , E.V. Korolkova 139 , V.A. Korotkov 128 , O. Kortner 99 , S. Kortner 99 , V.V. Kostyukhin 20 , M.J. Kotam¨ aki 29 , S. Kotov 99 , V.M. Kotov 65 , A. Kotwal 44 , C. Kourkoumelis 8 , V. Kouskoura 154 , A. Koutsman 105 , R. Kowalewski 169 , T.Z. Kowalski 37 , W. Kozanecki 136 , A.S. Kozhin 128 ,
En savoir plus

### Measurement of the $ZZ$ Production Cross Section in $pp$ Collisions at $\sqrt{s}$ = 13 TeV with the ATLAS Detector

MSMT CR, MPO CR and VSC CR, Czech Republic; DNRF, DNSRC and Lundbeck Foundation, Den- mark; IN2P3-CNRS, CEA-DSM/IRFU, France; GNSF, Georgia; BMBF, HGF, and MPG, Germany; GSRT, Greece; RGC, Hong Kong SAR, China; ISF, I-CORE and Benoziyo Center, Israel; INFN, Italy; MEXT and JSPS, Japan; CNRST, Morocco; FOM and NWO, Netherlands; RCN, Norway; MNiSW and NCN, Poland; FCT, Portugal; MNE/IFA, Romania; MES of Russia and NRC KI, Russian Feder- ation; JINR; MESTD, Serbia; MSSR, Slovakia; ARRS and MIZŠ, Slovenia; DST /NRF, South Africa; MINECO, Spain; SRC and Wallenberg Foundation, Sweden; SERI, SNSF and Cantons of Bern and Geneva, Switzerland; MOST, Taiwan; TAEK, Turkey; STFC, United Kingdom; DOE and NSF, United States of America. In addition, individual groups and members have received support from BCKDF, the Canada Council, CANARIE, CRC, Compute Canada, FQRNT, and the Ontario Innovation Trust, Canada; EPLANET, ERC, FP7, Horizon 2020 and Marie Skłodowska-Curie Actions, European Union; Investisse- ments d’Avenir Labex and Idex, ANR, Region Auvergne and Fondation Partager le Savoir, France; DFG and AvH Foundation, Germany; Herakleitos, Thales and Aristeia programmes co-financed by EU-ESF and the Greek NSRF; BSF, GIF and Minerva, Israel; BRF, Norway; the Royal Society and Leverhulme Trust, United Kingdom.
En savoir plus

### Measurement of the jet mass in high transverse momentum $Z(\rightarrow b\overline{b})\gamma$ production at $\sqrt{s}= 13$ TeV using the ATLAS detector

The systematic uncertainty due to the dependence of the unfolding on the prior signal distribution, as obtained from MC simulations, is evaluated through a data-driven ‘closure test’. The simulated signal sample is reweighted at particle level such that the distribution of the fully simulated reconstructed jet mass more closely matches the observed data. Pseudo-data from the reweighted signal MC sample are then unfolded using the response matrix from the original unweighted signal MC sample, and the unfolded result is compared with the reweighted particle-level distribution. Differences observed in this comparison are taken as systematic uncertainties in the unfolding, and are referred to as unfolding non-closure uncertainties in the following. The uncertainty due to the dependence on the number of unfolding iteration steps is negligible. The statistical uncertainties in the signal MC sample, used to build the response matrix, and background templates are also considered.
En savoir plus


text:
# Projectile motion

Parabolic water trajectory
Initial velocity of parabolic throwing
Components of initial velocity of parabolic throwing

Projectile motion is a form of motion in which an object or particle (called a projectile) is thrown near the earth's surface, and it moves along a curved path under the action of gravity only. The only force of significance that acts on the object is gravity, which acts downward to cause a downward acceleration. There are no horizontal forces needed to maintain the horizontal motion – consistent with the concept of inertia.

## The initial velocity

If the projectile is launched with an initial velocity $\mathbf{v}_0$, then it can be written as

$\mathbf{v}_0 = v_{0x}\mathbf{i} + v_{0y}\mathbf{j}$.

The components $v_{0x}$ and $v_{0y}$ can be found if the angle, $\theta$ is known:

$v_{0x} = v_0\cos\theta$,
$v_{0y} = v_0\sin\theta$.

If the projectile's range, launch angle, and drop height are known, launch velocity can be found using Newton's formula

$V_0 = \sqrt{{R^2 g} \over {R \sin 2\theta + 2h \cos^2\theta}}$.

The launch angle is usually expressed by the symbol theta, but often the symbol alpha is used.

## Kinematic quantities of projectile motion

In projectile motion, the horizontal motion and the vertical motion are independent of each other; that is, neither motion affects the other.

### Acceleration

Since there is no acceleration in the horizontal direction, the velocity in the horizontal direction is constant, being equal to $\mathbf{v}_0 \cos(\theta)$. The vertical motion of the projectile is the motion of a particle during its free fall. Here the acceleration is constant, being equal to $g$.[1] The components of the acceleration are:

$a_x = 0$,
$a_y =- g$.

### Velocity

The horizontal component of the velocity of the object remains unchanged throughout the motion. The vertical component of the velocity increases linearly, because the acceleration due to gravity is constant. The accelerations in the $x$ and $y$ directions can be integrated to solve for the components of velocity at any time $t$, as follows:

$v_x=v_0 \cos(\theta)$,
$v_y=v_0 \sin(\theta) - gt$.

The magnitude of the velocity (under the Pythagorean theorem):

$v=\sqrt{v_x^2 + v_y^2 \ }$.

### Displacement

Displacement and coordinates of parabolic throwing

At any time $t$, the projectile's horizontal and vertical displacement:

$x = v_0 t \cos(\theta)$,
$y = v_0 t \sin(\theta) - \frac{1}{2}gt^2$.

The magnitude of the displacement:

$\Delta r=\sqrt{x^2 + y^2 \ }$.

## Parabolic trajectory

Consider the equations,

$x = v_0 t \cos(\theta)$,
$y = v_0 t \sin(\theta) - \frac{1}{2}gt^2$.

If t is eliminated between these two equations the following equation is obtained:

$y=\tan(\theta) \cdot x-\frac{g}{2v^2_{0}\cos^2 \theta} \cdot x^2$,

This equation is the equation of a parabola. Since $g$, $\theta$, and $\mathbf{v}_0$ are constants, the above equation is of the form

$y=ax+bx^2$,

in which $a$ and $b$ are constants. This is the equation of a parabola, so the path is parabolic. The axis of the parabola is vertical.

## Time of Flight

Total time for which the projectile remains in the air is called Time of flight.

$y = v_0 t \sin(\theta) - \frac{1}{2}gt^2$

After the fight, Projectile returns to horizontal axis, so y=0

$0 = v_0 t \sin(\theta) - \frac{1}{2}gt^2$
$v_0 t \sin(\theta) = \frac{1}{2}gt^2$
$v_0 \sin(\theta) = \frac{1}{2}gt$
$t = \frac{2 v_0 \sin(\theta)}{g}$

Note that we have neglected air resistance on the projectile.

## The maximum height of projectile

Maximum height of projectile

The highest height which the object will reach is known as the peak of the object's motion. The increase of the height will last, until $v_y=0$, that is,

$0=v_0 \sin(\theta) - gt_h$.

Time to reach the maximum height:

$t_h = \frac{v_0 \sin(\theta)}{g}$.

From the vertical displacement of the maximum height of projectile:

$h = v_0 t_h \sin(\theta) - \frac{1}{2} gt^2_h$
$h = \frac{v_0^2 \sin^2(\theta)}{2g}$ .

## Relation between horizontal range and maximum height

The relation between the range $R$ on the horizontal plane and the maximum height $h$ reached at $\frac{t_d}{2}$ is:

$h = \frac{R\tan\theta}{4}$

## The maximum distance of projectile

Main article: Range of a projectile
The maximum distance of projectile

It is important to note that the Range and the Maximum height of the Projectile does not depend upon mass of the trajected body. Hence Range and Maximum height are equal for all those bodies which are thrown by same velocity and direction. Air resistance does not affect displacement of projectile.

The horizontal range d of the projectile is the horizontal distance the projectile has travelled when it returns to its initial height (y = 0).

$0 = v_0 t_d \sin(\theta) - \frac{1}{2}gt_d^2$.

Time to reach ground:

$t_d = \frac{2v_0 \sin(\theta)}{g}$.

From the horizontal displacement the maximum distance of projectile:

$d = v_0 t_d \cos(\theta)$,

so[2]

$d = \frac{v_0^2}{g}\sin(2\theta)$.

Note that $d$ has its maximum value when

$\sin 2\theta=1$,

which necessarily corresponds to

$2\theta=90^\circ$,

or

$\theta=45^\circ$.

## Application of the work energy theorem

According to the work-energy theorem the vertical component of velocity are listed below:

$v_y^2 = (v_0 \sin \theta)^2-2gy$.

## Projectile motion in art

• The sixth panel of Hwaseonghaenghaengdo Byeongpun (화성행행도 병풍) describes King Shooting Arrows at Deukjung Pavilion, 1795-02-14. According to palace records, Lady Hyegyeong, the King's mother, was so pleased to be presented with this 8-panels screen of such magnificent scale and stunning precision that she rewarded each of the seven artists who participated in its production. The artists were Choe Deuk-hyeon, Kim Deuk-sin, Yi Myeong-gyu, Jang Han-jong (1768 - 1815), Yun Seok-keun, Heo Sik (1762 - ?) and Yi In-mun.
Arrows
득중정어사
화성행행도 병풍
Hwaseonghaenghaengdo Byeongpun

## References

• Budó Ágoston: Kísérleti fizika I.,Budapest, Tankönyvkiadó, 1986. ISBN 963 17 8772 9 (Hungarian)
• Ifj. Zátonyi Sándor: Fizika 9.,Budapest, Nemzeti Tankönyvkiadó, 2009. ISBN 978-963-19-6082-2 (Hungarian)
• Hack Frigyes: Négyjegyű függvénytáblázatok, összefüggések és adatok, Budapest, Nemzeti Tankönyvkiadó, 2004. ISBN 963-19-3506-X (Hungarian)

## Notes

1. ^ The $g$ is the acceleration due to gravity. ($9.81 m/s^2$ near the surface of the Earth).
2. ^ $2\cdot\sin(\alpha)\cdot\cos(\alpha) = \sin(2\alpha)$
• Since the value of g is not specific the body with high velocity over g limit cannot be measured using the concept of the projectile motion


text:
# On The Shape Of Trig Graphs To A Precalc Student

I want to know why 3 types of trig graphs have the shape that they do:

1. Secant graphs. Why would $\dfrac {1}{\cos \theta}$ result in a graph like this? I get the cosine graph - it makes sense when you compare it to a unit circle. But I don't understand it at the same level for secant graphs. Can someone please explain why the secant graph is shaped like that given it's equation?

2. Cosecant graphs. Same as above.

3. Cotangent graphs. Why would $\dfrac {1}{\tan \theta}$ cause the tangent graph to flip? Because when you look at a cotangent graph, it's basically a reflected tangent graph. Why would $\dfrac {1}{\cos \theta}$ create a graph that looks like that?

Can you please give the explanation for why the graphs are shaped like that not too rigorously, and at the level of a Precalculus student who hasn't learnt Calculus yet? Thank you.

• When $\cos(\theta) = \pm 1$, then $\sec(\theta) = \pm 1$. When $\cos(\theta) = 0$, then $\sec(\theta)$ is undefined---this implies the possible existence of an asymptote (you need limits to confirm this, and that is usually a topic for the end of pre-calc, or for calculus). Between the ones and the asymptotes, the cosine function either increases or decreases monotonically, so the secant function will have the same behaviour, only in the opposite direction. This can be made rigorous without calculus (though calculus makes it easier). Jul 26, 2018 at 14:31
• That being said, I think that this is a question which might be more appropriate for the Mathematics Educators SE. Jul 26, 2018 at 14:32
• @XanderHenderson I'm not an educator though; I'm a student. But yeah, thanks for the response. Last thing though, what about for cotangent graphs? Why would it be a perfect reversal of tangent graph? Jul 26, 2018 at 14:35
• Because $\tan(\dfrac{\pi}{2}-x) = \cot(x)$ Jul 26, 2018 at 15:16
• " Can someone please explain why the secant graph is shaped like that given it's equation? " Can you explain why you don't understand it? It's $\frac 1{\cos x}$ and as $\cos x$ is periodic from 0 to 1 to 0 to -1 back to 0, It's reciprical will be periodic from $+\infty$ to $1$ back to $\infty$then an axis jump to $-\infty$ up to $-1$ and back down. .... And that is exactly what it does do. So from my point of view $\frac 1{\cos x}$ exactly as I expect others would expect it to do. So ... I'm confused why you are confused. Jul 26, 2018 at 16:03

consider how behavior in a graph of $f(x)$ will affect behavior in a graph $\frac 1 {f(x)}$. For values where $0 < f(x) < 1$ then we will have $\infty > \frac 1{f(x)}$, with little changes from $teensy$ to $\frac 12 teensy$ resulting in huge stretches from $huge$ to $2 \times huge$. And if $f(x)$ goes through from $teensy$ to $0$ to $-teensy$ then $\frac 1{f(x)}$ will get asymptotic to infinity, be infinite(undefined) at a point, and jump to "negative infinity" and then imediate start reducing to more moderate negative values as $f(x)$ because more siginificant negative values.
If $1 < f(x)$ we will have $1 > \frac 1{f(x)} > 0$ and if $f(x)$ grows blithely huge toward $huge$, $double-huge$ and $huge^2$ then $\frac 1{f(x)}$ will tend to flatline toward $0$.
$\cos x$ is periodic from $0$ to $1$ back down $0$ and and to $-1$ to $0$ to $1$ etc. and $\frac 1{\cos x}$ behaves exactly as we'd expect, for $+\infty$ down to a minimum of $1$ (as $\cos x$ goes from $0$ to $1$ and peaks) and then back to $\infty$. Then as $\cos x$ goes from tiny positive through $0$, to tiny negative. $\frac 1{\cos x}$ goess to $+\infty$ and jumps to $-\infty$ and starts surfaces up to $-1$ and then (as $\cos x$ reaches a nadir of $-1$ and heads back to $0$) $\frac 1{\cos x}$ reaches max at $-1$ and starts plumeting back to $-\infty. As for$\tan x$and$\frac 1{\tan x}$.$\tan x$will go from$\infty$where$\cos x = 1; \sin x= 0$to$1$where$\cos x = \sin x = \frac 1{\sqrt 2}$. In this stage$\sin x$is increasing faster than$\cos x$is decreasing. So there will be a bulge to the right in the graph. Then as$\cos x\to 0$and$\sin x \to 1$we have$\frac {\sin x}{\cos x} \to \infty$. and as$\cos x$is not decreasing faster than$\sin x$is increasing, the graph stretches to be long and skinny. Then as$\cos x$goes through$0$to negative, we jump to negative infinity. In the same interval$\cot x = \frac {\cos x}{\sin x}$starts and$\frac 10 = \infty$and decreases down to$1$and then to$0$. The exact same but in reverse. Then as$\cos x$goes threough$0$to negative$\frac {\cos x}{\sin x}$goes ther$0$to negative. Useful to realize$\cot x =\frac {\cos x}{\sin x } = \frac {\sin(\frac \pi 2 - x)}{\cos \frac \pi 2 - x)} = \tan (\frac \pi 2 - x)$so that explains more rigororously why their graphs are symmetriic. Pictures often help. Here's a graphical depiction of$\cos \theta$and$\sec \theta = \frac{1}{\cos \theta}$for$\theta = \frac{\pi}{3} = 60$degrees. The situation for$\cos \theta$is represented by the right triangle$\triangle ABC$. The radius is$CA = 1$, and the cosine of$\theta$is represented by the length of$CB = \frac12$. Now, extend$CA$rightward to$A'$, which lies on the vertical line tangent to the unit circle. I submit that the secant of$\theta$is represented by the length$CA'$, on this basis: •$\triangle ABC$and$\triangle A'B'C$are similar. • Therefore$CA'$is to$CB'$as$CA$is to$CB$. • Since$CB' = CA = 1$, we have that$CA'$is to$1$as$1$is to$CB$. • Symbolically,$CA' = \frac{CA'}{1} = \frac{1}{CB}$. • And since$CB$is$\cos \theta$,$CA' = \frac{1}{\cos \theta} = \sec \theta$. Finally, imagine increasing$\theta$toward$\frac{\pi}{2} = 90$degrees. It is evident that$A'$must move vertically upward—without bound, in fact, and that is indeed what the plot of$\sec \theta$does. If you increase$\theta$beyond$\frac{\pi}{2}$, but continue to extend$AC$rightward toward the same vertical tangent, you find that$\sec \theta$is negative and initially large, but decreasing toward$0$as you approach$\theta = \pi = 180\$ degrees.


text:
## Greens

1. The problem statement, all variables and given/known data

verify greens for the integral (xy^2 i - x^2y j) dot dr over c, where c = y = x^2 from (-1,1) to (1,1). Evaluate both sides independantly to achieve the same answer

2. Relevant equations

3. The attempt at a solution

so i took the partials and got

-2xy - 2yx = -4xy, shouldnt it equal o.
 PhysOrg.com science news on PhysOrg.com >> Galaxies fed by funnels of fuel>> The better to see you with: Scientists build record-setting metamaterial flat lens>> Google eyes emerging markets networks
 Blog Entries: 1 Recognitions: Gold Member Homework Help Why should it equal zero? What exactly is the question asking you to check?
 Recognitions: Gold Member Science Advisor Staff Emeritus I'm confused by this. Green's theorem relates the integral around a closed path to the integral of the expression you give over the region bounded by the closed path. "c = y = x^2 from (-1,1) to (1,1)" is not a closed path and so does not bound a region. Did you intend to include the line from (1, 1) back to (-1, 1)? In any case that expression you give would be 0 only if the integral around the closed path were 0.

## Greens

ya it does say "from -1,1 to 1,1 and the line segment from 1,1 to -1,1. sorry i didnt realize that was important
 Recognitions: Gold Member Science Advisor Staff Emeritus Then I strongly suggest you revies Green's theorem!
 Recognitions: Homework Help Forgot $$d\vec{r}$$. Use $$\oint_{C}\left( xy^2\hat{i} -x^2y\hat{j}\right)\cdot d\vec{r} = \oint_{C}\left( xy^2\hat{i} -x^2y\hat{j}\right)\cdot \left( dx\hat{i} +2x\, dy\hat{j}\right) = \oint_{C}xy^2\, dx -2x^3y\, dy$$
 oook check this $$\oint$$xy2dx - 2x3dy P = xy2 Q = 2x3y $$\int$$$$\int$$6x2y - 2xy dy dx -1 < x < 1, x2
 Recognitions: Homework Help $$\oint_{C}xy^2\, dx -2x^3y\, dy = \int_{-1}^{1}\int_{x^2}^{1}\left( \frac{\partial }{\partial x}\left( -2x^3y\right) -\frac{\partial }{\partial y}\left( xy^2\right)\right) dydx$$ $$= \int_{-1}^{1}\int_{x^2}^{1}\left(-6x^2y-2xy\right) dydx = \int_{-1}^{1}\left[ y^2\left(3x^2+x\right)\right|_{y=1}^{x^2} dx$$ $$= \int_{-1}^{1}\left(3x^6+x^5-3x^2-x\right) dx=-{\scriptstyle \frac{8}{7}}$$


text:
# Revision history [back]

### Bug in line 2.4.8?

I am running VS2012 c++/cli on Win 8.1 64 bit.

I recently updated my libraries from version 2.4.6 to 2.4.8. Previously, I had a series of functions that called the line function and those were working perfectly (or at least I never saw this problem).

Now, I updated to 2.4.8 and what I thought were simple functions are crashing at run time.

In particular, the following line is causing a crash:

cv::line(Frame,cv::Point(0,375),cv::Point(1000,375),CV_RGB(200,0,0),1,8,0);

Frame is Mat that has 1000 columns and 750 rows.

When I run this, I get an error saying "Run Time Check Failure #2 - Stack around the variable 'pt' was corrupted."

It is pointing me to the last line of the function "ThickLine" in the file drawing.cpp.

### Bug in line 2.4.8?

I am running VS2012 c++/cli on Win 8.1 64 bit.

I recently updated my libraries from version 2.4.6 to 2.4.8. Previously, I had a series of functions that called the line function and those were working perfectly (or at least I never saw this problem).

Now, I updated to 2.4.8 and what I thought were simple functions are crashing at run time.

In particular, the following line is causing a crash:

cv::line(Frame,cv::Point(0,375),cv::Point(1000,375),CV_RGB(200,0,0),1,8,0);

Frame is a Mat that has 1000 columns and 750 rows.

When I run this, I get an error saying "Run Time Check Failure #2 - Stack around the variable 'pt' was corrupted."

It is pointing me to the last line of the function "ThickLine" in the file drawing.cpp.

### Bug in line 2.4.8?

I am running VS2012 c++/cli on Win 8.1 64 bit.

I recently updated my libraries from version 2.4.6 to 2.4.8. Previously, I had a series of functions that called the line function and those were working perfectly (or at least I never saw this problem).

Now, I updated to 2.4.8 and what I thought were simple functions are crashing at run time.

In particular, the following line is causing a crash:

cv::line(Frame,cv::Point(0,375),cv::Point(1000,375),CV_RGB(200,0,0),1,8,0);
cv::line(Frame,cv::Point(0,375),cv::Point(999,375),CV_RGB(200,0,0),1,8,0);

Frame is a Mat that has 1000 columns and 750 rows.

When I run this, I get an error saying "Run Time Check Failure #2 - Stack around the variable 'pt' was corrupted."

It is pointing me to the last line of the function "ThickLine" in the file drawing.cpp.

### Bug in line 2.4.8?

I am running VS2012 c++/cli on Win 8.1 64 bit.

I recently updated my libraries from version 2.4.6 to 2.4.8. Previously, I had a series of functions that called the line function and those were working perfectly (or at least I never saw this problem).

Now, I updated to 2.4.8 and what I thought were simple functions are crashing at run time.

In particular, the following line code is causing a crash:

cv::Mat Frame;
cv::line(Frame,cv::Point(0,375),cv::Point(999,375),CV_RGB(200,0,0),1,8,0);

Frame is a Mat that has 1000 columns and 750 rows.

When I run this, I get an error saying "Run Time Check Failure #2 - Stack around the variable 'pt' was corrupted."

It is pointing me to the last line of the function "ThickLine" in the file drawing.cpp.

### Bug in line function in 2.4.8?

I am running VS2012 c++/cli on Win 8.1 64 bit.

I recently updated my libraries from version 2.4.6 to 2.4.8. Previously, I had a series of functions that called the line function and those were working perfectly (or at least I never saw this problem).

Now, I updated to 2.4.8 and what I thought were simple functions are crashing at run time.

In particular, the following code is causing a crash:

cv::Mat Frame;