AliRoot Core  3dc7879 (3dc7879)
AliFMDBaseDigitizer Class Reference

Base class for digitizers. More...

#include <FMD/AliFMDDigitizer>

Inheritance diagram for AliFMDBaseDigitizer:

Public Member Functions

 AliFMDBaseDigitizer ()
 
 AliFMDBaseDigitizer (AliDigitizationInput *digInp)
 
 AliFMDBaseDigitizer (const Char_t *name, const Char_t *title)
 
virtual ~AliFMDBaseDigitizer ()
 
virtual Bool_t Init ()
 
void SetShapingTime (Float_t B=10)
 
Float_t GetShapingTime () const
 
void SetStoreTrackRefs (Bool_t store=kTRUE)
 
Bool_t IsStoreTrackRefs () const
 
- Public Member Functions inherited from AliDigitizer
 AliDigitizer (const Text_t *name="AliDigitizer", const Text_t *title="AliDigitizer")
 
 AliDigitizer (AliDigitizationInput *manager, const Text_t *name="AliDigitizer", const Text_t *title="AliDigitizer")
 
 AliDigitizer (const AliDigitizer &dig)
 
AliDigitizeroperator= (const AliDigitizer &dig)
 
virtual ~AliDigitizer ()
 
virtual void Digitize (Option_t *option)=0
 
Bool_t GetRegionOfInterest () const
 

Protected Member Functions

virtual void DigitizeHits () const
 
virtual void ConvertToCount (Float_t edep, Float_t last, UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, TArrayI &counts) const
 
virtual UShort_t MakePedestal (UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip) const
 
virtual void AddNoise (TArrayI &) const
 
virtual void AddContribution (UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Float_t edep, Bool_t isPrimary, Int_t nTrackno, Int_t *tracknos, Int_t offset=0)
 
virtual void AddDigit (UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, Float_t edep, UShort_t count1, Short_t count2, Short_t count3, Short_t count4, UShort_t ntot, UShort_t nprim, const TArrayI &refs) const
 
virtual TTree * MakeOutputTree (AliLoader *loader)
 
virtual void StoreDigits (const AliLoader *loader)
 
 AliFMDBaseDigitizer (const AliFMDBaseDigitizer &o)
 Number of labels not assigned. More...
 
AliFMDBaseDigitizeroperator= (const AliFMDBaseDigitizer &o)
 
- Protected Member Functions inherited from AliDigitizer
Int_t GetNInputStreams () const
 
void Copy (TObject &dig) const
 

Protected Attributes

AliFMDfFMD
 
AliRunLoaderfRunLoader
 
AliFMDEdepMap fEdep
 Run loader. More...
 
Float_t fShapingTime
 
Bool_t fStoreTrackRefs
 
Int_t fIgnoredLabels
 
- Protected Attributes inherited from AliDigitizer
AliDigitizationInputfDigInput
 

Detailed Description

Base class for digitizers.

This class contains the procedures simulation ADC signal for the Forward Multiplicity detector : Hits->Digits and Hits->SDigits

Digits consists of

  • Detector #
  • Ring ID
  • Sector #
  • Strip #
  • ADC count in this channel

Summable digits consists of

  • Detector #
  • Ring ID
  • Sector #
  • Strip #
  • Total energy deposited in the strip
  • ADC count in this channel

As the Digits and SDigits have so much in common, the classes AliFMDDigitizer and AliFMDSDigitizer are implemented via a base class AliFMDBaseDigitizer.

                +---------------------+
                | AliFMDBaseDigitizer |
                +---------------------+
                          ^
                          |
               +----------+---------+
               |                    |
     +-----------------+     +------------------+
     | AliFMDDigitizer |  | AliFMDSDigitizer |
     +-----------------+  +------------------+

These classes uses parameters fetched from the AliFMDParameters manager.

The shaping function of the VA1 is generally given by

\[ f(x) = A(1 - \exp(-Bx)) \]

where A is the total charge collected in the pre-amp., and B is a paramter that depends on the shaping time of the VA1 circut.

When simulating the shaping function of the VA1 pre-amp. chip, we have to take into account, that the shaping function depends on the previous value of read from the pre-amp.

That results in the following algorithm:

last = 0;
for (i=0; i < n_pre_amp_charge; i++) {
charge = GetCharge(i);
if (last < charge)
f(t) = (charge - last) * (1 - exp(-B * t)) + last
else
f(t) = (last - charge) * exp(-B * t) + charge)
for (j=0; j < sample_rate; j++)
adc[j] = f(i / (# samples))
last = charge
}

Here, the first loop is over all charges collected by the VA1 chip, and the sample_rate is how many times the ALTRO ADC samples each of the 128 charges from the pre-amp.

The charge is the total charge \( Q\) collected by the VA1 pre-amplifier for a strip. \( Q\) is then given by

\[ Q = \frac{E}{e}\frac{S}{r} \]

where \( E\) is the total energy deposited in a silicon strip, \( R\) is the dynamic range of the VA1 pre-amp, \( e\) is the energy deposited by a single MIP, and \( S\) ALTRO channel size in each time step.

The energy deposited per MIP is given by \( e = M \rho w \) where \( M\) is the universal number \( 1.664 \mbox{keV}\mbox{cm}^{2}\mbox{g}^{-1}\), \( \rho\) is the density of silicon, and \( w\) is the depth of the silicon sensor.

The final ADC count is given by

\[ C' = C + P \]

where \( P\) is the (randomized) pedestal.

This class uses the class template AliFMDEdepMap to make an internal cache of the energy deposted of the hits. The class template is instantasized as

The first member of the values is the summed energy deposition in a given strip, while the second member of the values is the number of hits in a given strip. Using the second member, it's possible to do some checks on just how many times a strip got hit, and what kind of error we get in our reconstructed hits. Note, that this information is currently not written to the digits tree. I think a QA (Quality Assurance) digit tree is better suited for that task. However, the information is there to be used in the future.

Definition at line 156 of file AliFMDBaseDigitizer.h.

Constructor & Destructor Documentation

AliFMDBaseDigitizer::AliFMDBaseDigitizer ( )

CTOR

Definition at line 226 of file AliFMDBaseDigitizer.cxx.

AliFMDBaseDigitizer::AliFMDBaseDigitizer ( AliDigitizationInput digInp)

Normal CTOR

Parameters
managerManager of digitization

Definition at line 242 of file AliFMDBaseDigitizer.cxx.

AliFMDBaseDigitizer::AliFMDBaseDigitizer ( const Char_t *  name,
const Char_t *  title 
)

Normal ctor

Parameters
nameName
titleTitle

Definition at line 257 of file AliFMDBaseDigitizer.cxx.

AliFMDBaseDigitizer::~AliFMDBaseDigitizer ( )
virtual

DTOR

Definition at line 273 of file AliFMDBaseDigitizer.cxx.

AliFMDBaseDigitizer::AliFMDBaseDigitizer ( const AliFMDBaseDigitizer o)
inlineprotected

Number of labels not assigned.

Copy CTOR

Parameters
oobject to copy from

Definition at line 266 of file AliFMDBaseDigitizer.h.

Member Function Documentation

void AliFMDBaseDigitizer::AddContribution ( UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip,
Float_t  edep,
Bool_t  isPrimary,
Int_t  nTrackno,
Int_t *  tracknos,
Int_t  offset = 0 
)
protectedvirtual

Add edep contribution from (detector,ring,sector,strip) to cache

Definition at line 328 of file AliFMDBaseDigitizer.cxx.

Referenced by AddNoise(), AliFMDDigitizer::SumContributions(), and AliFMDHitDigitizer::SumContributions().

void AliFMDBaseDigitizer::AddDigit ( UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip,
Float_t  edep,
UShort_t  count1,
Short_t  count2,
Short_t  count3,
Short_t  count4,
UShort_t  ntot,
UShort_t  nprim,
const TArrayI &  refs 
) const
protectedvirtual

Add a digit to output

Reimplemented in AliFMDHitDigitizer.

Definition at line 583 of file AliFMDBaseDigitizer.cxx.

Referenced by AliFMDHitDigitizer::AddDigit(), AddNoise(), and DigitizeHits().

virtual void AliFMDBaseDigitizer::AddNoise ( TArrayI &  ) const
inlineprotectedvirtual

Add noise to each sample

Definition at line 224 of file AliFMDBaseDigitizer.h.

void AliFMDBaseDigitizer::ConvertToCount ( Float_t  edep,
Float_t  last,
UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip,
TArrayI &  counts 
) const
protectedvirtual

Convert the total energy deposited to a (set of) ADC count(s). See also the class description for more details.

Parameters
edepTotal energy deposited in detector
lastLast charge collected in previous VA1 channnel
detectorDetector #
ringRing ID
sectorSector #
stripStrip #
countsArray holding the counts on return

Definition at line 489 of file AliFMDBaseDigitizer.cxx.

Referenced by DigitizeHits(), and IsStoreTrackRefs().

void AliFMDBaseDigitizer::DigitizeHits ( ) const
protectedvirtual

For the stored energy contributions in the cache, convert the energy signal to ADC counts, and store the created digit in the digits array

Parameters
fmdPointer to detector

Definition at line 394 of file AliFMDBaseDigitizer.cxx.

Referenced by AliFMDHitDigitizer::Digitize(), AliFMDDigitizer::Digitize(), and IsStoreTrackRefs().

Float_t AliFMDBaseDigitizer::GetShapingTime ( ) const
inline
Returns
Get the shaping time

Definition at line 186 of file AliFMDBaseDigitizer.h.

Bool_t AliFMDBaseDigitizer::Init ( void  )
virtual

Initialize

Reimplemented from AliDigitizer.

Reimplemented in AliFMDDigitizer.

Definition at line 300 of file AliFMDBaseDigitizer.cxx.

Referenced by AliFMD::Hits2Digits(), AliFMD::Hits2SDigits(), and AliFMDDigitizer::Init().

Bool_t AliFMDBaseDigitizer::IsStoreTrackRefs ( ) const
inline

Definition at line 189 of file AliFMDBaseDigitizer.h.

TTree * AliFMDBaseDigitizer::MakeOutputTree ( AliLoader loader)
protectedvirtual

Make the output tree using the passed loader

Parameters
loader
Returns
The generated tree.

Reimplemented in AliFMDHitDigitizer.

Definition at line 605 of file AliFMDBaseDigitizer.cxx.

Referenced by AddNoise(), AliFMDDigitizer::Digitize(), and AliFMDHitDigitizer::MakeOutputTree().

UShort_t AliFMDBaseDigitizer::MakePedestal ( UShort_t  detector,
Char_t  ring,
UShort_t  sector,
UShort_t  strip 
) const
protectedvirtual

Make a pedestal

Parameters
detectorDetector #
ringRing ID
sectorSector #
stripStrip #
Returns
Pedestal value

Reimplemented in AliFMDHitDigitizer.

Definition at line 312 of file AliFMDBaseDigitizer.cxx.

Referenced by ConvertToCount(), IsStoreTrackRefs(), and AliFMDHitDigitizer::MakePedestal().

AliFMDBaseDigitizer & AliFMDBaseDigitizer::operator= ( const AliFMDBaseDigitizer o)
protected

Assignment operator

Returns
Reference to this object

Definition at line 280 of file AliFMDBaseDigitizer.cxx.

Referenced by AliFMDBaseDigitizer(), and AliFMDHitDigitizer::operator=().

void AliFMDBaseDigitizer::SetShapingTime ( Float_t  B = 10)
inline

The response shape of the VA1 shaping circuit is approximently given by

\[ f(x) = A(1 - \exp(-Bx)) \]

where \( A\) is the total charge collected by the pre-amp., and \( B\) is parameter that depends on the shaping time of the VA1 pre-amp. This member function sets the parameter \( B\)

Parameters
B

Definition at line 184 of file AliFMDBaseDigitizer.h.

Referenced by AliFMDBaseDigitizer().

void AliFMDBaseDigitizer::SetStoreTrackRefs ( Bool_t  store = kTRUE)
inline

Definition at line 188 of file AliFMDBaseDigitizer.h.

void AliFMDBaseDigitizer::StoreDigits ( const AliLoader loader)
protectedvirtual

Store the data using the loader

Parameters
loaderThe loader

Reimplemented in AliFMDHitDigitizer.

Definition at line 627 of file AliFMDBaseDigitizer.cxx.

Referenced by AddNoise(), AliFMDDigitizer::Digitize(), and AliFMDHitDigitizer::StoreDigits().

Member Data Documentation

Int_t AliFMDBaseDigitizer::fIgnoredLabels
mutableprotected
AliRunLoader* AliFMDBaseDigitizer::fRunLoader
protected

Definition at line 258 of file AliFMDBaseDigitizer.h.

Referenced by AliFMDDigitizer::Init(), and operator=().

Float_t AliFMDBaseDigitizer::fShapingTime
protected

Definition at line 260 of file AliFMDBaseDigitizer.h.

Referenced by ConvertToCount(), GetShapingTime(), operator=(), and SetShapingTime().

Bool_t AliFMDBaseDigitizer::fStoreTrackRefs
protected

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