#include "TBRIK.h"
#include "TNode.h"
#include "TParticle.h"
+#include "TTree.h"
+#include "TGeometry.h"
+#include "TFile.h"
// --- Standard library ---
#include "AliPHOSv4.h"
#include "AliRun.h"
#include "AliConst.h"
+#include "AliMC.h"
ClassImp(AliPHOSv4)
SetBigBox(0, fGeom->GetOuterBoxSize(0) ) ;
- SetBigBox(1, fGeom->GetOuterBoxSize(1) + fGeom->GetPPSDBoxSize(1) ) ;
+ SetBigBox(1, fGeom->GetOuterBoxSize(1) + fGeom->GetCPVBoxSize(1) ) ;
SetBigBox(2, fGeom->GetOuterBoxSize(0) );
fNRecParticles = 0 ;
}
//___________________________________________________________________________
-void AliPHOSv4::MakeBranch(Option_t* opt)
+void AliPHOSv4::MakeBranch(Option_t* opt, char *file)
{
// Create new branch in the current reconstructed Root Tree
- AliDetector::MakeBranch(opt) ;
+ AliDetector::MakeBranch(opt,file) ;
char branchname[10];
sprintf(branchname,"%s",GetName());
char *cd = strstr(opt,"R");
if (fFastRecParticles && gAlice->TreeR() && cd) {
- gAlice->TreeR()->Branch(branchname, &fFastRecParticles, fBufferSize);
+ gAlice->MakeBranchInTree(gAlice->TreeR(),
+ branchname, &fFastRecParticles, fBufferSize, file) ;
}
}
Int_t modid ;
gMC->CurrentVolID(modid);
- Float_t Energy = gMC->Etot() ; //Total energy of current track
+ Float_t energy = gMC->Etot() ; //Total energy of current track
//Calculating mass of current particle
- TDatabasePDG * PDG = TDatabasePDG::Instance() ;
- TParticlePDG * partPDG = PDG->GetParticle(gMC->TrackPid()) ;
+ TDatabasePDG * pdg = TDatabasePDG::Instance() ;
+ TParticlePDG * partPDG = pdg->GetParticle(gMC->TrackPid()) ;
Float_t mass = partPDG->Mass() ;
- if(Energy > mass){
- pos.SetMag(TMath::Sqrt(Energy*Energy-mass*mass)) ;
- TLorentzVector pTrack(pos,Energy) ;
+ if(energy > mass){
+ pos.SetMag(TMath::Sqrt(energy*energy-mass*mass)) ;
+ TLorentzVector pTrack(pos, energy) ;
TParticle * part = new TParticle(gMC->TrackPid(), 0,-1,-1,-1,-1, pTrack, lv) ;