From Laurent:
[u/mrichter/AliRoot.git] / MUON / AliMUONData.cxx
index b3d852b..9bd25ad 100644 (file)
@@ -222,21 +222,23 @@ void AliMUONData::AddGlobalTrigger(const AliMUONGlobalTrigger& trigger )
   TClonesArray &globalTrigger = *fGlobalTrigger;
   new(globalTrigger[fNglobaltrigger++]) AliMUONGlobalTrigger(trigger);
 }
-//_____________________________________________________________________________
+//____________________________________________________________________________
 void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber, 
                         Int_t idpart, Float_t X, Float_t Y, Float_t Z, 
                         Float_t tof, Float_t momentum, Float_t theta, 
-                        Float_t phi, Float_t length, Float_t destep)
+                        Float_t phi, Float_t length, Float_t destep,
+                        Float_t Xref,Float_t Yref,Float_t Zref)
 {
-  // Add new hit to the hit list
+ // Add new hit to the hit list
   TClonesArray &lhits = *fHits;
   new(lhits[fNhits++]) AliMUONHit(fIshunt, track, iChamber, 
                                  idpart, X, Y, Z, 
                                  tof, momentum, theta, 
-                                 phi, length, destep);
+                                 phi, length, destep,
+                                 Xref,Yref,Zref);
 }
 //____________________________________________________________________________
-void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber, 
+void AliMUONData::AddHit2(Int_t fIshunt, Int_t track, Int_t detElemId, 
                         Int_t idpart, Float_t X, Float_t Y, Float_t Z, 
                         Float_t tof, Float_t momentum, Float_t theta, 
                         Float_t phi, Float_t length, Float_t destep,
@@ -244,24 +246,18 @@ void AliMUONData::AddHit(Int_t fIshunt, Int_t track, Int_t iChamber,
 {
  // Add new hit to the hit list
   TClonesArray &lhits = *fHits;
-  new(lhits[fNhits++]) AliMUONHit(fIshunt, track, iChamber, 
+  new(lhits[fNhits++]) AliMUONHit(fIshunt, track, detElemId, 
                                  idpart, X, Y, Z, 
                                  tof, momentum, theta, 
                                  phi, length, destep,
-                                 Xref,Yref,Zref);
-}
-//____________________________________________________________________________
-void AliMUONData::AddHit(const AliMUONHit& hit)
-{
-  TClonesArray &lhits = *fHits;
-  new(lhits[fNhits++]) AliMUONHit(hit);
+                                 Xref,Yref,Zref, true);
 }
 //____________________________________________________________________________
-void AliMUONData::AddLocalTrigger(Int_t *localtr)
+void AliMUONData::AddLocalTrigger(const Int_t *localtr, const TArrayI& digits)
 {
   // add a MUON Local Trigger to the list
   TClonesArray &localTrigger = *fLocalTrigger;
-  new(localTrigger[fNlocaltrigger++]) AliMUONLocalTrigger(localtr);
+  new(localTrigger[fNlocaltrigger++]) AliMUONLocalTrigger(localtr, digits);
 }
 //____________________________________________________________________________
 void AliMUONData::AddLocalTrigger(const  AliMUONLocalTrigger& trigger)
@@ -849,14 +845,14 @@ void AliMUONData::ResetRecTracks()
 {
   // Reset tracks information
   fNrectracks = 0;
-  if (fRecTracks) fRecTracks->Clear();
+  if (fRecTracks) fRecTracks->Delete(); // necessary to delete in case of memory allocation
 }
 //____________________________________________________________________________
 void AliMUONData::ResetRecTriggerTracks()
 {
   // Reset tracks information
   fNrectriggertracks = 0;
-  if (fRecTriggerTracks) fRecTriggerTracks->Clear();
+  if (fRecTriggerTracks) fRecTriggerTracks->Delete(); // necessary to delete in case of memory allocation
 }
 //_____________________________________________________________________________
 void AliMUONData::SetTreeAddress(Option_t* option)