-
-
-//____________________________________________________________________________
-void AliITS::DigitsToRecPoints(Int_t evNumber,Int_t lastentry,Option_t *opt)
-{
- // cluster finding and reconstruction of space points
-
- // the condition below will disappear when the geom class will be
- // initialised for all versions - for the moment it is only for v5 !
- // 7 is the SDD beam test version
- Int_t ver = this->IsVersion();
- if(ver!=5 && ver!=7) return;
-
- char *all = strstr(opt,"All");
- char *det[3] = {strstr(opt,"SPD"),strstr(opt,"SDD"),strstr(opt,"SSD")};
-
- static Bool_t first=kTRUE;
- if (first) {
- MakeTreeC("C");
- first=kFALSE;
- }
-
- TTree *iTC=TreeC();
-
- //TBranch *branch;
- AliITSClusterFinder* rec;
-
- //TObjArray *branches=gAlice->TreeR()->GetListOfBranches();
- AliITSgeom *geom = GetITSgeom();
-
- Int_t id,module;
- for (id=0;id<kNTYPES;id++) {
- if (!all && !det[id]) continue;
- //branch = (TBranch*)branches->UncheckedAt(id);
- AliITSDetType *iDetType=DetType(id);
- rec = (AliITSClusterFinder*)iDetType->GetReconstructionModel();
- if (!rec) {
- Error("DigitsToRecPoints","The cluster finder class was not instantiated!");
- exit(1);
- // or SetDefaultClusterFinders();
- }
- TClonesArray *itsDigits = this->DigitsAddress(id);
-
- Int_t first,last;
- if(geom) {
- first = geom->GetStartDet(id);
- last = geom->GetLastDet(id);
- } else first=last=0;
- //printf("first last %d %d\n",first,last);
- for(module=first;module<=last;module++) {
- this->ResetDigits();
- if (all) gAlice->TreeD()->GetEvent(lastentry+module);
- else gAlice->TreeD()->GetEvent(lastentry+(module-first));
- Int_t ndigits = itsDigits->GetEntriesFast();
- if (ndigits) rec->FindRawClusters();
- gAlice->TreeR()->Fill();
- ResetRecPoints();
- iTC->Fill();
- ResetClusters();
- // try and fill only the branch
- //branch->Fill();
- //ResetRecPoints(id);
- } // loop over modules
- } // loop over detector types
-
-
- Int_t nentries=(Int_t)gAlice->TreeR()->GetEntries();
- Int_t ncentries=(Int_t)iTC->GetEntries();
- cout << " nentries ncentries " << nentries << ncentries << endl;
-
- char hname[30];
- sprintf(hname,"TreeR%d",evNumber);
- gAlice->TreeR()->Write(hname,TObject::kOverwrite);
- // reset tree
- gAlice->TreeR()->Reset();
-
- sprintf(hname,"TreeC%d",evNumber);
- iTC->Write(hname);
- iTC->Reset();
-}
-
-
-//____________________________________________________________________________
-void AliITS::HitsToFastRecPoints(Int_t evNumber,Int_t bgrev,Int_t size,
-Option_t *option,Option_t *opt,Text_t *filename)
-{
- // keep galice.root for signal and name differently the file for
- // background when add! otherwise the track info for signal will be lost !
-
-
- // the condition below will disappear when the geom class will be
- // initialised for all versions - for the moment it is only for v5 !
- Int_t ver = this->IsVersion();
- if(ver!=5) return;
-
- char *all = strstr(opt,"All");
- char *det[3] = {strstr(opt,"SPD"),strstr(opt,"SDD"),strstr(opt,"SSD")};
-
- Int_t nmodules;
- InitModules(size,nmodules);
- FillModules(evNumber,bgrev,nmodules,option,filename);
-
-
- AliITSsimulation* sim;
- AliITSgeom *geom = GetITSgeom();
-
- TRandom *random=new TRandom[9];
- random[0].SetSeed(111);
- random[1].SetSeed(222);
- random[2].SetSeed(333);
- random[3].SetSeed(444);
- random[4].SetSeed(555);
- random[5].SetSeed(666);
- random[6].SetSeed(777);
- random[7].SetSeed(888);
- random[8].SetSeed(999);
-
-
- Int_t id,module;
- for (id=0;id<kNTYPES;id++) {
- if (!all && !det[id]) continue;
- AliITSDetType *iDetType=DetType(id);
- sim = (AliITSsimulation*)iDetType->GetSimulationModel();
- if (!sim) {
- Error("HitsToFastPoints","The simulation class was not instantiated!");
- exit(1);
- // or SetDefaultSimulation();
- }
- Int_t first = geom->GetStartDet(id);
- Int_t last = geom->GetLastDet(id);
- for(module=first;module<=last;module++) {
- AliITSmodule *mod = (AliITSmodule *)fITSmodules->At(module);
- sim->CreateFastRecPoints(mod,module,random);
- gAlice->TreeR()->Fill();
- ResetRecPoints();
- } // loop over modules
- } // loop over detector types
-
-
- ClearModules();
-
- //Int_t nentries=(Int_t)gAlice->TreeR()->GetEntries();
-
- char hname[30];
- sprintf(hname,"TreeR%d",evNumber);
- gAlice->TreeR()->Write(hname,TObject::kOverwrite);
- // reset tree
- gAlice->TreeR()->Reset();
-
- delete [] random;