]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSImpact.cxx
Copy constructor is corrected
[u/mrichter/AliRoot.git] / PHOS / AliPHOSImpact.cxx
index 313907a36312ed6ea0904355a0aae695615ddd1d..562da4ed7f9c7ac493ec4d171fe2045d5dc0c703 100644 (file)
 
 /* $Id$ */
 
+/* History of cvs commits:
+ *
+ * $Log$
+ * Revision 1.6  2005/05/28 14:19:04  schutz
+ * Compilation warnings fixed by T.P.
+ *
+ */
+
 //_________________________________________________________________________
 //  Hit impact class for PHOS     
 //  A hit impact in PHOS is a set of parameters of a track which
 ClassImp(AliPHOSImpact)
 
 //____________________________________________________________________________
-AliPHOSImpact::AliPHOSImpact(const AliPHOSImpact & hit) 
-  : AliHit(hit)
+AliPHOSImpact::AliPHOSImpact() : 
+  fPid(0),
+  fPrimary(0),
+  fMomentum()
+{
+  //Def ctor.
+}
+
+//____________________________________________________________________________
+AliPHOSImpact::AliPHOSImpact(const AliPHOSImpact & hit) : 
+  AliHit(hit),
+  fPid(hit.fPid),
+  fPrimary(hit.fPrimary),
+  fMomentum(hit.fMomentum)
 {
-   // copy ctor
-   
+  // copy ctor
   fTrack   = hit.fTrack ; 
-  fPrimary = hit.fPrimary ; 
-  fPid     = hit.fPid ;
-  fMomentum= hit.fMomentum ;
   fX       = hit.fX ; 
   fY       = hit.fY ; 
   fZ       = hit.fZ ; 
 } 
 
 //____________________________________________________________________________
-AliPHOSImpact::AliPHOSImpact(Int_t shunt, Int_t primary, Int_t track, Int_t pid, TLorentzVector p, Float_t *xyz)
-  : AliHit(shunt, track)
+AliPHOSImpact::AliPHOSImpact(Int_t shunt, Int_t primary, Int_t track, Int_t pid, TLorentzVector p, Float_t *xyz): 
+  AliHit(shunt, track),
+  fPid(pid),
+  fPrimary(primary),
+  fMomentum(p)
 {
   //
   // Create a PHOS hit impact object
   //
-
-  fPrimary   = primary ;
-  fPid       = pid ; 
-  fMomentum  = p;
   fX         = xyz[0];  //position of particle first entering cristall/pad
   fY         = xyz[1];
   fZ         = xyz[2];  
 }
 
 //____________________________________________________________________________
-void AliPHOSImpact::Print()
+void AliPHOSImpact::Print(const Option_t *)const
 {
   // Prints particle info
   printf("Impact Pid=%4d, p=(%6.2f,%6.2f,%6.2f,%6.2f) GeV, x=(%6.1f,%6.1f,%6.1f) cm\n",