introduction to trigger / data acquisition / data analysis
DESCRIPTION
Introduction to Trigger / Data Acquisition / Data Analysis. EIROforum School on Instrumentation ESI 2009 Niko Neufeld, CERN-PH. Introduction. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/1.jpg)
Introduction to Trigger / Data
Acquisition / Data Analysis
EIROforum School on Instrumentation ESI 2009
Niko Neufeld, CERN-PH
![Page 2: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/2.jpg)
Introduction• Trigger & Data Acquisition are
indispensible parts of most electronically read out experiments. They can be anything from trivial side-aspects to vast (wo-)man-century collective efforts
• Technically they consist mainly of electronics, computer science, networking and (we hope) a bit of (insight into) physics
• Analysis of the data is what links our theoretical ideas to our observations and measurements
• Some material and lots of inspiration for this lecture was taken from lectures by my predecessors and colleagues in the CERN summer-school programme
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 2
![Page 3: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/3.jpg)
Outline
• Introduction– Trigger– Data acquisition– The first data
acquisition campaign
• A simple DAQ system– One sensor– More and more sensors
• Read-out with buses– Crates & Mechanics – The VME Bus
• Some hints for your own DAQ and a look at a large system
• Data Analysis– General remarks– Clusterfinding in a
Calorimete– A nice example by B.
Jacobson
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 3
![Page 4: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/4.jpg)
Disclaimer
• Trigger, DAQ and (even more so) Analysis are vast subjects covering a lot of physics, electronics, computing and mathematics
• Based entirely on personal bias I have selected a few topics
• While most of it will be only an overview at a few places we will go into some technical detail
• Some things will be only touched upon or left out altogether – information on those you will find in the references at the end– Electronics (lectures by J. Christiansen)– High Level Trigger– Experiment Control (= Run Control + Detector Control /
DCS)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 4
![Page 5: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/5.jpg)
Historical introduction
![Page 6: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/6.jpg)
Tycho Brahe and the Orbit of Mars
• First measurement campaign• Systematic data acquisition
– Controlled conditions (same time of the day and month)
– Careful observation of boundary conditions (weather, light conditions etc…) - important for data quality / systematic uncertainties
I've studied all available charts of the planets and stars and none of them match the others. There are just as many measurements and methods as there are astronomers and all of them disagree. What's needed is a long term project with the aim of mapping the heavens conducted from a single location over a period of several years.
Tycho Brahe, 1563 (age 17).
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 6
![Page 7: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/7.jpg)
The First Systematic Data Acquisition
• Data acquired over 18 years, normally e every month• Each measurement lasted at least 1 hr with the naked eye• Red line (only in the animated version) shows comparison with modern theory
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 7
![Page 8: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/8.jpg)
Tycho’s Trigger & DAQ in Today’s Terminology
• Bandwith (bw) = Amount of data transferred / per unit of time– “Transferred” = written to his logbook– “unit of time” = duration of measurement – bwTycho = ~ 100 Bytes / h (compare with
LHCb 40.000.000.000 Bytes / s)
• Trigger = in general something which tells you when is the “right” moment to take your data– In Tycho’s case the position of the sun,
respectively the moon was the trigger– the trigger rate ~ 3.85 x 10-6 Hz (compare
with LHCb 1.0 x 106 Hz)Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 8
![Page 9: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/9.jpg)
Some More Thoughts on Tycho
• Tycho did not do the correct analysis of the Mars data, this was done by Johannes Kepler (1571-1630), eventually paving the way for Newton’s laws
• Morale: the size & speed of a DAQ system are not correlated with the importance of the discovery!
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 9
![Page 10: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/10.jpg)
Raw data physics
• These are Tycho’s raw data• We need to convert them to orbital
coordinates around the earth (or sun) to confront them with theory
• And of course correct for quality (“minus bona”), time, etc…
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 10
![Page 11: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/11.jpg)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
Tycho’s theory
Kepler’s Laws1) Planets move in ellipses
with the Sun at one focus2) Planets in their orbits
sweep out equal areas in equal times
3) A planets rotational period squared equals the third power of its semi major-axis
11
![Page 12: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/12.jpg)
Trigger
![Page 13: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/13.jpg)
What is a trigger?
An open-source3D rally game?
The most famoushorse in movie history?
An important partof a Beretta
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 13
![Page 14: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/14.jpg)
What is a trigger?
Wikipedia: “A trigger is a system that uses simple criteria to rapidly decide which events in a particle detector to keep when only a small fraction of the total can be recorded. “
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 14
![Page 15: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/15.jpg)
Trigger
• Simple• Rapid• Selective• When only a small fraction can be
recorded
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 15
![Page 16: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/16.jpg)
Trivial DAQ
ADC Card
External View
sensor
sensor CPU
disk
ADC storage
Physical View
Logical ViewProces-
sing
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 16
![Page 17: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/17.jpg)
Trivial DAQ with a real trigger
ADC
Sensor
Delay
Proces-sing
Interrupt
Discriminator
Trigger
Start
storage
What if a trigger is produced when the ADC orprocessing is busy?
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 17
![Page 18: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/18.jpg)
Trivial DAQ with a real trigger 2
ADC
Sensor
Delay
Proces-sing
Interrupt
Discriminator
Trigger
Start
Deadtime (%) is the ratio between the time the DAQis busy and the total time.
SetQClear
and not
Busy Logic
Ready
storage
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 18
![Page 19: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/19.jpg)
Trivial DAQ with a real trigger 3
ADC
Sensor
Delay
Proces-sing
Discriminator
Trigger
Start
Buffers are introduced to de-randomize data, to decouple the data production from the data consumption. Better performance.
Busy Logic
FIFOFull
DataReady
and
storage
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 19
![Page 20: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/20.jpg)
Effect of derandomizing
The system is busy during the ADC conversion time if the FIFO is not full (assuming the storage can always follow!)
The system is busy during the ADC conversion time + processing time until the data is written to the storage
ADC
Sensor
Delay
Proces-sing
Interrupt
Discriminator
Trigger
Start
SetQ
Clear
and not
Busy Logic
Ready
storage
ADC
Sensor
Delay
Proces-sing
Discriminator
Trigger
Start Busy Logic
FIFOFull
DataReady
and
storage
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 20
![Page 21: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/21.jpg)
Choosing a trigger
• Keep it simple! (Remember Einstein: “As simple as possible, but not simpler”)
• Even though “premature optimization is the root of all evil”, think about efficiency (buffering)
• Try to have few adjustable parameters: scanning for a good working point will otherwise be a night-mare
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 21
![Page 22: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/22.jpg)
A Very Simple Data Acquisition System
![Page 23: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/23.jpg)
Measuring Temperature
• Suppose you are given a Pt100 thermo-resistor
• We read the temperature as a voltage with a digital voltmeter
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 23
![Page 24: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/24.jpg)
Reading Out Automatically
Note how small the sensor has become.In DAQ we normally need not worry about the details of the things we readout
USB/RS232
#include <libusb.h>struct usb_bus *bus; struct usb_device *dev; usb_dev_handle *vmh = 0; usb_find_busses(); usb_find_devices(); for (bus = usb_busses; bus; bus = bus->next)
for (dev = bus->devices; dev; dev = dev->next)
if (dev->descriptor.idVendor == HOBBICO) vmh = usb_open(dev);usb_bulk_read(vmh ,3,&u,sizeof(float),500);
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 24
![Page 25: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/25.jpg)
Read-out 16 Sensors
• Buy 4 x 4-port USB hub (very cheap) (+ 15 more voltmeters)
• Adapt our little DAQ program
• No fundamental (architectural) change to our DAQ
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 25
![Page 26: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/26.jpg)
Read-out 160 Sensors
• For a moment we (might) consider to buy 52 USB hubs, 160 Voltmeters
• …but hopefully we abandon the idea very quickly, before we start cabling this!
• Expensive, cumbersome, fragile our data acquisition system is not scalable
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 26
![Page 27: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/27.jpg)
Read-out with Buses
![Page 28: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/28.jpg)
A Better DAQ for Many (temperature) Sensors
• Buy or build a compact multi-port volt-meter module, e.g. 16 inputs
• Put many of these multi-port modules together in a common chassis or crate
• The modules need– Mechanical support– Power– A standardized way to
access their data (our measurement values)
• All this is provided by standards for (readout) electronics such as VME (IEEE 1014)
Backplane Connectors(for power and data)
VME Board Plugs into Backplane
7U VME Crate(a.k.a. “Subrack”)
19”
7U
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 28
![Page 29: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/29.jpg)
DAQ for 160 Sensors Using VME
• Readout boards in a VME-crate– mechanical
standard for– electrical
standard for power on the backplane
– signal and protocol standard for communication on a bus
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 29
![Page 30: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/30.jpg)
A Word on Mechanics and Pizzas
• The width and height of racks and crates are measured in US units: inches (in, '') and U – 1 in = 25.4 mm– 1 U = 1.75 in = 44.45 mm
• The width of a "standard" rack is 19 in.
• The height of a crate (also sub-rack) is measured in Us
• Rack-mountable things, in particular computers, which are 1 U high are often called pizza-boxes
• At least in Europe, the depth is measured in mm
• Gory details can be found in IEEE 1101.x (VME mechanics standard)
49 U
19 in
1 U
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 30
![Page 31: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/31.jpg)
Communication in a Crate: Buses
• A bus connects two or more devices and allows the to communicate
• The bus is shared between all devices on the bus arbitration is required
• Devices can be masters or slaves (some can be both)
• Devices can be uniquely identified ("addressed") on the bus
Device 1
Master
Data Lines
Slave
Select Line
Device 2 Device 4Device 3Device 2 Device 4
Master
Data Lines
Slave
Select Line
Device 1 Device 3
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 31
![Page 32: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/32.jpg)
Buses
• Famous examples: PCI, USB, VME, SCSI– older standards: CAMAC, ISA– upcoming: ATCA– many more: FireWire, I2C, Profibus, etc…
• Buses can be– local: PCI– external peripherals: USB– in crates: VME, compactPCI, ATCA– long distance: CAN, Profibus
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 32
![Page 33: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/33.jpg)
The VME Bus
• In a VME crate we can find three main types of modules– The controller which monitors
and arbitrates the bus– Masters read data from and
write data to slaves– Slaves send data to and
receive data from masters
• Addressing of modules– In VME each module occupies a
part of a (flat) range of addresses (24 bit to 32 bit)
– Address range of modules is hardwired (conflicts!)
0x000-0x1ff
0x200-0x2ff
0x300-0x3ff
0x400-0x4ff
0x500-0x5ff
0x600-0x6ff
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 33
![Page 34: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/34.jpg)
VME protocol 1) Arbitration
• Arbitration: Master asserts*) BR#, Controller answers by asserting BG#
• If there are several masters requesting at the same time the one physically closest to the controller wins
• The winning master drives BBSY* high to indicate that the bus is now in use
Pictures from http://www.interfacebus.com*) assert means driving the line to logical 0 (VME control lines are inverted or active-low)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 34
![Page 35: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/35.jpg)
VME protocol 2) Write transfer • The Master writes
data and address to the data / respectively address bus
• It asserts DS* and AS* to signal that the data and address are valid
• The slave reads and acknowledges by asserting DTACK
• The master releases DS*, AS* and BSBSY*, the cycle is complete
• Note: there is no clock! The slave can respond whenever it wants. VME is an asynchronous bus
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 35
![Page 36: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/36.jpg)
Speed Considerations
• Theoretically ~ 16 MB/s can be achieved– assuming the databus to be full 32-bit
wide– the master never has to relinquish bus
master ship• Better performance by using block-
transfers
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 36
![Page 37: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/37.jpg)
VME protocol 3) Block transfer
• After an address cycle several (up to 256) data cycles are performed
• The slave is supposed to increment the address counter
• The additional delays for asserting and acknowledging the address are removed
• Performance goes up to 40 MB/s
• In PCI this is referred to as "burst-transfer"
• Block transfers are essential for Direct Memory Access (DMA)
• More performance can be gained by using the address bus also for data (VME64)
• Block transfers are essential for Direct Memory Access (DMA)
• More performance can be gained by using the address bus also for data (VME64)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 37
![Page 38: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/38.jpg)
Dis-/Advantages of buses
• Relatively simple to implement– Constant number of lines– Each device implements the same interface
• Easy to add new devices– topological information of the bus can be used
for automagically choosing addresses for bus devices: this is what plug and play is all about
• One misbehaving device can bring the entire crate down
• At best the scaling for readout from a single unit is 1 / n
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 38
![Page 39: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/39.jpg)
Switched Networks
• In a switched network each node is connected either to another node or to a switch
• Switches can be connected to other switches
• A path from one node to another leads through 1 or more switches (this number is sometimes referred to as the number of "hops" )
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 39
![Page 40: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/40.jpg)
Connecting Devices in a Network
• In a network a device is identified by a network address– eg: our phone-number, the MAC address of
your computer• Devices communicate by sending
messages (frames, packets) to each other• Some establish a connection lilke the
telephone network, some simply send messages
• Modern networks are switched with point-to-point links– circuit switching, packet switching
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 40
![Page 41: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/41.jpg)
A Switched Network
• While 2 can send data to 1 and 4, 3 can send at full speed to 5
• 2 can distribute the share the bandwidth between 1 and 4 as needed
5
41
2
3
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 41
![Page 42: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/42.jpg)
Network Technologies
• Examples: – The telephone network – Ethernet (IEEE 802.3)– ATM (the backbone for GSM cell-phones)– Infiniband– Myrinet– many, many more
• Note: some of these have "bus"-features as well (Ethernet, Infiniband)
• Network technologies are sometimes functionally grouped– Cluster interconnect (Myrinet, Infiniband) 15 m – Local area network (Ethernet), 100 m to 10 km – Wide area network (ATM, SONET) > 50 km
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 42
![Page 43: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/43.jpg)
Ethernet
• Cheap, cheap, cheap• Unreliable – but in practice transmission errors
are very low• Available in many different speeds and physical
media– 10, 100, 1000 MBit, 10 Gbit and soon up to 100
Gbit/s on a single link– optical fibres– copper unshielded twisted pairs– power-lines– wireless
• We use IP or TCP/IP over Ethernet• By far the most widely used local area network
technology (even starting on the WAN)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 43
![Page 44: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/44.jpg)
Raw data format
Those who can read binary and those who cannot
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
There are 10 kinds of people in the world
44
![Page 45: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/45.jpg)
Binary vs Text
• 11010110 Pros:– compact– quick to write & read
(no conversion)
• Cons:– opaque (humans need
tool to read it)– depends on the
machine architecture (endinaness, floating point format)
– life-time bound to availability of software which can read it
• <TEXT></TEXT> Pros:– universally readable– can be parsed and
edited equally easily by humans and machines
– long-lived (ASCII has not changed over decades)
– machine independent
• Cons: – slow to read/write– low information density
(can be improved by compression)
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 45
![Page 46: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/46.jpg)
A little checklist for your DAQ
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
Data can be acquired with PC hardware
A single PC suffices? Yes
Data rate
(MB/s)
Standard software
available?
Yes
Do it yorself in Linux
No
Use it (e.g. Labview)
YesRaw data > 1 MB /
day
Use binary
Yes
Use text
No
Can be done with several
PCs?
Connect them via Ethernet
No
Yes
Use crate-based Electronics
(CompactPCI/VME)
No
Remember:YMMV
46
![Page 47: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/47.jpg)
Data Acquisition for a Large Experiment
![Page 48: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/48.jpg)
Moving on to Bigger Things…
The CMS Detector
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 48
![Page 49: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/49.jpg)
Moving on to Bigger Things…
?
• 15 million detector channels• @ 40 MHz• = ~15 * 1,000,000 * 40 * 1,000,000 bytes
• = ~ 600 TB/sec
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 49
![Page 50: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/50.jpg)
Designing a DAQ System for a Large HEP Experiment
• What defines "large"?– The number of channels: for LHC experiments
O(107) channels• a (digitized) channel can be between 1 and ~ 14 bits
– The rate: for LHC experiments everything happens at 40.08 MHz, the LHC bunch crossing frequency (This corresponds to 24.9500998 ns or 25 ns among friends)
• HEP experiments usually consist of many different sub-detectors: tracking, calorimetry, particle-ID, muon-detectors
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 50
![Page 51: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/51.jpg)
Challenges for the L1 at LHC• N (channels) ~ O(107); ≈20 interactions every 25
ns– need huge number of connections
• Need to synchronize detector elements to (better than) 25 ns
• In some cases: detector signal/time of flight > 25 ns– integrate more than one bunch crossing's worth of
information– need to identify bunch crossing...
• It's On-Line (cannot go back and recover events)– need to monitor selection - need very good control over
all conditions
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 51
![Page 52: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/52.jpg)
Trigger• No (affordable) DAQ system
could read out O(107) channels at 40 MHz 400 TBit/s to read out – even assuming binary channels!
• What’s worse: most of these millions of events per second are totally uninteresting: one Higgs event every 0.02 seconds
• A first level trigger (Level-1, L1) must somehow select the more interesting events and tell us which ones to deal with any further
Black magic happening here
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 52
![Page 53: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/53.jpg)
Know Your Enemy: pp Collisions at 14 TeV at 1034 cm-2s-1
(pp) = 70 mb --> >7 x 108 /s (!)
• In ATLAS and CMS* 20 min bias events will overlap
• HZZZ H 4 muons:the cleanest(“golden”)signature
Reconstructed tracks with pt > 25 GeV
And this (not the H though…)
repeats every 25 ns…
*)LHCb @2x1033 cm-2-1 isn’t much nicer and in Alice (PbPb) it will be even worseTrigger / DAQ / Analysis ESI 2009, Niko Neufeld 53
![Page 54: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/54.jpg)
How to defeat minimum bias: transverse momentum pt
µ
e
n
p
Use prompt data (calorimetry and muons) to identify: High p
t electron, muon, jets,
missing ET
CALORIMETERs Cluster finding and energy deposition evaluation
MUON System Segment and track finding
New data every 25 ns Decision latency ~ µs
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 54
![Page 55: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/55.jpg)
Collision rate 40 MHzLevel-1 Maximum trigger rate
100 kHzAverage event size ≈1 MbyteEvent Flow Control ≈106 Mssg/s
No. of In-Out units 512Readout network bandwidth ≈
1 Terabit/s Event filter computing power ≈
106 SI95Data production ≈Tbyte/dayNo. of PC motherboards ≈Thousands
CMS DAQ
Congestion is handled by synchronizing the sources to send in discrete time-slots: Barrel Shifting
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 55
![Page 56: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/56.jpg)
WE GOT THE DATA.WHAT NOW?
![Page 57: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/57.jpg)
Reconstruction and Analysis
And that in simple terms is how we analysethe data
Apologies for this being HEP biased
Difference between Reconstruction andAnalysis is sociologico-technical:
Usually reconstruction is done in common for all analysis done on aspecific set of data.Analysis is something very personal:(even then there are 2000 co-authors )
![Page 58: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/58.jpg)
• We intend to fill this gap
The goal is to understand in the most general; that’s usually also the simplest.
- A. Eddington
We use experiments to inquire about what “reality” does.
Theory &Parameters
Reality
58Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 59: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/59.jpg)
Theory
• “Clear statement of how the world works”
Particle Data Group, Barnett et al
Additional term goes here
59Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 60: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/60.jpg)
What does the data mean?
Digitized data:
“Address”: what detector element took the reading
“Value”: What the electronics wrote down
Look up type, calibration info
Look up/calculate spatial position
Check valid, convert to useful units/form
Draw
0x800010000xFEEDBABE 0xCAFECAFE 0xDEADBEEF
60Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 61: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/61.jpg)
It’s a long way to pμ
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 61
![Page 62: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/62.jpg)
Reconstruction: Calorimeter Energy
• Goal is to measure particle properties in the event– “Finding” stage attempts to find patterns that indicate what
happened – “Fitting” stage attempts to extract the best possible measurement
from those patterns.
62Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 63: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/63.jpg)
Finding• Clusters of energy in a calorimeter are due to the
original particles– Clustering algorithm groups individual channel energies– Don’t want to miss any; don’t want to pick up fakes
• Many algorithms exist– Scan for one or more channels above a high threshold as
“seeds”– Include channels on each side above a lower threshold:
0
10
20
30
40
50
60
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Channel
Not perfect! Doesn’t use prior knowledge about event, cluster shape, etc 63Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 64: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/64.jpg)
One lump or two?
• Hard to tune thresholds to get this right.
• Perhaps a smarter algorithm would do better?
0
10
20
30
40
50
60
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
Channel
64Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 65: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/65.jpg)
Fitting• From the clusters, fit for energy and position
– Complicated by noise & limited information• Simple algorithm: Sum of channels for energy,
average for position
-1 0 +1
50%, 50% Cluster at 0, evenly split
85%, 15% Cluster at -0.5, unevenly split
100%, 0% Cluster at -1
x 50%( 1) 50%(1) 0.0
x 85%( 1) 15%(1) 0.70
x 100%( 1) 0(1) 1.0
65Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 66: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/66.jpg)
RICH
• Probably the most complex detector
• Measures the true velocity of a particle cosθ=1/n β
• Typically 5 stable charged particles
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 66
![Page 67: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/67.jpg)
RICH pattern recognition
• Staggering complexity
• For each track (20 to 50) consider each photon (100 to 200) under each hypothesis (5) and minimize!
• Involves ray tracing the photon through the detector
• O(N4) lots of CPU needed!
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 67
![Page 68: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/68.jpg)
A very nice example by Bob Jacobson
![Page 69: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/69.jpg)
A simple analysis: What’s BR(Z->+-)?
• Measure:
• Take a sample of events, and count those with a final state.
– Two tracks, approximately back-to-back with the expected |p|
• Empirically, other kinds of events have more tracks
– Right number of muon hits in outer layers• Muons are very penetrating, travel through entire detector
– Expected energy in calorimeter• Electrons will deposit most of their energy early in the
calorimeter; muons leave little
BR Z 0 Number of events
Total number of events
69Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 70: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/70.jpg)
70Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 71: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/71.jpg)
Not Z->+-
71Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 72: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/72.jpg)
Not Z->+-
72Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 73: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/73.jpg)
Not Z->+-
73Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 74: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/74.jpg)
Not Z->+-
74Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 75: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/75.jpg)
Z->+-
75Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 76: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/76.jpg)
Not Z->+-
76Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 77: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/77.jpg)
Not Z->+-
77Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 78: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/78.jpg)
Not Z->+-
78Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 79: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/79.jpg)
Z->+-
79Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 80: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/80.jpg)
Not Z->+-
80Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 81: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/81.jpg)
Not Z->+-
81Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 82: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/82.jpg)
Not Z->+-
82Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 83: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/83.jpg)
Not Z->+-
83Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 84: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/84.jpg)
Not Z->+-
84Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 85: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/85.jpg)
Not Z->+-
85Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 86: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/86.jpg)
Not Z->+-
86Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 87: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/87.jpg)
Summary• We have a result: BR(Z->+-) = 2/45• But there’s a lot more to do!• Statistical error
– We saw 2 events, but it could easily have been 1 or 3– Those fluctuations go like the square-root of the number
of events:
– To reduce that uncertainty, you need lots of events• Need to record lots of events in the detector, and then process
them
• Systematic error– What if you only see 50% of the +- events?
• Due to detector imperfections, poor understanding, etc?
BR Z 0 N
Ntotal
N
Ntotal
N seenN
BR Z 0 Nseen Ntotal
0.50 0.05
87Trigger / DAQ / Analysis ESI 2009, Niko Neufeld
![Page 88: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/88.jpg)
This is only the beginning…
• Statistics• Systematic errors need a case-by-
case treatment• Complex detector response can only
be estimated by simulation• etc…
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 88
![Page 89: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/89.jpg)
Summary
• We have touched on a few key-concepts of trigger, DAQ and analysis of data
• While there is literature and of course a strong underpinning in science and engineering, these three fields are essentially crafts
• The best thing is to learn them from others and by doing them
• Have fun!
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 89
![Page 90: Introduction to Trigger / Data Acquisition / Data Analysis](https://reader035.vdocuments.us/reader035/viewer/2022062309/568157a8550346895dc537a7/html5/thumbnails/90.jpg)
Further Reading
• Trigger– Game:
http://www.happypenguin.org/show?Trigger
• Buses– VME: http://www.vita.com/– PCI
http://www.pcisig.com/• Network and Protocols
– Ethernet“Ethernet: The Definitive Guide”, O’Reilly, C. Spurgeon
– TCP/IP“TCP/IP Illustrated”, W. R. Stevens
– Protocols: RFCswww.ietf.orgin particular RFC1925 http://www.ietf.org/rfc/rfc1925.txt“The 12 networking truths” is required reading
• Wikipedia (!!!) and references therein – for all computing related stuff this is usually excellent
• Conferences– IEEE Realtime– ICALEPCS– CHEP– IEEE NSS-MIC
• Journals– IEEE Transactions on Nuclear
Science, in particular the proceedings of the IEEE Realtime conferences
– IEEE Transactions on Communications
• Analysis & Statistics– Fruehwirth & Regler “Data
Analysis Techniques for High Energy Physics”
– G. Cowan “Statistical Data Analysis”
Trigger / DAQ / Analysis ESI 2009, Niko Neufeld 90