#include "AliITSRawStreamSPD.h"
#include "AliITSRawStreamSSD.h"
#include "AliITSRawStreamSDD.h"
-#include "AliITSresponseSDD.h"
#include "AliRawReader.h"
#include "AliRun.h"
#include "AliLog.h"
sprintf(branchname,"%s",GetName());
if(fLoader->TreeS()){
- if(fDetTypeSim->GetSDigits()==0x0) fDetTypeSim->SetSDigits(new TClonesArray("AliITSpListItem",1000));
TClonesArray* sdig = (TClonesArray*)fDetTypeSim->GetSDigits();
MakeBranchInTree(fLoader->TreeS(),branchname,&sdig,buffersize,fl);
}
}
//______________________________________________________________________
-void AliITS::InitModules(Int_t size,Int_t &nmodules){
+Bool_t AliITS::InitModules(Int_t size,Int_t &nmodules){
// Initialize the modules array.
// Inputs:
// Int_t size Size of array of the number of modules to be
if(!fDetTypeSim) {
Error("InitModules","fDetTypeSim is null!");
- return;
+ return kFALSE;
}
Int_t nl,indexMAX,index;
if(size<=0){ // default to using data stored in AliITSgeom
if(fDetTypeSim->GetITSgeom()==0) {
Error("InitModules","fITSgeom not defined");
- return;
+ return kFALSE;
} // end if fITSgeom==0
nl = fDetTypeSim->GetITSgeom()->GetNlayers();
indexMAX = fDetTypeSim->GetITSgeom()->GetIndexMax();
nmodules = size;
} // end i size<=0
+ return kTRUE;
}
//______________________________________________________________________
void AliITS::Hits2SDigits(){
}
fDetTypeSim->AddSumDigit(sdig);
-}
-//______________________________________________________________________
-void AliITS::AddRealDigit(Int_t branch, Int_t *digits){
- // Add a real digit - as coming from data.
- // Inputs:
- // Int_t id Detector type number.
- // Int_t *digits Integer array containing the digits info. See
- // AliITSdigit.h
- // Outputs:
- // none.
- // Return:
- // none.
-
- if(!fDetTypeSim) {
- Error("AddRealDigit","fDetTypeSim is 0!");
- return;
- }
- fDetTypeSim->AddRealDigit(branch,digits);
-
}
//______________________________________________________________________
void AliITS::AddSimDigit(Int_t branch, AliITSdigit *d){
}
//______________________________________________________________________
void AliITS::AddSimDigit(Int_t branch,Float_t phys,Int_t *digits,Int_t *tracks,
- Int_t *hits,Float_t *charges){
+ Int_t *hits,Float_t *charges, Int_t sigexpanded){
// Add a simulated digit to the list.
// Inputs:
// Int_t id Detector type number.
Error("AddSimDigit","fDetTypeSim is 0!");
return;
}
- fDetTypeSim->AddSimDigit(branch,phys,digits,tracks,hits,charges);
+ fDetTypeSim->AddSimDigit(branch,phys,digits,tracks,hits,charges,sigexpanded);
}
//______________________________________________________________________
}
fDetTypeSim->SetTreeAddressD(digits,(Char_t*)GetName());
AliITSDDLModuleMapSDD* ddlsdd=fDetTypeSim->GetDDLModuleMapSDD();
-
+ Bool_t isHLTmodeC=fDetTypeSim->IsHLTmodeC();
AliITSDDLRawData rawWriter;
+ if(isHLTmodeC) rawWriter.SetUseCompressedSDDFormat(kTRUE);
+ else rawWriter.SetUseCompressedSDDFormat(kFALSE);
//Verbose level
// 0: Silent
// 1: cout messages
// SPD
//
AliITSsegmentationSPD* segSPD = (AliITSsegmentationSPD*) fDetTypeSim->GetSegmentationModel(0);
+ if(!segSPD){
+ AliWarning("Set AliITS defaults");
+ SetDefaults();
+ segSPD = (AliITSsegmentationSPD*) fDetTypeSim->GetSegmentationModel(0);
+ }
npx = segSPD->Npx();
Double_t thr, sigma;
last = (modA[module])->GetEntries();
TClonesArray& dum = *modA[module];
- fDetTypeSim->GetCalibrationModel(module)->Thresholds(thr,sigma);
+ fDetTypeSim->GetSimuParam()->SPDThresholds(module,thr,sigma);
thr += 1.;
new (dum[last]) AliITSpListItem(-1, -1, module, index, thr);
}
Int_t module = inputSDD.GetModuleID();
Int_t anode = inputSDD.GetAnode();
Int_t time = inputSDD.GetTime();
- Int_t signal = inputSDD.GetSignal();
+ Int_t signal10 = inputSDD.GetSignal();
Int_t index = npx * anode + time;
if (module >= size) continue;
- // 8bit -> 10 bit
- AliITSresponseSDD *resSDD = (AliITSresponseSDD*) fDetTypeSim->GetResponse(1);
- Int_t signal10 = resSDD->Convert8to10(signal); // signal is a 8 bit value (if the compression is active)
-
last = modA[module]->GetEntries();
TClonesArray& dum = *modA[module];
new (dum[last]) AliITSpListItem(-1, -1, module, index, Double_t(signal10));