}
//____________________________________________________________________________
-AliPHOSRecPoint::RecPointsList * AliPHOS::EmcRecPoints(Int_t evt)
-{
- // returns the pointer to the EMCA RecPoints list
- // if the list is empty, get it from TreeR on the disk file
-
- AliPHOSRecPoint::RecPointsList * rv = 0 ;
-
- if ( fEmcRecPoints )
- rv = fEmcRecPoints ;
-
- else {
- fEmcRecPoints = new TClonesArray("AliPHOSEmcRecPoint", 100) ;
- gAlice->GetEvent(evt) ;
- TTree * fReconstruct = gAlice->TreeR() ;
- fReconstruct->SetBranchAddress( "PHOSEmcRP", &fEmcRecPoints) ;
- fReconstruct->GetEvent(0) ;
- fEmcRecPoints->Expand( fEmcRecPoints->GetEntries() ) ;
- rv = fEmcRecPoints ;
+void AliPHOS::SetTreeAddress()
+{
+ TBranch *branch;
+ AliDetector::SetTreeAddress();
+
+ //Branch address for TreeR: RecParticles
+ TTree *treeR = gAlice->TreeR();
+ if ( treeR && fRecParticles ) {
+ branch = treeR->GetBranch("PHOSRP");
+ if (branch) branch->SetAddress(&fRecParticles) ;
}
-
- return rv ;
-
-}
-
-//____________________________________________________________________________
-AliPHOSRecParticle::RecParticlesList * AliPHOS::RecParticles(Int_t evt)
-{
- // returns the pointer to the RecParticles list
- // if the list is empty, get it from TreeR on the disk file
-
- AliPHOSRecParticle::RecParticlesList * rv = 0 ;
-
- if ( fRecParticles )
- rv = fRecParticles ;
-
- else {
- fRecParticles = new TClonesArray("AliPHOSRecParticle", 100) ;
- gAlice->GetEvent(evt) ;
- TTree * fReconstruct = gAlice->TreeR() ;
- fReconstruct->SetBranchAddress( "PHOSRP", &fRecParticles) ;
- fReconstruct->GetEvent(0) ;
- fRecParticles->Expand( fRecParticles->GetEntries() ) ;
- rv = fRecParticles ;
+ //Branch address for TreeR: TrackSegments
+ if ( treeR && fTrackSegments ) {
+ branch = treeR->GetBranch("PHOSTS");
+ if (branch) branch->SetAddress(&fTrackSegments) ;
}
-
- return rv ;
-
+ //Branch address for TreeR: EmcRecPoint
+ if ( treeR && fEmcRecPoints ) {
+ branch = treeR->GetBranch("PHOSEmcRP");
+ if (branch) branch->SetAddress(&fEmcRecPoints) ;
+ }
}
-//____________________________________________________________________________
-AliPHOSRecParticle::RecParticlesList * AliPHOS::TrackSegments(Int_t evt)
-{
- // returns the pointer to the TrackSegments list
- // if the list is empty, get it from TreeR on the disk file
- AliPHOSTrackSegment::TrackSegmentsList * rv = 0 ;
-
- if ( fTrackSegments )
- rv = fTrackSegments ;
-
- else {
- fTrackSegments = new TClonesArray("AliPHOSTrackSegment", 100) ;
- gAlice->GetEvent(evt) ;
- TTree * fReconstruct = gAlice->TreeR() ;
- fReconstruct->SetBranchAddress( "PHOSTS", &fTrackSegments) ;
- fReconstruct->GetEvent(0) ;
- fTrackSegments->Expand( fTrackSegments->GetEntries() ) ;
- rv = fTrackSegments ;
- }
-
- return rv ;
-
-}
virtual ~AliPHOS() ;
virtual void CreateMaterials() ; // defines the material of the detector
- virtual RecPointsList * EmcRecPoints() {
+ virtual AliPHOSRecPoint::RecPointsList * EmcRecPoints() {
// Getting list of RecPoints
return fEmcRecPoints ;
}
virtual AliPHOSGeometry * GetGeometry() = 0 ;
- virtual RecPointsList * PpsdRecPoints()=0;// gets Array of clusters in the PPSD
+ virtual AliPHOSRecPoint::RecPointsList * PpsdRecPoints()=0;// gets Array of clusters in the PPSD
virtual void SetTreeAddress(); // Tree Address for reconstruction lists
- virtual RecParticlesList * RecParticles() {
+ virtual AliPHOSRecParticle::RecParticlesList * RecParticles() {
// Getting list of RecParticles
return fRecParticles ;
}
- virtual TrackSegmentsList * TrackSegments() {
+ virtual AliPHOSTrackSegment::TrackSegmentsList * TrackSegments() {
// Getting list of TrackSegments
return fTrackSegments ;
}