# Simple Event display

## CAEN data

The main program to run a basic event diplay is the `./Display`. It produces a 3D plot showing the energy depositions in the 2024 test beam geometry, with the sizes and colors corresponding to the bins' contents. It can be run be run either over a particular event in the given run, or a range. It can only be run on calibrated data, otherwise all bins will be filled with `0`.

Sometimes, if run over more than 100 events, the colors are not assigned - to be debugged, the problem doesn't appear when run over a signle event.

Following options are implemented:

* common with the rest of the macros:
  * \`-d\` : switch to debug info with debug level 0 to n
  * \`-F\` : set plot extention expliticly, default is pdf
  * \`-i\` : input file in root format,
  * \`-P\` : plots directory path,
  * \`-r\` : name of run list file,
  * \`-y\` : setting year externally,
* specific for the event display:
  * &#x20;\`-e\` : setting event number to plot, default 0,
  * \`-N\` : setting number of events to plot, default 1,
  * \`-M\` : plot only muon triggered events (in the given range)

Example of how to run it:

```
./Display -d 1 -i $INPUT_FILE -r $RUN_LIST -P $PLOT_DIR -e 5 [-N 10 -M]
```

The primary script implemented for the event display is `runEventDisplay_2024.sh`:

<figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2F1S7lAxTsHS8YzjPdlXpT%2FElectrons_EventDisplay_evt28.png?alt=media&#x26;token=963e3d26-69b1-4778-88eb-435f71c12f1f" alt=""><figcaption></figcaption></figure>

<figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2F38pJVSDitCEatxX6UFdt%2FElectronsMuonTrig_EventDisplay_evt55.png?alt=media&#x26;token=daebbcb8-b781-4180-84c2-b46046609910" alt=""><figcaption></figcaption></figure>

<figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2Ft491CSvaI2cNFO436HEe%2FHadrons_EventDisplay_evt7.png?alt=media&#x26;token=0336f2a2-d64d-4047-87e3-853761553cbc" alt=""><figcaption></figcaption></figure>

<figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2FNbcMqx37dUpFDQfPa1L8%2FHadronsMuonTrig_EventDisplay_evt90.png?alt=media&#x26;token=c429b66e-5f57-493a-b9ef-3a4e574db1d5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2F4CcLg7SdTvJ956gZqsZo%2FMuons_EventDisplay_evt46.png?alt=media&#x26;token=bb1989cf-554b-45e0-9ab2-5baffd060fb9" alt=""><figcaption></figcaption></figure>

```
bash runEventDisplay_2024.sh $USERNAME $BEAM_TYPE $EVENT_NUMBER $HOW_MANY_EVENTS [muonTrig]
```

where: `$BEAM_TYPE` can be `muon`, `electron`, `hadron.`

Alternative views with projections in `X,Y` and `Z` are also provided:

<div><figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2FDGDj8qf29zpJEGcniAPL%2FEventDisplay_Colored_evt000031.png?alt=media&#x26;token=e9d61e34-e17c-41ad-80a7-0735e717075b" alt=""><figcaption></figcaption></figure> <figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2FgUAku1EJbdvhokmJI8Ig%2FEventDisplay_MonoChrome_evt000031.png?alt=media&#x26;token=c51d4419-78eb-4b24-b826-3ac0f07e6ad6" alt=""><figcaption></figcaption></figure> <figure><img src="https://790592996-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fs5C8zkGYS3GkZpbQrPK0%2Fuploads%2FvjUNdqq6C9x4GqhWixUf%2FEventDisplay_muonHighlighed_evt000031.png?alt=media&#x26;token=66869385-4e1c-46a0-9a60-9e6ef1c2dd84" alt=""><figcaption></figcaption></figure></div>
