Bugs fixed
authorauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Mar 2012 12:48:49 +0000 (12:48 +0000)
committerauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 22 Mar 2012 12:48:49 +0000 (12:48 +0000)
MFT/AliMFTCluster.h
MFT/AliMuonForwardTrack.cxx
MFT/AliMuonForwardTrackFinder.cxx
MFT/MergeClustersMFT.C

index 9238f9a..9462e08 100644 (file)
@@ -29,7 +29,7 @@ public:
   AliMFTCluster(const AliMFTCluster&);
   AliMFTCluster& operator=(const AliMFTCluster&);
 
-  virtual ~AliMFTCluster() { fDigitsInCluster->Delete(); delete fDigitsInCluster; }  // destructor
+  virtual ~AliMFTCluster() { ; }  // destructor
 
   void SetXYZ(Double_t x, Double_t y, Double_t z) { fX=x; fY=y; fZ=z; }
 
index ebc95e9..6adb6d7 100644 (file)
@@ -138,7 +138,6 @@ AliMuonForwardTrack::~AliMuonForwardTrack() {
 
   delete fMUONTrack;
   delete fMCTrackRef;
-  fMFTClusters->Delete();
   delete fMFTClusters;
   
 }
index 3c9b843..8ad17d0 100644 (file)
@@ -510,8 +510,8 @@ Int_t AliMuonForwardTrackFinder::LoadNextTrack() {
   
   // the track we are going to build, starting from fMuonTrackReco and adding the MFT clusters
   AliMuonForwardTrack *track = new ((*fCandidateTracks)[0]) AliMuonForwardTrack();
-  track -> SetMUONTrack(fMuonTrackReco);
-  if (fLabelMC>=0 && fStack->Particle(fLabelMC)) track->SetMCTrackRef(fStack->Particle(fLabelMC));
+  track -> SetMUONTrack(new AliMUONTrack(*fMuonTrackReco));
+  if (fLabelMC>=0 && fStack->Particle(fLabelMC)) track->SetMCTrackRef(new TParticle(*(fStack->Particle(fLabelMC))));
   track -> SetMCLabel(fMuonTrackReco->GetMCLabel());
   track -> SetMatchTrigger(fMuonTrackReco->GetMatchTrigger());
 
@@ -915,7 +915,7 @@ void AliMuonForwardTrackFinder::FindClusterInPlane(Int_t planeId) {
       AliDebug(3, Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
       AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
       newTrack->AddTrackParamAtMFTCluster(currentParamFront, *cluster);    // creating new track param and attaching the cluster
-      AliDebug(1, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
+      AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
                       planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
       newTrack->SetPlaneExists(planeId);
       AliDebug(2, Form("current muon is trackable: %d\n", fIsCurrentMuonTrackable));
@@ -968,7 +968,7 @@ void AliMuonForwardTrackFinder::FindClusterInPlane(Int_t planeId) {
       AliDebug(3,Form("accepting cluster: chi2=%f (cut = %f)\n", chi2, chi2cut));
       AliMuonForwardTrack *newTrack = new ((*fCandidateTracks)[fCandidateTracks->GetEntriesFast()]) AliMuonForwardTrack(*fCurrentTrack);
       newTrack->AddTrackParamAtMFTCluster(currentParamBack, *cluster);    // creating new track param and attaching the cluster
-      AliDebug(1, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
+      AliDebug(2, Form("After plane %02d: newTrack->GetNMFTClusters() = %d (fCurrentTrack->GetNMFTClusters() = %d)", 
                       planeId, newTrack->GetNMFTClusters(), fCurrentTrack->GetNMFTClusters()));
       newTrack->SetPlaneExists(planeId);
       AliDebug(2, Form("current muon is trackable: %d\n", fIsCurrentMuonTrackable));
@@ -1395,12 +1395,13 @@ void AliMuonForwardTrackFinder::PrintParticleHistory() {
   TParticle *part = 0;
   if (fLabelMC>=0) part = fStack->Particle(fLabelMC);
 
-  AliDebug(1, Form("fStack->Particle(fLabelMC) = %p", part));
+  AliDebug(1, Form("fStack->Particle(%d) = %p", fLabelMC, part));
+  AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
 
   if (part) {
     if (part->GetFirstMother() != -1) {
       TParticle *partMother = fStack->Particle(part->GetFirstMother());
-      AliDebug(1, Form("fStack->Particle(part->GetFirstMother() = %p", partMother));
+      AliDebug(1, Form("fStack->Particle(%d) = %p", part->GetFirstMother(), partMother));
       if (partMother) {
        Char_t newName[100];
        if (partMother->GetFirstMother() != -1) history += "...  #rightarrow ";
@@ -1409,6 +1410,8 @@ void AliMuonForwardTrackFinder::PrintParticleHistory() {
       }
     }
     Char_t newName[100];
+    AliDebug(1, Form("fStack->Particle(%d)->GetPdgCode() = %d", fLabelMC, part->GetPdgCode()));
+    AliDebug(1, Form("fStack->Particle(%d)->GetName() = %s", fLabelMC, part->GetName()));
     PDGNameConverter(part->GetName(), newName);
     history += Form("%s  at  z = %5.1f cm", newName, part->Vz());
     //  printf("%s", history.Data());
index 44dcc6b..e5fbd15 100644 (file)
@@ -30,10 +30,13 @@ void MergeAllClusters();
                               
 //====================================================================================================================================================
 
-void MergeClustersMFT(Int_t option = 9999,
+void MergeClustersMFT(Int_t seed = 12345,
+                     Int_t option = 9999,
                      Int_t nEvents = 9999,
                      Int_t maxPileUp = 9999) {
   
+  gRandom->SetSeed(seed);
+
   if (option==kMergePileUpClusters_pp) {
 
     Int_t runs_pp[fNRunsPileUp_pp] = {0};