ROOT logo
AliRoot » ITS » UPGRADE » AliITSUSimulationPix

class AliITSUSimulationPix: public AliITSUSimulation

  Version: 1
  Modified by D. Elia, G.E. Bruno, H. Tydesjo
  Fast diffusion code by Bjorn S. Nilsen
  March-April 2006
  October     2007: GetCalibrationObjects() removed

  Version: 0
  Written by Boris Batyunya
  December 20 1999

  Adapted for pixels of ITS upgrade July 2012, ruben.shahoyan@cern.ch

  AliITSUSimulationPix is to do the simulation of pixels

  2013 Feb: Added MonoPix response and nois calculation al la MIMOSA32 (levente.molnar@cern.ch)


Function Members (Methods)

public:
AliITSUSimulationPix()
AliITSUSimulationPix(const AliITSUSimulationPix& source)
AliITSUSimulationPix(AliITSUSimuParam* sim, AliITSUSensMap* map)
virtual~AliITSUSimulationPix()
voidTObject::AbstractMethod(const char* method) const
voidAddNoisyPixels()
Int_tAddRandomNoisePixels(Double_t tof = 0)
virtual Bool_tAliITSUSimulation::AddSDigitsToChip(TSeqCollection* pItemArray, Int_t mask)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidCalcDiodeShiftInPixel(Int_t xrow, Int_t zcol, Float_t& x, Float_t& z)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
voidAliITSUSimulation::ClearMap()
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidAliITSUSimulation::CreateFastRecPoints(AliITSUChip*, Int_t, TRandom*, TClonesArray*)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual voidDigitiseChip()
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 TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidFinishSDigitiseChip()
voidFrompListToDigits()
static Double_tAliITSUSimulation::GausInt1D(Double_t sig, Double_t a, Double_t b)
static Double_tAliITSUSimulation::GausInt2D(Double_t sig0, Double_t a0, Double_t b0, Double_t sig1, Double_t a1, Double_t b1)
virtual Double_tAliITSUSimulation::GenerateReadOutCycleOffset()
static Int_tAliITSUSimulation::GenOrderedSample(UInt_t nmax, UInt_t ngen, TArrayI& vals, TArrayI& ind)
AliITSCalibration*AliITSUSimulation::GetCalibDead() const
AliITSCalibration*AliITSUSimulation::GetCalibNoisy() const
AliITSUChip*AliITSUSimulation::GetChip() const
Bool_tAliITSUSimulation::GetDebug(Int_t level = 1) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
Int_tAliITSUSimulation::GetEvent() const
virtual const char*TObject::GetIconName() const
AliITSUSensMap*AliITSUSimulation::GetMap() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Int_tGetReadOutCycle(Int_t row, Int_t col, Double_t hitTime)
Double_tAliITSUSimulation::GetReadOutCycleLength() const
Double_tAliITSUSimulation::GetReadOutCycleOffset() const
Int_tGetReadOutCycleRollingShutter(Int_t row, Int_t col, Double_t hitTime)
AliITSUParamList*AliITSUSimulation::GetResponseParam() const
AliITSsegmentation*AliITSUSimulation::GetSegmentation() const
AliITSUSimuParam*AliITSUSimulation::GetSimuParam() const
Double_tGetTanLorAngle() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
voidHits2SDigits()
voidHits2SDigitsFast()
voidHits2SDigitsFastDigital()
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 voidInit()
virtual voidAliITSUSimulation::InitSimulationChip(AliITSUChip* mod, Int_t ev, AliITSsegmentation* seg, AliITSUParamList* resp)
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_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::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)
AliITSUSimulationPix&operator=(const AliITSUSimulationPix& s)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidRemoveDeadPixels()
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 = "")
virtual voidSDigitiseChip()
voidSDigitsToDigits()
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidAliITSUSimulation::SetCalibDead(AliITSCalibration* calib)
voidAliITSUSimulation::SetCalibNoisy(AliITSCalibration* calib)
voidAliITSUSimulation::SetChip(AliITSUChip* mod)
voidAliITSUSimulation::SetDebug(Int_t level = 5)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidAliITSUSimulation::SetEvent(Int_t evnt)
voidAliITSUSimulation::SetMap(AliITSUSensMap* p)
voidAliITSUSimulation::SetNoDebug()
static voidTObject::SetObjectStat(Bool_t stat)
voidAliITSUSimulation::SetReadOutCycleLength(Double_t v = 25e-6)
voidAliITSUSimulation::SetReadOutCycleOffset(Double_t v = 0)
virtual voidSetResponseParam(AliITSUParamList* resp)
voidAliITSUSimulation::SetSegmentation(AliITSsegmentation* seg)
voidAliITSUSimulation::SetSimuParam(AliITSUSimuParam* sp)
Bool_tSetTanLorAngle(Double_t WeightHole = 1.0)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
Double_tSpreadFrom2DHisto(const Double_t* dtIn)
Double_tSpreadFunDoubleGauss2D(const Double_t* dtIn)
Double_tSpreadFunGauss2D(const Double_t* dtIn)
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
voidAliITSUSimulation::UpdateMapNoise(UInt_t col, UInt_t row, Double_t noise, Int_t roCycle = 0)
voidAliITSUSimulation::UpdateMapSignal(UInt_t col, UInt_t row, Int_t trk, Int_t ht, Double_t signal, Int_t roCycle = 0)
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
voidWriteSDigits()
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidPlaceDigitalPixels(Double_t x0, Double_t z0, Double_t el, Double_t tof, Int_t tID, Int_t hID)
voidSetCoupling(AliITSUSDigit* old)
voidSetCouplingOld(AliITSUSDigit* old)
voidSpreadCharge2D(Double_t x0, Double_t z0, Double_t dy, Int_t ix0, Int_t iz0, Double_t el, Double_t tof, Int_t tID, Int_t hID)

Data Members

public:
enum { kCellX1
kCellX2
kCellZ1
kCellZ2
kCellYDepth
kNDtSpread
kSpreadFunGauss2D
kSpreadFunDoubleGauss2D
kSpreadFunHisto
kNSpreadFuns
kChargeSpreadType
kSpreadFunParamNXoffs
kSpreadFunParamNZoffs
kSpreadFunMinSteps
kReadOutSchemeType
kReadOutCycleLength
kSpreadFunGlobalQScale
kPixSNDisrcCut
kPixMinElToAdd
kPixNoiseIsOn
kPixNoiseInAllMod
kPixNoiseMPV
kPixNoiseSigma
kPixFakeRate
kDigitalSim
kNReservedParams
kParamStart
kNoisyPixOCDB
kNoisyPixRnd
kReadOutStrobe
kReadOutRollingShutter
kNReadOutTypes
kG1MeanX
kG1SigX
kG1MeanZ
kG1SigZ
kNG1Par
kG2MeanX0
kG2SigX0
kG2MeanZ0
kG2SigZ0
kG2MeanX1
kG2SigX1
kG2MeanZ1
kG2SigZ1
kG2ScaleG2
kNG2Par
};
enum AliITSUSimulation::[unnamed] { kMaxROCycleAccept
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
AliITSCalibration*AliITSUSimulation::fCalibDead! dead channels
AliITSCalibration*AliITSUSimulation::fCalibNoisy! noisy channels
AliITSUChip*AliITSUSimulation::fChip! chip being processed
Bool_tAliITSUSimulation::fCyclesID[253]! status of RO cycles
Int_tAliITSUSimulation::fDebug! debug flag
Int_tAliITSUSimulation::fEvent! event number being processed
Double_tfGlobalChargeScaleCharge scaling to match Geant and Test beam
G__p2memfuncfROTimeFun! pointer on current R/O time check function
Float_tAliITSUSimulation::fReadOutCycleLength! readout cycle lenght in s
Float_tAliITSUSimulation::fReadOutCycleOffset! The phase of the RO with respect to the trigger
AliITSUParamList*AliITSUSimulation::fResponseParam! response parameterization data
AliITSsegmentation*AliITSUSimulation::fSeg! segmentation
AliITSUSensMap*AliITSUSimulation::fSensMap! sensor map for hits manipulations
AliITSUSimuParam*AliITSUSimulation::fSimuParam! simulation parameters
TH2*fSpread2DHisto! optional 2D histo for charge spread parameterization
G__p2memfuncfSpreadFun! pointer on current spread function
Double_tfTanLorAng! Tangent of the Lorentz Angle (weighted average for hole and electrons)

Class Charts

Inheritance Chart:
TObject
AliITSUSimulation
AliITSUSimulationPix

Function documentation

AliITSUSimulationPix()
 Default constructor.
AliITSUSimulationPix(AliITSUSimuParam* sim, AliITSUSensMap* map)
 standard constructor
AliITSUSimulationPix(const AliITSUSimulationPix& source)
     Copy Constructor
~AliITSUSimulationPix()
 destructor
 only the sens map is owned and it is deleted by ~AliITSUSimulation
AliITSUSimulationPix& operator=(const AliITSUSimulationPix& s)
    Assignment operator
void Init()
 Initilization
Bool_t SetTanLorAngle(Double_t WeightHole = 1.0)
 This function set the Tangent of the Lorentz angle.
 A weighted average is used for electrons and holes
 Input: Double_t weightHole: wheight for hole: it should be in the range [0,1]
 output: Bool_t : kTRUE in case of success

void SDigitiseChip()
  This function begins the work of creating S-Digits.
void WriteSDigits()
  This function adds each S-Digit to pList
void FinishSDigitiseChip()
  This function calls SDigitsToDigits which creates Digits from SDigits
void DigitiseChip()
  This function creates Digits straight from the hits and then adds
  electronic noise to the digits before adding them to pList
  Each of the input variables is passed along to Hits2SDigits

void Hits2SDigits()
 Does the charge distributions using Gaussian diffusion charge charing.
void Hits2SDigitsFast()
 Does the charge distributions using Gaussian diffusion charge charing.    // Inputs:
    AliITSUChip *mod  Pointer to this chip

void SpreadCharge2D(Double_t x0, Double_t z0, Double_t dy, Int_t ix0, Int_t iz0, Double_t el, Double_t tof, Int_t tID, Int_t hID)
 Spreads the charge over neighboring cells. Assume charge is distributed
 as charge(x,z) = (el/2*pi*sigx*sigz)*exp(-arg)
 arg=((x-x0)*(x-x0)/2*sigx*sigx)+((z-z0*z-z0)/2*sigz*sigz)
 Defined this way, the integral over all x and z is el.
 Inputs:
    Double_t x0   x position of point where charge is liberated (local)
    Double_t z0   z position of point where charge is liberated (local)
    Double_t dy   distance from the entrance surface (diffusion sigma may depend on it)
    Int_t    ix0  row of cell corresponding to point x0
    Int_t    iz0  columb of cell corresponding to point z0
    Double_t el   number of electrons liberated in this step
    Double_t sigx Sigma difusion along x for this step (y0 dependent)
    Double_t sigz Sigma difusion along z for this step (z0 dependent)
    Int_t    tID  track number
    Int_t    hID  hit "hit" index number

Double_t SpreadFunDoubleGauss2D(const Double_t* dtIn)
 calculate integral of charge in the cell with boundaries at X=dtIn[kCellX1]:dtIn[kCellX2]
 and Z=dtIn[kCellZ1]:dtIn[kCellZ2]
 The spread function is assumed to be double gaussian in 2D
 Parameters should be: mean0,sigma0, mean1,sigma1, relative strenght of 2nd gaussian wrt 1st one

 1st gaussian
Double_t SpreadFrom2DHisto(const Double_t* dtIn)
 calculate integral of charge in the cell with boundaries at X=dtIn[kCellX1]:dtIn[kCellX2]
 and Z=dtIn[kCellZ1]:dtIn[kCellZ2]
 The spread function integral is taken from fSpread2DHisto extracted from the sensor response parameters
 list in the method SetResponseParam. The histo must return the fraction of charge integrates in the
 cell whose center is on the distance X=(dtIn[kCellX1]+dtIn[kCellX2])/2 and Z=(dtIn[kCellZ1]+dtIn[kCellZ2])/2
 from the injection point.

Double_t SpreadFunGauss2D(const Double_t* dtIn)
 calculate integral of charge in the cell with boundaries at X=dtIn[kCellX1]:dtIn[kCellX2]
 and Z=dtIn[kCellZ1]:dtIn[kCellZ2]
 The spread function is assumed to be gaussian in 2D
 Parameters should be: mean0,sigma0
void RemoveDeadPixels()
 Removes dead pixels on each chip (ladder)
 This should be called before going from sdigits to digits (i.e. from FrompListToDigits)
void AddNoisyPixels()
 Adds noisy pixels on each chip (ladder)
 This should be called before going from sdigits to digits (i.e. FrompListToDigits)
void FrompListToDigits()
 add noise and electronics, perform the zero suppression and add the digits to the list

 RS may use for ordered random sample generation dl.acm.org/ft_gateway.cfm?id=356313&type=pdf

Int_t AddRandomNoisePixels(Double_t tof = 0)
 create random noisy sdigits above threshold

void SetCoupling(AliITSUSDigit* old)
  Take into account the coupling between adiacent pixels.
  The parameters probcol and probrow are the probability of the
  signal in one pixel shared in the two adjacent pixels along
  the column and row direction, respectively.
  Note pList is goten via GetMap() and chip is not need any more.
  Otherwise it is identical to that coded by Tiziano Virgili (BSN).
void SetCouplingOld(AliITSUSDigit* old)
  Take into account the coupling between adiacent pixels.
  The parameters probcol and probrow are the fractions of the
  signal in one pixel shared in the two adjacent pixels along
  the column and row direction, respectively.
 Inputs:
 old            existing AliITSUSDigit
 ntrack         track incex number
 idhit          hit index number
 chip         chip number

void SetResponseParam(AliITSUParamList* resp)
 attach response parameterisation data
Int_t GetReadOutCycleRollingShutter(Int_t row, Int_t col, Double_t hitTime)
 Get the read-out cycle of the hit in the given column/row of the sensor.
 hitTime is the time of the subhit (hit is divided to nstep charge deposit) in seconds
 globalPhaseShift gives the start of the RO for the cycle in pixel wrt the LHC clock
 GetRollingShutterWindow give the with of the rolling shutter read out window

Int_t GetReadOutCycle(Int_t row, Int_t col, Double_t hitTime)
 Check whether the hit is in the read out window of the given column/row of the sensor

void CalcDiodeShiftInPixel(Int_t xrow, Int_t zcol, Float_t& x, Float_t& z)
 Calculates the shift of the diode wrt the geometric center of the pixel.
 It is needed for staggerred pixel layout or double diode pixels with assymetric center
 The shift can depend on the column or line or both...
 The x and z are passed in cm

void Hits2SDigitsFastDigital()
 Does the digital chip response simulation
    AliITSUChip *mod  Pointer to this chip

void PlaceDigitalPixels(Double_t x0, Double_t z0, Double_t el, Double_t tof, Int_t tID, Int_t hID)
 Place the digital pixel positions on the sensor
 Inputs:
    Double_t x0hit   x position of point where charge is liberated (local) - hit
    Double_t z0hit   z position of point where charge is liberated (local) - hit
    Double_t el   number of electrons liberated in this step
    Double_t sigx Sigma difusion along x for this step (y0 dependent)
    Double_t sigz Sigma difusion along z for this step (z0 dependent)
    Int_t    tID  track number
    Int_t    hID  hit "hit" index number

Double_t GetTanLorAngle() const
 For backwards compatibility
{return fTanLorAng;}
void SDigitsToDigits()