From f035f6ce1258bdbc2071cc1d206a6b713d418f89 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 6 Apr 2001 15:05:59 +0000 Subject: [PATCH] can now read from HPSS --- PHOS/AliPHOSClusterizerv1.cxx | 54 +++++++-------- PHOS/AliPHOSClusterizerv1.h | 4 +- PHOS/AliPHOSDigitizer.cxx | 11 +-- PHOS/AliPHOSIndexToObject.cxx | 33 +++++++-- PHOS/AliPHOSPIDv1.cxx | 43 ++++++++---- PHOS/AliPHOSSDigitizer.cxx | 27 ++++++-- PHOS/AliPHOSTrackSegmentMakerv1.cxx | 100 ++++++++++++++++------------ PHOS/AliPHOSTrackSegmentMakerv1.h | 4 +- 8 files changed, 169 insertions(+), 107 deletions(-) diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 0a02d61a7ff..d59f607cc1a 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -33,7 +33,7 @@ // unfolding of the clusters with several local maxima. // results are stored in TreeR#, branches PHOSEmcRP (EMC recPoints), // PHOSCpvRP (CPV RecPoints) and AliPHOSClusterizer (Clusterizer with all -// parameters including input digits branch file name thresholds etc.) +// parameters including input digits branch title, thresholds etc.) // This TTask normally called from Reconstructioner, but as well can be used it in // standalone mode: // root [0] AliPHOSClusterizerv1 * cl = new AliPHOSClusterizerv1("galice.root") @@ -42,9 +42,9 @@ // root [1] cl->ExecuteTask() // //finds RecPoints in all events stored in galice.root // root [2] cl->SetDigitsBranch("digits2") -// //sets another input file +// //sets another title for Digitis (input) branch // root [3] cl->SetRecPointsBranch("recp2") -// //sets another aouput file +// //sets another title four output branches // root [4] cl->SetEmcLocalMaxCut(0.03) // //set clusterization parameters // root [5] cl->ExecuteTask("deb all time") @@ -81,17 +81,17 @@ #include "AliRun.h" ClassImp(AliPHOSClusterizerv1) - + //____________________________________________________________________________ AliPHOSClusterizerv1::AliPHOSClusterizerv1():AliPHOSClusterizer() { - // default ctor (to be used) - SetName("AliPHOSClusterizer"); + // default ctor (to be used mainly by Streamer) + SetName("AliPHOSClusterizer"); SetTitle("Version 1") ; - + fNumberOfCpvClusters = 0 ; fNumberOfEmcClusters = 0 ; - + fCpvClusteringThreshold = 0.0; fEmcClusteringThreshold = 0.2; fPpsdClusteringThreshold = 0.0000002 ; @@ -101,7 +101,7 @@ ClassImp(AliPHOSClusterizerv1) fW0 = 4.5 ; fW0CPV = 4.0 ; - + fGeom = 0 ; fDigits = 0 ; @@ -113,14 +113,14 @@ ClassImp(AliPHOSClusterizerv1) } //____________________________________________________________________________ - AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* digitsFile):AliPHOSClusterizer() +AliPHOSClusterizerv1::AliPHOSClusterizerv1(const char* headerFile,const char* digitsFile):AliPHOSClusterizer() { SetName("AliPHOSClusterizer"); SetTitle("Version 1") ; fNumberOfCpvClusters = 0 ; fNumberOfEmcClusters = 0 ; - + fCpvClusteringThreshold = 0.0; fEmcClusteringThreshold = 0.2; fPpsdClusteringThreshold = 0.0000002 ; @@ -139,7 +139,10 @@ ClassImp(AliPHOSClusterizerv1) TFile * file = (TFile*) gROOT->GetFile(fHeaderFileName.Data() ) ; if(file == 0){ - file = new TFile(fHeaderFileName.Data(),"update") ; + if(fHeaderFileName.Contains("rfio")) // if we read file using HPSS + file = TFile::Open(fHeaderFileName.Data(),"update") ; + else + file = new TFile(fHeaderFileName.Data(),"update") ; gAlice = (AliRun *) file->Get("gAlice") ; } @@ -199,6 +202,8 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Fl Int_t nPar, Float_t * fitparameters) { // Calls TMinuit to fit the energy distribution of a cluster with several maxima + // the initial values for fitting procedure are set in the positions of local maxima. + // Cluster will be fitted as a superposition of nPar/3 electromagnetic showers gMinuit->mncler(); // Reset Minuit's list of paramters gMinuit->SetPrintLevel(-1) ; // No Printout @@ -282,7 +287,7 @@ Bool_t AliPHOSClusterizerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Fl //____________________________________________________________________________ void AliPHOSClusterizerv1::Init(){ - + //Make all memory allocations which can not be done in default constructor. if(!fIsInitialized){ if(fHeaderFileName.IsNull()) fHeaderFileName = "galice.root" ; @@ -405,19 +410,20 @@ Bool_t AliPHOSClusterizerv1::IsInCpv(AliPHOSDigit * digit) const } //____________________________________________________________________________ Bool_t AliPHOSClusterizerv1::ReadDigits(){ + //reads digitis with specified title from TreeD fNumberOfEmcClusters = 0 ; fNumberOfCpvClusters = 0 ; // Get Digits Tree header from file - char treeName[20]; - sprintf(treeName,"TreeD%d",fEvent); gAlice->GetEvent(fEvent) ; gAlice->SetEvent(fEvent) ; - TTree * treeD = gAlice->TreeD() ; // (TTree*)file->Get(treeName); + TTree * treeD = gAlice->TreeD() ; if(treeD==0){ + char treeName[20]; + sprintf(treeName,"TreeD%d",fEvent); cout << "Error in AliPHOSClusterizerv1 : no "<GetFile(((TObjString *) fHeaderFiles->At(0))->GetString() ) ; if(file==0){ - file = new TFile(((TObjString *) fHeaderFiles->At(0))->GetString(),"update") ; + if(((TObjString *) fHeaderFiles->At(0))->GetString().Contains("rfio")) + file = TFile::Open(((TObjString *) fHeaderFiles->At(0))->GetString(),"update") ; + else + file = new TFile(((TObjString *) fHeaderFiles->At(0))->GetString(),"update") ; gAlice = (AliRun *) file->Get("gAlice") ; //If not read yet } diff --git a/PHOS/AliPHOSIndexToObject.cxx b/PHOS/AliPHOSIndexToObject.cxx index 245ad1c5e3f..597947ea0bd 100644 --- a/PHOS/AliPHOSIndexToObject.cxx +++ b/PHOS/AliPHOSIndexToObject.cxx @@ -16,9 +16,23 @@ /* $Id: */ //_________________________________________________________________________ -// A singleton +// A singleton. This class should be used on the analysiz stage to get +// reconstructed objects: Digits, RecPoints, TrackSegments and RecParticles, +// instead of direct reading them from galice.root file. This container +// ensures, that one reads Digits, made of these particular digits RecPoints, +// made of these particlar RecPoints TrackSegments and RecParticles, what is +// not trivial if there are several identical branches, but produced with +// different set of parameters. +// +// An example of use (see as well class AliPHOSAnalyser): +// AliPHOSIndexToObject * please = AliPHOSIndexToObject::GetInstance("galice.root","RecParticles","") ; +// for(Int_t irecp = 0; irecp < please->GimeNRecParticles() ; irecp++) +// AliPHOSRecParticle * part = please->GimeRecParticle(1) ; +// ................ +// please->GetEvent(event) ; // reads new event from galice.root // //*-- Author: Yves Schutz (SUBATECH) & Dmitri Peressounko (RRC KI & SUBATECH) +//*-- Complitely redesigned by Dmitri Peressounko March 2001 ////////////////////////////////////////////////////////////////////////////// @@ -68,7 +82,10 @@ AliPHOSIndexToObject::AliPHOSIndexToObject(char* headerFile,char* branch,char* b TFile * file = (TFile*) gROOT->GetFile(fHeaderFile.Data() ) ; if(file == 0){ - file = new TFile(fHeaderFile.Data(),"update") ; + if(fHeaderFile.Contains("rfio")) // if we read file using HPSS + file = TFile::Open(fHeaderFile.Data(),"update") ; + else + file = new TFile(fHeaderFile.Data(),"update") ; gAlice = (AliRun *) file->Get("gAlice") ; } @@ -563,6 +580,8 @@ Bool_t AliPHOSIndexToObject::ReadDigits(char * branchTitle){ if(gAlice->TreeD()== 0) return kFALSE ; + + //if RecPoints are already read, we should read Digits from which they are made if(fClusterizer) @@ -602,7 +621,6 @@ Bool_t AliPHOSIndexToObject::ReadDigits(char * branchTitle){ digitsBranch->SetAddress(&fDigits) ; digitizerBranch->SetAddress(&fDigitizer) ; - gAlice->TreeD()->GetEvent(0) ; } else{ //we should read any branch and print warning if there are other possibilities TBranch * digitsBranch = 0; @@ -633,11 +651,11 @@ Bool_t AliPHOSIndexToObject::ReadDigits(char * branchTitle){ digitsBranch->SetAddress(&fDigits) ; digitizerBranch->SetAddress(&fDigitizer) ; - - gAlice->TreeD()->GetEvent(0) ; - + } + gAlice->TreeD()->GetEvent(0) ; + return kTRUE ; } //____________________________________________________________________________ @@ -718,6 +736,9 @@ void AliPHOSIndexToObject::GetEvent(Int_t event){ if(event == fEvent) // do nothing return ; + if(event > fMaxEvent) + return ; + fEvent = event ; gAlice->GetEvent(fEvent) ; diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index e8909e142d6..c45f8a14f1f 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -35,7 +35,7 @@ // Shower is considered as EM if f() > 0 ) // One can visualize current cuts calling method PlotDispersionCuts(). // -// Below we present usercase: +// usercase: // root [0] AliPHOSPIDv1 * p1 = new AliPHOSPIDv1("galice.root") // Warning in : object already instantiated // root [1] p1->SetIdentificationMethod("disp ellipse") @@ -104,7 +104,10 @@ AliPHOSPIDv1::AliPHOSPIDv1(const char * headeFile,const char * tsBranchTitle):Al TFile * file = (TFile*) gROOT->GetFile(fHeaderFileName.Data() ) ; if(file == 0){ - file = new TFile(fHeaderFileName.Data(),"update") ; + if(fHeaderFileName.Contains("rfio")) // if we read file using HPSS + file = TFile::Open(fHeaderFileName.Data(),"update") ; + else + file = new TFile(fHeaderFileName.Data(),"update") ; gAlice = (AliRun *) file->Get("gAlice") ; } @@ -137,6 +140,7 @@ AliPHOSPIDv1::~AliPHOSPIDv1() //____________________________________________________________________________ void AliPHOSPIDv1::Init() { + // Make all memory allocationa not possible in default constructor if(!fIsInitialized){ if(fHeaderFileName.IsNull()) fHeaderFileName = "galice.root" ; @@ -169,14 +173,15 @@ void AliPHOSPIDv1::Init() fIsInitialized = kTRUE ; } - - } //____________________________________________________________________________ Bool_t AliPHOSPIDv1::ReadTrackSegments() { - //Fist read Track Segment Branch and extract RecPointsBranch from fTSMaker + // Reads TrackSegments an extracts the title of the RecPoints + // branch from which TS were made. + // Then reads both TrackSegments and RecPoints. + //Fist read Track Segment Branch and extract RecPointsBranch from fTSMaker fTrackSegments->Clear() ; fEmcRecPoints->Clear() ; fCpvRecPoints->Clear() ; @@ -307,6 +312,8 @@ Float_t AliPHOSPIDv1::GetDistance(AliPHOSEmcRecPoint * emc,AliPHOSRecPoint * cp //____________________________________________________________________________ void AliPHOSPIDv1::Exec(Option_t * option) { + //Steering method + if(!fIsInitialized) Init() ; @@ -352,7 +359,7 @@ void AliPHOSPIDv1::MakeRecParticles(){ new( (*fRecParticles)[index] ) AliPHOSRecParticle() ; rp = (AliPHOSRecParticle *)fRecParticles->At(index) ; rp->SetTraskSegment(index) ; - + AliPHOSEmcRecPoint * emc = 0 ; if(ts->GetEmcIndex()>=0) emc = (AliPHOSEmcRecPoint *) fEmcRecPoints->At(ts->GetEmcIndex()) ; @@ -411,12 +418,21 @@ void AliPHOSPIDv1::MakeRecParticles(){ void AliPHOSPIDv1:: Print(Option_t * option) const { // Print the parameters used for the particle type identification - - cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl ; - - cout << "Eliptic cuts function " << endl ; - cout << " " << fFormula->GetTitle() << endl ; - + cout << "=============== AliPHOSPID1 ================" << endl ; + cout << "Making PID "<< endl ; + cout << " Headers file: " << fHeaderFileName.Data() << endl ; + cout << " RecPoints branch title: " << fRecPointsTitle.Data() << endl ; + cout << " TrackSegments Branch title: " << fTSTitle.Data() << endl ; + cout << " RecParticles Branch title " << fRecparticlesTitle.Data() << endl; + cout << "with parameters: " << endl ; + cout << " Maximal EMC - CPV (PPSD) distance (cm) " << fCpvEmcDistance << endl ; + if(fIDOptions.Contains("dis",TString::kIgnoreCase )) + cout << " dispersion cut " << fDispersion << endl ; + if(fIDOptions.Contains("ell",TString::kIgnoreCase )){ + cout << "Eliptic cuts function: " << endl ; + cout << fFormula->GetTitle() << endl ; + } + cout << "============================================" << endl ; } //____________________________________________________________________________ @@ -425,12 +441,11 @@ void AliPHOSPIDv1::SetShowerProfileCut(char * formula){ //shower considered "narrow" if Formula(lambda[0],lambda[1]) > 0. if(fFormula) delete fFormula; - fFormula = new TF2("Lambda Cut",formula,0,3,0,3) ; + fFormula = new TFormula("Lambda Cut",formula) ; } //____________________________________________________________________________ void AliPHOSPIDv1::WriteRecParticles() { - //check, if these branches already exist TBranch * pidBranch = 0; TBranch * rpBranch = 0; diff --git a/PHOS/AliPHOSSDigitizer.cxx b/PHOS/AliPHOSSDigitizer.cxx index 6cd2cea2a93..f400007c8d2 100644 --- a/PHOS/AliPHOSSDigitizer.cxx +++ b/PHOS/AliPHOSSDigitizer.cxx @@ -23,14 +23,28 @@ // SDigits are written to TreeS, branch "PHOS" // AliPHOSSDigitizer with all current parameters is written // to TreeS branch "AliPHOSSDigitizer". -// Both branches, "PHOS" and "AliPHOSSDigitizer", are written to the same -// file, and therefore, changing branch file name one can produce several -// versions of SDigitization from the same hits. -// +// Both branches have the same title. If necessary one can produce +// another set of SDigits with different parameters. Two versions +// can be distunguished using titles of the branches. +// User case: +// root [0] AliPHOSSDigitizer * s = new AliPHOSSDigitizer("galice.root") +// Warning in : object already instantiated +// root [1] s->ExecuteTask() +// // Makes SDigitis for all events stored in galice.root +// root [2] s->SetPedestalParameter(0.001) +// // One can change parameters of digitization +// root [3] s->SetSDigitsBranch("Redestal 0.001") +// // and write them into the new branch +// root [4] s->ExeciteTask("deb all tim") +// // available parameters: +// deb - print # of produced SDigitis +// deb all - print # and list of produced SDigits +// tim - print benchmarking information // //*-- Author : Dmitri Peressounko (SUBATECH & KI) ////////////////////////////////////////////////////////////////////////////// + // --- ROOT system --- #include "TFile.h" #include "TTask.h" @@ -83,7 +97,10 @@ AliPHOSSDigitizer::AliPHOSSDigitizer(const char* headerFile, const char *sDigits //File was not opened yet if(file == 0){ - file = new TFile(fHeadersFile.Data(),"update") ; + if(fHeadersFile.Contains("rfio")) + file = TFile::Open(fHeadersFile,"update") ; + else + file = new TFile(fHeadersFile.Data(),"update") ; gAlice = (AliRun *) file->Get("gAlice") ; } diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.cxx b/PHOS/AliPHOSTrackSegmentMakerv1.cxx index 50a1c9c1cbf..3fa472b52f5 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.cxx +++ b/PHOS/AliPHOSTrackSegmentMakerv1.cxx @@ -15,9 +15,26 @@ /* $Id$ */ //_________________________________________________________________________ // Implementation version 1 of algorithm class to construct PHOS track segments -// Associates EMC and PPSD clusters -// Unfolds the EMC cluster -// +// Track segment for PHOS is list of +// EMC RecPoint + (possibly) CPV RecPoint + (possibly) PPSD RecPoint +// To find TrackSegments we do the following: for each EMC RecPoints we look at +// CPV/PPSD RecPoints in the radious fR0. If there is such a CPV RecPoint, +// we make "Link" it is just indexes of EMC and CPV/PPSD RecPoint and distance +// between them in the PHOS plane. Then we sort "Links" and starting from the +// least "Link" pointing to the unassined EMC and CPV RecPoints assing them to +// new TrackSegment. If there is no CPV/PPSD RecPoint we make TrackSegment +// consisting from EMC along. There is no TrackSegments without EMC RecPoint. +// +// In principle this class should be called from AliPHOSReconstructioner, but +// one can use it as well in standalong mode. +// User case: +// root [0] AliPHOSTrackSegmentMakerv1 * t = new AliPHOSTrackSegmentMaker("galice.root") +// Warning in : object already instantiated +// root [1] t->ExecuteTask() +// root [2] t->SetMaxEmcPpsdDistance(5) +// root [3] t->SetTrackSegmentsBranch("max distance 5 cm") +// root [4] t->ExecuteTask("deb all time") +// //*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH) // @@ -64,7 +81,8 @@ ClassImp( AliPHOSTrackSegmentMakerv1) fIsInitialized = kFALSE ; } //____________________________________________________________________________ - AliPHOSTrackSegmentMakerv1:: AliPHOSTrackSegmentMakerv1(const char* headerFile, const char* branchTitle): AliPHOSTrackSegmentMaker() + AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1(const char* headerFile, const char* branchTitle): +AliPHOSTrackSegmentMaker() { // ctor SetTitle("version 1") ; @@ -104,6 +122,7 @@ ClassImp( AliPHOSTrackSegmentMakerv1) } //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::Init(){ + //Make all memory allokations not possible in default constructor if(!fIsInitialized){ if(fHeaderFileName.IsNull()) @@ -146,7 +165,8 @@ void AliPHOSTrackSegmentMakerv1::Init(){ //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::FillOneModule() { - // Finds bounds in which clusters from one PHOS module are + // Finds first and last indexes between which + // clusters from one PHOS module are //First EMC clusters @@ -189,6 +209,7 @@ Float_t AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * { // Calculates the distance between the EMC RecPoint and the PPSD RecPoint //clusters are sorted in "rows" and "columns" of width 1 cm + Float_t delta = 1 ; // Width of the rows in sorting of RecPoints (in cm) // if you change this value, change it as well in xxxRecPoint::Compare() Float_t r = fR0 ; @@ -222,7 +243,9 @@ Float_t AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::MakeLinks() { - // Finds distances (links) between all EMC and PPSD clusters, which are not further apart from each other than fR0 + // Finds distances (links) between all EMC and PPSD clusters, + // which are not further apart from each other than fR0 + // and sort them in accordance with this distance fLinkUpArray->Clear() ; fLinkLowArray->Clear() ; @@ -272,6 +295,10 @@ void AliPHOSTrackSegmentMakerv1::MakeLinks() //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::MakePairs() { + // Using the previously made list of "links", we found the smallest link - i.e. + // link with the least distance betwing EMC and CPV and pointing to still + // unassigned RecParticles. We assign these RecPoints to TrackSegment and + // remove them from the list of "unassigned". //Make arrays to mark clusters already chousen Int_t * emcExist = 0; @@ -364,7 +391,7 @@ void AliPHOSTrackSegmentMakerv1::MakePairs() //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::Exec(Option_t * option) { - // Makes the track segments out of the list of EMC and PPSD Recpoints and stores them in a list + //STEERing method if(! fIsInitialized) Init() ; @@ -407,11 +434,11 @@ void AliPHOSTrackSegmentMakerv1::Print(Option_t * option)const { if(fIsInitialized){ cout << "======== AliPHOSTrackSegmentMakerv1 ========" << endl ; cout << "Making Track segments "<< endl ; - cout << " Headers file: " << fHeaderFileName.Data() << endl ; - cout << " RecPoints branch file name: " <Clear() ; @@ -436,25 +466,16 @@ Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){ gAlice->GetEvent(fEvent) ; // Get TreeR header from file - char treeName[20]; - sprintf(treeName,"TreeR%d",fEvent); - if(gAlice->TreeR()==0){ + char treeName[20]; + sprintf(treeName,"TreeR%d",fEvent); cout << "Error in AliPHOSTrackSegmentMakerv1 : no "<At(ibranch) ; if( fRecPointsBranchTitle.CompareTo(emcBranch->GetTitle())==0 ) - if( strcmp(emcBranch->GetName(),emcBranchName) == 0) { + if( strcmp(emcBranch->GetName(),"PHOSEmcRP") == 0) { emcNotFound = kFALSE ; } } @@ -478,14 +499,14 @@ Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){ if(cpvNotFound){ cpvBranch=(TBranch *) branches->At(ibranch) ; if( fRecPointsBranchTitle.CompareTo(cpvBranch->GetTitle())==0 ) - if( strcmp(cpvBranch->GetName(),cpvBranchName) == 0) + if( strcmp(cpvBranch->GetName(),"PHOSCpvRP") == 0) cpvNotFound = kFALSE ; } if(clusterizerNotFound){ clusterizerBranch = (TBranch *) branches->At(ibranch) ; if( fRecPointsBranchTitle.CompareTo(clusterizerBranch->GetTitle()) == 0) - if( strcmp(clusterizerBranch->GetName(),cluBranchName) == 0) + if( strcmp(clusterizerBranch->GetName(),"AliPHOSClusterizer") == 0) clusterizerNotFound = kFALSE ; } @@ -504,19 +525,18 @@ Bool_t AliPHOSTrackSegmentMakerv1::ReadRecPoints(){ gAlice->TreeR()->GetEvent(0) ; - delete emcBranchName; - delete cpvBranchName; - delete cluBranchName; - return kTRUE ; } //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){ - - char treeName[20]; - sprintf(treeName,"TreeR%d",fEvent); - + // Writes found TrackSegments to TreeR. Creates branches + // "PHOSTS" and "AliPHOSTrackSegmentMaker" with the same title. + // In the former branch found TrackSegments are stored, while + // in the latter all parameters, with which TS were made. + // ROOT does not allow overwriting existing branches, therefore + // first we chesk, if branches with the same title alredy exist. + // If yes - exits without writing. //First, check, if branches already exist TBranch * tsMakerBranch = 0; @@ -595,6 +615,9 @@ void AliPHOSTrackSegmentMakerv1::WriteTrackSegments(){ //____________________________________________________________________________ void AliPHOSTrackSegmentMakerv1::PrintTrackSegments(Option_t * option){ + // option deb - prints # of found TrackSegments + // option deb all - prints as well indexed of found RecParticles assigned to the TS + cout << "AliPHOSTrackSegmentMakerv1: " << endl ; cout << " Found " << fTrackSegments->GetEntriesFast() << " trackSegments " << endl ; @@ -614,14 +637,3 @@ void AliPHOSTrackSegmentMakerv1::PrintTrackSegments(Option_t * option){ cout << "-------------------------------------------------------"<< endl ; } } -//____________________________________________________________________________ -void AliPHOSTrackSegmentMakerv1::SetRecPointsBranch(const char * title){ - //set the title of RecPoints - fRecPointsBranchTitle = title ; - -} -//____________________________________________________________________________ -void AliPHOSTrackSegmentMakerv1::SetTrackSegmentsBranch(const char * title){ - - fTSBranchTitle = title ; -} diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.h b/PHOS/AliPHOSTrackSegmentMakerv1.h index 72ea231d647..2e58f7b54a2 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.h +++ b/PHOS/AliPHOSTrackSegmentMakerv1.h @@ -48,8 +48,8 @@ public: virtual void Print(Option_t * option) const ; virtual Bool_t ReadRecPoints() ; virtual void SetMaxEmcPpsdDistance(Float_t r){ fR0 = r ;} - virtual void SetRecPointsBranch(const char * title) ; - virtual void SetTrackSegmentsBranch(const char * title) ; + virtual void SetRecPointsBranch(const char * title) { fRecPointsBranchTitle = title ;} + virtual void SetTrackSegmentsBranch(const char * title){ fTSBranchTitle = title ; } virtual void WriteTrackSegments() ; AliPHOSTrackSegmentMakerv1 & operator = (const AliPHOSTrackSegmentMakerv1 & ) { -- 2.31.1