#include "TH1.h"
#include "TPad.h"
#include "TH2.h"
+#include "TH2.h"
#include "TParticle.h"
#include "TClonesArray.h"
#include "TTree.h"
// --- AliRoot header files ---
#include "AliRun.h"
+#include "AliPHOSv1.h"
#include "AliPHOSAnalyze.h"
#include "AliPHOSClusterizerv1.h"
#include "AliPHOSTrackSegmentMakerv1.h"
#include "AliPHOSIndexToObject.h"
#include "AliPHOSHit.h"
#include "AliPHOSCpvRecPoint.h"
+#include "AliPHOSPpsdRecPoint.h"
ClassImp(AliPHOSAnalyze)
fGeom = AliPHOSGeometry::GetInstance( fPHOS->GetGeometry()->GetName(), fPHOS->GetGeometry()->GetTitle() );
//========== Initializes the Index to Object converter
- fObjGetter = AliPHOSIndexToObject::GetInstance(fPHOS) ;
+ fObjGetter = AliPHOSIndexToObject::GetInstance() ; // <--- To be redone
//========== Current event number
fEvt = -999 ;
}
fDebugLevel = 0;
- fClu = 0 ;
- fPID = 0 ;
- fTrs = 0 ;
- fRec = 0 ;
+ // fClu = 0 ;
+ // fPID = 0 ;
+ // fTrs = 0 ;
+ // fRec = 0 ;
ResetHistograms() ;
}
if(fRootFile->IsOpen()) fRootFile->Close() ;
if(fRootFile) {delete fRootFile ; fRootFile=0 ;}
if(fPHOS) {delete fPHOS ; fPHOS =0 ;}
- if(fClu) {delete fClu ; fClu =0 ;}
- if(fPID) {delete fPID ; fPID =0 ;}
- if(fRec) {delete fRec ; fRec =0 ;}
- if(fTrs) {delete fTrs ; fTrs =0 ;}
+ // if(fClu) {delete fClu ; fClu =0 ;}
+ // if(fPID) {delete fPID ; fPID =0 ;}
+ // if(fRec) {delete fRec ; fRec =0 ;}
+ // if(fTrs) {delete fTrs ; fTrs =0 ;}
}
//____________________________________________________________________________
TH2F * recNbar = new TH2F("recNbar","RecParticles with primary Nbar", 64,-71.,71.,64,-71.,71.);
//========== Create the Clusterizer
- fClu = new AliPHOSClusterizerv1() ;
+ // fClu = new AliPHOSClusterizerv1() ;
gAlice->GetEvent(Nevent);
}
}
- // fPHOS->SetTreeAddress() ;
+ //Set TreeS here and get AliPHOSSdigitizer
+
gAlice->TreeS()->GetEvent(0) ;
fGeom->AbsToRelNumbering(sdigit->GetId(), relid) ;
Float_t x,z ;
fGeom->RelPosInModule(relid,x,z) ;
- Float_t e = fPHOS->Calibrate(sdigit->GetAmp()) ;
+ Float_t e = 1 ; //<--- fPHOS->Calibrate(sdigit->GetAmp()) ;
if(relid[0]==Nmod){
if(relid[1]==0) //EMC
sdigitOccupancy->Fill(x,z,e) ;
fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
Float_t x,z ;
fGeom->RelPosInModule(relid,x,z) ;
- Float_t e = fClu->Calibrate(digit->GetAmp()) ;
+ Float_t e = 1; //<--- fClu->Calibrate(digit->GetAmp()) ;
if(relid[0]==Nmod){
if(relid[1]==0) //EMC
digitOccupancy->Fill(x,z,e) ;
if(ppsdRecPoints ){
for(irecp = 0; irecp < ppsdRecPoints->GetEntries() ; irecp ++){
AliPHOSPpsdRecPoint * ppsd= (AliPHOSPpsdRecPoint *)ppsdRecPoints->At(irecp) ;
+
+ ppsd->GetLocalPosition(pos) ;
+ cout << "PPSD " << irecp << " " << ppsd->GetPHOSMod() << " " << pos.X() << " " << pos.Z() << endl ;
+
if(ppsd->GetPHOSMod()==Nmod){
ppsd->GetLocalPosition(pos) ;
if(ppsd->GetUp())
nbar->Draw("boxsame") ;
}
-//____________________________________________________________________________
- void AliPHOSAnalyze::Reconstruct(Int_t nevents,Int_t firstEvent )
-{
-
- // Performs reconstruction of EMC and CPV (GPS2, IHEP or MIXT)
- // for events from FirstEvent to Nevents
-
- Int_t ievent ;
- for ( ievent=firstEvent; ievent<nevents; ievent++) {
- if (ievent==firstEvent) {
- cout << "Analyze > Starting Reconstructing " << endl ;
- //========== Create the Clusterizer
- fClu = new AliPHOSClusterizerv1() ;
+// //____________________________________________________________________________
+// void AliPHOSAnalyze::Reconstruct(Int_t nevents,Int_t firstEvent )
+// {
+
+// // Performs reconstruction of EMC and CPV (GPS2, IHEP or MIXT)
+// // for events from FirstEvent to Nevents
+
+// Int_t ievent ;
+// for ( ievent=firstEvent; ievent<nevents; ievent++) {
+// if (ievent==firstEvent) {
+// cout << "Analyze > Starting Reconstructing " << endl ;
+// //========== Create the Clusterizer
+// fClu = new AliPHOSClusterizerv1() ;
- //========== Creates the track segment maker
- fTrs = new AliPHOSTrackSegmentMakerv1() ;
- // fTrs->UnsetUnfoldFlag() ;
+// //========== Creates the track segment maker
+// fTrs = new AliPHOSTrackSegmentMakerv1() ;
+// // fTrs->UnsetUnfoldFlag() ;
- //========== Creates the particle identifier
- fPID = new AliPHOSPIDv1() ;
- fPID->SetShowerProfileCuts(0.3, 1.8, 0.3, 1.8 ) ;
+// //========== Creates the particle identifier
+// fPID = new AliPHOSPIDv1() ;
+// fPID->SetShowerProfileCuts(0.3, 1.8, 0.3, 1.8 ) ;
- //========== Creates the Reconstructioner
- fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;
- if (fDebugLevel != 0) fRec -> SetDebugReconstruction(kTRUE);
- }
+// //========== Creates the Reconstructioner
+// fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;
+// if (fDebugLevel != 0) fRec -> SetDebugReconstruction(kTRUE);
+// }
- if (fDebugLevel != 0 ||
- (ievent+1) % (Int_t)TMath::Power( 10, (Int_t)TMath::Log10(ievent+1) ) == 0)
- cout << "======= Analyze ======> Event " << ievent+1 << endl ;
+// if (fDebugLevel != 0 ||
+// (ievent+1) % (Int_t)TMath::Power( 10, (Int_t)TMath::Log10(ievent+1) ) == 0)
+// cout << "======= Analyze ======> Event " << ievent+1 << endl ;
- gAlice->GetEvent(ievent) ;
- gAlice->SetEvent(ievent) ;
+// gAlice->GetEvent(ievent) ;
+// gAlice->SetEvent(ievent) ;
- if(gAlice->TreeS() == 0) gAlice->MakeTree("S");
- fPHOS->MakeBranch("S") ;
+// if(gAlice->TreeS() == 0) gAlice->MakeTree("S");
+// fPHOS->MakeBranch("S") ;
- fPHOS->Hits2SDigits() ;
+// fPHOS->Hits2SDigits() ;
- if(gAlice->TreeD() == 0) gAlice->MakeTree("D");
- fPHOS->MakeBranch("D") ;
+// if(gAlice->TreeD() == 0) gAlice->MakeTree("D");
+// fPHOS->MakeBranch("D") ;
- fPHOS->SDigits2Digits() ;
+// fPHOS->SDigits2Digits() ;
- if(gAlice->TreeR() == 0) gAlice->MakeTree("R");
+// if(gAlice->TreeR() == 0) gAlice->MakeTree("R");
- fPHOS->Reconstruction(fRec);
+// fPHOS->Reconstruction(fRec);
- gAlice->TreeS()->Fill() ;
- gAlice->TreeS()->Write(0,TObject::kOverwrite);
+// gAlice->TreeS()->Fill() ;
+// gAlice->TreeS()->Write(0,TObject::kOverwrite);
- gAlice->TreeD()->Fill() ;
- gAlice->TreeD()->Write(0,TObject::kOverwrite);
+// gAlice->TreeD()->Fill() ;
+// gAlice->TreeD()->Write(0,TObject::kOverwrite);
- }
+// }
- if(fClu) {delete fClu ; fClu =0 ;}
- if(fPID) {delete fPID ; fPID =0 ;}
- if(fRec) {delete fRec ; fRec =0 ;}
- if(fTrs) {delete fTrs ; fTrs =0 ;}
+// if(fClu) {delete fClu ; fClu =0 ;}
+// if(fPID) {delete fPID ; fPID =0 ;}
+// if(fRec) {delete fRec ; fRec =0 ;}
+// if(fTrs) {delete fTrs ; fTrs =0 ;}
-}
+// }
//-------------------------------------------------------------------------------------
void AliPHOSAnalyze::ReadAndPrintCPV(Int_t EvFirst, Int_t EvLast)
// --- ROOT system ---
-#include "TFile.h"
-#include "TH1.h"
-#include "TH2.h"
+class TFile ;
+class TH1F ;
+class TH2F ;
// --- Standard library ---
// --- AliRoot header files ---
-#include "AliPHOSv1.h"
-#include "AliPHOSGeometry.h"
-#include "AliPHOSPID.h"
-#include "AliPHOSIndexToObject.h"
+class AliPHOSv1 ;
+class AliPHOSGeometry ;
+class AliPHOSPID ;
+class AliPHOSIndexToObject ;
class AliPHOSAnalyze : public TObject {
void AnalyzeCPV(Int_t Nevents); // analyzes various CPV characteristics
void AnalyzeEMC(Int_t Nevents); // analyzes EMC resolution
void InvariantMass(Int_t Nevents = 100) ;
- void Reconstruct(Int_t Nevtents = 100,Int_t FirstEvent = 0) ;
+ // void Reconstruct(Int_t Nevtents = 100,Int_t FirstEvent = 0) ;
void BookingHistograms() ; // booking histograms for the ManyEvent analysis ;
void BookResolutionHistograms() ; // booking histograms for the Resoluion analysis ;
void Copy(TObject & obj) ; // copies an analysis into an other one
AliPHOSAnalyze & operator = (const AliPHOSAnalyze & rvalue) {
// assignement operator requested by coding convention
// but not needed
- assert(0==1) ;
+ abort() ;
return *this ;
}
void SetDebugLevel(Int_t flag) { fDebugLevel = flag; }
private:
- AliPHOSClusterizer * fClu ; // a clusterizer
+ // AliPHOSClusterizer * fClu ; // a clusterizer
Int_t fEvt ; // the evt number being processed
AliPHOSGeometry * fGeom ; // the PHOS Geometry object
AliPHOSIndexToObject * fObjGetter ; // provides methods to retrieve objects from their index in a list
AliPHOSv1 * fPHOS ; // the PHOS object from the root file
- AliPHOSPID * fPID ; // a particle identifier
- AliPHOSReconstructioner * fRec ; // a reconstructioner
+ // AliPHOSPID * fPID ; // a particle identifier
+ // AliPHOSReconstructioner * fRec ; // a reconstructioner
TFile * fRootFile ; // the root file that contains the data
- AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ;
+ // AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ;
Int_t fDebugLevel; // debug level for analysis