- TString taskName(GetName()) ;
- taskName.ReplaceAll(Version(), "") ;
-
- while ( (branch = (TBranch*)next()) && (!phostsfound || !tracksegmentmakerfound) ) {
- if ( (strcmp(branch->GetName(), "PHOSTS")==0) && (strcmp(branch->GetTitle(), taskName.Data())==0) )
- phostsfound = kTRUE ;
-
- else if ( (strcmp(branch->GetName(), "AliPHOSTrackSegmentMaker")==0) && (strcmp(branch->GetTitle(), taskName.Data())==0) )
- tracksegmentmakerfound = kTRUE ;
- }
-
- if ( phostsfound || tracksegmentmakerfound ) {
- cerr << "WARNING: AliPHOSTrackSegmentMakerv1::Exec -> TrackSegments and/or TrackSegmentMaker branch with name "
- << taskName.Data() << " already exits" << endl ;
- return ;
- }
-
- const AliPHOSGeometry * geom = AliPHOSGetter::GetInstance()->PHOSGeometry() ;
- Int_t nevents = (Int_t) gAlice->TreeE()->GetEntries() ;
- Int_t ievent ;
-
- for(ievent = 0; ievent < nevents; ievent++){
- if(!ReadRecPoints(ievent)) //reads RecPoints for event ievent
- return;
-
- for(fModule = 1; fModule <= geom->GetNModules() ; fModule++ ){
-
- FillOneModule() ;
-
- MakeLinks() ;
-
- MakePairs() ;
-
- }
-
- WriteTrackSegments(ievent) ;
-
- if(strstr(option,"deb"))
- PrintTrackSegments(option) ;
-
- }
-
- if(strstr(option,"tim")){
- gBenchmark->Stop("PHOSTSMaker");
- cout << "AliPHOSTSMaker:" << endl ;
- cout << " took " << gBenchmark->GetCpuTime("PHOSTSMaker") << " seconds for making TS "
- << gBenchmark->GetCpuTime("PHOSTSMaker")/nevents << " seconds per event " << endl ;
- cout << endl ;
- }
-
-}
-
-//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const
-{
- // Print TrackSegmentMaker parameters
-
- if( strcmp(GetName(), "") != 0 ) {
- cout << "======== AliPHOSTrackSegmentMakerv1 ========" << endl ;
- cout << "Making Track segments "<< endl ;
- cout << " Headers file: " << fHeaderFileName.Data() << endl ;
- cout << " RecPoints branch file name: " << fRecPointsBranchTitle.Data() << endl ;
- cout << " TrackSegments Branch file name: " << fTrackSegmentsBranchTitle.Data() << endl ;
- cout << "with parameters: " << endl ;
- cout << " Maximal EMC - CPV (PPSD) distance (cm)" << fR0 << endl ;
- cout << "============================================" << endl ;
- }
- else
- cout << "AliPHOSTrackSegmentMakerv1 not initialized " << endl ;
-}
-//____________________________________________________________________________
-Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(Int_t event)
-{
- // Reads Emc and CPV recPoints
- // made previously with Clusterizer.
-
-