Skip to content

Commit

Permalink
Improved simulation of SPD readout time windows (Annalisa Mastroserio)
Browse files Browse the repository at this point in the history
  • Loading branch information
fprino committed May 30, 2016
1 parent 323ace6 commit e1850d2
Show file tree
Hide file tree
Showing 6 changed files with 1,046 additions and 906 deletions.
6 changes: 6 additions & 0 deletions ITS/ITSbase/AliITSpList.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ class AliITSpList: public AliITSMap {
if(GetpListItem(i,j)==0) return 0;
return GetpListItem(i,j)->GetNsignals();
}
// Returns the signal+noise for a give map coordinate for SDigits in the FO strobe
virtual Double_t GetSignalFo(Int_t i,Int_t j) const {
if(GetpListItem(i,j)==0) return 0.0;
return GetpListItem(i,j)->GetSumSignalFo();
}

// Adds the contents of pl to the list with track number off set given by
// fileIndex.
virtual void AddItemTo(Int_t fileIndex, AliITSpListItem *pl);
Expand Down
9 changes: 9 additions & 0 deletions ITS/ITSbase/AliITSpListItem.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ fUsed(kFALSE){
this->fTrack[i] = -2;
this->fHits[i] = -1;
this->fSignal[i] = 0.0;
this->fInFastOrStrobe[i] = kFALSE;
} // end if i
}
//______________________________________________________________________
Expand All @@ -69,6 +70,7 @@ fUsed(kTRUE){
this->fTrack[i] = -2;
this->fSignal[i] = 0.0;
this->fHits[i] = -1;
this->fInFastOrStrobe[i] = kFALSE;
} // end if i
}
//______________________________________________________________________
Expand All @@ -95,10 +97,12 @@ fUsed(kTRUE){
this->fTrack[0] = track;
this->fHits[0] = hit;
this->fSignal[0] = signal;
this->fInFastOrStrobe[0] = kFALSE;
for(Int_t i=1;i<this->fgksize;i++){
this->fTrack[i] = -2;
this->fSignal[i] = 0.0;
this->fHits[i] = -1;
this->fInFastOrStrobe[i] = kFALSE;
} // end if i
}

Expand All @@ -116,6 +120,7 @@ void AliITSpListItem::Build(Int_t module,Int_t index,Double_t noise){
this->fTrack[i] = -2;
this->fSignal[i] = 0.0;
this->fHits[i] = -1;
this->fInFastOrStrobe[i] = kFALSE;
}
}

Expand All @@ -132,10 +137,12 @@ void AliITSpListItem::Build(Int_t track,Int_t hit,Int_t module,Int_t index,Doubl
this->fTrack[0] = track;
this->fHits[0] = hit;
this->fSignal[0] = signal;
this->fInFastOrStrobe[0] = kFALSE;
for(Int_t i=1;i<this->fgksize;i++){
this->fTrack[i] = -2;
this->fSignal[i] = 0.0;
this->fHits[i] = -1;
this->fInFastOrStrobe[i] = kFALSE;
}
}

Expand All @@ -153,6 +160,7 @@ void AliITSpListItem::Build(const AliITSpListItem &source){
this->fTrack[i] = source.fTrack[i];
this->fSignal[i] = source.fSignal[i];
this->fHits[i] = source.fHits[i];
this->fInFastOrStrobe[i] = source.fInFastOrStrobe[i];
}
}

Expand Down Expand Up @@ -202,6 +210,7 @@ fUsed(source.fUsed){
this->fTrack[i] = source.fTrack[i];
this->fSignal[i] = source.fSignal[i];
this->fHits[i] = source.fHits[i];
this->fInFastOrStrobe[i] = source.fInFastOrStrobe[i];
} // end if i

}
Expand Down
7 changes: 6 additions & 1 deletion ITS/ITSbase/AliITSpListItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class AliITSpListItem: public TObject {
return fSignalAfterElect;}
// Returns the Sum/Total signal
virtual Double_t GetSumSignal() const {return fTsignal+fNoise;}
// Returns the Total signal for hits in the FO strobe
virtual Double_t GetSumSignalFo() const {Double_t foSig =0; for(Int_t i=0; i<fgksize; i++) if(fInFastOrStrobe[i]) foSig+=GetSignal(i); return foSig; }
// Returns the noise
virtual Double_t GetNoise() const {return fNoise;}
// Returns the number of stored singals.
Expand Down Expand Up @@ -80,6 +82,8 @@ class AliITSpListItem: public TObject {
// Returns max size of array for for Tracks, Hits, and signals.
static Int_t GetMaxKept() {return fgksize;};

void SetIsInFoStrobe(Int_t i) {(i>=0&&i<fgksize) ? fInFastOrStrobe[i]=kTRUE : printf("index %i out of range \n",i); }

private:
static const Int_t fgksize = 10; // Array sizes
Int_t fmodule; // module number
Expand All @@ -91,8 +95,9 @@ class AliITSpListItem: public TObject {
Double_t fNoise; // Total noise, coupling, ...
Double_t fSignalAfterElect; // Signal after electronics
Bool_t fUsed; //! kTRUE if the item is built and in use
Bool_t fInFastOrStrobe[fgksize]; //[fgksize] bool if the hit (in readout strobe) is also in the Fo strobe

ClassDef(AliITSpListItem,4) // Item list of signals and track numbers
ClassDef(AliITSpListItem,5) // Item list of signals and track numbers
};
// Input and output functions for standard C++ input/output.
ostream & operator<<(ostream &os,AliITSpListItem &source);
Expand Down
10 changes: 10 additions & 0 deletions ITS/ITSsim/AliITSSimuParam.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ AliITSSimuParam::AliITSSimuParam():
SetSDDDiffCoeff(fgkSDDDiffCoeffDefault,fgkSDDDiffCoeff1Default);
SetSDDMaxAdc((Double_t)fgkSDDMaxAdcDefault);
SetSSDCouplings(fgkSSDCouplingPRDefault,fgkSSDCouplingPLDefault,fgkSSDCouplingNRDefault,fgkSSDCouplingNLDefault);
fSPDHitStrobe[0]=-1; // 100 ns before the collision time ( 300 ns readout strobe in total)
fSPDHitStrobe[1]=2; // 200 ns after the collision time (300 ns readout strobe in total)
fSPDFoStrobe[0]=0; // coincidence with collision time
fSPDFoStrobe[1]=1; // 100 ns after the collision time
}
//______________________________________________________________________
AliITSSimuParam::AliITSSimuParam(const AliITSSimuParam &simpar):
Expand Down Expand Up @@ -152,6 +156,10 @@ AliITSSimuParam::AliITSSimuParam(const AliITSSimuParam &simpar):
fSPDNoise[i]=simpar.fSPDNoise[i];
fSPDBaseline[i]=simpar.fSPDBaseline[i];
}
for (Int_t j=0; j<2; j++){
fSPDHitStrobe[j]=simpar.fSPDHitStrobe[j];
fSPDFoStrobe[j]=simpar.fSPDFoStrobe[j];
}
}

//______________________________________________________________________
Expand Down Expand Up @@ -197,6 +205,8 @@ void AliITSSimuParam::PrintParameters() const{
printf("Weight of Holes in Lor.Drift = %f\n",fSPDLorentzHoleWeight);
printf("Flag to add noisy = %d\n",fSPDAddNoisyFlag);
printf("Flag to remove dead = %d\n",fSPDRemoveDeadFlag);
printf("Hit Strobe params = %d %d\n",fSPDHitStrobe[0],fSPDHitStrobe[1]);
printf("FO Strobe params = %d %d\n",fSPDFoStrobe[0],fSPDFoStrobe[1]);
printf("\n");
printf("===== SDD parameters =====\n");
printf("Electronic chips = %d\n",fSDDElectronics);
Expand Down
8 changes: 7 additions & 1 deletion ITS/ITSsim/AliITSSimuParam.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ class AliITSSimuParam : public TObject {


void PrintParameters() const;
void SetSPDReadoutStrobe(Int_t win[2]){fSPDHitStrobe[0]=win[0];fSPDHitStrobe[1]=win[1];}
void SetSPDFastOrStrobe(Int_t win[2]){fSPDFoStrobe[0]=win[0];fSPDFoStrobe[1]=win[1];}
const Int_t* GetSPDHitStrobe() const {return fSPDHitStrobe;}
const Int_t* GetSPDFoStrobe() const {return fSPDFoStrobe;}

protected:

Expand Down Expand Up @@ -235,6 +239,8 @@ class AliITSSimuParam : public TObject {
TString fSPDCouplOpt; // SPD Coupling Option
Double_t fSPDCouplCol; // SPD Coupling parameter along the cols
Double_t fSPDCouplRow; // SPD Coupling parameter along the rows
Int_t fSPDHitStrobe[2]; // Hit read out strobe (left and right readout windows wrt the collision)
Int_t fSPDFoStrobe[2]; // FastOr read out strobe (left and right readout windows wrt the collision)
Float_t fSPDEccDiff; // Eccentricity (i.e. asymmetry parameter) in the
// Gaussian diffusion for SPD
Bool_t fSPDLorentzDrift; // Flag to decide whether to simulate the Lorentz Drift or not in SPD
Expand Down Expand Up @@ -271,6 +277,6 @@ class AliITSSimuParam : public TObject {
Double_t fN; // the impurity concentration of the material in #/cm^3 (NOT USED!)
Float_t fT; // The temperature of the Si in Degree K.

ClassDef(AliITSSimuParam,6);
ClassDef(AliITSSimuParam,7);
};
#endif
Loading

0 comments on commit e1850d2

Please sign in to comment.