4 /**************************************************************************
5 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
7 * Author: The ALICE Off-line Project. *
8 * Contributors are mentioned in the code where appropriate. *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 /* $Id: AliITSU.cxx $ */
22 ///////////////////////////////////////////////////////////////////////////////
24 // An overview of the basic philosophy of the ITS code development //
25 // and analysis is show in the figure below. //
28 <img src="picts/ITS/ITS_Analysis_schema.gif">
31 <font size=+2 color=red>
32 <p>Roberto Barbera is in charge of the ITS Offline code (1999).
33 <a href="mailto:roberto.barbera@ct.infn.it">Roberto Barbera</a>.
39 // AliITSU. Inner Traking System base class.
40 // This class contains the base procedures for the Inner Tracking System
44 <img src="picts/ITS/AliITS_Class_Diagram.gif">
47 <font size=+2 color=red>
48 <p>This show the class diagram of the different elements that are part of
56 // Written by Rene Brun, Federico Carminati, and Roberto Barbera
59 // Modified and documented by Bjorn S. Nilsen
63 // Modified and documented by A. Bologna
66 // AliITSU is the general base class for the ITS. Also see AliDetector for
67 // futher information.
69 ///////////////////////////////////////////////////////////////////////////////
72 #include <TClonesArray.h>
74 #include <TParticle.h>
77 #include <TVirtualMC.h>
78 #include "AliDetector.h"
80 #include "AliITSLoader.h"
81 #include "AliITSULoader.h"
82 #include "AliITSUHit.h"
83 #include "AliITSUSDigit.h"
84 #include "AliITSUSimulation.h"
85 #include "AliITSUSimulationPix.h"
86 #include "AliITSsimulationFastPoints.h"
88 #include "AliITSUDigitizer.h"
89 #include "AliITSRecPoint.h"
90 #include "AliRawReader.h"
93 #include "AliITSdigit.h"
94 #include "AliITSUModule.h"
95 #include "AliITSUDigitPix.h"
96 #include "AliITSsegmentation.h"
97 #include "AliITSUSegmentationPix.h"
98 #include "AliITSUSimuParam.h"
99 #include "AliITSFOSignalsSPD.h"
103 //______________________________________________________________________
124 ,fSimInitDone(kFALSE)
126 // Default initializer for ITS
129 //______________________________________________________________________
130 AliITSU::AliITSU(const Char_t *title, Int_t nlay) :
131 AliDetector("ITS",title)
150 ,fSimInitDone(kFALSE)
152 // The standard Constructor for the ITS class.
153 AliMC* mc = gAlice->GetMCApp();
154 if( mc && mc->GetHitLists() ) {
155 fHits = new TClonesArray("AliITSUHit",100); // from AliDetector
156 mc->AddHitList(fHits);
161 //______________________________________________________________________
164 // Default destructor for ITS.
169 if (fSimulation) fSimulation->Delete();
171 delete fSegmentation;
172 delete[] fLayerName; // Array of TStrings
175 int nmod = fGeomTGeo ? fGeomTGeo->GetNModules() : 0;
176 if (fModuleHits) fModuleHits->Delete();
179 for(Int_t j=0; j<nmod; j++){
185 if (fpSDigits) { fpSDigits->Delete(); delete fpSDigits; }
186 if (fSDigits) { fSDigits->Delete(); delete fSDigits; }
191 //______________________________________________________________________
192 AliDigitizer* AliITSU::CreateDigitizer(AliDigitizationInput* manager) const
194 // Creates the AliITSDigitizer in a standard way for use via AliModule.
195 // This function can not be included in the .h file because of problems
196 // with the order of inclusion (recursive).
198 // AliDigitizationInput *manager The Manger class for Digitization
202 // A new AliITSRunDigitizer (cast as a AliDigitizer).
204 return new AliITSUDigitizer(manager);
207 //______________________________________________________________________
210 // Initializer ITS after it has been built
211 // This routine initializes the AliITS class. It is intended to be
212 // called from the Init function in AliITSv?. Besides displaying a banner
213 // indicating that it has been called it initializes the array fIdSens
214 // and sets the default segmentation, response, digit and raw cluster
215 // classes therefore it should be called after a call to CreateGeometry.
217 if (!fIdSens) fIdSens = new Int_t[fNLayers];
218 for(int i=0;i<fNLayers;i++) fIdSens[i] = gMC ? gMC->VolId(fLayerName[i]) : 0;
219 fGeomTGeo = new AliITSUGeomTGeo(kTRUE);
224 //______________________________________________________________________
225 void AliITSU::MakeBranch(Option_t* option)
227 // Creates Tree branches for the ITS.
229 // Option_t *option String of Tree types S,D, and/or R.
230 // const char *file String of the file name where these branches
231 // are to be stored. If blank then these branches
232 // are written to the same tree as the Hits were
239 Bool_t cH = (strstr(option,"H")!=0);
240 Bool_t cS = (strstr(option,"S")!=0);
241 Bool_t cD = (strstr(option,"D")!=0);
243 if(cH && (fHits == 0x0)) fHits = new TClonesArray("AliITSUHit", 1560);
244 AliDetector::MakeBranch(option);
246 if(cS) MakeBranchS(0);
247 if(cD) MakeBranchD(0);
251 //___________________________________________________________________
252 void AliITSU::MakeBranchS(const char* fl)
254 // Creates Tree Branch for the ITS summable digits.
256 // cont char *fl File name where SDigits branch is to be written
257 // to. If blank it write the SDigits to the same
258 // file in which the Hits were found.
260 Int_t buffersize = 4000;
263 // only one branch for SDigits.
264 snprintf(branchname,30,"%s",GetName());
265 if(fLoader->TreeS()) MakeBranchInTree(fLoader->TreeS(),branchname,&fSDigits,buffersize,fl);
269 //______________________________________________________________________
270 void AliITSU::MakeBranchD(const char* file)
272 //Make branch for digits
273 MakeBranchInTreeD(fLoader->TreeD(),file);
276 //___________________________________________________________________
277 void AliITSU:: MakeBranchInTreeD(TTree* treeD, const char* file)
279 // Creates Tree branches for the ITS.
281 if (!treeD) {AliFatal("No tree provided");}
282 Int_t buffersize = 4000;
283 if (!fDetDigits) InitArrays();
285 for (Int_t i=0;i<kNDetTypes;i++) {
287 TClonesArray* darr = (TClonesArray*)fDetDigits->At(i);
288 AliDetector::MakeBranchInTree(treeD,Form("%sDigits%s",GetName(),fGeomTGeo->GetDetTypeName(i)),
289 &darr,buffersize,file);
294 //______________________________________________________________________
295 void AliITSU::InitArrays()
299 if(!fLoader) MakeLoader(AliConfig::GetDefaultEventFolderName());
301 fDetDigits = new TObjArray(kNDetTypes);
302 for (Int_t i=0;i<kNDetTypes;i++) fDetDigits->AddAt(new TClonesArray(GetDigitClassName(i),100),i);
304 fSDigits = new TClonesArray("AliITSUSDigit",100);
306 fDetHits = new TClonesArray("AliITSUHit",100);
308 fModuleHits = new TObjArray(fGeomTGeo->GetNModules());
309 for (int i=0;i<fGeomTGeo->GetNModules();i++) fModuleHits->AddLast( new AliITSUModule(i,fGeomTGeo) );
313 //______________________________________________________________________
314 void AliITSU::SetTreeAddress()
316 // Set branch address for the Trees.
317 TTree *treeS = fLoader->TreeS();
319 TBranch* br = treeS->GetBranch(GetName());
320 if (br) br->SetAddress(&fSDigits);
323 TTree *treeD = fLoader->TreeD();
325 if (!fDetDigits) InitArrays();
326 for (int i=0;i<kNDetTypes;i++) {
327 TString brname = Form("%sDigits%s",GetName(),GetDetTypeName(i));
328 TBranch* br = treeD->GetBranch(brname.Data());
330 TClonesArray* darr = (TClonesArray*)fDetDigits->At(i);
331 br->SetAddress(&darr);
334 if (fLoader->TreeH() && (fHits == 0x0)) fHits = new TClonesArray("AliITSUHit", 1560);
335 AliDetector::SetTreeAddress();
339 //______________________________________________________________________
340 void AliITSU::AddHit(Int_t track, Int_t *vol, Float_t *hits)
343 // The function to add information to the AliITSUHit class. See the
344 // AliITSUHit class for a full description. This function allocates the
345 // necessary new space for the hit information and passes the variable
346 // track, and the pointers *vol and *hits to the AliITSUHit constructor
349 // Int_t track Track number which produced this hit.
350 // Int_t *vol Array of Integer Hit information. See AliITSUHit.h
351 // Float_t *hits Array of Floating Hit information. see AliITSUHit.h
352 TClonesArray &lhits = *fHits;
353 new(lhits[fNhits++]) AliITSUHit(fIshunt,track,vol,hits);
357 //______________________________________________________________________
358 void AliITSU::FillModules(Int_t bgrev, Option_t *option, const char *filename)
360 // fill the modules with the sorted by module hits; add hits from
361 // background if option=Add.
363 static TTree *trH1=0; //Tree with background hits
364 static Bool_t first=kTRUE;
365 static TFile *file = 0;
366 const char *addBgr = strstr(option,"Add");
370 file = new TFile(filename);
375 // Get Hits Tree header from file
376 if (trH1) {delete trH1; trH1=0;}
379 snprintf(treeName,20,"TreeH%d",bgrev);
380 trH1 = (TTree*)gDirectory->Get(treeName);
381 if (!trH1) Error("FillModules","cannot find Hits Tree for event:%d",bgrev);
382 // Set branch addresses
385 FillModules(fLoader->TreeH(),0); // fill from this file's tree.
388 FillModules(trH1,10000000); // Default mask 10M.
389 TTree *fAli=fLoader->GetRunLoader()->TreeK();
392 fileAli = fAli->GetCurrentFile();
399 //______________________________________________________________________
400 void AliITSU::FillModules(TTree *treeH, Int_t /*mask*/)
402 // fill the modules with the sorted by module hits;
403 // can be called many times to do a merging
405 // TTree *treeH The tree containing the hits to be copied into
407 // Int_t mask The track number mask to indecate which file
408 // this hits came from.
410 if (treeH == 0x0) { AliError("Tree H is NULL"); return; }
412 Int_t lay,lad,det,index;
413 AliITSUHit *itsHit=0;
415 snprintf(branchname,20,"%s",GetName());
416 TBranch *branch = treeH->GetBranch(branchname);
417 if (!branch) {Error("FillModules","%s branch in TreeH not found",branchname); return;} // end if !branch
419 branch->SetAddress(&fHits);
420 Int_t nTracks =(Int_t) treeH->GetEntries();
422 for (iPrimTrack=0; iPrimTrack<nTracks; iPrimTrack++) {
424 Int_t nBytes = treeH->GetEvent(iPrimTrack);
425 if (nBytes <= 0) continue;
426 Int_t nHits = fHits->GetEntriesFast();
427 for (h=0; h<nHits; h++){
428 itsHit = (AliITSUHit *)fHits->UncheckedAt(h);
429 itsHit->GetDetectorID(lay,lad,det);
430 index = fGeomTGeo->GetModuleIndex(lay,lad,det); // !!! AliITSHit counts indices from 1!
431 itsHit = new( (*fDetHits)[fDetHits->GetEntriesFast()] ) AliITSUHit(*itsHit);
432 itsHit->SetUniqueID(h);
433 GetModule(index)->AddHit(itsHit);
434 // do we need to add a mask?
435 // itsHit->SetTrack(itsHit->GetTrack()+mask);
436 } // end loop over hits
437 } // end loop over tracks
440 //______________________________________________________________________
441 void AliITSU::ClearModules()
443 // clear accumulated hits
444 if (!fModuleHits || !fDetHits) AliFatal("Hits accumulation arrays are not defined");
445 for (int i=fGeomTGeo->GetNModules();i--;) GetModule(i)->Clear();
449 //______________________________________________________________________
450 void AliITSU::Hits2SDigits()
452 // Standard Hits to summable Digits function.
453 if (!IsSimInitDone()) InitSimulation();
454 fLoader->LoadHits("read");
455 fLoader->LoadSDigits("recreate");
456 AliRunLoader* rl = fLoader->GetRunLoader();
458 for (Int_t iEvent = 0; iEvent < rl->GetNumberOfEvents(); iEvent++) {
459 rl->GetEvent(iEvent);
460 if (!fLoader->TreeS()) fLoader->MakeTree("S");
463 Hits2SDigits(iEvent,0," "," ");
466 fLoader->UnloadHits();
467 fLoader->UnloadSDigits();
471 //______________________________________________________________________
472 void AliITSU::Hits2SDigits(Int_t evNumber,Int_t bgrev,Option_t *option,const char *filename)
474 // Keep galice.root for signal and name differently the file for
475 // background when add! otherwise the track info for signal will be lost !
477 // Int_t evnt Event to be processed.
478 // Int_t bgrev Background Hit tree number.
479 // Int_t nmodules Not used.
480 // Option_t *option String indicating if merging hits or not. To
481 // merge hits set equal to "Add". Otherwise no
482 // background hits are considered.
483 // Test_t *filename File name containing the background hits..
485 if (!IsSimInitDone()) InitSimulation();
486 FillModules(bgrev,option,filename);
488 Int_t nmodules = fGeomTGeo->GetNModules();
489 for(int module=0;module<nmodules;module++) {
490 int id = fGeomTGeo->GetModuleDetTypeID(module);
491 AliITSUSimulation* sim = GetSimulationModel(id);
492 if (!sim) AliFatal(Form("The sim.class for module %d of DetTypeID %d is missing",module,id));
493 sim->SDigitiseModule( GetModule(module), module, evNumber, GetSegmentation(id));
494 fLoader->TreeS()->Fill(); // fills all branches - wasted disk space
500 fLoader->TreeS()->GetEntries();
501 fLoader->TreeS()->AutoSave();
502 fLoader->WriteSDigits("OVERWRITE");
503 fLoader->TreeS()->Reset();
506 //______________________________________________________________________
507 void AliITSU::Hits2Digits()
509 // Standard Hits to Digits function.
510 if (!IsSimInitDone()) InitSimulation();
511 fLoader->LoadHits("read");
512 fLoader->LoadDigits("recreate");
513 AliRunLoader* rl = fLoader->GetRunLoader();
515 for (Int_t iEvent = 0; iEvent < rl->GetNumberOfEvents(); iEvent++) {
516 rl->GetEvent(iEvent);
517 if (!fLoader->TreeS()) fLoader->MakeTree("S");
520 Hits2Digits(iEvent,0," "," ");
523 fLoader->UnloadHits();
524 fLoader->UnloadSDigits();
528 //______________________________________________________________________
529 void AliITSU::Hits2Digits(Int_t evNumber,Int_t bgrev,Option_t *option,const char *filename)
531 // Keep galice.root for signal and name differently the file for
532 // background when add! otherwise the track info for signal will be lost !
534 // Int_t evnt Event to be processed.
535 // Int_t bgrev Background Hit tree number.
536 // Option_t *option String indicating if merging hits or not. To
537 // merge hits set equal to "Add". Otherwise no
538 // background hits are considered.
539 // Test_t *filename File name containing the background hits..
542 if (!IsSimInitDone()) InitSimulation();
543 FillModules(bgrev,option,filename);
545 Int_t nmodules = fGeomTGeo->GetNModules();
546 for (Int_t module=0;module<nmodules;module++) {
547 int id = fGeomTGeo->GetModuleDetTypeID(module);
548 AliITSUSimulation* sim = GetSimulationModel(id);
549 if (!sim) AliFatal(Form("The sim.class for module %d of DetTypeID %d is missing",module,id));
550 sim->DigitiseModule( GetModule(module) ,module, evNumber, GetSegmentation(id));
551 // fills all branches - wasted disk space
552 fLoader->TreeD()->Fill();
558 // WriteFOSignals(); // Add Fast-OR signals to event (only one object per event)
559 fLoader->TreeD()->GetEntries();
560 fLoader->TreeD()->AutoSave();
561 fLoader->TreeD()->Reset();
565 //_____________________________________________________________________
566 void AliITSU::Hits2FastRecPoints(Int_t bgrev,Option_t *opt,const char *flnm)
568 // keep galice.root for signal and name differently the file for
569 // background when add! otherwise the track info for signal will be lost !
571 // Int_t evnt Event to be processed.
572 // Int_t bgrev Background Hit tree number.
573 // Option_t *opt Option passed to FillModules. See FillModules.
574 // Test_t *flnm File name containing the background hits..
579 if (!IsSimInitDone()) InitSimulation();
580 AliITSULoader *pITSloader = (AliITSULoader*)fLoader;
581 Int_t nmodules = fGeomTGeo->GetNModules();
582 FillModules(bgrev,opt,flnm);
584 TTree *lTR = pITSloader->TreeR();
586 pITSloader->MakeTree("R");
587 lTR = pITSloader->TreeR();
590 TClonesArray* ptarray = new TClonesArray("AliITSRecPoint",1000);
591 TBranch* branch = (TBranch*)lTR->Branch("ITSRecPointsF",&ptarray);
592 branch->SetAddress(&ptarray);
593 for (int module=0;module<nmodules;module++){
594 int id = fGeomTGeo->GetModuleDetTypeID(module);
595 AliITSUSimulation* sim = GetSimulationModel(id);
596 if (!sim) AliFatal(Form("The sim.class for module %d of DetTypeID %d is missing",module,id));
597 sim->CreateFastRecPoints( GetModule(module) ,module,gRandom,ptarray);
603 fLoader->WriteRecPoints("OVERWRITE");
607 //_____________________________________________________________________
608 Int_t AliITSU::Hits2Clusters(TTree *hTree, TTree *cTree)
611 // This function creates ITS clusters
612 if (!IsSimInitDone()) InitSimulation();
614 FillModules(hTree,0);
616 TClonesArray *points = new TClonesArray("AliITSRecPoint",1000);
617 TBranch *branch=cTree->GetBranch("ITSRecPoints");
618 if (!branch) cTree->Branch("ITSRecPoints",&points);
619 else branch->SetAddress(&points);
621 AliITSsimulationFastPoints sim;
623 for (Int_t m=0; m<mmax; m++) {
624 sim.CreateFastRecPoints(GetModule(m),m,gRandom,points);
625 ncl+=points->GetEntriesFast();
632 AliDebug(1,Form("Number of found fast clusters : %d",ncl));
639 //_____________________________________________________________________
640 void AliITSU::CheckLabels(Int_t lab[3]) const //RSDONE
642 // Tries to find mother's labels
644 if(lab[0]<0 && lab[1]<0 && lab[2]<0) return; // In case of no labels just exit
646 Int_t ntracks = gAlice->GetMCApp()->GetNtrack();
647 for (Int_t i=0;i<3;i++){
648 Int_t label = lab[i];
649 if (label>=0 && label<ntracks) {
650 TParticle *part=(TParticle*)gAlice->GetMCApp()->Particle(label);
651 if (part->P() < 0.005) {
652 Int_t m=part->GetFirstMother();
654 if (part->GetStatusCode()>0) continue;
662 //______________________________________________________________________
663 void AliITSU::ResetDigits() //RSDONE?
665 // Reset number of digits and the digits array for the ITS detector.
666 if (fDetDigits) for (int i=kNDetTypes;i--;) ResetDigits(i);
670 //______________________________________________________________________
671 void AliITSU::ResetDigits(Int_t branch)
673 // Reset number of digits and the digits array for this branch.
674 if (fDetDigits) ((TClonesArray*)fDetDigits->At(branch))->Clear();
678 //______________________________________________________________________
679 void AliITSU::AddSumDigit(AliITSUSDigit &sdig)
681 // Adds the module summable digits to the summable digits tree.
682 new( (*fSDigits)[fSDigits->GetEntriesFast()]) AliITSUSDigit(sdig);
686 //______________________________________________________________________
687 void AliITSU::AddSimDigit(Int_t branch, AliITSdigit *d)
689 // Add a simulated digit.
691 // Int_t id Detector type number.
692 // AliITSdigit *d Digit to be added to the Digits Tree. See
694 TClonesArray &ldigits = *((TClonesArray*)fDetDigits->At(branch));
695 int nd = ldigits.GetEntriesFast();
697 case AliITSUGeomTGeo::kDetTypePix:
698 new(ldigits[nd]) AliITSUDigitPix(*((AliITSUDigitPix*)d));
701 AliFatal(Form("Unknown digits branch %d",branch));
705 //______________________________________________________________________
706 void AliITSU::AddSimDigit(Int_t branch,Float_t phys,Int_t *digits,Int_t *tracks,
707 Int_t *hits,Float_t *charges, Int_t sigexpanded)
709 // Add a simulated digit to the list.
711 // Int_t id Detector type number.
712 // Float_t phys Physics indicator. See AliITSdigits.h
713 // Int_t *digits Integer array containing the digits info. See
715 // Int_t *tracks Integer array [AliITSdigitS?D::GetNTracks()]
716 // containing the track numbers that contributed to
718 // Int_t *hits Integer array [AliITSdigitS?D::GetNTracks()]
719 // containing the hit numbers, from AliITSmodule, that
720 // contributed to this digit.
721 // Float_t *charge Floating point array of the signals contributed
722 // to this digit by each track.
723 TClonesArray &ldigits = *((TClonesArray*)fDetDigits->At(branch));
724 int nd = ldigits.GetEntriesFast();
726 case AliITSUGeomTGeo::kDetTypePix:
727 new(ldigits[nd]) AliITSUDigitPix(digits,tracks,hits);
730 AliFatal(Form("Unknown digits branch %d",branch));
735 //______________________________________________________________________
736 void AliITSU::Digits2Raw()
738 AliError("Not ready");
741 //______________________________________________________________________
742 AliLoader* AliITSU::MakeLoader(const char* topfoldername)
744 //builds ITSgetter (AliLoader type)
745 //if detector wants to use castomized getter, it must overload this method
747 AliDebug(1,Form("Creating AliITSULoader. Top folder is %s.",topfoldername));
748 fLoader = new AliITSULoader(GetName(),topfoldername);
752 //______________________________________________________________________
753 Bool_t AliITSU::Raw2SDigits(AliRawReader* rawReader)
755 AliError("Not ready");
759 //______________________________________________________________________
761 AliTriggerDetector* AliITSU::CreateTriggerDetector() const
763 // create an AliITSTrigger object (and set trigger conditions as input)
764 return new AliITSTrigger(fDetTypeSim->GetTriggerConditions());
768 //______________________________________________________________________
769 void AliITSU::WriteFOSignals()
771 // This method write FO signals in Digits tree both in Hits2Digits
773 AliError("Not ready");
774 // fDetTypeSim->ProcessNoiseForFastOr();
777 //_______________________________________________________________________
778 void AliITSU::SDigits2Digits()
780 // Standard Summable digits to Digits function.
782 if (!IsSimInitDone()) InitSimulation();
783 TTree* trees = fLoader->TreeS();
784 if( !(trees && fSDigits) ) AliFatal("Error: No trees or SDigits.");
785 TBranch* brchSDigits = trees->GetBranch(GetName());
787 int nmodules = fGeomTGeo->GetNModules();
788 for (int module=0;module<nmodules;module++) {
789 int id = fGeomTGeo->GetModuleDetTypeID(module);
790 AliITSUSimulation *sim = GetSimulationModel(id);
792 AliFatal(Form("The sim.class for module %d of DetTypeID %d is missing",module,id));
795 sim->InitSimulationModule(module,gAlice->GetEvNumber(),GetSegmentation(id));
797 brchSDigits->GetEvent(module);
798 sim->AddSDigitsToModule(fSDigits,0);
799 sim->FinishSDigitiseModule();
800 fLoader->TreeD()->Fill();
804 fLoader->TreeD()->GetEntries();
805 fLoader->TreeD()->AutoSave();
806 fLoader->TreeD()->Reset();
809 //_______________________________________________________________________
810 void AliITSU::InitSimulation()
812 // Initialize arrays, segmentations ets, needed for simulation
813 // Equivalent of old AliITSDetTypeSim construction
815 if (fSimInitDone) {AliInfo("Already done"); return;}
817 fSimuParam = new AliITSUSimuParam();
818 fSensMap = new AliITSUSensMap("AliITSUSDigit",0,0);
819 fSimulation = new TObjArray(kNDetTypes);
820 fSegmentation = new TObjArray();
821 AliITSUSegmentationPix::LoadSegmentations(fSegmentation, AliITSUGeomTGeo::GetITSsegmentationFileName());
822 fSegmentation->SetOwner(kTRUE);
824 // add known simulation types used in the setup
825 for (int i=fNLayers;i--;) {
826 int sType = fGeomTGeo->GetLayerDetTypeID(i)/AliITSUGeomTGeo::kMaxSegmPerDetType;
827 if (fSimulation->At(sType)) continue;
829 AliITSUSimulation* simUpg = 0;
831 case AliITSUGeomTGeo::kDetTypePix :
832 simUpg = new AliITSUSimulationPix(fSimuParam,fSensMap);
834 default: AliFatal(Form("No %d detector type is defined",sType));
836 fSimulation->AddAtAndExpand(simUpg,sType);
841 fSimInitDone = kTRUE;