]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - PHOS/AliPHOSReconstructioner.cxx
position of the particle initiating the hit in PHOS
[u/mrichter/AliRoot.git] / PHOS / AliPHOSReconstructioner.cxx
index 772abdb3ed68fb285f779d9fef1a98f72aabde07..acd3ae5db2c77fb9d6de2d99cf91536255bfa1b8 100644 (file)
@@ -82,7 +82,7 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
     cout << "\n\nDebugReconstruction>>> " << "Start making reconstructed points (clusterizing!!)" << endl;
   
   fClusterizer->MakeClusters(dl, emccl, ppsdl);
-  
+
   if  (fDebugReconstruction){
     cout << "DebugReconstruction>>> " << "AliPHOSReconstructioner: Digit list entries is " << dl->GetEntries() << endl ;
     cout << "AliPHOSReconstructioner: Emc  list entries is " << emccl->GetEntries() << endl ;
@@ -118,8 +118,6 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
     
   }
 
-
-
   // Making Clusters
   if  (fDebugReconstruction)  cout << "DebugReconstruction>>> Start making reconstructed points (clusterizing)" << endl;
 
@@ -262,35 +260,35 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
   }
   if  (fDebugReconstruction)  cout << "DebugReconstruction>>>> Start making reconstructed particles" << endl;
   
-  fPID->MakeParticles(trsl, rpl) ; 
+  if (fPID) {
+    fPID->MakeParticles(trsl, rpl) ; 
   
-  // mark the position of the RecParticles in the array
-  AliPHOSRecParticle * rp ; 
-  for (index = 0 ; index < rpl->GetEntries() ; index++) {
-    rp = (AliPHOSRecParticle * )rpl->At(index) ; 
-    rp->SetIndexInList(index) ; 
-  }
-  //Debugger of RecParticles
-  if  (fDebugReconstruction){
-    cout << "DebugReconstruction>>>  Reconstructed particle list entries is " <<    rpl->GetEntries() << endl ;
-    cout << "DebugReconstruction>>> Module "  << 
-      "    PARTICLE     "   <<
-      "Ene(KeV) "           <<                         
-      "Index "              << 
-      "   X      "          << 
-      "   Y      "          << 
-      "   Z       "         <<
-      "Nprim "              <<
-      " Primaries list "    <<  endl;      
+    // mark the position of the RecParticles in the array
+    AliPHOSRecParticle * rp ; 
     for (index = 0 ; index < rpl->GetEntries() ; index++) {
-      rp = (AliPHOSRecParticle * ) rpl->At(index) ;       
-      TVector3 locpos; (rp->GetPHOSTrackSegment())->GetPosition(locpos);
-      Int_t * primaries; 
-      Int_t nprimaries;
-      Text_t particle[11];
-      primaries = (rp->GetPHOSTrackSegment())->GetPrimariesEmc(nprimaries);
-      switch(rp->GetType())
-       {
+      rp = (AliPHOSRecParticle * )rpl->At(index) ; 
+      rp->SetIndexInList(index) ; 
+    }
+    //Debugger of RecParticles
+    if  (fDebugReconstruction){
+      cout << "DebugReconstruction>>>  Reconstructed particle list entries is " <<    rpl->GetEntries() << endl ;
+      cout << "DebugReconstruction>>> Module "  << 
+       "    PARTICLE     "   <<
+       "Ene(KeV) "           <<                         
+       "Index "              << 
+       "   X      "          << 
+       "   Y      "          << 
+       "   Z       "         <<
+       "Nprim "              <<
+       " Primaries list "    <<  endl;      
+      for (index = 0 ; index < rpl->GetEntries() ; index++) {
+       rp = (AliPHOSRecParticle * ) rpl->At(index) ;       
+       TVector3 locpos; (rp->GetPHOSTrackSegment())->GetPosition(locpos);
+       Int_t * primaries; 
+       Int_t nprimaries;
+       Text_t particle[11];
+       primaries = (rp->GetPHOSTrackSegment())->GetPrimariesEmc(nprimaries);
+       switch(rp->GetType()) {
        case  AliPHOSFastRecParticle::kNEUTRALEM:
          strcpy( particle, "NEUTRAL_EM");
          break;
@@ -316,98 +314,22 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
          strcpy(particle, "CHARGED_HA") ;
          break ; 
        }
-      
-      cout << "DebugReconstruction>>> " << 
-       setw(4) << (rp->GetPHOSTrackSegment())->GetPHOSMod() << "  "  <<
-       setw(15) << particle << "  " <<
-       setw(9) << 1000.*(rp->GetPHOSTrackSegment())->GetEnergy() <<       " "  <<             
-       setw(3) <<  rp->GetIndexInList() << " "  <<  
-       setw(9) <<  locpos.X() <<" "  << 
-       setw(9) <<  locpos.Y() <<" "  << 
-       setw(9) <<  locpos.Z() << " " <<
-       setw(4) << nprimaries << "  ";
-      for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
-       cout << setw(4)  <<  primaries[iprimary] << " ";
-      cout << endl;     
+       
+       cout << "DebugReconstruction>>> " << 
+         setw(4) << (rp->GetPHOSTrackSegment())->GetPHOSMod() << "  "  <<
+         setw(15) << particle << "  " <<
+         setw(9) << 1000.*(rp->GetPHOSTrackSegment())->GetEnergy() <<       " "  <<             
+         setw(3) <<  rp->GetIndexInList() << " "  <<  
+         setw(9) <<  locpos.X() <<" "  << 
+         setw(9) <<  locpos.Y() <<" "  << 
+         setw(9) <<  locpos.Z() << " " <<
+         setw(4) << nprimaries << "  ";
+       for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
+         cout << setw(4)  <<  primaries[iprimary] << " ";
+       cout << endl;    
+      }
     }
     
   }
 
-
-}
-
-//____________________________________________________________________________
- void AliPHOSReconstructioner::Make(DigitsList * dl, 
-                                   AliPHOSRecPoint::RecPointsList * emccl,
-                                   AliPHOSRecPoint::RecPointsList * cpvcl)
-{
-
-  // Launches the Reconstruction process of EMC and CPV in the sequence:
-  //       Make the reconstructed poins (clusterize)
-  //       Make the track segments 
-  // Particle identification is not made here
-  // EMC and CPV rec.points are the same yet
-  //
-  // Yuri Kharlov. 20 October 2000
-
-  Int_t index ;   
-
-  // Making Clusters
-  if  (fDebugReconstruction)
-    cout << "DebugReconstruction>>> Start clusterizing reconstructed points" << endl;
-  fClusterizer->MakeClusters(dl, emccl, cpvcl);
-  
-  if  (fDebugReconstruction){
-  // Digit Debuging
-    cout << "AliPHOSReconstructioner: Digit list entries are " << dl->GetEntries()    << endl ;
-    cout << "AliPHOSReconstructioner: EMC   list entries are " << emccl->GetEntries() << endl ;
-    cout << "AliPHOSReconstructioner: CPV   list entries are " << cpvcl->GetEntries() << endl ;
-    cout << ">>>>>>>>>>>>>>>>>>>>>> DebugReconstruction  <<<<<<<<<<<<<<<<<<<<<<<<<<"  << endl ;
-    cout << "DebugReconstruction>>> Digit list entries is " <<    dl->GetEntries() << endl ;
-    AliPHOSDigit * digit;
-    Bool_t calorimeter ;
-    Float_t factor;
-    cout << "DebugReconstruction>>>    Vol Id " << 
-      " Ene(MeV, KeV) "              <<                         
-      " Index "                      << 
-      " Nprim "                      << 
-      " Primaries list "             <<  endl;      
-    for (index = 0 ; index < dl->GetEntries() ; index++) {
-      digit = (AliPHOSDigit * )  dl->At(index) ;
-      calorimeter = fClusterizer->IsInEmc(digit);
-      if (calorimeter) factor =1000. ; else factor=1000000.;
-      cout << "DebugReconstruction>>>  " << 
-        setw(8)  <<  digit->GetId() << " "  <<
-       setw(3)  <<  (Int_t) calorimeter <<  
-       setw(10) <<  factor*fClusterizer->Calibrate(digit->GetAmp()) << "  "  <<                   
-       setw(6)  <<  digit->GetIndexInList() << "  "  << 
-       setw(5)  <<  digit->GetNprimary() <<"  ";
-      for (Int_t iprimary=0; iprimary<digit->GetNprimary(); iprimary++)
-       cout << setw(5)  <<  digit->GetPrimary(iprimary+1) << " ";
-      cout << endl;     
-    }
-    
-  }
-
-  // mark the position of the RecPoints in the array
-  AliPHOSEmcRecPoint * emcrp ; 
-  Int_t currentPHOSModule;
-  for (index = 0 ; index < emccl->GetEntries() ; index++) {
-    emcrp = (AliPHOSEmcRecPoint * )emccl->At(index) ; 
-    emcrp ->SetIndexInList(index) ; 
-    TVector3  locpos;  emcrp->GetLocalPosition(locpos);
-    currentPHOSModule = emcrp->GetPHOSMod();
-  }
-  AliPHOSCpvRecPoint * cpvrp ; 
-  for (index = 0 ; index < cpvcl->GetEntries() ; index++) {
-    cpvrp = (AliPHOSCpvRecPoint * )cpvcl->At(index) ; 
-    cpvrp ->SetIndexInList(index) ; 
-    TVector3  locpos;   cpvrp->GetLocalPosition(locpos);
-    Int_t lengX,lengZ;  cpvrp->GetClusterLengths(lengX,lengZ);
-    currentPHOSModule = cpvrp->GetPHOSMod();
-  }
-    
-  if  (fDebugReconstruction)
-    cout << "DebugReconstruction>>>> Start unfolding reconstructed points" << endl;
-  fTrackSegmentMaker->MakeTrackSegmentsCPV(dl, emccl, cpvcl) ;
 }