ROOT logo
AliRoot » FMD » AliFMDDigitizer

class AliFMDDigitizer: public AliFMDBaseDigitizer

 Copyright(c) 2004, ALICE Experiment at CERN, All rights reserved. *
                                                                        *
 Author: The ALICE Off-line Project.                                    *
 Contributors are mentioned in the code where appropriate.              *
                                                                        *
 Permission to use, copy, modify and distribute this software and its   *
 documentation strictly for non-commercial purposes is hereby granted   *
 without fee, provided that the above copyright notice appears in all   *
 copies and that both the copyright notice and this permission notice   *
 appear in the supporting documentation. The authors make no claims     *
 about the suitability of this software for any purpose. It is          *
 provided "as is" without express or implied warranty.                  *

 $Id$ *

 * @file    AliFMDDigitizer.cxx
 *
 * @author  Christian Holm Christensen <cholm@nbi.dk>
 * @date    Mon Mar 27 12:38:26 2006
 * @brief   FMD Digitizers implementation
 *
 * @ingroup FMD_sim



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

  Digits consists of
   - Detector #
   - Ring ID
   - Sector #
   - Strip #
   - ADC count in this channel

  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 |
      +-----------------+	+------------------+
                |
     +-------------------+
     | AliFMDSSDigitizer |
     +-------------------+

 These classes has several paramters:

     fPedestal
     fPedestalWidth
         (Only AliFMDDigitizer)
         Mean and width of the pedestal.  The pedestal is simulated
         by a Guassian, but derived classes my override MakePedestal
         to simulate it differently (or pick it up from a database).

     fVA1MipRange
         The dymamic MIP range of the VA1_ALICE pre-amplifier chip

     fAltroChannelSize
         The largest number plus one that can be stored in one
         channel in one time step in the ALTRO ADC chip.

     fSampleRate
         How many times the ALTRO ADC chip samples the VA1_ALICE
         pre-amplifier signal.   The VA1_ALICE chip is read-out at
         10MHz, while it's possible to drive the ALTRO chip at
         25MHz.  That means, that the ALTRO chip can have time to
         sample each VA1_ALICE signal up to 2 times.  Although it's
         not certain this feature will be used in the production,
         we'd like have the option, and so it should be reflected in
         the code.


 The shaping function of the VA1_ALICE 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_ALICE circut.

 When simulating the shaping function of the VA1_ALICe
 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 charge IN pre-amp. charge train DO
      IF last < charge THEN
        f(t) = (charge - last) * (1 - exp(-B * t)) + last
      ELSE
        f(t) = (last - charge) * exp(-B * t) + charge)
      ENDIF
      FOR i IN # samples DO
        adc_i = f(i / (# samples))
      DONE
      last = charge
   DONE

 Here,

   pre-amp. charge train
       is a series of 128 charges read from the VA1_ALICE chip

   # samples
       is the number of times the ALTRO ADC samples each of the 128
       charges from the pre-amp.

 Where Q is the total charge collected by the VA1_ALICE
 pre-amplifier.   Q is then given by

           E S
      Q =  - -
           e R

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

 The energy deposited per MIP is given by

      e = M * rho * w

 where M is the universal number 1.664, 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 (see MakePedestal)

 This class uses the class template AliFMDMap<Type> to make an
 internal cache of the energy deposted of the hits.  The class
 template is instantasized as

  typedef AliFMDMap<std::pair<Float_t, UShort_t> > AliFMDEdepMap;

 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.


 Latest changes by Christian Holm Christensen


Function Members (Methods)

public:
AliFMDDigitizer()
AliFMDDigitizer(AliDigitizationInput* digInput)
AliFMDDigitizer(const AliFMDDigitizer&)
virtual~AliFMDDigitizer()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidDigitize(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Bool_tAliDigitizer::GetRegionOfInterest() const
Float_tAliFMDBaseDigitizer::GetShapingTime() const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual Bool_tInit()
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
Bool_tAliFMDBaseDigitizer::IsStoreTrackRefs() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(basic_ostream<char,char_traits<char> >& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
voidAliFMDBaseDigitizer::SetShapingTime(Float_t B = 10)
voidAliFMDBaseDigitizer::SetStoreTrackRefs(Bool_t store = kTRUE)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidAliFMDBaseDigitizer::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)
virtual voidAliFMDBaseDigitizer::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 voidAliFMDBaseDigitizer::AddNoise(TArrayI&) const
virtual voidAliFMDBaseDigitizer::ConvertToCount(Float_t edep, Float_t last, UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip, TArrayI& counts) const
virtual voidAliDigitizer::Copy(TObject& dig) const
virtual voidAliFMDBaseDigitizer::DigitizeHits() const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Int_tAliDigitizer::GetNInputStreams() const
virtual TTree*AliFMDBaseDigitizer::MakeOutputTree(AliLoader* loader)
virtual UShort_tAliFMDBaseDigitizer::MakePedestal(UShort_t detector, Char_t ring, UShort_t sector, UShort_t strip) const
voidTObject::MakeZombie()
AliFMDBaseDigitizer&AliFMDBaseDigitizer::operator=(const AliFMDBaseDigitizer& o)
virtual voidAliFMDBaseDigitizer::StoreDigits(const AliLoader* loader)
voidSumContributions(TBranch* sdigitsBranch)

Data Members

protected:
AliDigitizationInput*AliDigitizer::fDigInput! Pointer to the Digitizer input
AliFMDEdepMapAliFMDBaseDigitizer::fEdepCache of Energy from hits
AliFMD*AliFMDBaseDigitizer::fFMDDetector object
Int_tAliFMDBaseDigitizer::fIgnoredLabels! Number of labels not assigned
TStringTNamed::fNameobject identifier
AliRunLoader*AliFMDBaseDigitizer::fRunLoader! Run loader
Float_tAliFMDBaseDigitizer::fShapingTimeShaping profile parameter
Bool_tAliFMDBaseDigitizer::fStoreTrackRefsWether to store track references
TStringTNamed::fTitleobject title

Class Charts

Inheritance Chart:
TNamed
AliDigitizer
AliFMDBaseDigitizer
AliFMDDigitizer

Function documentation

Init()
 Initialisation

Digitize(Option_t* option = "")
 Execute this digitizer.
 This member function will be called once per event by the passed
 AliDigitizationInput* digInput object.

 Parameters:
    options Not used

SumContributions(TBranch* sdigitsBranch)
 Sum contributions from SDigits

 Parameters:
    sdigitsBranch Branch of SDigit data

AliFMDDigitizer()
   * CTOR

{}
AliFMDDigitizer(AliDigitizationInput* digInput)
   * CTOR
   *
   * @param input Input of digitization

{}
virtual ~AliFMDDigitizer()
   * DTOR

{}