/* $Id$ */
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.22 2005/06/17 07:39:07 hristov
+ * Removing GetDebug and SetDebug from AliRun and AliModule. Using AliLog for the messages
+ *
+ * Revision 1.21 2005/05/28 14:19:05 schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
//_________________________________________________________________________
// Implementation version vImpacts of PHOS Manager class.
// This class inherits from v1 and adds impacts storing.
#include "AliPHOSvImpacts.h"
#include "AliRun.h"
#include "AliMC.h"
+#include "AliLog.h"
ClassImp(AliPHOSvImpacts)
//____________________________________________________________________________
-AliPHOSvImpacts::AliPHOSvImpacts():AliPHOSv1()
+AliPHOSvImpacts::AliPHOSvImpacts():
+ fEMCImpacts(0),
+ fCPVImpacts(0),
+ fPPSDImpacts(0)
{
// ctor
- fEMCImpacts = 0 ;
- fPPSDImpacts = 0 ;
- fCPVImpacts = 0 ;
}
//____________________________________________________________________________
AliPHOSvImpacts::AliPHOSvImpacts(const char *name, const char *title):
-AliPHOSv1(name,title)
+ AliPHOSv1(name,title),
+ fEMCImpacts(new TList),
+ fCPVImpacts(new TList),
+ fPPSDImpacts(0)
{
// ctor : title is used to identify the layout
//
// - fEMCImpacts, fCPVImpacts which are
// TList of EMC and CPV modules respectively, each
// modules contains TClonesArray of AliPHOSImpacts
-
- fEMCImpacts = new TList();
- fCPVImpacts = new TList();
Int_t nPHOSModules = GetGeometry()->GetNModules();
Int_t nCPVModules = GetGeometry()->GetNModules();
}
+//____________________________________________________________________________
+AliPHOSvImpacts::AliPHOSvImpacts(AliPHOSvImpacts & phos):
+ AliPHOSv1(phos),
+ fEMCImpacts(0),
+ fCPVImpacts(0),
+ fPPSDImpacts(0)
+{
+ phos.Copy(*this);
+}
+
//____________________________________________________________________________
AliPHOSvImpacts::~AliPHOSvImpacts()
{
}
//____________________________________________________________________________
-void AliPHOSvImpacts::AddImpact( char* det, Int_t shunt, Int_t primary, Int_t track, Int_t module,
+void AliPHOSvImpacts::Copy(TObject & phos) const
+{
+ TObject::Copy(phos) ;
+ AliPHOS::Copy(phos) ;
+}
+
+
+//____________________________________________________________________________
+void AliPHOSvImpacts::AddImpact(const char* det, Int_t shunt, Int_t primary, Int_t track, Int_t module,
Int_t pid, TLorentzVector p, Float_t *xyz)
{
// Add an impact to the impact list.
new((*impacts)[nImpacts]) AliPHOSImpact(shunt,primary,track,pid,p,xyz) ;
- if (fDebug==1) {
- printf("Module %d %s: ",module,det);
+ AliDebugClass(1,Form("Module %d %s: ",module,det));
+ if (AliLog::GetGlobalDebugLevel()>0)
(dynamic_cast<AliPHOSImpact*>((impacts->At(nImpacts))))->Print();
- }
}
//____________________________________________________________________________
// Add impact to EMC
- if( gMC->CurrentVolID(copy) == gMC->VolId("PXTL") &&
+ static Int_t idPXTL = gMC->VolId("PXTL");
+ if( gMC->CurrentVolID(copy) == idPXTL &&
gMC->IsTrackEntering() ) {
gMC->TrackMomentum(pmom);
gMC->TrackPosition(pos) ;
// Add impact to CPV
- if( gMC->CurrentVolID(copy) == gMC->VolId("PCPQ") &&
+ static Int_t idPCPQ = gMC->VolId("PCPQ");
+ if( gMC->CurrentVolID(copy) == idPCPQ &&
gMC->IsTrackEntering() ) {
gMC->TrackMomentum(pmom);
gMC->TrackPosition(pos) ;