]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
remove confusing setter for MC
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 May 2010 12:24:21 +0000 (12:24 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 3 May 2010 12:24:21 +0000 (12:24 +0000)
PWG1/TRD/AliTRDinfoGen.cxx
PWG1/TRD/info/AliTRDtrackInfo.cxx
PWG1/TRD/info/AliTRDtrackInfo.h

index 940c635f2de11482a20820c469514d81cf018303..ab06a67e82ba5e831ce510e68d446c763d1b7ce2 100644 (file)
@@ -279,6 +279,7 @@ void AliTRDinfoGen::UserExec(Option_t *){
   AliTRDseedV1 *tracklet = NULL;
   AliTRDcluster *cl = NULL;
   for(Int_t itrk = 0; itrk < nTracksESD; itrk++){
+    new(fTrackInfo) AliTRDtrackInfo();
     esdTrack = fESDev->GetTrack(itrk);
     AliDebug(3, Form("\n%3d ITS[%d] TPC[%d] TRD[%d]\n", itrk, esdTrack->GetNcls(0), esdTrack->GetNcls(1), esdTrack->GetNcls(2)));
 
@@ -322,7 +323,7 @@ void AliTRDinfoGen::UserExec(Option_t *){
         iref++;
       }
 
-      new(fTrackInfo) AliTRDtrackInfo();
+      fTrackInfo->SetMC();
       fTrackInfo->SetPDG(fPdg);
       fTrackInfo->SetPrimary(mcParticle->Particle()->IsPrimary());
       Int_t jref = iref;//, kref = 0;
@@ -334,9 +335,6 @@ void AliTRDinfoGen::UserExec(Option_t *){
         jref++;
       }
       AliDebug(3, Form("NtrackRefs[%d(%d)]", fTrackInfo->GetNTrackRefs(), nRefs));
-    } else {
-      new (fTrackInfo) AliTRDtrackInfo();
-      fTrackInfo->SetPDG(fPdg);
     }
 
     // copy some relevant info to TRD track info
index 411d2743c6fa8b7e943ab23d49f549444e3de8a7..c42d34235e3cb3cb71d05a1ed40e129ad1eafa51 100644 (file)
@@ -299,7 +299,6 @@ void AliTRDtrackInfo::AddTrackRef(const AliTrackReference *tref)
   // Add track reference
   //
 
-  SetMC();
   if(fMC->fNTrackRefs >= 12){ 
     SetCurved();
     return;
index 6091b5259e567d7e79becedb5968fbe0d825c570..b57f620c68a336aa8390e671568701cc8758ac0f 100644 (file)
@@ -117,10 +117,10 @@ public:
   Bool_t             HasMCinfo() const { return (Bool_t)fMC; }
 
   void               SetCurved(Bool_t curv = kTRUE) {SetBit(kCurv, curv);}
-  void               SetLabel(Int_t lab) { SetMC(); fMC->fLabel = lab; }
+  void               SetLabel(Int_t lab) {fMC->fLabel = lab; }
   void               SetNumberOfClustersRefit(Int_t n) {fNClusters = n;}
   inline void        SetMC();
-  void               SetPDG(Int_t pdg) { SetMC(); fMC->fPDG = pdg; }
+  void               SetPDG(Int_t pdg) {fMC->fPDG = pdg; }
   void               SetPrimary(Bool_t prim = kTRUE) {SetBit(kPrim, prim);}
   void               SetOuterParam(const AliExternalTrackParam *op);
   void               SetStatus(ULong_t stat) {fESD.fStatus = stat;}