AMS Data


AMS Unpack

The macros for standalone AMS unpacking of data stored in a LMD file are:

  • unpack_gsi2018_ams_mapped.C - mapped level
  • unpack_gsi2018_ams_mapped2cal.C - cal level
  • unpack_gsi2018_ams_mapped2hit.C - hit level

These macros perform unpacking of data, channel mapping and store the data in a root file, whose name has to be defined by the user.

Before running the macros, make sure that paths to input / output files are properly set to the right names, which are specific to your computer.

Mapped level, execute the macro unpack_gsi2018_ams_mapped.C

cd macros/r3b/unpack/ams
root -l unpack_gsi2018_ams_mapped.C
[..] ... unpacking of the file ...

The output file contains the TTree "evt" with a TClonesArray of R3BAmsMappedData unpacked from the original lmd file. The variables that one can find in this level are:

  • fDetId - Detector unique identifier
  • fStripId - Strip unique identifier
  • fEnergy - Total energy deposited in the strip [channels]

For a simple visualization
root -l name_file.root
[..] ... open file ...
[..] evt->Draw("AmsMappedData.fEnergy:AmsMappedData.fStripId","AmsMappedData.fDetId==0","")
[..] ...

Cal level, execute the macro unpack_gsi2018_ams_mapped2cal.C

cd macros/r3b/unpack/ams
root -l unpack_gsi2018_ams_mapped2cal.C
[..] ... unpacking of the file and calibration of data ...

The output file contains the TTree "evt" with a TClonesArray of R3BAmsStripCalData unpacked from the original lmd file. The variables that one can find in this level are:

  • fDetId - Detector unique identifier
  • fSideId - Side unique identifier [K or S]
  • fStripId - Strip unique identifier
  • fEnergy - Total energy deposited in the strip [channels]

For a simple visualization
root -l name_file.root
[..] ... open file ...
[..] evt->Draw("AmsStripCalData.fEnergy:AmsStripCalData.fStripId","AmsStripCalData.fDetId==0 && AmsStripCalData.fSideId==0","")
[..] ...

Hit level, execute the macro unpack_gsi2018_ams_mapped2hit.C

cd macros/r3b/unpack/ams
root -l unpack_gsi2018_ams_mapped2hit.C
[..] ... unpacking of the file, calibration of data and reconstruction of hits ...

The output file contains the TTree "evt" with a TClonesArray of R3BAmsHitData unpacked from the original lmd file. The variables that one can find in this level are:

  • fDetId - Detector unique identifier
  • fNumHit - Number of hits
  • fX - Position X [mm]
  • fY - Position Y [mm]
  • fZ - Position Z [mm]
  • fEnergy - Total energy deposited for each hit [channels]

For a simple visualization
root -l name_file.root
[..] ... open file ...
[..] evt->Draw("AmsHitData.fY:AmsHitData.fX","AmsHitData.fDetId==0","")
[..] ...


AMS Online

The macro for standalone online is:

unpack_gsi2018_ams_online.C

Before running the macro, make sure that paths to stream server, HTTP server and their corresponding ports are properly set to the right values:

TString filename = "--stream=lxg0898:6002"

The port of the HTTP server is defined by user in the online macro:

run->ActivateHttpServer( Int_t refresh = 2000, Int_t port=8044)

then, execute the macro in bash mode:

root -b unpack_gsi2018_ams_online.C

the HTTP server will be the name of the computer where you are running the macro, for example, lxg0898, lxir123, ....

then, open firefox and go into http://lxir123:8044/

Figure shows an example of data (hit level) from the AMS detectors, after the calibration procedure, in the online:

Image: