From b73f246d92ad05600f8f4134e117aacee0c00850 Mon Sep 17 00:00:00 2001 From: schutz Date: Fri, 15 Dec 2000 10:26:16 +0000 Subject: [PATCH] the MIXT geometry (IHEP+GPS2) has been introduced --- PHOS/AliPHOS.cxx | 23 +++- PHOS/AliPHOS.h | 15 ++- PHOS/AliPHOSAnalyze.cxx | 13 +- PHOS/AliPHOSClusterizer.h | 5 +- PHOS/AliPHOSClusterizerv1.cxx | 20 ++-- PHOS/AliPHOSClusterizerv1.h | 11 +- PHOS/AliPHOSCpvRecPoint.h | 2 +- PHOS/AliPHOSPIDv1.cxx | 3 + PHOS/AliPHOSRecPoint.cxx | 2 +- PHOS/AliPHOSRecPoint.h | 2 +- PHOS/AliPHOSReconstructioner.cxx | 178 ++++++++-------------------- PHOS/AliPHOSReconstructioner.h | 14 +-- PHOS/AliPHOSTrackSegmentMaker.h | 4 +- PHOS/AliPHOSTrackSegmentMakerv1.cxx | 10 +- PHOS/AliPHOSTrackSegmentMakerv1.h | 1 + PHOS/AliPHOSv0.cxx | 2 +- PHOS/AliPHOSv1.cxx | 37 ++++-- 17 files changed, 157 insertions(+), 185 deletions(-) diff --git a/PHOS/AliPHOS.cxx b/PHOS/AliPHOS.cxx index f42c431b78e..3f377132c55 100644 --- a/PHOS/AliPHOS.cxx +++ b/PHOS/AliPHOS.cxx @@ -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() ; diff --git a/PHOS/AliPHOS.h b/PHOS/AliPHOS.h index 02b952e66d8..5aece3df0a2 100644 --- a/PHOS/AliPHOS.h +++ b/PHOS/AliPHOS.h @@ -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) diff --git a/PHOS/AliPHOSAnalyze.cxx b/PHOS/AliPHOSAnalyze.cxx index fd39e19d696..5c1acbd5ceb 100644 --- a/PHOS/AliPHOSAnalyze.cxx +++ b/PHOS/AliPHOSAnalyze.cxx @@ -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); diff --git a/PHOS/AliPHOSClusterizer.h b/PHOS/AliPHOSClusterizer.h index 0df3eee1e7e..8f6447ec79e 100644 --- a/PHOS/AliPHOSClusterizer.h +++ b/PHOS/AliPHOSClusterizer.h @@ -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 ; diff --git a/PHOS/AliPHOSClusterizerv1.cxx b/PHOS/AliPHOSClusterizerv1.cxx index 549a07a5607..156b57c206a 100644 --- a/PHOS/AliPHOSClusterizerv1.cxx +++ b/PHOS/AliPHOSClusterizerv1.cxx @@ -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++ ; diff --git a/PHOS/AliPHOSClusterizerv1.h b/PHOS/AliPHOSClusterizerv1.h index 9a02b696e97..3f39659137b 100644 --- a/PHOS/AliPHOSClusterizerv1.h +++ b/PHOS/AliPHOSClusterizerv1.h @@ -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 ; } diff --git a/PHOS/AliPHOSCpvRecPoint.h b/PHOS/AliPHOSCpvRecPoint.h index c20c74097f9..0a904148de0 100644 --- a/PHOS/AliPHOSCpvRecPoint.h +++ b/PHOS/AliPHOSCpvRecPoint.h @@ -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 ; } diff --git a/PHOS/AliPHOSPIDv1.cxx b/PHOS/AliPHOSPIDv1.cxx index 96904f7d66c..30a71f4f8d8 100644 --- a/PHOS/AliPHOSPIDv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -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() ; diff --git a/PHOS/AliPHOSRecPoint.cxx b/PHOS/AliPHOSRecPoint.cxx index 22838832d44..ce8f7126d80 100644 --- a/PHOS/AliPHOSRecPoint.cxx +++ b/PHOS/AliPHOSRecPoint.cxx @@ -43,7 +43,7 @@ AliPHOSRecPoint::AliPHOSRecPoint() { // ctor - fGeom = AliPHOSGeometry::GetInstance() ; + fGeom = (AliPHOSGeometry*) AliPHOSGeometry::GetInstance() ; fPHOSMod = 0; } diff --git a/PHOS/AliPHOSRecPoint.h b/PHOS/AliPHOSRecPoint.h index bc5716c4d16..489c0b7c1b8 100644 --- a/PHOS/AliPHOSRecPoint.h +++ b/PHOS/AliPHOSRecPoint.h @@ -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) diff --git a/PHOS/AliPHOSReconstructioner.cxx b/PHOS/AliPHOSReconstructioner.cxx index 8e022488254..0d6dee6d6a9 100644 --- a/PHOS/AliPHOSReconstructioner.cxx +++ b/PHOS/AliPHOSReconstructioner.cxx @@ -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>> " << + 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>> 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; iprimaryGetNprimary(); 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) ; } diff --git a/PHOS/AliPHOSReconstructioner.h b/PHOS/AliPHOSReconstructioner.h index 6f467d053e5..8b00ea866ad 100644 --- a/PHOS/AliPHOSReconstructioner.h +++ b/PHOS/AliPHOSReconstructioner.h @@ -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; } diff --git a/PHOS/AliPHOSTrackSegmentMaker.h b/PHOS/AliPHOSTrackSegmentMaker.h index 2490ef57bd9..5295138eec4 100644 --- a/PHOS/AliPHOSTrackSegmentMaker.h +++ b/PHOS/AliPHOSTrackSegmentMaker.h @@ -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 ; diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.cxx b/PHOS/AliPHOSTrackSegmentMakerv1.cxx index 9d2a1802e92..40648709a61 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.cxx +++ b/PHOS/AliPHOSTrackSegmentMakerv1.cxx @@ -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) ; diff --git a/PHOS/AliPHOSTrackSegmentMakerv1.h b/PHOS/AliPHOSTrackSegmentMakerv1.h index ce203ded756..f193b69e073 100644 --- a/PHOS/AliPHOSTrackSegmentMakerv1.h +++ b/PHOS/AliPHOSTrackSegmentMakerv1.h @@ -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, diff --git a/PHOS/AliPHOSv0.cxx b/PHOS/AliPHOSv0.cxx index 28a6c532173..386652bcd67 100644 --- a/PHOS/AliPHOSv0.cxx +++ b/PHOS/AliPHOSv0.cxx @@ -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 --- diff --git a/PHOS/AliPHOSv1.cxx b/PHOS/AliPHOSv1.cxx index 8de0cdbe925..6857de2da21 100644 --- a/PHOS/AliPHOSv1.cxx +++ b/PHOS/AliPHOSv1.cxx @@ -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(); } -- 2.39.3