* provided "as is" without express or implied warranty. *
**************************************************************************/
+
/* $Id$ */
//_________________________________________________________________________
// --- ROOT system ---
-#include "TTree.h"
+//#include <TTree.h>
+#include <TVirtualMC.h>
// --- Standard library ---
// --- AliRoot header files ---
-#include "AliRun.h"
-#include "AliMC.h"
-#include "AliPHOSvImpacts.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSImpact.h"
+#include "AliPHOSvImpacts.h"
+#include "AliRun.h"
+#include "AliMC.h"
ClassImp(AliPHOSvImpacts)
AliPHOSvImpacts::AliPHOSvImpacts():AliPHOSv1()
{
// ctor
+ fEMCImpacts = 0 ;
+ fPPSDImpacts = 0 ;
+ fCPVImpacts = 0 ;
}
//____________________________________________________________________________
}
//____________________________________________________________________________
-void AliPHOSvImpacts::MakeBranch(Option_t *opt, const char *file)
+void AliPHOSvImpacts::MakeBranch(Option_t *opt)
{
// Create new branch in the current Hits Root Tree containing
// a list of PHOS impacts (exact values of track coming to detector)
- AliDetector::MakeBranch(opt,file);
+ AliDetector::MakeBranch(opt);
Int_t bufferSize = 32000 ;
Int_t splitlevel = 0 ;
- gAlice->TreeH()->Branch("PHOSEmcImpacts" , "TList", &fEMCImpacts , bufferSize, splitlevel);
- gAlice->TreeH()->Branch("PHOSCpvImpacts" , "TList", &fCPVImpacts , bufferSize, splitlevel);
+ TreeH()->Branch("PHOSEmcImpacts" , "TList", &fEMCImpacts , bufferSize, splitlevel);
+ TreeH()->Branch("PHOSCpvImpacts" , "TList", &fCPVImpacts , bufferSize, splitlevel);
}
TLorentzVector pos ; // Lorentz vector of the track current position
Int_t copy ;
- Int_t tracknumber = gAlice->CurrentTrack() ;
- Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
+ Int_t tracknumber = gAlice->GetMCApp()->GetCurrentTrackNumber() ;
+ Int_t primary = gAlice->GetMCApp()->GetPrimary( gAlice->GetMCApp()->GetCurrentTrackNumber() );
TString name = GetGeometry()->GetName() ;
// Add impact to EMC
gMC -> Gmtod (pm, pd, 2); // transform 3-momentum from master to daughter system
// Select tracks coming to the crystal from up or down sides
- if (pd[1]<0 && xyzd[1] > GetGeometry()->GetCrystalSize(1)/2-0.001 ||
- pd[1]>0 && xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2+0.001) {
+ if (pd[1]<0 && xyzd[1] > GetGeometry()->GetCrystalSize(1)/2-0.1 ||
+ pd[1]>0 && xyzd[1] < -GetGeometry()->GetCrystalSize(1)/2+0.1) {
+ // Select tracks coming to the crystal from up or down sides
Int_t pid = gMC->TrackPid();
Int_t module;
gMC->CurrentVolOffID(10,module);