AliPhysics  6cf2591 (6cf2591)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliFMDEncodedEdx Class Reference

#include <AliFMDEncodedEdx.h>

Classes

struct  Spec
 

Public Types

enum  { kNEBits = 8, kNLBits = 5, kEMask = 0xFF, kLMask = 0x1F }
 

Public Member Functions

 AliFMDEncodedEdx ()
 
virtual ~AliFMDEncodedEdx ()
 

Static Public Member Functions

static const SpecGetdEAxis ()
 
static const SpecGetdLAxis ()
 
static UInt_t Encode (Double_t edep, Double_t length)
 
static void Decode (UInt_t bits, Double_t &edep, Double_t &length)
 
static void Decode (UInt_t bits, Double_t &edep, Double_t &length, Double_t &wEdep, Double_t &wLength)
 
static TH1Make1D (const char *name, const char *title, UShort_t mode=true)
 
static TH2Make2D (const char *name, const char *title, Bool_t xedep=true)
 
static Bool_t IsAvailable (UInt_t alirootRev)
 

Private Member Functions

 ClassDef (AliFMDEncodedEdx, 1)
 

Static Private Member Functions

static UInt_t EncodeOne (Double_t v, const Spec &a)
 
static Double_t DecodeOne (UInt_t b, const Spec &a)
 
static Double_t DecodeOne (UInt_t b, Double_t &w, const Spec &a)
 

Detailed Description

Class to encode the energy loss \(d\Delta\) and path length \(dx\) of a particle into track reference bits. A total of 13 bits are available. Of these 8 are used for \(d\Delta\) and 5 for \(dx\).

The encoding is done by binning. That is, for a given value of \(d\Delta\) or \(dx\) we calculate a bin number and store that. The reverse decoding is done by looking up the bin center of the bin number stored. Note, that the bin numbers go from 0 to 255 (for \(d\Delta\)) and 31 (for \(dx\)).

The bins become progressively wider. That is, we define 3 regions.

  • Lower region which spans the lower 10% of the distribution has 75% of all avaible bins.
  • Middle region which spans from the 10% to 20% of the distribtion and has 20% of the available bins.
  • Upper region which covers the rest of the distribtion in 5% of the available bins
Type N bins Range bin value bin value
\(d\Delta\) 256 0-11 192 1.1 243 2.2
\(dx\) 32 0-0.7 24 0.07 30 1.4

Currently there's no support of other schemas

Definition at line 52 of file AliFMDEncodedEdx.h.

Member Enumeration Documentation

anonymous enum

How the 13 bits are distributed

Enumerator
kNEBits 
kNLBits 
kEMask 
kLMask 

Definition at line 200 of file AliFMDEncodedEdx.h.

Constructor & Destructor Documentation

AliFMDEncodedEdx::AliFMDEncodedEdx ( )
inline

Constructor - a no-op

Definition at line 209 of file AliFMDEncodedEdx.h.

virtual AliFMDEncodedEdx::~AliFMDEncodedEdx ( )
inlinevirtual

Destructor - a no-op

Definition at line 213 of file AliFMDEncodedEdx.h.

Member Function Documentation

AliFMDEncodedEdx::ClassDef ( AliFMDEncodedEdx  ,
 
)
private
static void AliFMDEncodedEdx::Decode ( UInt_t  bits,
Double_t edep,
Double_t length 
)
inlinestatic

Decode the lower 13-bit of the input into \(d\Delta\) and \(dx\)

Parameters
bitsEncoded 13-bit word (lower 13 bit)
edepOn return, the \(d\Delta\)
lengthOn return, the \(dx\)

Definition at line 259 of file AliFMDEncodedEdx.h.

Referenced by AliFMDMCTrackDensity::ProcessRef(), and AliFMDMCTrackELoss::ProcessRef().

static void AliFMDEncodedEdx::Decode ( UInt_t  bits,
Double_t edep,
Double_t length,
Double_t wEdep,
Double_t wLength 
)
inlinestatic

Decode the lower 13-bit of the input into \(d\Delta\) and \(dx\)

Parameters
bitsEncoded 13-bit word (lower 13 bit)
edepOn return, the \(d\Delta\)
lengthOn return, the \(dx\)
wEdepOn return, the width of the corresponding \(d\Delta\) bin
wLengthOn return, the width of the corresponding \(dx\) bin

Definition at line 273 of file AliFMDEncodedEdx.h.

static Double_t AliFMDEncodedEdx::DecodeOne ( UInt_t  b,
const Spec a 
)
inlinestaticprivate

Decode a value

Parameters
bEncoded value
aBin specification
Returns
Decoded value

Definition at line 375 of file AliFMDEncodedEdx.h.

Referenced by Decode().

static Double_t AliFMDEncodedEdx::DecodeOne ( UInt_t  b,
Double_t w,
const Spec a 
)
inlinestaticprivate

Decode a value

Parameters
bEncoded value
aBin specification
wOn return, the bin width
Returns
Decoded value

Definition at line 389 of file AliFMDEncodedEdx.h.

static UInt_t AliFMDEncodedEdx::Encode ( Double_t  edep,
Double_t  length 
)
inlinestatic

Encode \(d\Delta\) and \(dx\) into a 13bit number.

Parameters
edep\(d\Delta\)
length\(dx\)
Returns
13-bit (lower) encoded value

Definition at line 246 of file AliFMDEncodedEdx.h.

static UInt_t AliFMDEncodedEdx::EncodeOne ( Double_t  v,
const Spec a 
)
inlinestaticprivate

Encode one value

Parameters
vValue
aBin specification
Returns
Encoded value

Definition at line 361 of file AliFMDEncodedEdx.h.

Referenced by Encode().

static const Spec& AliFMDEncodedEdx::GetdEAxis ( )
inlinestatic

Get the \(d\Delta\) bin specification. If not initialized already, do so .

Returns
Constant reference to \(d\Delta\) bin specification

Definition at line 220 of file AliFMDEncodedEdx.h.

Referenced by AliFMDMCTrackELoss::CreateOutputObjects(), Decode(), Encode(), Make1D(), Make2D(), AliFMDMCTrackInspector::RingHistos::MakeIncreasingAxis(), and AliFMDMCHitEnergyFitter::RingHistos::MakeIncreasingAxis().

static const Spec& AliFMDEncodedEdx::GetdLAxis ( )
inlinestatic

Get the \(dx\) bin specification. If not initialized already, do so .

Returns
Constant reference to \(dx\) bin specification

Definition at line 232 of file AliFMDEncodedEdx.h.

Referenced by Decode(), Encode(), Make1D(), and Make2D().

static Bool_t AliFMDEncodedEdx::IsAvailable ( UInt_t  alirootRev)
inlinestatic

Check if the encoded \(d\Delta\) and \(dx\) are available in the upper 13 bits of the unique ID field of track references.

Parameters
alirootRevAliROOT revision of the code that produced the track references. Note, it cannot be the revision of AliROOT running, since that can be much newer (or older) than the code that made the track references. One should get this information from the object stored in the ESD tree's user objects.
Returns
true if alirootRev is larger than some fixed number set when this class was committed to SVN.

Definition at line 347 of file AliFMDEncodedEdx.h.

static TH1* AliFMDEncodedEdx::Make1D ( const char *  name,
const char *  title,
UShort_t  mode = true 
)
inlinestatic

Make a 1-dimension histogram with the natural binning for the encoding for either \(d\Delta\) or \(dx\)

Parameters
nameName of produced histogram
titleTitle of produced histogram
modeIf 0, make histogram for \(d\Delta\). If 1 for \(dx\), if 2 for \(d\Delta/dx\)
Returns
Newly allocated histogram

Definition at line 290 of file AliFMDEncodedEdx.h.

static TH2* AliFMDEncodedEdx::Make2D ( const char *  name,
const char *  title,
Bool_t  xedep = true 
)
inlinestatic

Make a 2-dimension histogram with the natural binning for the encoding of \(d\Delta\) versus \(dx\) (or vice versa)

Parameters
nameName of produced histogram
titleTitle of produced histogram
xedepIf true, put \(d\Delta\) on the X-axis, otherwise for \(dx\)
Returns
Newly allocated histogram

Definition at line 321 of file AliFMDEncodedEdx.h.


The documentation for this class was generated from the following file: