-
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
#include "AliMC.h"
#include "AliRun.h"
#include "AliMagF.h"
+#include "AliPHOSGeometry.h"
ClassImp(AliPHOS)
-//____________________________________________________________________________
-AliPHOS::AliPHOS():AliDetector()
-{
- // ctor
- //We do not create objects, because these pointers will be overwritten durin reading from file.
- fSDigits = 0 ;
- fDigits = 0 ;
- fEmcRecPoints = 0 ;
- fPpsdRecPoints = 0 ;
- fTrackSegments = 0 ;
- fRecParticles = 0 ;
-
-}
-//____________________________________________________________________________
-AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name,title)
-{
- // ctor
-
- fSDigits = new TClonesArray("AliPHOSDigit",1000) ;
- fDigits = new TClonesArray("AliPHOSDigit",1000) ;
- fEmcRecPoints = new TObjArray(100) ;
- fPpsdRecPoints = new TObjArray(100) ;
- fTrackSegments = new TClonesArray("AliPHOSTrackSegment",100);
- fRecParticles = new TClonesArray("AliPHOSRecParticle",100);
-
-}
-//____________________________________________________________________________
-AliPHOS::~AliPHOS()
-{
- // dtor
- if(fEmcRecPoints)
- fEmcRecPoints->Delete() ;
- delete fEmcRecPoints ;
- if(fPpsdRecPoints)
- fPpsdRecPoints->Delete() ;
- delete fPpsdRecPoints ;
- if(fTrackSegments)
- fTrackSegments->Delete() ;
- delete fTrackSegments ;
- if(fRecParticles)
- fRecParticles->Delete() ;
- delete fRecParticles ;
- delete fHits ;
- delete fDigits ;
- delete fSDigits ;
-}
//____________________________________________________________________________
void AliPHOS::CreateMaterials()
branch = treeH->GetBranch(branchname);
if (branch) branch->SetAddress(&fHits);
}
-
- // Branch address for digit tree
- TTree *treeD = gAlice->TreeD();
-
- if(fDigits)
- fDigits->Clear();
-
- if (treeD && fDigits) {
- branch = treeD->GetBranch(branchname);
- if (branch) branch->SetAddress(&fDigits);
- }
-
- if(fSDigits)
- fSDigits->Clear();
-
- if (gAlice->TreeS() && fSDigits ) {
- branch = gAlice->TreeS()->GetBranch("PHOS");
- if (branch) branch->SetAddress(&fSDigits) ;
- }
-
-
- TTree *treeR = gAlice->TreeR();
-
- //Branch address for TreeR: EmcRecPoint
-
- if(fEmcRecPoints)
- fEmcRecPoints->Delete();
-
-
- if ( treeR && fEmcRecPoints ) {
- branch = treeR->GetBranch("PHOSEmcRP");
- if (branch) branch->SetAddress(&fEmcRecPoints) ;
- }
-
- //Branch address for TreeR: PPSDRecPoint
-
- if(fPpsdRecPoints)
- fPpsdRecPoints->Delete();
-
- if ( treeR && fPpsdRecPoints ) {
- branch = treeR->GetBranch("PHOSPpsdRP");
- if (branch) branch->SetAddress(&fPpsdRecPoints) ;
- }
-
- //Branch address for TreeR: TrackSegments
-
- if(fTrackSegments)
- fTrackSegments->Clear() ;
-
- if ( treeR && fTrackSegments ) {
- branch = treeR->GetBranch("PHOSTS");
- if (branch) branch->SetAddress(&fTrackSegments) ;
- }
-
- //Branch address for TreeR: RecParticles
-
- if(fRecParticles)
- fRecParticles->Clear() ;
-
- if ( treeR && fRecParticles ) {
- branch = treeR->GetBranch("PHOSRP");
- if (branch) branch->SetAddress(&fRecParticles) ;
- }
-
}
#define ALIPHOS_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-
/* $Id$ */
//_________________________________________________________________________
//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
// --- ROOT system ---
-#include "TString.h"
+
+class TString ;
// --- AliRoot header files ---
-#include "AliDetector.h"
-#include "AliPHOSGeometry.h"
-#include "AliRecPoint.h"
-#include "AliPHOSTrackSegment.h"
-#include "AliPHOSRecParticle.h"
+#include "AliDetector.h"
+class AliPHOSGeometry ;
class AliPHOS : public AliDetector {
public:
- AliPHOS() ;
- AliPHOS(const char* name, const char* title="");
+ AliPHOS() {}
+ AliPHOS(const char* name, const char* title="") {}
AliPHOS(const AliPHOS & phos) {
// cpy ctor: no implementation yet
// requested by the Coding Convention
- assert(0==1) ;
+ abort() ;
}
- virtual ~AliPHOS() ;
+ virtual ~AliPHOS() {}
virtual void AddHit(Int_t, Int_t*, Float_t *) {
- // do not used this definition but the one below
- assert(0==1) ;
+ // do not use this definition but the one below
+ abort() ;
}
virtual void AddHit( Int_t shunt, Int_t primary, Int_t track, Int_t id, Float_t *hits ) = 0 ;
virtual void CreateMaterials() ;
- AliPHOSRecPoint::RecPointsList * EmcRecPoints() const {
- // Getting list of RecPoints
- return fEmcRecPoints ;
- }
virtual AliPHOSGeometry * GetGeometry() = 0 ;
Int_t IsVersion(void) const { return -1 ; }
- AliPHOSRecPoint::RecPointsList * PpsdRecPoints() const {
- // to be redefined when ppsd is present
- return fPpsdRecPoints ;
- }
- virtual void SetTreeAddress();
- AliPHOSRecParticle::RecParticlesList * RecParticles() const {
- // Getting list of RecParticles
- return fRecParticles ;
- }
- TClonesArray *SDigits() const {return fSDigits;}
-
- AliPHOSTrackSegment::TrackSegmentsList * TrackSegments() const {
- // Getting list of TrackSegments
- return fTrackSegments ;
- }
+ virtual void SetTreeAddress();
virtual TString Version() {return TString(" ") ; }
AliPHOS & operator = (const AliPHOS & rvalue) {
// assignement operator requested by coding convention
// but not needed
- assert(0==1) ;
+ abort() ;
return *this ;
}
protected:
- TClonesArray *fSDigits ; // List of summable digits
- AliPHOSRecPoint::RecPointsList *fEmcRecPoints ; // The RecPoints (clusters) list in EMC
- AliPHOSRecPoint::RecPointsList *fPpsdRecPoints ;// The RecPoints (clusters) list in PPSD (veto)
- AliPHOSTrackSegment::TrackSegmentsList *fTrackSegments ;// The TrackSegment list in PHOS
- AliPHOSRecParticle::RecParticlesList *fRecParticles ; // The reconstructed particles list in PHOS
ClassDef(AliPHOS,2) // Photon Spectrometer Detector (base class)