+
/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* *
fDigits = 0 ;
fEmcRecPoints = 0 ;
fPpsdRecPoints = 0 ;
+ fCpvRecPoints = 0 ;
fTrackSegments = 0 ;
fRecParticles = 0 ;
fDigits = 0 ;
fEmcRecPoints = 0 ;
fPpsdRecPoints = 0 ;
+ fCpvRecPoints = 0 ;
fTrackSegments = 0 ;
fRecParticles = 0 ;
if(fPpsdRecPoints)
fPpsdRecPoints->Delete() ;
delete fPpsdRecPoints ;
+ if(fCpvRecPoints)
+ fCpvRecPoints->Delete() ;
+ delete fCpvRecPoints ;
if(fTrackSegments)
fTrackSegments->Delete() ;
delete fTrackSegments ;
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
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() ;
// 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
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)
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
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();
//=========== 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);
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 ;
//____________________________________________________________________________
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() ) ;
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 ;
// 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++ ;
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 ; }
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 ; }
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() ;
{
// ctor
- fGeom = AliPHOSGeometry::GetInstance() ;
+ fGeom = (AliPHOSGeometry*) AliPHOSGeometry::GetInstance() ;
fPHOSMod = 0;
}
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)
}
//____________________________________________________________________________
- 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
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 ;
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 ;
}
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;
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) ;
}
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; }
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 ;
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) ;
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,
else
cout << "AliPHOSv0::CreateGeometry : no charged particle identification system installed" << endl;
-// this->CreateGeometryforSupport() ;
+ this->CreateGeometryforSupport() ;
// --- Position PHOS mdules in ALICE setup ---
// and the TreeD at the end of the event (branch is set in FinishEvent() ).
fHits= new TClonesArray("AliPHOSHit",1000) ;
- gAlice->AddHitList(fHits);
fNhits = 0 ;
fDigits = 0 ;
fHits= new TClonesArray("AliPHOSHit",1000) ;
- gAlice->AddHitList(fHits);
+
fNhits = 0 ;
fIshunt = 1 ; // All hits are associated with primary particles
fPpsdRecPoints = 0 ;
}
+ if ( fCpvRecPoints ) {
+ fCpvRecPoints->Delete() ;
+ delete fCpvRecPoints ;
+ fCpvRecPoints = 0 ;
+ }
+
if ( fTrackSegments ) {
fTrackSegments->Delete() ;
delete fTrackSegments ;
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() ) {
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) ;
}
// 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
size = fPpsdRecPoints->GetEntries() ;
fPpsdRecPoints->Expand(size) ;
+ size = fCpvRecPoints->GetEntries() ;
+ fCpvRecPoints->Expand(size) ;
+
size = fTrackSegments->GetEntries() ;
fTrackSegments->Expand(size) ;
{
// 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();
}