]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
the MIXT geometry (IHEP+GPS2) has been introduced
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Dec 2000 10:26:16 +0000 (10:26 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 15 Dec 2000 10:26:16 +0000 (10:26 +0000)
17 files changed:
PHOS/AliPHOS.cxx
PHOS/AliPHOS.h
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSClusterizer.h
PHOS/AliPHOSClusterizerv1.cxx
PHOS/AliPHOSClusterizerv1.h
PHOS/AliPHOSCpvRecPoint.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSRecPoint.cxx
PHOS/AliPHOSRecPoint.h
PHOS/AliPHOSReconstructioner.cxx
PHOS/AliPHOSReconstructioner.h
PHOS/AliPHOSTrackSegmentMaker.h
PHOS/AliPHOSTrackSegmentMakerv1.cxx
PHOS/AliPHOSTrackSegmentMakerv1.h
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv1.cxx

index f42c431b78e6b655ede5d806d3776fd079fa68e8..3f377132c550a86be59ff8c07fd1c1d815c20cd1 100644 (file)
@@ -1,3 +1,4 @@
+
 /**************************************************************************
  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  *                                                                        *
@@ -47,6 +48,7 @@ AliPHOS::AliPHOS():AliDetector()
   fDigits        = 0 ;
   fEmcRecPoints  = 0 ; 
   fPpsdRecPoints = 0 ;
+  fCpvRecPoints  = 0 ;
   fTrackSegments = 0 ;
   fRecParticles  = 0 ;
 
@@ -59,6 +61,7 @@ AliPHOS::AliPHOS(const char* name, const char* title): AliDetector(name,title)
   fDigits        = 0 ; 
   fEmcRecPoints  = 0 ; 
   fPpsdRecPoints = 0 ;
+  fCpvRecPoints  = 0 ;
   fTrackSegments = 0 ;
   fRecParticles  = 0 ;
   
@@ -73,6 +76,9 @@ AliPHOS::~AliPHOS()
   if(fPpsdRecPoints)
     fPpsdRecPoints->Delete() ;
   delete fPpsdRecPoints ;
+  if(fCpvRecPoints)
+    fCpvRecPoints->Delete() ;
+  delete fCpvRecPoints ;
   if(fTrackSegments)
     fTrackSegments->Delete() ;
   delete fTrackSegments ;
@@ -361,10 +367,10 @@ void AliPHOS::SetTreeAddress()
     if (branch) branch->SetAddress(&fDigits) ;
   } 
 
-   TTree *treeR = gAlice->TreeR();
+  TTree *treeR = gAlice->TreeR();
    
-   //Branch address for TreeR: EmcRecPoint
-
+  //Branch address for TreeR: EmcRecPoint
+  
   if(fEmcRecPoints)
     fEmcRecPoints->Delete();
   else
@@ -386,6 +392,17 @@ void AliPHOS::SetTreeAddress()
     if (branch) branch->SetAddress(&fPpsdRecPoints) ;
   }
 
+  //Branch address for TreeR: CPVRecPoint
+  if(fCpvRecPoints)
+    fCpvRecPoints->Delete();
+  else
+    fCpvRecPoints = new AliPHOSRecPoint::RecPointsList(1) ;
+
+  if ( treeR && fCpvRecPoints ) {
+    branch = treeR->GetBranch("PHOSCpvRP");
+    if (branch) branch->SetAddress(&fCpvRecPoints) ;
+  }
+
   //Branch address for TreeR: TrackSegments
   if(fTrackSegments)
     fTrackSegments->Clear() ;
index 02b952e66d86e555c52b930155218689f918981b..5aece3df0a2605dd857ae3c614a6b27b4d1c689e 100644 (file)
@@ -51,6 +51,10 @@ class AliPHOS : public AliDetector {
     // to be redefined when ppsd is present
     return & fPpsdRecPoints ;
   } 
+  virtual  AliPHOSRecPoint::RecPointsList ** CpvRecPoints() {
+    // to be redefined when cpv is present
+    return & fCpvRecPoints ;
+  }
   virtual void  SetTreeAddress();                
   virtual  AliPHOSRecParticle::RecParticlesList **  RecParticles() {
     // Getting list of RecParticles
@@ -69,12 +73,13 @@ class AliPHOS : public AliDetector {
     return *this ; 
   }
  
- protected:
+protected:
   
-  AliPHOSRecPoint::RecPointsList * fEmcRecPoints ;         // The RecPoints (clusters) list in EMC 
-  AliPHOSRecPoint::RecPointsList * fPpsdRecPoints ;        // The RecPoints (clusters) list in PPSD (veto)
-  AliPHOSTrackSegment::TrackSegmentsList * fTrackSegments ;// The TrackSegment list in PHOS
-  AliPHOSRecParticle::RecParticlesList * fRecParticles ;   // The reconstructed particles list in PHOS
+  AliPHOSRecPoint::RecPointsList         *fEmcRecPoints ; // The RecPoints (clusters) list in EMC 
+  AliPHOSRecPoint::RecPointsList         *fPpsdRecPoints ;// The RecPoints (clusters) list in PPSD (veto)
+  AliPHOSRecPoint::RecPointsList         *fCpvRecPoints ; // The RecPoints (clusters) list in CPV (veto)
+  AliPHOSTrackSegment::TrackSegmentsList *fTrackSegments ;// The TrackSegment list in PHOS
+  AliPHOSRecParticle::RecParticlesList   *fRecParticles ; // The reconstructed particles list in PHOS
 
   ClassDef(AliPHOS,2) // Photon Spectrometer Detector (base class)
 
index fd39e19d69636cfa176dbf2ff90943ca8370450f..5c1acbd5ceb0b7beda3676543996c3f0db8b7e28 100644 (file)
@@ -390,8 +390,8 @@ void AliPHOSAnalyze::ReadAndPrintCPV(Int_t EvFirst, Int_t EvLast)
     AliPHOSRecPoint::RecPointsList ** emcRecPoints = fPHOS->EmcRecPoints() ;
     gAlice->TreeR()->SetBranchAddress( "PHOSEmcRP" , emcRecPoints  ) ;
     
-    AliPHOSRecPoint::RecPointsList ** cpvRecPoints = fPHOS->PpsdRecPoints() ;
-    gAlice->TreeR()->SetBranchAddress( "PHOSPpsdRP", cpvRecPoints ) ;
+    AliPHOSRecPoint::RecPointsList ** cpvRecPoints = fPHOS->CpvRecPoints() ;
+    gAlice->TreeR()->SetBranchAddress( "PHOSCpvRP", cpvRecPoints ) ;
 
     // Read and print CPV hits
       
@@ -408,7 +408,7 @@ void AliPHOSAnalyze::ReadAndPrintCPV(Int_t EvFirst, Int_t EvLast)
       gAlice->ResetHits();
       gAlice->TreeH()->GetEvent(itrack);
       Int_t iModule = 0 ;      
-      for (iModule=0; iModule < fGeom->GetNModules(); iModule++) {
+      for (iModule=0; iModule < fGeom->GetNCPVModules(); iModule++) {
        cpvModule = fPHOS->GetCPVModule(iModule);
        cpvHits   = cpvModule.Hits();
        nCPVhits  = cpvHits->GetEntriesFast();
@@ -432,10 +432,11 @@ void AliPHOSAnalyze::ReadAndPrintCPV(Int_t EvFirst, Int_t EvLast)
 
     //=========== Gets the Reconstruction TTree
     gAlice->TreeR()->GetEvent(0) ;
-    TIter nextRP(*fPHOS->PpsdRecPoints() ) ;
-    AliPHOSPpsdRecPoint *cpvRecPoint ;
+    printf("Recpoints: %d\n",(*fPHOS->CpvRecPoints())->GetEntries());
+    TIter nextRP(*fPHOS->CpvRecPoints() ) ;
+    AliPHOSCpvRecPoint *cpvRecPoint ;
     Int_t nRecPoints = 0;
-    while( ( cpvRecPoint = (AliPHOSPpsdRecPoint *)nextRP() ) ) {
+    while( ( cpvRecPoint = (AliPHOSCpvRecPoint *)nextRP() ) ) {
       nRecPoints++;
       TVector3  locpos;
       cpvRecPoint->GetLocalPosition(locpos);
index 0df3eee1e7ef6ba46eb0924b0dd9b4ea26dc659b..8f6447ec79e6cd424ffcdbf7e7d30f812f287198 100644 (file)
@@ -41,7 +41,10 @@ public:
   virtual Float_t GetPpsdClusteringThreshold() = 0 ; 
   virtual Float_t GetPpsdEnergyThreshold() = 0 ; 
 
-  virtual void MakeClusters(const DigitsList * dl, AliPHOSRecPoint::RecPointsList * emccl, AliPHOSRecPoint::RecPointsList * ppsdl) = 0 ; 
+  virtual void MakeClusters(const DigitsList * dl,
+                           AliPHOSRecPoint::RecPointsList * emccl,
+                           AliPHOSRecPoint::RecPointsList * ppsdl,
+                           AliPHOSRecPoint::RecPointsList * cpvl) = 0 ; 
   virtual void PrintParameters() = 0 ;  
   virtual void SetCalibrationParameters(Float_t A, Float_t B) = 0 ; 
   virtual void SetEmcClusteringThreshold(Float_t cluth) = 0 ; 
index 549a07a5607bfdfc4ad0b979d50b34eb41ef3f1b..156b57c206a7e8913306596960813c9df29f588b 100644 (file)
@@ -218,13 +218,15 @@ Bool_t AliPHOSClusterizerv1::IsInCpv(AliPHOSDigit * digit)
 //____________________________________________________________________________
 void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, 
                                        AliPHOSRecPoint::RecPointsList * emcl, 
-                                       AliPHOSRecPoint::RecPointsList * ppsdl)
+                                       AliPHOSRecPoint::RecPointsList * ppsdl, 
+                                       AliPHOSRecPoint::RecPointsList * cpvl)
 {
   // Steering method to construct the clusters stored in a list of Reconstructed Points
   // A cluster is defined as a list of neighbour digits
 
-  fNumberOfEmcClusters = 0 ;
+  fNumberOfEmcClusters  = 0 ;
   fNumberOfPpsdClusters = 0 ;
+  fNumberOfCpvClusters  = 0 ;
 
   // Fill and sort the working digits list
   TObjArray tempodigitslist( dl->GetEntries() ) ;
@@ -240,9 +242,9 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
 
     AliPHOSDigit ** clusterdigitslist = new AliPHOSDigit*[dl->GetEntries()] ;   
     Int_t index ;
-    if (( (  IsInEmc (digit) ) && ( Calibrate(digit->GetAmp() ) > fEmcClusteringThreshold  ) ) || 
-        ( (  IsInPpsd(digit) ) && ( Calibrate(digit->GetAmp() ) > fPpsdClusteringThreshold ) ) ||
-        ( (  IsInCpv (digit) ) && ( Calibrate(digit->GetAmp() ) > fCpvClusteringThreshold  ) ) ) {
+    if (( IsInEmc (digit) && Calibrate(digit->GetAmp()) > fEmcClusteringThreshold  ) || 
+        ( IsInPpsd(digit) && Calibrate(digit->GetAmp()) > fPpsdClusteringThreshold ) ||
+        ( IsInCpv (digit) && Calibrate(digit->GetAmp()) > fCpvClusteringThreshold  ) ) {
   
       Int_t iDigitInCluster = 0 ; 
 
@@ -261,19 +263,21 @@ void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl,
        
        // start a new PPSD cluster
        if(fNumberOfPpsdClusters >= ppsdl->GetSize()) ppsdl->Expand(2*fNumberOfPpsdClusters+1);
+       if(fNumberOfCpvClusters  >= cpvl ->GetSize()) cpvl ->Expand(2*fNumberOfCpvClusters +1);
        if      (IsInPpsd(digit)) {
          (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSPpsdRecPoint() ;
          clu =  (AliPHOSPpsdRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
+         fNumberOfPpsdClusters++ ; 
        }
        else if (IsInCpv(digit) ) {
-         (*ppsdl)[fNumberOfPpsdClusters] = new AliPHOSCpvRecPoint(fW0CPV, fLocMaxCutCPV) ;
-         clu =  (AliPHOSCpvRecPoint *) ppsdl->At(fNumberOfPpsdClusters)  ;  
+         (*cpvl) [fNumberOfCpvClusters]  = new AliPHOSCpvRecPoint(fW0CPV, fLocMaxCutCPV) ;
+         clu =  (AliPHOSCpvRecPoint  *) cpvl ->At(fNumberOfCpvClusters)  ;  
+         fNumberOfCpvClusters++ ; 
        }
        else {
          cout << "AliPHOSClusterizerv1::MakeClusters: unknown configuration " << fGeom->GetName() << endl;
          assert(0==1);
        }
-       fNumberOfPpsdClusters++ ; 
        clu->AddDigit(*digit, Calibrate(digit->GetAmp()) ) ;    
        clusterdigitslist[iDigitInCluster] = digit  ;   
        iDigitInCluster++ ; 
index 9a02b696e97a6fc4b2a89b3376d3ce0a253a0797..3f39659137bde4e74fb9d44a12ba75eb516c3bd3 100644 (file)
@@ -46,13 +46,14 @@ public:
   virtual Float_t GetCpvClusteringThreshold()  { return fCpvClusteringThreshold;  } 
   virtual Float_t GetCpvEnergyThreshold()      { return fCpvEnergyThreshold;  }
 
-  virtual Bool_t IsInEmc (AliPHOSDigit * digit) ;                      // Tells if id digit is in EMC
-  virtual Bool_t IsInPpsd(AliPHOSDigit * digit) ;                      // Tells if id digit is in PPSD
-  virtual Bool_t IsInCpv (AliPHOSDigit * digit) ;                      // Tells if id digit is in CPV
+  virtual Bool_t IsInEmc (AliPHOSDigit * digit) ;             // Tells if id digit is in EMC
+  virtual Bool_t IsInPpsd(AliPHOSDigit * digit) ;             // Tells if id digit is in PPSD
+  virtual Bool_t IsInCpv (AliPHOSDigit * digit) ;             // Tells if id digit is in CPV
   virtual void MakeClusters(const DigitsList * dl, 
                            AliPHOSRecPoint::RecPointsList * emcl, 
-                           AliPHOSRecPoint::RecPointsList * ppsdl) ; // does the job 
-  virtual void PrintParameters() ;  
+                           AliPHOSRecPoint::RecPointsList * ppsdl,
+                           AliPHOSRecPoint::RecPointsList * cpvl) ; // does the job 
+  virtual void PrintParameters() ;
   virtual void SetCalibrationParameters(Float_t A,Float_t B){ fA = A ; fB = B;} 
   virtual void SetEmcClusteringThreshold(Float_t cluth)  { fEmcClusteringThreshold = cluth ; }
   virtual void SetEmcEnergyThreshold(Float_t enth)       { fEmcEnergyThreshold = enth ; } 
index c20c74097f9694493e5ab255a99bb2142e70cb18..0a904148de041d6741a41461638d721d5f468dba 100644 (file)
@@ -75,7 +75,7 @@ public:
   void        GetClusterLengths(Int_t &lengX, Int_t &lengZ); // cluster lengths along x and z
   Bool_t      IsCPV(void) {
     // true if the recpoint is in CPV
-    return (fPHOSMod <= fGeom->GetNCPVModules()) ; } 
+    return (fPHOSMod <= ((AliPHOSGeometry*) fGeom)->GetNCPVModules()) ; } 
   Bool_t      IsSortable() const { 
     // says that emcrecpoints are sortable objects 
     return kTRUE ; } 
index 96904f7d66cffea5a5fdc90d043a8de1329561fc..30a71f4f8d86c2714a657de40b2382ce3ae109bd 100644 (file)
@@ -95,6 +95,9 @@ void  AliPHOSPIDv1::MakeParticles(AliPHOSTrackSegment::TrackSegmentsList * trsl,
   Int_t pcdetector ;    // 1 hit and 0 no hit
 
   while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) {
+    Int_t module = tracksegment->GetPHOSMod();
+    cout << "PHOS module: " << module << endl;
+    if ( module <= fGeom->GetNCPVModules()) continue;
     new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ;
     rp = (AliPHOSRecParticle *)rpl->At(index) ; 
     AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ;
index 22838832d442165755c0adfb809dab2bd6828147..ce8f7126d8059439e85b888f616eead41055ab95 100644 (file)
@@ -43,7 +43,7 @@ AliPHOSRecPoint::AliPHOSRecPoint()
 {
   // ctor
 
-  fGeom =   AliPHOSGeometry::GetInstance() ;
+  fGeom = (AliPHOSGeometry*) AliPHOSGeometry::GetInstance() ;
   fPHOSMod = 0;
 }
 
index bc5716c4d16e24c7f1cd1ee4a37902e13997fdbd..489c0b7c1b85c7b0894ac1a1aa98312a4e1d9c5b 100644 (file)
@@ -78,7 +78,7 @@ class AliPHOSRecPoint : public AliRecPoint {
 protected:
   
   Int_t fPHOSMod ;      // PHOS Module number in which the RecPoint is found
-  AliPHOSGeometry * fGeom ; // pointer to the PHOS geometry class
+//    AliPHOSGeometry * fGeom ; // pointer to the PHOS geometry class
   
   ClassDef(AliPHOSRecPoint,1) // RecPoint for PHOS (Base Class)
  
index 8e022488254d42ff5a9991925c55db99ad86a4f2..0d6dee6d6a91792aff6e543b920cdd8d779adc49 100644 (file)
@@ -68,11 +68,12 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
 } 
 
 //____________________________________________________________________________
- void AliPHOSReconstructioner::MakePPSD(DigitsList * dl, 
-                                       AliPHOSRecPoint::RecPointsList * emccl, 
-                                       AliPHOSRecPoint::RecPointsList * ppsdl, 
-                                       AliPHOSTrackSegment::TrackSegmentsList * trsl, 
-                                       AliPHOSRecParticle::RecParticlesList * rpl)
+ void AliPHOSReconstructioner::Make(DigitsList * dl, 
+                                   AliPHOSRecPoint::RecPointsList * emccl, 
+                                   AliPHOSRecPoint::RecPointsList * ppsdl, 
+                                   AliPHOSRecPoint::RecPointsList * cpvcl, 
+                                   AliPHOSTrackSegment::TrackSegmentsList * trsl, 
+                                   AliPHOSRecParticle::RecParticlesList * rpl)
 {
   // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
   //                                                      Make the track segments 
@@ -81,8 +82,8 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
   if  (fDebugReconstruction)
     cout << "\n\nDebugReconstruction>>> " << "Start making reconstructed points (clusterizing!!)" << endl;
   
-  fClusterizer->MakeClusters(dl, emccl, ppsdl);
-  
+  fClusterizer->MakeClusters(dl, emccl, ppsdl, cpvcl);
+
   if  (fDebugReconstruction){
     cout << "DebugReconstruction>>> " << "AliPHOSReconstructioner: Digit list entries is " << dl->GetEntries() << endl ;
     cout << "AliPHOSReconstructioner: Emc  list entries is " << emccl->GetEntries() << endl ;
@@ -213,7 +214,7 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
   
   
   if  (fDebugReconstruction)  cout << "DebugReconstruction>>>> Start making track segments(unfolding+tracksegments)" << endl;
-  fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;   
+  fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, cpvcl, trsl) ;   
   
   // mark the position of the TrackSegments in the array
   AliPHOSTrackSegment * trs ; 
@@ -259,36 +260,36 @@ AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterize
     
   }
   if  (fDebugReconstruction)  cout << "DebugReconstruction>>>> Start making reconstructed particles" << endl;
+
+  if (fPID) {
+    fPID->MakeParticles(trsl, rpl) ; 
   
-  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;
@@ -314,99 +315,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::MakeCPV(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) ; 
-    if (cpvrp->IsCPV()) break;
-    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) ;
 }
index 6f467d053e51784d0c49a637befd9ab272fa0bf5..8b00ea866ada2997bb8a67f9b0a568e32b08cdce 100644 (file)
@@ -42,14 +42,12 @@ public:
   AliPHOSClusterizer * GetClusterizer() { return fClusterizer ; }
   void Init(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
                          AliPHOSPID * Identifier) ;  
-  void MakePPSD(TClonesArray * DL, 
-               AliPHOSRecPoint::RecPointsList * emccl, 
-               AliPHOSRecPoint::RecPointsList * ppsdl, 
-               AliPHOSTrackSegment::TrackSegmentsList * trsl, 
-               AliPHOSRecParticle::RecParticlesList * rpl)    ; // does the job for EMC+PPSD
-  void MakeCPV (TClonesArray * DL, 
-               AliPHOSRecPoint::RecPointsList * emccl, 
-               AliPHOSRecPoint::RecPointsList * ppsdl) ;        // does the job for EMC+CPV
+  void Make(TClonesArray * DL, 
+           AliPHOSRecPoint::RecPointsList * emccl, 
+           AliPHOSRecPoint::RecPointsList * ppsdl, 
+           AliPHOSRecPoint::RecPointsList * cpvl,
+           AliPHOSTrackSegment::TrackSegmentsList * trsl, 
+           AliPHOSRecParticle::RecParticlesList * rpl)    ; // does the job
 
   void SetDebugReconstruction(Bool_t deb) { fDebugReconstruction = deb; }
 
index 2490ef57bd9df42e0e09f1d2b5529d850ab435ce..5295138eec4fb3fabb9e72272ecdb70b63a15a48 100644 (file)
@@ -37,10 +37,8 @@ public:
   virtual void MakeTrackSegments(DigitsList * DL, 
                                 AliPHOSRecPoint::RecPointsList * emcl, 
                                 AliPHOSRecPoint::RecPointsList * ppsdl,
+                                AliPHOSRecPoint::RecPointsList * cpvl,
                                 AliPHOSTrackSegment::TrackSegmentsList * trsl ) = 0 ; // does the job
-  virtual void MakeTrackSegmentsCPV(DigitsList * DL, 
-                                AliPHOSRecPoint::RecPointsList * emcl, 
-                                AliPHOSRecPoint::RecPointsList * ppsdl ) = 0; // just unfold EMC and CPV clusters
   virtual void SetMaxEmcPpsdDistance(Float_t r) = 0 ; 
   virtual void SetUnfoldFlag() = 0 ;
   virtual void UnsetUnfoldFlag() = 0 ;
index 9d2a1802e92c708e60f2da2e6215239df00f9159..40648709a61b3a2652522f662d56928214790676 100644 (file)
@@ -378,31 +378,29 @@ void  AliPHOSTrackSegmentMakerv1::MakePairs(TArrayI * emcRecPoints,
 void  AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * dl, 
                                                    AliPHOSRecPoint::RecPointsList * emcl, 
                                                    AliPHOSRecPoint::RecPointsList * ppsdl, 
+                                                   AliPHOSRecPoint::RecPointsList * cpvl, 
                                                    AliPHOSTrackSegment::TrackSegmentsList * trsl)
 {
   // Makes the track segments out of the list of EMC and PPSD Recpoints and stores them in a list
   
-  Int_t phosmod      = fGeom->GetNCPVModules() + 1 ;
   Int_t emcStopedAt  = 0 ; 
   Int_t ppsdStopedAt = 0 ; 
 
   fNTrackSegments = 0 ; 
-
   
   TArrayI * emcRecPoints     = new TArrayI(1000) ;  // these arrays keep indexes 
   TArrayI * ppsdRecPointsUp  = new TArrayI(1000) ;  // of RecPoints, which are 
-  TArrayI * ppsdRecPointsLow = new TArrayI(1000) ;  // kept in TClonesArray's emcl and ppsdl
-  
+  TArrayI * ppsdRecPointsLow = new TArrayI(1000) ;  // kept in TClonesArray's emcl, ppsdl, cpv
   
   TClonesArray * linklowArray = new TClonesArray("AliPHOSLink", 1000);
   TClonesArray * linkupArray  = new TClonesArray("AliPHOSLink", 1000); 
 
-
   if(fUnfoldFlag){
     UnfoldAll(dl, emcl) ; // Unfolds all EMC clusters
+    UnfoldAll(dl, cpvl) ; // Unfolds all CPV clusters
   }
 
-
+  Int_t phosmod  = fGeom->GetNCPVModules() + 1 ;
   while(phosmod <= fGeom->GetNModules() ){
     
     FillOneModule(emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ;
index ce203ded756901623a7fc541ac376ad64a407e28..f193b69e073e31a830490d143d20c8ae3693663c 100644 (file)
@@ -61,6 +61,7 @@ public:
   void    MakeTrackSegments(DigitsList * DL, 
                            AliPHOSRecPoint::RecPointsList * emcl, 
                            AliPHOSRecPoint::RecPointsList * ppsdl, 
+                           AliPHOSRecPoint::RecPointsList * cpvl, 
                            AliPHOSTrackSegment::TrackSegmentsList * trsl ) ; // does the job
   virtual void MakeTrackSegmentsCPV(DigitsList * DL, 
                                 AliPHOSRecPoint::RecPointsList * emcl, 
index 28a6c53217363a597450eb1efb40c564b96f3053..386652bcd674830583c7a6ab6a70db0dc80ca022 100644 (file)
@@ -662,7 +662,7 @@ void AliPHOSv0::CreateGeometry()
   else
     cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl; 
 
-//      this->CreateGeometryforSupport() ; 
+  this->CreateGeometryforSupport() ; 
   
   // --- Position  PHOS mdules in ALICE setup ---
   
index 8de0cdbe9256b2a8503accf8b825c5da2924e66d..6857de2da210636082ee70db61e799f96c31e456 100644 (file)
@@ -104,7 +104,6 @@ AliPHOSv0(name,title)
   // and the TreeD at the end of the event (branch is set in FinishEvent() ).
   
   fHits= new TClonesArray("AliPHOSHit",1000) ;
-  gAlice->AddHitList(fHits);
 
   fNhits = 0 ;
 
@@ -165,7 +164,7 @@ AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *nam
 
   fDigits = 0 ;
   fHits= new TClonesArray("AliPHOSHit",1000) ;
-  gAlice->AddHitList(fHits);
+
   fNhits = 0 ;
 
   fIshunt     =  1 ; // All hits are associated with primary particles
@@ -213,6 +212,12 @@ AliPHOSv1::~AliPHOSv1()
     fPpsdRecPoints = 0 ; 
   }
   
+  if ( fCpvRecPoints ) {
+    fCpvRecPoints->Delete() ; 
+    delete fCpvRecPoints ; 
+    fCpvRecPoints = 0 ; 
+  }
+  
   if ( fTrackSegments ) {
     fTrackSegments->Delete() ; 
     delete fTrackSegments ;
@@ -407,6 +412,13 @@ void AliPHOSv1::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
     gAlice->TreeR()->Branch(branchname, "TObjArray", &fPpsdRecPoints, fBufferSize, splitlevel) ;
   }
 
+  fCpvRecPoints->Delete() ; 
+
+  if ( fCpvRecPoints && gAlice->TreeR() ) {
+    sprintf(branchname,"%sCpvRP",GetName()) ;
+    gAlice->TreeR()->Branch(branchname, "TObjArray", &fCpvRecPoints, fBufferSize, splitlevel) ;
+  }
+
   fTrackSegments->Delete() ; 
 
   if ( fTrackSegments && gAlice->TreeR() ) { 
@@ -416,7 +428,7 @@ void AliPHOSv1::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
 
   fRecParticles->Delete() ; 
 
-  if      (strcmp(fGeom->GetName(),"GPS2") == 0 || strcmp(fGeom->GetName(),"MIXT") == 0) {
+  if (strcmp(fGeom->GetName(),"GPS2") == 0 || strcmp(fGeom->GetName(),"MIXT") == 0) {
     if ( fRecParticles && gAlice->TreeR() ) { 
       sprintf(branchname,"%sRP",GetName()) ;
       gAlice->TreeR()->Branch(branchname, &fRecParticles, fBufferSize) ;
@@ -424,10 +436,13 @@ void AliPHOSv1::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
   }
   
   // 3.
-  if      (strcmp(fGeom->GetName(),"GPS2") == 0 || strcmp(fGeom->GetName(),"MIXT") == 0)
-    fReconstructioner->MakePPSD(fDigits, fEmcRecPoints, fPpsdRecPoints, fTrackSegments, fRecParticles);
-  if (strcmp(fGeom->GetName(),"IHEP") == 0 || strcmp(fGeom->GetName(),"MIXT") == 0)
-    fReconstructioner->MakeCPV (fDigits, fEmcRecPoints, fPpsdRecPoints);
+
+  fReconstructioner->Make(fDigits, fEmcRecPoints, fPpsdRecPoints,
+                         fCpvRecPoints, fTrackSegments, fRecParticles);
+
+  printf("Reconstruction: %d %d %d %d %d\n",
+        fEmcRecPoints->GetEntries(),fPpsdRecPoints->GetEntries(),fCpvRecPoints->GetEntries(),
+        fTrackSegments->GetEntries(),fRecParticles->GetEntries());
 
   // 4. Expand or Shrink the arrays to the proper size
   
@@ -439,6 +454,9 @@ void AliPHOSv1::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
   size = fPpsdRecPoints->GetEntries() ;
   fPpsdRecPoints->Expand(size) ;
 
+  size = fCpvRecPoints->GetEntries() ;
+  fCpvRecPoints->Expand(size) ;
+
   size = fTrackSegments->GetEntries() ;
   fTrackSegments->Expand(size) ;
 
@@ -473,10 +491,11 @@ void AliPHOSv1::ResetReconstruction()
 { 
   // Deleting reconstructed objects
 
-  if ( fEmcRecPoints )   fEmcRecPoints->Delete();
+  if ( fEmcRecPoints  )  fEmcRecPoints ->Delete();
   if ( fPpsdRecPoints )  fPpsdRecPoints->Delete();
+  if ( fCpvRecPoints  )  fCpvRecPoints ->Delete();
   if ( fTrackSegments )  fTrackSegments->Delete();
-  if ( fRecParticles )   fRecParticles->Delete();
+  if ( fRecParticles  )  fRecParticles ->Delete();
   
 }