]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSDetTypeSim.cxx
CreateVertexer now instantiates by default a AliITSVertexer3D object.
[u/mrichter/AliRoot.git] / ITS / AliITSDetTypeSim.cxx
index c6271471acb27ccb7f61b3ab7e90c687f3b25cbe..1b98518f72e9b2c993bb0d4b96d7a4d2351c4867 100644 (file)
@@ -81,6 +81,7 @@ fSDigits("AliITSpListItem",1000),
 fNDigits(0),     //! number of Digits
 fRunNumber(0),   //! Run number (to access DB)
 fDigits(),       //! [NMod][NDigits]
+fSimuPar(0),
 fDDLMapSDD(0),
 fHitClassName(), // String with Hit class name.
 fSDigClassName(),// String with SDigit class name.
@@ -101,6 +102,7 @@ fFirstcall(kTRUE){ // flag
   fDigits = new TObjArray(fgkNdettypes);
   fNDigits = new Int_t[fgkNdettypes];
   fDDLMapSDD=new AliITSDDLModuleMapSDD();
+  fSimuPar= new AliITSSimuParam();
   fNMod[0] = fgkDefaultNModulesSPD;
   fNMod[1] = fgkDefaultNModulesSDD;
   fNMod[2] = fgkDefaultNModulesSSD;
@@ -150,6 +152,7 @@ AliITSDetTypeSim::~AliITSDetTypeSim(){
        delete fPostProcess;
     }
     fPostProcess = 0;
+    if(fSimuPar) delete fSimuPar;
     if(fDDLMapSDD) delete fDDLMapSDD;
     if(fNDigits) delete [] fNDigits;
     fNDigits = 0;
@@ -174,6 +177,7 @@ fSDigits(*((TClonesArray*)source.fSDigits.Clone())),
 fNDigits(source.fNDigits),     //! number of Digits
 fRunNumber(source.fRunNumber),   //! Run number (to access DB)
 fDigits(source.fDigits),       //! [NMod][NDigits]
+fSimuPar(source.fSimuPar),
 fDDLMapSDD(source.fDDLMapSDD),
 fHitClassName(source.fHitClassName), // String with Hit class name.
 fSDigClassName(source.fSDigClassName),// String with SDigit class name.
@@ -384,43 +388,13 @@ void AliITSDetTypeSim::SetDefaults(){
     ResetSegmentation();
     if(!GetCalibration()){AliFatal("Exit"); exit(0);}
 
+    SetDigitClassName(0,"AliITSdigitSPD");
+    SetDigitClassName(1,"AliITSdigitSDD");
+    SetDigitClassName(2,"AliITSdigitSSD");
+
     for(Int_t idet=0;idet<fgkNdettypes;idet++){
-       //SPD
-       if(idet==0){
-           if(!GetSegmentationModel(idet)) SetDefaultSegmentation(idet);
-           const char *kData0=(GetCalibrationModel(GetITSgeom()->GetStartSPD()))->DataType();
-           if (strstr(kData0,"real")) {
-               SetDigitClassName(idet,"AliITSdigit");
-           }else {
-               SetDigitClassName(idet,"AliITSdigitSPD");
-           } // end if
-       } // end if idet==0
-       //SDD
-       if(idet==1){
-           if(!GetSegmentationModel(idet)) SetDefaultSegmentation(idet);
-           AliITSCalibrationSDD* rsp = 
-               (AliITSCalibrationSDD*)GetCalibrationModel(
-                   GetITSgeom()->GetStartSDD());
-           const char *kopt = ((AliITSresponseSDD*)rsp->GetResponse())->
-               ZeroSuppOption();
-           if(!strstr(kopt,"ZS")) {
-             SetDigitClassName(idet,"AliITSdigit");
-           }else {
-             SetDigitClassName(idet,"AliITSdigitSDD");
-           } // end if
-       } // end if idet==1
-       //SSD
-       if(idet==2){
-           if(!GetSegmentationModel(idet))SetDefaultSegmentation(idet);
-           const char *kData2 = (GetCalibrationModel(
-                                  GetITSgeom()->GetStartSSD())->DataType());
-           if (strstr(kData2,"real")) {
-               SetDigitClassName(idet,"AliITSdigit");
-           }else {
-               SetDigitClassName(idet,"AliITSdigitSSD");
-           } // end if
-       } // end if idet==2
-    }// end for idet
+      if(!GetSegmentationModel(idet)) SetDefaultSegmentation(idet);
+    }
 }
 //______________________________________________________________________
 Bool_t AliITSDetTypeSim::GetCalibration() {
@@ -807,13 +781,6 @@ void AliITSDetTypeSim::AddSumDigit(AliITSpListItem &sdig){
   new(fSDigits[fNSDigits++]) AliITSpListItem(sdig);
 }
 //__________________________________________________________
-void AliITSDetTypeSim::AddRealDigit(Int_t branch, Int_t *digits){
-  //   Add a real digit - as coming from data.
-
-  TClonesArray &ldigits = *((TClonesArray*)fDigits->At(branch));
-  new(ldigits[fNDigits[branch]++]) AliITSdigit(digits); 
-}
-//__________________________________________________________
 void AliITSDetTypeSim::AddSimDigit(Int_t branch, AliITSdigit* d){  
   //    Add a simulated digit.