// Construct histograms and displays them.
// Use the macro EditorBar.C for best access to the functionnalities
//
-//*-- Author: Y. Schutz (SUBATECH)
+//*-- Author: Y. Schutz (SUBATECH) & Gines Martinez (SUBATECH)
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
#include "AliPHOSDigit.h"
#include "AliPHOSTrackSegment.h"
#include "AliPHOSRecParticle.h"
+#include "AliPHOSIndexToObject.h"
ClassImp(AliPHOSAnalyze)
//____________________________________________________________________________
AliPHOSAnalyze::AliPHOSAnalyze(Text_t * name)
{
- // ctor: analyze events from root file: name
+ // ctor: analyze events from root file "name"
Bool_t ok = OpenRootFile(name) ;
if ( !ok ) {
}
}
+//____________________________________________________________________________
+AliPHOSAnalyze::AliPHOSAnalyze(const AliPHOSAnalyze & ana)
+{
+ // copy ctor
+ ( (AliPHOSAnalyze &)ana ).Copy(*this) ;
+}
+
+//____________________________________________________________________________
+void AliPHOSAnalyze::Copy(TObject & obj)
+{
+ // copy an analysis into an other one
+ TObject::Copy(obj) ;
+ // I do nothing more because the copy is silly but the Code checkers requires one
+}
+
//____________________________________________________________________________
AliPHOSAnalyze::~AliPHOSAnalyze()
{
// dtor
- fRootFile->Close() ;
+ if (fRootFile->IsOpen() )
+ fRootFile->Close() ;
delete fRootFile ;
fRootFile = 0 ;
// =========== End of reconstruction
+ // Deleting fClu, fTrs, fPID et fRec
+ fClu->Delete();
+ fTrs->Delete();
+ fPID->Delete();
+ fRec->Delete();
+
// =========== Write the root file
- fRootFile->Write() ;
-
+
// =========== Finish
cout << "AnalyzeOneEvent > event # " << fEvt << " processed" << endl ;
if (ievent==0) cout << "AnalyzeManyEvents > " << "Starting Analyzing " << endl ;
//========== Create the Clusterizer
fClu = new AliPHOSClusterizerv1() ;
- fClu->SetEmcEnergyThreshold(0.025) ;
+ fClu->SetEmcEnergyThreshold(0.05) ;
fClu->SetEmcClusteringThreshold(0.50) ;
fClu->SetPpsdEnergyThreshold (0.0000002) ;
fClu->SetPpsdClusteringThreshold(0.0000001) ;
//=========== Do the reconstruction
fPHOS->Reconstruction(fRec);
//=========== Cluster in module
- TIter nextEmc(fPHOS->EmcClusters() ) ;
+ TIter nextEmc(fPHOS->EmcRecPoints() ) ;
while((emc = (AliPHOSEmcRecPoint *)nextEmc()))
{
if ( emc->GetPHOSMod() == module )
{
fhEmcCluster->Fill( emc->GetTotalEnergy() );
- TIter nextPpsd( fPHOS->PpsdClusters()) ;
+ TIter nextPpsd( fPHOS->PpsdRecPoints()) ;
while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsd()))
{
if ( ppsd->GetPHOSMod() == module )
}
}
//=========== Cluster in module PPSD Down
- TIter nextPpsd(fPHOS->PpsdClusters() ) ;
+ TIter nextPpsd(fPHOS->PpsdRecPoints() ) ;
while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsd()))
{
if ( ppsd->GetPHOSMod() == module )
//fhElectronPositionY->Fill(recpart. ) ;
cout << "ELECTRON" << endl;
break;
- case kNEUTRALHADRON:
+ case kNEUTRALHA:
fhNeutralHadronEnergy->Fill(recparticle->Energy() ) ;
//fhNeutralHadronPositionX->Fill(recpart. ) ;
//fhNeutralHadronPositionY->Fill(recpart. ) ;
//fhNeutralEMPositionY->Fill(recpart. ) ;
//cout << "NEUTRAL EM" << endl;
break ;
- case kCHARGEDHADRON:
+ case kCHARGEDHA:
fhChargedHadronEnergy->Fill(recparticle->Energy() ) ;
//fhChargedHadronPositionX->Fill(recpart. ) ;
//fhChargedHadronPositionY->Fill(recpart. ) ;
cout << "CHARGED HADRON" << endl;
break ;
- case kGAMMAHADRON:
+ case kGAMMAHA:
fhPhotonHadronEnergy->Fill(recparticle->Energy() ) ;
//fhPhotonHadronPositionX->Fill(recpart. ) ;
//fhPhotonHadronPositionY->Fill(recpart. ) ;
fPHOS = (AliPHOSv0 *)gAlice->GetDetector("PHOS") ;
fGeom = AliPHOSGeometry::GetInstance( fPHOS->GetGeometry()->GetName(), fPHOS->GetGeometry()->GetTitle() );
+
} // else !ok
} // if fRootFile
if ( ok ) {
+
+ //========== Initializes the Index to Object converter
+
+ fObjGetter = AliPHOSIndexToObject::GetInstance(fPHOS) ;
+
//========== Create the Clusterizer
fClu = new AliPHOSClusterizerv1() ;
fClu->SetEmcEnergyThreshold(0.030) ;
- fClu->SetEmcClusteringThreshold(1.0) ;
+ fClu->SetEmcClusteringThreshold(0.50) ;
fClu->SetPpsdEnergyThreshold (0.0000002) ;
fClu->SetPpsdClusteringThreshold(0.0000001) ;
fClu->SetLocalMaxCut(0.03) ;
fPID = new AliPHOSPIDv1() ;
cout << "AnalyzeOneEvent > using particle identifier " << fPID->GetName() << endl ;
-
+ //fPID->SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M) ;
+ fPID->SetShowerProfileCuts(0.7, 2.0 , 0.6 , 1.5) ;
+
//========== Creates the Reconstructioner
- fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;
+ fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;
+ fRec -> SetDebugReconstruction(kFALSE);
//=========== Connect the various Tree's for evt
Text_t canvasname[80] ;
sprintf(canvasname, "Reconstructed particles in PHOSmodule # %d", module) ;
TCanvas * rparticlecanvas = new TCanvas("RparticleCanvas", canvasname, 650, 500) ;
- RecParticlesList * rpl = fPHOS->RecParticles() ;
+ AliPHOSRecParticle::RecParticlesList * rpl = fPHOS->RecParticles() ;
Int_t nRecParticles = rpl->GetEntries() ;
Int_t nRecParticlesInModule = 0 ;
TIter nextRecPart(rpl) ;
//=========== Cluster in module
- TClonesArray * emcRP = fPHOS->EmcClusters() ;
+ // TClonesArray * emcRP = fPHOS->EmcClusters() ;
+ TObjArray * emcRP = fPHOS->EmcRecPoints() ;
+
etot = 0.;
Int_t totalnClusters = 0 ;
Int_t nClusters = 0 ;
//=========== Cluster in module PPSD Down
- TClonesArray * ppsdRP = fPHOS->PpsdClusters() ;
+ // TClonesArray * ppsdRP = fPHOS->PpsdClusters() ;
+ TObjArray * ppsdRP = fPHOS->PpsdRecPoints() ;
+
etot = 0.;
TIter nextPpsd(ppsdRP) ;
AliPHOSPpsdRecPoint * ppsd ;
//=========== Cluster in module PPSD Up
- ppsdRP = fPHOS->PpsdClusters() ;
+ ppsdRP = fPHOS->PpsdRecPoints() ;
+
etot = 0.;
TIter nextPpsdUp(ppsdRP) ;
while((ppsd = (AliPHOSPpsdRecPoint *)nextPpsdUp()))
TCanvas * trackcanvas = new TCanvas("TrackSegmentCanvas", canvasname, 650, 500) ;
histotrack->Draw() ;
- TrackSegmentsList * trsegl = fPHOS->TrackSegments() ;
+ AliPHOSTrackSegment::TrackSegmentsList * trsegl = fPHOS->TrackSegments() ;
AliPHOSTrackSegment * trseg ;
Int_t nTrackSegments = trsegl->GetEntries() ;