* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Base Class of PHOS.
-// Only creates the materials
-//*-- Author : Laurent Aphecetche SUBATECH
+// Base Class for PHOS description:
+// PHOS consists of a PbWO4 calorimeter (EMCA) and a gazeous charged
+// particles detector (CPV or PPSD).
+// The only provided method here is CreateMaterials,
+// which defines the materials common to all PHOS versions.
+//
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
#include "AliPHOS.h"
#include "AliMC.h"
-//#include "TGeant3.h"
#include "AliRun.h"
ClassImp(AliPHOS)
-//____________________________________________________________________________
-AliPHOS::AliPHOS(const char* name, const char* title)
- : AliDetector(name,title)
-{
-}
-
-//____________________________________________________________________________
-AliPHOS::AliPHOS() : AliDetector()
-{
-}
-
//____________________________________________________________________________
AliPHOS::~AliPHOS()
{
//____________________________________________________________________________
void AliPHOS::CreateMaterials()
{
- // DEFINITION OF PHOS MATERIALS
+ // Definitions of materials to build PHOS and associated tracking media.
+ // media number in idtmed are 699 to 798.
// --- The PbWO4 crystals ---
Float_t aX[3] = {207.19, 183.85, 16.0} ;
/* $Id$ */
-////////////////////////////////////////////////
-// Abstract Base Class for PHOS //
-// Version SUBATECH //
-// Author Laurent Aphecetche SUBATECH //
-// The only provided method here is //
-// CreateMaterials, which defines the //
-// materials common to all PHOS versions. //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Base Class for PHOS
+//
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
// --- ROOT system ---
public:
- AliPHOS(const char* name, const char* title) ;
- AliPHOS() ;
+ AliPHOS(const char* name, const char* title): AliDetector(name,title) {}
+ AliPHOS() : AliDetector() {}
virtual ~AliPHOS() ;
- virtual void CreateMaterials() ;
- virtual AliPHOSGeometry * GetGeometry() = 0 ;
+ virtual void CreateMaterials() ; // defines the material of the detector
+ virtual AliPHOSGeometry * GetGeometry() = 0 ; // hands the pointer to the unique geometry object
- ClassDef(AliPHOS,2) // Photon Spectrometer Detector
+ ClassDef(AliPHOS,2) // Photon Spectrometer Detector (base class)
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Algorythm class to analyze PHOS events
-//*-- Y. Schutz : SUBATECH
+// Algorythm class to analyze PHOSv0 events:
+// Construct histograms and displays them.
+// Use the macro EditorBar.C for best access to the functionnalities
+//
+//*-- Author: Y. Schutz (SUBATECH)
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSAnalyze::AliPHOSAnalyze()
{
- // ctor
+ // default ctor (useless)
fRootFile = 0 ;
}
//____________________________________________________________________________
AliPHOSAnalyze::AliPHOSAnalyze(Text_t * name)
{
- // ctor
+ // ctor: analyze events from root file: name
Bool_t ok = OpenRootFile(name) ;
if ( !ok ) {
//____________________________________________________________________________
void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
{
+ // analyze one single event with id=evt
+
+ TStopwatch ts ;
+ ts.Start() ;
Bool_t ok = Init(evt) ;
if ( ok ) {
fPHOS->Reconstruction(fRec);
// =========== End of reconstruction
+
+ // =========== Write the root file
+
+ fRootFile->Write() ;
+ // =========== Finish
+
cout << "AnalyzeOneEvent > event # " << fEvt << " processed" << endl ;
} // ok
else
cout << "AnalyzeOneEvent > filed to process event # " << evt << endl ;
-
+
+ ts.Stop() ; cout << "CPU time = " << ts.CpuTime() << endl ;
+ cout << "Real time = " << ts.RealTime() << endl ;
}
//____________________________________________________________________________
- void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module) // analyzes many events
+ void AliPHOSAnalyze::AnalyzeManyEvents(Int_t Nevents, Int_t module)
{
+ // analyzes Nevents events in a single PHOS module
if ( fRootFile == 0 )
cout << "AnalyzeManyEvents > " << "Root File not openned" << endl ;
{
if ( recparticle->GetPHOSTrackSegment()->GetPHOSMod() == module )
{
- cout << "Particle type is " << recparticle->GetType() << endl ;
+ cout << "Particle type is " << recparticle->GetType() << endl ;
+ Int_t numberofprimaries = 0 ;
+ Int_t * listofprimaries = recparticle->GetPrimaries(numberofprimaries) ;
+ cout << "Number of primaries = " << numberofprimaries << endl ;
+ Int_t index ;
+ for ( index = 0 ; index < numberofprimaries ; index++)
+ cout << " primary # " << index << " = " << listofprimaries[index] << endl ;
switch(recparticle->GetType())
{
case kGAMMA:
//____________________________________________________________________________
void AliPHOSAnalyze::BookingHistograms()
{
+ // Books the histograms where the results of the analysis are stored (to be changed)
+
if (fhEmcDigit )
delete fhEmcDigit ;
if (fhVetoDigit )
//____________________________________________________________________________
Bool_t AliPHOSAnalyze::Init(Int_t evt)
{
+ // Do a few initializations: open the root file
+ // get the AliRun object
+ // defines the clusterizer, tracksegment maker and particle identifier
+ // sets the associated parameters
Bool_t ok = kTRUE ;
fClu = new AliPHOSClusterizerv1() ;
fClu->SetEmcEnergyThreshold(0.030) ;
- fClu->SetEmcClusteringThreshold(0.50) ;
+ fClu->SetEmcClusteringThreshold(1.0) ;
fClu->SetPpsdEnergyThreshold (0.0000002) ;
fClu->SetPpsdClusteringThreshold(0.0000001) ;
fClu->SetLocalMaxCut(0.03) ;
//____________________________________________________________________________
void AliPHOSAnalyze::DisplayKineEvent(Int_t evt)
{
+ // Display particles from the Kine Tree in global Alice (theta, phi) coordinates.
+ // One PHOS module at the time.
+ // The particle type can be selected.
+
if (evt == -999)
evt = fEvt ;
fGeom->ImpactOnEmc(theta, phi, mod, z, x) ;
if ( mod == module ) {
nparticlein++ ;
- histoparticle->Fill(phi*kRADDEG, theta*kRADDEG, particle->Energy() ) ;
+ if (particle->Energy() > fClu->GetEmcClusteringThreshold() )
+ histoparticle->Fill(phi*kRADDEG, theta*kRADDEG, particle->Energy() ) ;
}
}
}
//____________________________________________________________________________
void AliPHOSAnalyze::DisplayRecParticles()
{
+ // Display reconstructed particles in global Alice(theta, phi) coordinates.
+ // One PHOS module at the time.
+ // Click on symbols indicate the reconstructed particle type.
+
if (fEvt == -999) {
cout << "DisplayRecParticles > Analyze an event first ... (y/n) " ;
Text_t answer[1] ;
Double_t kRADDEG = 180. / TMath::Pi() ;
while ( (rp = (AliPHOSRecParticle *)nextRecPart() ) ) {
AliPHOSTrackSegment * ts = rp->GetPHOSTrackSegment() ;
- if ( ts->GetPHOSMod() == module ) {
+ if ( ts->GetPHOSMod() == module ) {
+ Int_t numberofprimaries = 0 ;
+ Int_t * listofprimaries = rp->GetPrimaries(numberofprimaries) ;
+ cout << "Number of primaries = " << numberofprimaries << endl ;
+ Int_t index ;
+ for ( index = 0 ; index < numberofprimaries ; index++)
+ cout << " primary # " << index << " = " << listofprimaries[index] << endl ;
+
nRecParticlesInModule++ ;
Double_t theta = rp->Theta() * kRADDEG ;
Double_t phi = rp->Phi() * kRADDEG ;
//____________________________________________________________________________
void AliPHOSAnalyze::DisplayRecPoints()
{
+ // Display reconstructed points in local PHOS-module (x, z) coordinates.
+ // One PHOS module at the time.
+ // Click on symbols displays the EMC cluster, or PPSD information.
+
if (fEvt == -999) {
cout << "DisplayRecPoints > Analyze an event first ... (y/n) " ;
Text_t answer[1] ;
//____________________________________________________________________________
void AliPHOSAnalyze::DisplayTrackSegments()
{
+ // Display track segments in local PHOS-module (x, z) coordinates.
+ // One PHOS module at the time.
+ // One symbol per PHOS subsystem: EMC, upper PPSD, lower PPSD.
+
if (fEvt == -999) {
cout << "DisplayTrackSegments > Analyze an event first ... (y/n) " ;
Text_t answer[1] ;
//____________________________________________________________________________
Bool_t AliPHOSAnalyze::OpenRootFile(Text_t * name)
{
- fRootFile = new TFile(name) ;
+ // Open the root file named "name"
+
+ fRootFile = new TFile(name, "update") ;
return fRootFile->IsOpen() ;
}
//____________________________________________________________________________
void AliPHOSAnalyze::SavingHistograms()
{
- Text_t outputname[80] ;// = fRootFile->GetName();
+ // Saves the histograms in a root file named "name.analyzed"
+
+ Text_t outputname[80] ;
sprintf(outputname,"%s.analyzed",fRootFile->GetName());
TFile output(outputname,"RECREATE");
output.cd();
/* $Id$ */
-////////////////////////////////////////////////
-// Algorythm class to analyze PHOS events //
-// Yves Schutz SUBATECH //
-// //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm class to analyze PHOSv0 events
+//*-- Author : Yves Schutz (SUBATECH)
// --- ROOT system ---
AliPHOSClusterizer * fClu ; // a clusterizer
Int_t fEvt ; // the evt number being processed
- AliPHOSGeometry * fGeom; // the PHOS Geometry object
+ AliPHOSGeometry * fGeom ; // the PHOS Geometry object
AliPHOSv0 * fPHOS ; // the PHOS object from the root file
AliPHOSPID * fPID ; // a particle identifier
AliPHOSReconstructioner * fRec ; // a reconstructioner
TFile * fRootFile ; // the root file that contains the data
AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ;
- TH1F * fhEmcDigit ; // Histo of digit energies in the Emc
- TH1F * fhVetoDigit ; // Histo of digit energies in the Veto
- TH1F * fhConvertorDigit ; // Histo of digit energies in the Convertor
- TH1F * fhEmcCluster ; // Histo of Cluster energies in Emc
- TH1F * fhVetoCluster ; // Histo of Cluster energies in Veto
- TH1F * fhConvertorCluster; // Histo of Cluster energies in Convertor
- TH2F * fhConvertorEmc ; // 2d Convertor versus Emc energies
- TH1F * fhPhotonEnergy ; // Spectrum of detected photons
- TH1F * fhElectronEnergy ; // Spectrum of detected electrons
- TH1F * fhNeutralHadronEnergy ; // Spectrum of detected neutral hadron
- TH1F * fhNeutralEMEnergy ; // Spectrum of detected neutral EM
- TH1F * fhChargedHadronEnergy ; // Spectrum of detected charged
- TH1F * fhPhotonHadronEnergy ; // Spectrum of detected Photon-Hadron
- TH1F * fhPhotonPositionX ; // X distribution of detected photons
- TH1F * fhElectronPositionX ; // X distribution of detected electrons
- TH1F * fhNeutralHadronPositionX ; // X distribution of detected neutral hadron
- TH1F * fhNeutralEMPositionX ; // X distribution of detected neutral EM
- TH1F * fhChargedHadronPositionX ; // X distribution of detected charged
- TH1F * fhPhotonHadronPositionX ; // X distribution of detected Photon-Hadron
- TH1F * fhPhotonPositionY ; // Y distribution of detected photons
- TH1F * fhElectronPositionY ; // Y distribution of detected electrons
- TH1F * fhNeutralHadronPositionY ; // Y distribution of detected neutral hadron
- TH1F * fhNeutralEMPositionY ; // Y distribution of detected neutral EM
- TH1F * fhChargedHadronPositionY ; // Y distribution of detected charged
- TH1F * fhPhotonHadronPositionY ; // Y distribution of detected Photon-Hadron
+ TH1F * fhEmcDigit ; // Histo of digit energies in the Emc
+ TH1F * fhVetoDigit ; // Histo of digit energies in the Veto
+ TH1F * fhConvertorDigit ; // Histo of digit energies in the Convertor
+ TH1F * fhEmcCluster ; // Histo of Cluster energies in Emc
+ TH1F * fhVetoCluster ; // Histo of Cluster energies in Veto
+ TH1F * fhConvertorCluster ; // Histo of Cluster energies in Convertor
+ TH2F * fhConvertorEmc ; // 2d Convertor versus Emc energies
+ TH1F * fhPhotonEnergy ; // Spectrum of detected photons
+ TH1F * fhElectronEnergy ; // Spectrum of detected electrons
+ TH1F * fhNeutralHadronEnergy ; // Spectrum of detected neutral hadron
+ TH1F * fhNeutralEMEnergy ; // Spectrum of detected neutral EM
+ TH1F * fhChargedHadronEnergy ; // Spectrum of detected charged
+ TH1F * fhPhotonHadronEnergy ; // Spectrum of detected Photon-Hadron
+ TH1F * fhPhotonPositionX ; // X distribution of detected photons
+ TH1F * fhElectronPositionX ; // X distribution of detected electrons
+ TH1F * fhNeutralHadronPositionX ; // X distribution of detected neutral hadron
+ TH1F * fhNeutralEMPositionX ; // X distribution of detected neutral EM
+ TH1F * fhChargedHadronPositionX ; // X distribution of detected charged
+ TH1F * fhPhotonHadronPositionX ; // X distribution of detected Photon-Hadron
+ TH1F * fhPhotonPositionY ; // Y distribution of detected photons
+ TH1F * fhElectronPositionY ; // Y distribution of detected electrons
+ TH1F * fhNeutralHadronPositionY ; // Y distribution of detected neutral hadron
+ TH1F * fhNeutralEMPositionY ; // Y distribution of detected neutral EM
+ TH1F * fhChargedHadronPositionY ; // Y distribution of detected charged
+ TH1F * fhPhotonHadronPositionY ; // Y distribution of detected Photon-Hadron
-ClassDef(AliPHOSAnalyze,1) // PHOS event analyzis , version 1
+ClassDef(AliPHOSAnalyze,1) // PHOSv0 event analyzis algorithm
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz SUBATECH
+// Base class for the clusterization algorithm (pure abstract)
+//
+//*-- Author: Yves Schutz SUBATECH
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
/* $Id$ */
-////////////////////////////////////////////////
-// Algorithme class for the clusterization //
-// interface class //
-// Version SUBATECH //
-// Author Yves Schutz SUBATECH //
-// //
-// pABC //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Base class for the clusterization algorithm (pure abstract)
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
#include "AliPHOSDigit.h"
-typedef TClonesArray RecPointsList ; // a cluster has a variable size (see ROOT FAQ)
-typedef TClonesArray DigitsList ; //for digits saved on disk
+typedef TClonesArray RecPointsList ;
+typedef TClonesArray DigitsList ;
class AliPHOSClusterizer : public TObject {
virtual void SetPpsdClusteringThreshold(Float_t cluth) = 0 ;
virtual void SetPpsdEnergyThreshold(Float_t enth) = 0 ;
- ClassDef(AliPHOSClusterizer,1) // clusterization interface, version 1
+ ClassDef(AliPHOSClusterizer,1) // Clusterization algorithm class (abstract base class)
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz SUBATECH
+// Implementation version 1 of the clusterization algorithm
+//
+//*-- Author: Yves Schutz (SUBATECH)
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSClusterizerv1::AliPHOSClusterizerv1()
{
+ // default ctor (to be used)
+
fA = 0.;
fB = 0.01 ;
fNumberOfEmcClusters = 0 ;
//____________________________________________________________________________
Int_t AliPHOSClusterizerv1::AreNeighbours(AliPHOSDigit * d1, AliPHOSDigit * d2)
{
- // neigbours are defined as digits having at least common vertex
- // The order of A and B in AreNeighbours(A,B) is important: first (A) should be digit
- // in cluster, which compared with digits not clusterized yet
+ // Gives the neighbourness of two digits = 0 are not neighbour but continue searching
+ // = 1 are neighbour
+ // = 2 are not neighbour but do not continue searching
+ // neighbours are defined as digits having at least common vertex
+ // The order of d1 and d2 is important: first (d1) should be a digit already in a cluster
+ // which is compared to a digit (d2) not yet in a cluster
+
Int_t rv = 0 ;
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
//____________________________________________________________________________
void AliPHOSClusterizerv1::FillandSort(const DigitsList * dl, TObjArray * tl)
{
- // copies the digits with energy above thershold and sorts the list
+ // Copies the digits with energy above thershold and sorts the list
// according to increasing Id number
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
//____________________________________________________________________________
void AliPHOSClusterizerv1:: GetNumberOfClustersFound(Int_t * numb)
{
- numb[0] = fNumberOfEmcClusters ;
- numb[1] = fNumberOfPpsdClusters ;
+ // Fills numb with the number of EMC (numb[0]) clusters found
+ // PPSD (numb[1]) clusters found
+
+ numb[0] = fNumberOfEmcClusters ;
+ numb[1] = fNumberOfPpsdClusters ;
}
//____________________________________________________________________________
Bool_t AliPHOSClusterizerv1::IsInEmc(AliPHOSDigit * digit)
{
+ // Tells if (true) or not (false) the digit is in a PHOS-EMC module
+
Bool_t rv = kFALSE ;
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
//____________________________________________________________________________
void AliPHOSClusterizerv1::MakeClusters(const DigitsList * dl, RecPointsList * emcl, RecPointsList * ppsdl)
{
-
+ // Steering method to construct the clusters stored in a list of Reconstructed Points
+ // A cluster is defined as a list of neighbour digits
// Fill and sort the working digits list
TObjArray tempodigitslist( dl->GetEntries() ) ;
//____________________________________________________________________________
void AliPHOSClusterizerv1::PrintParameters()
{
+ // Print the energy thresholds
+
cout << "PHOS Clusterizer version 1 :" << endl
<< " EMC Clustering threshold = " << fEmcClusteringThreshold << endl
<< " EMC Energy threshold = " << fEmcEnergyThreshold << endl
/* $Id$ */
-////////////////////////////////////////////////
-// Clusterizer implementation version 1 //
-// algorithme class //
-// //
-// Author Yves Schutz SUBATECH //
-// //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version 1 of the clusterization algorithm
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
private:
- Float_t fA ;
- Float_t fB ;
- Float_t fEmcClusteringThreshold ;
- Float_t fEmcEnergyThreshold ;
- Float_t fLocMaxCut ;
- Int_t fNumberOfEmcClusters ;
- Int_t fNumberOfPpsdClusters ;
- Float_t fPpsdClusteringThreshold ;
- Float_t fPpsdEnergyThreshold ;
- Float_t fW0 ;
+ Float_t fA ; // offset of the energy calibration
+ Float_t fB ; // gain of the energy calibration
+ Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster
+ Float_t fEmcEnergyThreshold ; // minimum energy of EMC digit to be considered
+ Float_t fLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
+ Int_t fNumberOfEmcClusters ; // number of EMC clusters found
+ Int_t fNumberOfPpsdClusters ; // number of PPSD clusters found
+ Float_t fPpsdClusteringThreshold ; // minimum energy to include a PPSD digit in a cluster
+ Float_t fPpsdEnergyThreshold ; // minimum energy of PPSD digit to be considered
+ Float_t fW0 ; // logarithmic weight for the cluster center of gravity calculation
- ClassDef(AliPHOSClusterizerv1,1) // Clusterizer implementation , version 1
+ ClassDef(AliPHOSClusterizerv1,1) // Clusterizer implementation version 1
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Digit class for PHOS that contains an absolute ID and an energy
-//*-- Author : Laurent Aphecetche SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// PHOS digit: Id
+// energy
+// 3 identifiers for the primary particle(s) at the origine of the digit
+// The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
+// It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesQArray,
+// it is not possible to stream such an array... (beyond my understqnding!)
+//
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
+
// --- ROOT system ---
// --- Standard library ---
#include <iostream>
-#include <cassert>
// --- AliRoot header files ---
//____________________________________________________________________________
AliPHOSDigit::AliPHOSDigit()
{
+ // default ctor
+
fNprimary = 0 ;
fPrimary1 = -1 ;
fPrimary2 = -1 ;
//____________________________________________________________________________
AliPHOSDigit::AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy)
{
+ // ctor with all data
+
fId = id ;
fAmp = DigEnergy ;
fPrimary1 = primary ;
//____________________________________________________________________________
AliPHOSDigit::AliPHOSDigit(const AliPHOSDigit & digit)
-{
+{
+ // copy ctor
+
fId = digit.fId;
fAmp = digit.fAmp ;
fNprimary = digit.fNprimary ;
fPrimary3 = digit.fPrimary3 ;
}
-//____________________________________________________________________________
-AliPHOSDigit::~AliPHOSDigit()
-{
-}
-
//____________________________________________________________________________
Int_t AliPHOSDigit::Compare(TObject * obj)
{
+ // Compares two digits with respect to its Id
+ // to sort according increasing Id
+
Int_t rv ;
AliPHOSDigit * digit = (AliPHOSDigit *)obj ;
//____________________________________________________________________________
Int_t AliPHOSDigit::GetPrimary(Int_t index) const
{
+ // Returns the primary particle id index =1,2,3
+
Int_t rv = -1 ;
if ( index > 3 )
cout << "AliPHOSDigit ERROR > only 3 primaries allowed" << endl ;
//____________________________________________________________________________
Bool_t AliPHOSDigit::operator==(AliPHOSDigit const & digit) const
{
+ // Two digits are equal if they have the same Id
+
if ( fId == digit.fId )
return kTRUE ;
else
//____________________________________________________________________________
AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
{
+ // Adds the amplitude of digits and completes the list of primary particles
+
fAmp += digit.fAmp ;
// Here comes something crummy ... but I do not know how to stream pointers
//____________________________________________________________________________
ostream& operator << ( ostream& out , const AliPHOSDigit & digit)
{
- out << "ID " << digit.fId << " Energy = " << digit.fAmp ;
+ // Prints the data of the digit
+
+ out << "ID " << digit.fId << " Energy = " << digit.fAmp << endl
+ << "Primary 1 = " << digit.fPrimary1 << endl
+ << "Primary 2 = " << digit.fPrimary2 << endl
+ << "Primary 3 = " << digit.fPrimary3 << endl ;
return out ;
}
/* $Id$ */
-////////////////////////////////////////////////
-// The digit class: a list of abs Id, energy//
-// Version SUBATECH //
-// Author Laurent Aphecetche SUBATECH //
-// comment: added sortable YS //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// PHOS digit: Id
+// energy
+// 3 identifiers for the primary particle(s) at the origine of the digit
+// The digits are made in FinishEvent() by summing all the hits in a single PHOS crystal or PPSD gas cell
+// It would be nice to replace the 3 identifiers by an array, but, because digits are kept in a TClonesQArray,
+// it is not possible to stream such an array... (beyond my understqnding!)
+//
+//*-- Author: Laurent Aphecetche & Yves Schutz (SUBATECH)
// --- ROOT system ---
AliPHOSDigit() ;
AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy) ;
AliPHOSDigit(const AliPHOSDigit & digit) ;
- virtual ~AliPHOSDigit() ;
+ virtual ~AliPHOSDigit(){}
Bool_t operator==(AliPHOSDigit const &rValue) const;
AliPHOSDigit& operator+(AliPHOSDigit const &rValue) ;
Int_t fPrimary3 ; // third primary (because I do not know how to stream *fPrimary)
Int_t fNprimary ; // Number of primaries
- ClassDef(AliPHOSDigit,1) // Digit in PHOS, version 1
+ ClassDef(AliPHOSDigit,1) // Digit in PHOS
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Rec Point in the PHOS EM calorimeter
-//*-- Author : Dmitri Peressounko RRC KI
-//////////////////////////////////////////////////////////////////////////////
+// RecPoint implementation for PHOS-EMC
+// An EmcRecPoint is a cluster of digits
+//
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
+
// --- ROOT system ---
#include "TPad.h"
fLocPos.SetX(1000000.) ; //Local position should be evaluated
}
-//____________________________________________________________________________
-AliPHOSEmcRecPoint::~AliPHOSEmcRecPoint()
-{
- // dtor
-}
-
//____________________________________________________________________________
void AliPHOSEmcRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
{
- // adds a digit to the digits list
- // and accumulates the total amplitude and the multiplicity
+ // Adds a digit to the RecPoint
+ // and accumulates the total amplitude and the multiplicity
if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
fMaxDigit*=2 ;
//____________________________________________________________________________
Bool_t AliPHOSEmcRecPoint::AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 )
{
+ // Tells if (true) or not (false) two digits are neighbors)
Bool_t aren = kFALSE ;
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::Compare(TObject * obj)
{
+ // Compares two RecPoints according to their position in the PHOS modules
+
Int_t rv ;
AliPHOSEmcRecPoint * clu = (AliPHOSEmcRecPoint *)obj ;
//______________________________________________________________________________
void AliPHOSEmcRecPoint::ExecuteEvent(Int_t event, Int_t px, Int_t py)
{
- //Execute action corresponding to one event
+ // Execute action corresponding to one event
// This member function is called when a AliPHOSRecPoint is clicked with the locator
//
// If Left button is clicked on AliPHOSRecPoint, the digits are switched on
//____________________________________________________________________________
Float_t AliPHOSEmcRecPoint::GetDispersion()
{
+ // Calculates the dispersion of the shower at the origine of the RecPoint
+
Float_t d = 0 ;
Float_t wtot = 0 ;
GetLocalPosition(locpos);
Float_t x = locpos.X() ;
Float_t z = locpos.Z() ;
- // Int_t i = GetPHOSMod() ;
AliPHOSDigit * digit ;
AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
//____________________________________________________________________________
void AliPHOSEmcRecPoint::GetElipsAxis(Float_t * lambda)
{
+ // Calculates the axis of the shower ellipsoid
+
Float_t wtot = 0. ;
Float_t x = 0.;
Float_t z = 0.;
lambda[1] = TMath::Sqrt( 0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz ) ) ;
}
+//____________________________________________________________________________
+void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
+{
+ // Calculates the center of gravity in the local PHOS-module coordinates
+
+ if( fLocPos.X() < 1000000.) { // already evaluated
+ LPos = fLocPos ;
+ return ;
+ }
+
+ Float_t wtot = 0. ;
+
+ Int_t relid[4] ;
+
+ Float_t x = 0. ;
+ Float_t z = 0. ;
+
+ AliPHOSDigit * digit ;
+
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+
+ Int_t iDigit;
+
+
+ for(iDigit=0; iDigit<fMulDigit; iDigit++) {
+ digit = (AliPHOSDigit *) fDigitsList[iDigit];
+
+ Float_t xi ;
+ Float_t zi ;
+ phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
+ phosgeom->RelPosInModule(relid, xi, zi);
+ Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
+ x += xi * w ;
+ z += zi * w ;
+ wtot += w ;
+
+ }
+
+ x /= wtot ;
+ z /= wtot ;
+ fLocPos.SetX(x) ;
+ fLocPos.SetY(0.) ;
+ fLocPos.SetZ(z) ;
+
+ LPos = fLocPos ;
+}
+
//____________________________________________________________________________
Float_t AliPHOSEmcRecPoint::GetMaximalEnergy(void)
{
+ // Finds the maximum energy in the cluster
+
Float_t menergy = 0. ;
Int_t iDigit;
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::GetMultiplicityAtLevel(Float_t H)
{
+ // Calculates the multiplicity of digits with energy larger than H*energy
+
Int_t multipl = 0 ;
Int_t iDigit ;
for(iDigit=0; iDigit<fMulDigit; iDigit++) {
//____________________________________________________________________________
Int_t AliPHOSEmcRecPoint::GetNumberOfLocalMax(Int_t * maxAt, Float_t * maxAtEnergy)
{
+ // Calculates the number of local maxima in the cluster using fLocalMaxCut as the minimum
+ // energy difference between two local maxima
+
AliPHOSDigit * digit ;
AliPHOSDigit * digitN ;
return iDigitN ;
}
-//____________________________________________________________________________
-void AliPHOSEmcRecPoint::GetLocalPosition(TVector3 &LPos)
-{
- if( fLocPos.X() < 1000000.) { // already evaluated
- LPos = fLocPos ;
- return ;
- }
-
- Float_t wtot = 0. ;
-
- Int_t relid[4] ;
-
- Float_t x = 0. ;
- Float_t z = 0. ;
-
- AliPHOSDigit * digit ;
-
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
-
- Int_t iDigit;
-
-
- for(iDigit=0; iDigit<fMulDigit; iDigit++) {
- digit = (AliPHOSDigit *) fDigitsList[iDigit];
-
- Float_t xi ;
- Float_t zi ;
- phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
- phosgeom->RelPosInModule(relid, xi, zi);
- Float_t w = TMath::Max( 0., fW0 + TMath::Log( fEnergyList[iDigit] / fAmp ) ) ;
- x += xi * w ;
- z += zi * w ;
- wtot += w ;
-
- }
-
- x /= wtot ;
- z /= wtot ;
- fLocPos.SetX(x) ;
- fLocPos.SetY(0.) ;
- fLocPos.SetZ(z) ;
-
- LPos = fLocPos ;
-}
// //____________________________________________________________________________
// AliPHOSEmcRecPoint& AliPHOSEmcRecPoint::operator = (AliPHOSEmcRecPoint Clu)
//____________________________________________________________________________
void AliPHOSEmcRecPoint::Print(Option_t * option)
{
+ // Print the list of digits belonging to the cluster
+
cout << "AliPHOSEmcRecPoint: " << endl ;
AliPHOSDigit * digit ;
//______________________________________________________________________________
void AliPHOSEmcRecPoint::Streamer(TBuffer &R__b)
{
- // Stream an object of class AliPHOSEmcRecPoint.
-
+ // Stream an object of class AliPHOSEmcRecPoint.
+ // Needed because of the array fEnergyList
+
if (R__b.IsReading()) {
Version_t R__v = R__b.ReadVersion(); if (R__v) { }
AliPHOSRecPoint::Streamer(R__b);
/* $Id$ */
-//////////////////////////////////////////////////
-// Rec Point in the EM calorimeter of PHOS //
-// //
-// Author Dmitri Peressounko RRC KI //
-// comment: contains list of AliPHOSDigit's * //
-// and evaluates a few average values //
-//////////////////////////////////////////////////
+//_________________________________________________________________________
+// RecPoint implementation for PHOS-EMC
+// An EmcRecPoint is a cluster of digits
+//
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
// --- ROOT system ---
AliPHOSEmcRecPoint(){} ;
AliPHOSEmcRecPoint(Float_t W0, Float_t LocMaxCut) ;
- virtual ~AliPHOSEmcRecPoint() ;
+ virtual ~AliPHOSEmcRecPoint(){}
+
void AddDigit(AliDigitNew & digit, Float_t Energy) ; // add a digit to the digits list
Int_t Compare(TObject * obj) ; // method for sorting
Bool_t AreNeighbours(AliPHOSDigit * digit1, AliPHOSDigit * digit2 ) ;
- Float_t fDelta ; // parameter used to sort the clusters
- Float_t fLocMaxCut ; // parameter used for local maximum searc
+ Float_t fDelta ; // parameter used to sort the clusters
+ Float_t fLocMaxCut ; // minimum energy difference to distinguish two maxima
Float_t * fEnergyList ; // energy of digits
Float_t fW0 ; // logarithmic weight factor for center of gravity calculation
- ClassDef(AliPHOSEmcRecPoint,1) // EMC RecPoint, version 1
+ ClassDef(AliPHOSEmcRecPoint,1) // EMC RecPoint (cluster)
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Particle modified by PHOS response to be used by AliPHOSvFast
-//*-- Y. Schutz: SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// A Particle modified by PHOS response and produced by AliPHOSvFast
+// To become a general class of AliRoot ?
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSFastRecParticle::AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp)
{
+ // copy ctor
+
fType = rp.fType ;
fPdgCode = rp.fPdgCode;
fStatusCode = rp.fStatusCode;
//____________________________________________________________________________
AliPHOSFastRecParticle::AliPHOSFastRecParticle(const TParticle & pp)
{
+ // ctor from a TParticle (crummy?!)
+
TParticle & pnoconst = const_cast<TParticle &>(pp) ;
AliPHOSFastRecParticle & p = static_cast<AliPHOSFastRecParticle&>(pnoconst) ;
fParticlePDG = p.fParticlePDG;
}
-//____________________________________________________________________________
- AliPHOSFastRecParticle::~AliPHOSFastRecParticle()
-{
-}
-
//____________________________________________________________________________
Int_t AliPHOSFastRecParticle::DistancetoPrimitive(Int_t px, Int_t py)
{
{
// Execute action corresponding to one event
// This member function is called when a AliPHOSFastRecParticle is clicked with the locator
- //
-
+
if (!gPad->IsEditable())
return ;
}
}
+
+//____________________________________________________________________________
+Int_t * AliPHOSFastRecParticle::GetPrimaries(Int_t & number)
+{
+ // Retrieves the unique primary particle at the origine of the present reconstruced particle
+
+ number = 1 ;
+ Int_t * list = new Int_t[1] ;
+ list[0] = fPrimary ;
+
+ return list ;
+}
+
//____________________________________________________________________________
TString AliPHOSFastRecParticle::Name()
{
+ // Returns the name of the particle type
+
TString name ;
switch (fType) {
case kGAMMA:
//______________________________________________________________________________
void AliPHOSFastRecParticle::Paint(Option_t *)
{
-// Paint this ALiRecParticle in theta,phi coordinate as a TMarker with its current attributes
+ // Paint this ALiRecParticle in theta,phi coordinate as a TMarker with its current attributes
Double_t kRADDEG = 180. / TMath::Pi() ;
- Coord_t x = Phi() * kRADDEG ;
- Coord_t y = Theta() * kRADDEG ;
- Color_t markercolor = 1 ;
- Size_t markersize = 1. ;
- Style_t markerstyle = 5 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1,&x,&y,"") ;
+ Coord_t x = Phi() * kRADDEG ;
+ Coord_t y = Theta() * kRADDEG ;
+ Color_t markercolor = 1 ;
+ Size_t markersize = 1. ;
+ Style_t markerstyle = 5 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1,&x,&y,"") ;
}
//____________________________________________________________________________
void AliPHOSFastRecParticle::Print()
{
+ // Print the typr, energy and momentum
+
cout << "AliPHOSFastRecParticle > " << "type is " << Name() << endl
<< " " << "Energy = " << fE << endl
<< " " << "Px = " << fPx << endl
/* $Id$ */
-////////////////////////////////////////////////
-// A Particle modified by PHOS response //
-// Yves Schutz SUBATECH //
-// To become a general class of AliRoot ? //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// A Particle modified by PHOS response and produced by AliPHOSvFast
+// To become a general class of AliRoot ?
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
// --- AliRoot header files ---
-//#include "AliPHOSRecParticle.h"
-
typedef TClonesArray FastRecParticlesList ;
+
const static Int_t kUNDEFINED = -1;
const static Int_t kGAMMA = 0 ;
const static Int_t kELECTRON = 1 ;
AliPHOSFastRecParticle() {}; // ctor
AliPHOSFastRecParticle(const AliPHOSFastRecParticle & rp) ; // ctor
AliPHOSFastRecParticle(const TParticle & p) ; // ctor
- virtual ~AliPHOSFastRecParticle() ; // dtor
+ virtual ~AliPHOSFastRecParticle(){} // dtor
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) ;
virtual void Draw(Option_t *option) ;
- virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
+ virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
+ virtual Int_t * GetPrimaries(Int_t & number) ;
Int_t GetType() { return fType ; }
TString Name() ;
virtual void Paint(Option_t * option="");
void Print() ;
+ void SetPrimary(Int_t index) { fPrimary = index ; }
void SetType(Int_t type) { fType = type ; }
protected:
- Int_t fType ; // identified particle type
+ Int_t fType ; // particle type obtained by "virtual" reconstruction
+ Int_t fPrimary ; // (unique) primary particle index
- ClassDef(AliPHOSFastRecParticle,1) // Reconstructed Particle, version 1
+ ClassDef(AliPHOSFastRecParticle,1) // Reconstructed Particle produced by the fast simulation
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Geometry class for PHOS version SUBATECH
-//*-- Author : Y. Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Geometry class for PHOS : singleton
+// The EMC modules are parametrized so that any configuration can be easily implemented
+// The title is used to identify the type of CPV used. So far only PPSD implemented
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
// --- Standard library ---
#include <iostream>
-#include <cassert>
// --- AliRoot header files ---
//____________________________________________________________________________
AliPHOSGeometry::~AliPHOSGeometry(void)
{
+ // dtor
+
fRotMatrixArray->Delete() ;
delete fRotMatrixArray ;
}
//____________________________________________________________________________
Bool_t AliPHOSGeometry::AbsToRelNumbering(const Int_t AbsId, Int_t * relid)
{
- // relid[0] = PHOS Module number 1:fNModules
- // relid[1] = 0 if PbW04
- // = PPSD Module number 1:fNumberOfModulesPhi*fNumberOfModulesZ*2 (2->up and bottom level)
- // relid[2] = Row number inside a PHOS or PPSD module
- // relid[3] = Column number inside a PHOS or PPSD module
+ // Converts the absolute numbering into the following array/
+ // relid[0] = PHOS Module number 1:fNModules
+ // relid[1] = 0 if PbW04
+ // = PPSD Module number 1:fNumberOfModulesPhi*fNumberOfModulesZ*2 (2->up and bottom level)
+ // relid[2] = Row number inside a PHOS or PPSD module
+ // relid[3] = Column number inside a PHOS or PPSD module
Bool_t rv = kTRUE ;
Float_t id = AbsId ;
//____________________________________________________________________________
void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrix & gmat)
{
-
+ // Calculates the ALICE global coordinates of a RecPoint and the error matrix
+
AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;
TVector3 localposition ;
//____________________________________________________________________________
void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos)
{
+ // Calculates the ALICE global coordinates of a RecPoint
+
AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;
TVector3 localposition ;
tmpPHOS->GetLocalPosition(gpos) ;
//____________________________________________________________________________
void AliPHOSGeometry::Init(void)
{
+ // Initializes the PHOS parameters
+
fRotMatrixArray = new TObjArray(fNModules) ;
cout << "PHOS geometry setup: parameters for option " << fName << " " << fTitle << endl ;
//____________________________________________________________________________
void AliPHOSGeometry::InitPHOS(void)
{
- // PHOS
+ // Initializes the EMC parameters
fNPhi = 64 ;
fNZ = 64 ;
//____________________________________________________________________________
void AliPHOSGeometry::InitPPSD(void)
{
- // PPSD
+ // Initializes the PPSD parameters
fAnodeThickness = 0.0009 ;
fAvalancheGap = 0.01 ;
//____________________________________________________________________________
AliPHOSGeometry * AliPHOSGeometry::GetInstance()
{
+ // Returns the pointer of the unique instance
+
return (AliPHOSGeometry *) fGeom ;
}
//____________________________________________________________________________
AliPHOSGeometry * AliPHOSGeometry::GetInstance(const Text_t* name, const Text_t* title)
{
+ // Returns the pointer of the unique instance
+
AliPHOSGeometry * rv = 0 ;
if ( fGeom == 0 ) {
fGeom = new AliPHOSGeometry(name, title) ;
//____________________________________________________________________________
Bool_t AliPHOSGeometry::RelToAbsNumbering(const Int_t * relid, Int_t & AbsId)
{
-
- // AbsId = 1:fNModules * fNPhi * fNZ -> PbWO4
- // AbsId = 1:fNModules * 2 * (fNumberOfModulesPhi * fNumberOfModulesZ) * fNumberOfPadsPhi * fNumberOfPadsZ -> PPSD
+ // Converts the relative numbering into the absolute numbering
+ // AbsId = 1:fNModules * fNPhi * fNZ -> PbWO4
+ // AbsId = 1:fNModules * 2 * (fNumberOfModulesPhi * fNumberOfModulesZ) * fNumberOfPadsPhi * fNumberOfPadsZ -> PPSD
Bool_t rv = kTRUE ;
void AliPHOSGeometry::RelPosInAlice(const Int_t id, TVector3 & pos )
{
+ // Converts the absolute numbering into the global ALICE coordinates
+
if (id > 0) {
Int_t relid[4] ;
//____________________________________________________________________________
void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & z)
{
+ // Converts the relative numbering into the local PHOS-module (x, z) coordinates
+
Int_t ppsdmodule ;
Int_t row = relid[2] ; //offset along z axiz
Int_t column = relid[3] ; //offset along x axiz
//____________________________________________________________________________
void AliPHOSGeometry::SetPHOSAngles()
{
+ // Calculates the position in ALICE of the PHOS modules
+
Double_t const kRADDEG = 180.0 / kPI ;
Float_t pphi = TMath::ATan( fOuterBoxSize[0] / ( 2.0 * fIPtoOuterCoverDistance ) ) ;
pphi *= kRADDEG ;
void AliPHOSGeometry::SetLeadConverterThickness(Float_t e)
{
// should ultimately disappear
+
cout << " AliPHOSGeometry WARNING : You have changed LeadConverterThickness from "
<< fLeadConverterThickness << " to " << e << endl ;
/* $Id$ */
-////////////////////////////////////////////////
-// Geometry class for PHOS : singleton //
-// Version SUBATECH //
-// Author Y. Schutz SUBATECH //
-// geometry parametrized for any //
-// shape of modules //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Geometry class for PHOS : singleton
+// The EMC modules are parametrized so that any configuration can be easily implemented
+// The title is used to identify the type of CPV used. So far only PPSD implemented
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
public:
- AliPHOSGeometry() {} ; // must be kept public for root persistency purposes
+ AliPHOSGeometry() {} ; // must be kept public for root persistency purposes, but should never be called by the outside world
virtual ~AliPHOSGeometry(void) ;
static AliPHOSGeometry * GetInstance(const Text_t* name, const Text_t* title) ;
static AliPHOSGeometry * GetInstance() ;
// General
- Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative
+ Bool_t AbsToRelNumbering(const Int_t AbsId, Int_t * RelId) ; // converts the absolute PHOS numbering to a relative
void EmcModuleCoverage(const Int_t m, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt = kRadian);
- // calculates the angular coverage in theta and phi of a EMC module
+ // calculates the angular coverage in theta and phi of a EMC module
void EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt = kRadian) ;
// calculates the angular coverage in theta and phi of a
// single crystal in a EMC module
Float_t GetGapBetweenCrystals(void) const { return fGapBetweenCrystals ; }
Float_t GetIPtoCrystalSurface(void) const { return fIPtoCrystalSurface ; }
Float_t GetIPtoOuterCoverDistance(void) const { return fIPtoOuterCoverDistance ; }
+ Float_t GetIPtoPpsdUp(void) const { return (fIPtoOuterCoverDistance - fPPSDBoxSize[1] + fPPSDModuleSize[1]/2 ); }
+ Float_t GetIPtoPpsdLow(void) const { return (fIPtoOuterCoverDistance - fPPSDModuleSize[1]/2 ); }
Float_t GetIPtoTopLidDistance(void) const { return fIPtoTopLidDistance ; }
Float_t GetLowerThermoPlateThickness(void) const { return fLowerThermoPlateThickness ; }
Float_t GetLowerTextolitPlateThickness(void) const { return fLowerTextolitPlateThickness ; }
static AliPHOSGeometry * fGeom ; // pointer to the unique instance of the singleton
- ClassDef(AliPHOSGeometry,1) // PHOS geometry class , version subatech
+ ClassDef(AliPHOSGeometry,1) // PHOS geometry class
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Hit classes for PHOS
-//*-- Author : Maxim Volkov, RRC KI
-//////////////////////////////////////////////////////////////////////////////
+// Hits class for PHOS
+// A hit in PHOS is the sum of all hits in a single crystal
+//
+//*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH)
// --- ROOT system ---
#include <cstring>
#include <cstdlib>
#include <strstream>
-#include <cassert>
// --- AliRoot header files ---
#include "AliPHOSHit.h"
//____________________________________________________________________________
AliPHOSHit::AliPHOSHit(Int_t primary, Int_t id, Float_t *hits)
{
-
+ // ctor
+
fId = id ;
fX = hits[0] ;
fY = hits[1] ;
//____________________________________________________________________________
Bool_t AliPHOSHit::operator==(AliPHOSHit const &rValue) const
{
+ // Two hits are identical if they have the same Id and originate from the same primary
+
Bool_t rv = kFALSE ;
if ( fId == rValue.GetId() && fPrimary == rValue.GetPrimary() )
//____________________________________________________________________________
AliPHOSHit AliPHOSHit::operator+(const AliPHOSHit &rValue) const
{
+ // Add the energy of the hit
AliPHOSHit added(*this);
added.fELOS += rValue.GetEnergy() ;
- assert ( added.fPrimary == rValue.fPrimary ) ;
-
return added;
}
//____________________________________________________________________________
ostream& operator << (ostream& out, const AliPHOSHit& hit)
{
+ // Print out Id and energy
+
out << "AliPHOSHit = " << hit.GetId() << " " << hit.GetEnergy() << endl ;
return out ;
}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-////////////////////////////////////////////////
-// Hits class for PHOS //
-// Version SUBATECH //
-// A hit in PHOS is the sum of all hits in a //
-// a single crystal due to one ans only one //
-// primary particle //
-// Author M. Volkov, RRC KI //
-// october 1999: //
-// Modified by Y. Schutz SUBATECH //
-// january 2000: //
-// Modified by Y. Schutz SUBATECH //
-// added fPrimary //
-////////////////////////////////////////////////
-
/* $Id$ */
+//_________________________________________________________________________
+// Hits class for PHOS
+// A hit in PHOS is the sum of all hits in a single crystal
+//
+//*-- Author: Maxime Volkov (RRC KI) & Yves Schutz (SUBATECH)
+
// --- ROOT system ---
// --- AliRoot header files ---
Float_t fELOS ; // Energy deposited
Int_t fPrimary ; // Primary particles at the origine of the hit
- ClassDef(AliPHOSHit,1) // Hits object for PHOS
+ ClassDef(AliPHOSHit,1) // Hit for PHOS
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Auxiliary class, used ONLY by AliPHOSTrackSegmentMaker
-//*-- Author : Dmitri Peressounko SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Algorithm class used only by AliPHOSTrackSegmentMaker
+//
+//*-- Author: Dmitri Peressounko (SUBATECH)
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSLink::AliPHOSLink(Float_t r, Int_t Emc, Int_t Ppsd)
{
+ // ctor
+
fR = r ;
fEmcN = Emc ;
fPpsdN = Ppsd ;
//____________________________________________________________________________
Int_t AliPHOSLink::Compare(TObject * obj)
{
+ // Compare according to the distance between EMC and PPSD RecPoints in a track segment
+
Int_t rv ;
AliPHOSLink * link = (AliPHOSLink *) obj ;
/* $Id$ */
-////////////////////////////////////////////////
-// Short description //
-// Version SUBATECH //
-// Author Dmitri Peressounko SUBATECH //
-// comment: auxiliary class used ONLY //
-// by AliPHOSTrackSegmentMaker //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm class used only by AliPHOSTrackSegmentMaker
+//
+//*-- Author: Dmitri Peressounko (SUBATECH)
// --- ROOT system ---
Int_t fEmcN ; // Emc index
Int_t fPpsdN ; // Ppsd index
- Float_t fR ; // Distance
+ Float_t fR ; // Distance between EMC and PPSD RecPoints in a track segment
- ClassDef(AliPHOSLink,1) // description , version 1
+ ClassDef(AliPHOSLink,1) // Auxilliary algorithm class used by AliPHOSTrackSegmentMaker
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// To identify the type of particle detected in PHOS with or without the help
-// from other detectors
-//*-- Author : Yves Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Algorithm class for the identification of particles detected in PHOS
+// base class
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
// --- ROOT system ---
/* $Id$ */
-////////////////////////////////////////////////
-// Algorithme class for the identification of//
-// particles detected in PHOS //
-// base class //
-// Version SUBATECH //
-// Author Yves Schutz SUBATECH //
-// //
-// pABC //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm class for the identification of particles detected in PHOS
+// base class
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
virtual void SetShowerProfileCuts(Float_t, Float_t, Float_t, Float_t) {} ;
virtual void SetDispersionCutOff(Float_t ) {}
- ClassDef(AliPHOSPID,1) // Particle Identifier interface, version 1
+ ClassDef(AliPHOSPID,1) // Particle Identifier algorithm (base class)
} ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Algorithm class to identify the type of particle from the PHOS TrackSegment alone
-//*-- Author : Y. Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v1 of the PHOS particle identifier
+// Identification is based on information from PPSD and EMC
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
// --- ROOT system ---
ClassImp( AliPHOSPIDv1)
-
-//____________________________________________________________________________
- AliPHOSPIDv1::AliPHOSPIDv1(): fCutOnDispersion(1.5)
-
-{
- // ctor
-
-}
-
-//____________________________________________________________________________
- AliPHOSPIDv1::~AliPHOSPIDv1()
-{
- // dtor
-}
-
-
//____________________________________________________________________________
void AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl)
{
- // main function, does the job
+ // Makes a RecParticle out of a TrackSegment
TIter next(trsl) ;
AliPHOSTrackSegment * tracksegment ;
//____________________________________________________________________________
void AliPHOSPIDv1:: Print()
{
+ // Print the parameters used for the particle type identification
+
cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl
<< fLambda1m << " < value1 < " << fLambda1M << endl
<< fLambda2m << " < value2 < " << fLambda2M << endl ;
//____________________________________________________________________________
void AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M)
{
+ // Modifies the parameters used for the particle type identification
+
fLambda1m = l1m ;
fLambda1M = l1M ;
fLambda2m = l2m ;
/* $Id$ */
-///////////////////////////////////////////////////
-// Particle Identifier class for PHOS //
-// Version SUBATECH //
-// Author Yves Schutz //
-// comment: identify the type of particle //
-// PHOS SubTrack alone //
-///////////////////////////////////////////////////
+
+//_________________________________________________________________________
+// Implementation version v1 of the PHOS particle identifier
+// Identification is based on information from PPSD and EMC
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
public:
- AliPHOSPIDv1() ;
- virtual ~ AliPHOSPIDv1() ; // dtor
+ AliPHOSPIDv1(): fCutOnDispersion(1.5){}
+ virtual ~ AliPHOSPIDv1(){} ; // dtor
virtual void MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
void Print() ;
private:
// cuts on the shower profile
- Float_t fLambda1m ; // minimum value for first elips axis
- Float_t fLambda1M ; // maximum value for first elips axis
- Float_t fLambda2m ; // minimum value for second elips axis
- Float_t fLambda2M ; // maximum value for second elips axis
-
+ Float_t fLambda1m ; // minimum value for first elips axis
+ Float_t fLambda1M ; // maximum value for first elips axis
+ Float_t fLambda2m ; // minimum value for second elips axis
+ Float_t fLambda2M ; // maximum value for second elips axis
Float_t fCutOnDispersion ; // cut on the shower dispersion to distinguish hadronic from EM showers
- ClassDef( AliPHOSPIDv1,1) // particle identifier implementation , version 1
+ ClassDef( AliPHOSPIDv1,1) // Particle identifier implementation version 1
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// RecPoint in the PHOS PPSD: a list of AliPHOSDigit's
-//*-- Author : Yves Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// A RecPoint (cluster) in the PPSD
+// A PPSD RecPoint ends up to be a single digit
+//
+//*-- Yves Schutz (SUBATECH)
// --- ROOT system ---
+
#include "TPad.h"
+
// --- Standard library ---
#include <iostream>
-#include <cassert>
// --- AliRoot header files ---
//____________________________________________________________________________
AliPHOSPpsdRecPoint::AliPHOSPpsdRecPoint(void)
{
+ // ctor
+
fMulDigit = 0 ;
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
fDelta = geom->GetCrystalSize(0) ;
fLocPos.SetX(1000000.) ; //Local position should be evaluated
}
-//____________________________________________________________________________
-AliPHOSPpsdRecPoint::~AliPHOSPpsdRecPoint(void) // dtor
-{
- //dtor
-}
-
//____________________________________________________________________________
void AliPHOSPpsdRecPoint::AddDigit(AliDigitNew & digit, Float_t Energy)
{
fAmp += Energy ;
}
-
-
-
//____________________________________________________________________________
Int_t AliPHOSPpsdRecPoint::Compare(TObject * obj)
{
+ // Compares according to the position
+
Int_t rv ;
AliPHOSPpsdRecPoint * clu = (AliPHOSPpsdRecPoint *)obj ;
}
//____________________________________________________________________________
-void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos){
-
+void AliPHOSPpsdRecPoint::GetLocalPosition(TVector3 &LPos)
+{
+ // Calculates the local position in the PHOS-PPSD-module corrdinates
+
if( fLocPos.X() < 1000000.) { //allready evaluated
LPos = fLocPos ;
return ;
//______________________________________________________________________________
void AliPHOSPpsdRecPoint::Paint(Option_t *)
{
-//*-*-*-*-*-*-*-*-*-*-*Paint this ALiRecPoint as a TMarker with its current attributes*-*-*-*-*-*-*
-//*-* =============================================
- TVector3 pos(0.,0.,0.) ;
- GetLocalPosition(pos) ;
- Coord_t x = pos.X() ;
- Coord_t y = pos.Z() ;
- Color_t markercolor = 1 ;
- Size_t markersize = 1. ;
- Style_t markerstyle = 2 ;
- if (GetUp())
- markerstyle = 3 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor);
- gVirtualX->SetMarkerSize (markersize);
- gVirtualX->SetMarkerStyle(markerstyle);
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize);
- gPad->PaintPolyMarker(1,&x,&y,"");
-
-
+ //*-*-*-*-*-*-*-*-*-*-*Paint this ALiRecPoint as a TMarker with its current attributes*-*-*-*-*-*-*
+ //*-* =============================================
+
+ TVector3 pos(0.,0.,0.) ;
+ GetLocalPosition(pos) ;
+ Coord_t x = pos.X() ;
+ Coord_t y = pos.Z() ;
+ Color_t markercolor = 1 ;
+ Size_t markersize = 1. ;
+ Style_t markerstyle = 2 ;
+ if (GetUp())
+ markerstyle = 3 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor);
+ gVirtualX->SetMarkerSize (markersize);
+ gVirtualX->SetMarkerStyle(markerstyle);
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize);
+ gPad->PaintPolyMarker(1,&x,&y,"");
+
+
}
//____________________________________________________________________________
void AliPHOSPpsdRecPoint::Print(Option_t * option)
{
+ // Print the digits information
+
cout << "AliPHOSPpsdRecPoint: " << endl ;
AliPHOSDigit * digit ;
}
-// //____________________________________________________________________________
-// AliPHOSPpsdRecPoint& AliPHOSPpsdRecPoint::operator = (AliPHOSPpsdRecPoint Clu)
-// {
-// int* DL = Clu.GetDigitsList() ;
-
-// if(fDigitsList)
-// delete fDigitsList ;
-
-// AliPHOSDigit * digit ;
-
-// Int_t iDigit;
-
-// for(iDigit=0; iDigit<fMulDigit; iDigit++) {
-// digit = (AliPHOSDigit *) DL[iDigit];
-// AddDigit(*digit) ;
-// }
-
-// fDelta = Clu.GetDelta() ;
-// delete DL ;
-
-// fAmp = Clu.GetEnergy() ;
-// fGeom = Clu.GetGeom() ;
-// TVector3 LocPos;
-// Clu.GetLocalPosition(LocPos) ;
-// fLocPos = LocPos;
-// fMulDigit = Clu.GetMultiplicity() ;
-// fMaxDigit = Clu.GetMaximumMultiplicity() ;
-// fPHOSMod = Clu.GetPHOSMod() ;
-
-
-// return *this ;
-// }
/* $Id$ */
-////////////////////////////////////////////////
-// Cluster in the PPSD of PHOS //
-// Version SUBATECH //
-// Author Yves Schutz SUBATECH //
-// comment: its a list of AliPHOSDigit's //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// A RecPoint (cluster) in the PPSD
+// A PPSD RecPoint ends up to be a single digit
+//
+//*-- Yves Schutz (SUBATECH)
// --- ROOT system ---
public:
- AliPHOSPpsdRecPoint() ; // ctor
- virtual ~AliPHOSPpsdRecPoint() ; // dtor
- void AddDigit(AliDigitNew & digit, Float_t Energy) ;
+ AliPHOSPpsdRecPoint() ; // ctor
+ virtual ~AliPHOSPpsdRecPoint(){} // dtor
+
+ void AddDigit(AliDigitNew & digit, Float_t Energy) ;
Int_t Compare(TObject * obj) ; // method to sort clusters
Float_t GetDelta(void) {return fDelta ;}
Int_t GetMultiplicity(void) const { return fMulDigit ; }
Int_t GetMaximumMultiplicity() { return fMaxDigit ; }
void GetLocalPosition(TVector3 &LPos) ; // computes the position in the module of the cluster center
- Float_t GetTotalEnergy(void) const { return fAmp ; } // in Ppsd EMC RecPoint Amp = Energy //projection of ALICE axes on PHOS Module, y = 0 .
+ Float_t GetTotalEnergy(void) const { return fAmp ; } // in Ppsd EMC RecPoint Amp = Energy
Bool_t GetUp() ; // true if cluster is in upper ppsd
Bool_t IsEmc(void) {return kFALSE ; }
Bool_t IsSortable() const { return kTRUE ; }
virtual void Paint(Option_t * option="");
void Print(Option_t * opt = "void") ;
- // AliPHOSPpsdRecPoint& operator = (AliPHOSPpsdRecPoint Clu) ;
-
private:
Float_t fDelta ; // parameter used for sorting
- ClassDef(AliPHOSPpsdRecPoint,1) // PPSD RecPoint, version 1
+ ClassDef(AliPHOSPpsdRecPoint,1) // PPSD RecPoint
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Reconstructed Particle
-//*-- Y. Schutz: SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// A Reconstructed Particle in PHOS
+// To become a general class of AliRoot ?
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSRecParticle::AliPHOSRecParticle(const AliPHOSRecParticle & rp)
{
+ // copy ctor
+
fPHOSTrackSegment = new AliPHOSTrackSegment( *( rp.GetPHOSTrackSegment()) ) ;
fType = rp.fType ;
+
fPdgCode = rp.fPdgCode;
fStatusCode = rp.fStatusCode;
fMother[0] = rp.fMother[0];
//____________________________________________________________________________
AliPHOSRecParticle::~AliPHOSRecParticle()
{
+ // dtor
+
if(!fPHOSTrackSegment) {
delete fPHOSTrackSegment ;
fPHOSTrackSegment = 0 ;
}
}
+
+//____________________________________________________________________________
+Int_t * AliPHOSRecParticle::GetPrimaries(Int_t & number)
+{
+ // Retrieves all the primary particles at the origine of this reconstructed particle
+
+ Int_t emcnumber = 0 ;
+ Int_t * emclist = fPHOSTrackSegment->GetPrimariesEmc(emcnumber) ;
+
+ Int_t ppsdlnumber = 0 ;
+ Int_t * ppsdllist = fPHOSTrackSegment->GetPrimariesPpsdLow(ppsdlnumber) ;
+
+ Int_t ppsdunumber = 0 ;
+ Int_t * ppsdulist = fPHOSTrackSegment->GetPrimariesPpsdUp(ppsdunumber) ;
+
+ number = emcnumber + ppsdlnumber + ppsdunumber ;
+ Int_t * list = new Int_t[number] ;
+
+ Int_t index ;
+ for ( index = 0 ; index < emcnumber ; index++)
+ list[index] = emclist[index] ;
+
+ Int_t jndex ;
+ for ( jndex = 0 ; jndex < ppsdlnumber ; jndex++) {
+ assert(index < number) ;
+ list[index] = ppsdllist[jndex] ;
+ index++ ;
+ }
+
+ for ( jndex = 0 ; jndex < ppsdunumber ; jndex++) {
+ assert(index < number) ;
+ list[index] = ppsdulist[jndex] ;
+ index++ ;
+ }
+
+ cout << "passed 6 " << endl;
+
+ delete emclist ;
+ delete ppsdllist ;
+ delete ppsdulist ;
+
+ return list ;
+}
/* $Id$ */
-////////////////////////////////////////////////
-// A Reconstructed Particle in PHOS //
-// Yves Schutz SUBATECH //
-// To become a general class of AliRoot ? //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// A Reconstructed Particle in PHOS
+// To become a general class of AliRoot ?
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
virtual ~AliPHOSRecParticle() ; // dtor
AliPHOSTrackSegment * GetPHOSTrackSegment() const { return fPHOSTrackSegment ; }
+ virtual Int_t * GetPrimaries(Int_t & number) ;
private:
AliPHOSTrackSegment * fPHOSTrackSegment ; // pointer to the associated track segment in PHOS
- ClassDef(AliPHOSRecParticle,1) // Reconstructed Particle, version 1
-
+ ClassDef(AliPHOSRecParticle,1) // Reconstructed Particle
};
#endif // AliPHOSRECPARTICLE_H
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// PHOSRecPoint base class deriving from AliRecPoint
-//*-- Author : Gines MARTINEZ SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Base Class for PHOS Reconstructed Points
+//
+//*-- Author: Gines Martinez (SUBATECH)
// --- ROOT system ---
#include "TPad.h"
AliPHOSRecPoint::AliPHOSRecPoint()
: AliRecPoint()
{
+ // ctor
+
fGeom = AliPHOSGeometry::GetInstance() ;
fPHOSMod = 0;
}
-//____________________________________________________________________________
-AliPHOSRecPoint::~AliPHOSRecPoint()
-{
- // dtor
-}
-
//____________________________________________________________________________
Int_t AliPHOSRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
{
- //Compute distance from point px,py to a AliPHOSRecPoint considered as a Tmarker
- // Compute the closest distance of approach from point px,py to this marker.
- // The distance is computed in pixels units.
- //
-
- TVector3 pos(0.,0.,0.) ;
- GetLocalPosition( pos) ;
- Float_t x = pos.X() ;
- Float_t y = pos.Z() ;
- const Int_t kMaxDiff = 10;
- Int_t pxm = gPad->XtoAbsPixel(x);
- Int_t pym = gPad->YtoAbsPixel(y);
- Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
-
- if (dist > kMaxDiff) return 9999;
- return dist;
+ // Compute distance from point px,py to a AliPHOSRecPoint considered as a Tmarker
+ // Compute the closest distance of approach from point px,py to this marker.
+ // The distance is computed in pixels units.
+
+ TVector3 pos(0.,0.,0.) ;
+ GetLocalPosition( pos) ;
+ Float_t x = pos.X() ;
+ Float_t y = pos.Z() ;
+ const Int_t kMaxDiff = 10;
+ Int_t pxm = gPad->XtoAbsPixel(x);
+ Int_t pym = gPad->YtoAbsPixel(y);
+ Int_t dist = (px-pxm)*(px-pxm) + (py-pym)*(py-pym);
+
+ if (dist > kMaxDiff) return 9999;
+ return dist;
}
//___________________________________________________________________________
//
// If Left button is clicked on AliPHOSRecPoint, the digits are switched on
// and switched off when the mouse button is released.
- //
// static Int_t pxold, pyold;
- static TGraph * digitgraph = 0 ;
- static TPaveText* clustertext = 0 ;
-
- if (!gPad->IsEditable()) return;
-
- switch (event) {
-
-
- case kButton1Down:{
- AliPHOSDigit * digit ;
- AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
- Int_t iDigit;
- Int_t relid[4] ;
- Float_t xi[fMulDigit] ;
- Float_t zi[fMulDigit] ;
-
- for(iDigit=0; iDigit<fMulDigit; iDigit++) {
- digit = (AliPHOSDigit *) fDigitsList[iDigit];
- phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
- phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ;
- }
-
- if (!digitgraph) {
- digitgraph = new TGraph(fMulDigit,xi,zi);
- digitgraph-> SetMarkerStyle(5) ;
- digitgraph-> SetMarkerSize(1.) ;
- digitgraph-> SetMarkerColor(1) ;
- digitgraph-> Draw("P") ;
- }
- if (!clustertext) {
+ static TGraph * digitgraph = 0 ;
+ static TPaveText* clustertext = 0 ;
+
+ if (!gPad->IsEditable()) return;
- TVector3 pos(0.,0.,0.) ;
- GetLocalPosition(pos) ;
- clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
- Text_t line1[40] ;
- Text_t line2[40] ;
- sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
- sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
- clustertext ->AddText(line1) ;
- clustertext ->AddText(line2) ;
- clustertext ->Draw("");
- }
- gPad->Update() ;
- Print() ;
+ switch (event) {
+
+
+ case kButton1Down:{
+ AliPHOSDigit * digit ;
+ AliPHOSGeometry * phosgeom = (AliPHOSGeometry *) fGeom ;
+ Int_t iDigit;
+ Int_t relid[4] ;
+ Float_t xi[fMulDigit] ;
+ Float_t zi[fMulDigit] ;
+
+ for(iDigit=0; iDigit<fMulDigit; iDigit++) {
+ digit = (AliPHOSDigit *) fDigitsList[iDigit];
+ phosgeom->AbsToRelNumbering(digit->GetId(), relid) ;
+ phosgeom->RelPosInModule(relid, xi[iDigit], zi[iDigit]) ;
+ }
+
+ if (!digitgraph) {
+ digitgraph = new TGraph(fMulDigit,xi,zi);
+ digitgraph-> SetMarkerStyle(5) ;
+ digitgraph-> SetMarkerSize(1.) ;
+ digitgraph-> SetMarkerColor(1) ;
+ digitgraph-> Draw("P") ;
+ }
+ if (!clustertext) {
+
+ TVector3 pos(0.,0.,0.) ;
+ GetLocalPosition(pos) ;
+ clustertext = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+50,pos.Z()+35,"") ;
+ Text_t line1[40] ;
+ Text_t line2[40] ;
+ sprintf(line1,"Energy=%1.2f GeV",GetEnergy()) ;
+ sprintf(line2,"%d Digits",GetDigitsMultiplicity()) ;
+ clustertext ->AddText(line1) ;
+ clustertext ->AddText(line2) ;
+ clustertext ->Draw("");
+ }
+ gPad->Update() ;
+ Print() ;
+ }
+
+ break;
+
+ case kButton1Up:
+ if (digitgraph) {
+ delete digitgraph ;
+ digitgraph = 0 ;
+ }
+ if (clustertext) {
+ delete clustertext ;
+ clustertext = 0 ;
+ }
+
+ break;
+
}
-
- break;
-
- case kButton1Up:
- if (digitgraph) {
- delete digitgraph ;
- digitgraph = 0 ;
- }
- if (clustertext) {
- delete clustertext ;
- clustertext = 0 ;
- }
-
- break;
-
- }
}
//____________________________________________________________________________
Int_t AliPHOSRecPoint::GetPHOSMod()
-{
+{
+ // Returns the PHOS module in which the RecPoint is found
+
if(fPHOSMod > 0)
return fPHOSMod ;
}
//______________________________________________________________________________
-void AliPHOSRecPoint::GetPrimaries(Int_t & number, Int_t * list)
+Int_t * AliPHOSRecPoint::GetPrimaries(Int_t & number)
{
+ // Constructs the list of primary particles which have contributed to this RecPoint
+
AliPHOSDigit * digit ;
Int_t index ;
- Int_t maxcounter = 3 ;
+ Int_t maxcounter = 10 ;
Int_t counter = 0 ;
Int_t * tempo = new Int_t[maxcounter] ;
break ;
}
} // end of check
- if ( !already) { // store it
- tempo[counter] = newprimary ;
- counter++ ;
+ if ( !already) { // store it
+ tempo[counter] = newprimary ;
+ counter++ ;
} // store it
} // all primaries in digit
delete newprimaryarray ;
} // all digits
number = counter ;
- for ( index = 0 ; index < number ; index ++ )
- list[index] = tempo[index] ;
-
- delete tempo ;
+ return tempo ;
}
//______________________________________________________________________________
void AliPHOSRecPoint::Paint(Option_t *)
{
-// Paint this ALiRecPoint as a TMarker with its current attributes
-
- TVector3 pos(0.,0.,0.) ;
- GetLocalPosition(pos) ;
- Coord_t x = pos.X() ;
- Coord_t y = pos.Z() ;
- Color_t markercolor = 1 ;
- Size_t markersize = 1. ;
- Style_t markerstyle = 5 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1,&x,&y,"") ;
+ // Paint this ALiRecPoint as a TMarker with its current attributes
+
+ TVector3 pos(0.,0.,0.) ;
+ GetLocalPosition(pos) ;
+ Coord_t x = pos.X() ;
+ Coord_t y = pos.Z() ;
+ Color_t markercolor = 1 ;
+ Size_t markersize = 1. ;
+ Style_t markerstyle = 5 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1,&x,&y,"") ;
}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-////////////////////////////////////////////////
-// Base class for Reconstructed Points //
-// in PHOS and PPSD //
-// //
-// Author Gines MARTINEZ SUBATECH //
-// //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Base Class for PHOS Reconstructed Points
+//
+//*-- Author: Gines Martinez (SUBATECH)
// --- ROOT system ---
#include "AliRecPoint.h"
-
class AliPHOSRecPoint : public AliRecPoint {
public:
AliPHOSRecPoint() ; // ctor
- virtual ~AliPHOSRecPoint() ; // dtor
+ virtual ~AliPHOSRecPoint(){} // dtor
virtual void AddDigit(AliDigitNew & digit, Float_t Energy) = 0 ;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual void Draw(Option_t * option="") ;
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) ;
virtual Int_t GetPHOSMod(void) ;
- virtual void GetPrimaries(Int_t & number, Int_t * list) ;
+ virtual Int_t * GetPrimaries(Int_t & number) ;
virtual Bool_t IsEmc(void){return kTRUE ;}
virtual void Paint(Option_t * option="");
virtual void Print(Option_t * opt = "void") {}
protected:
- Int_t fPHOSMod ;
+ Int_t fPHOSMod ; // PHOS Module number in which the RecPoint is found
- ClassDef(AliPHOSRecPoint,1)
+ ClassDef(AliPHOSRecPoint,1) // RecPoint for PHOS (Base Class)
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Gines MARTINEZ SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Algorithm class for the reconstruction: clusterizer
+// track segment maker
+// particle identifier
+//
+//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
+
// --- ROOT system ---
ClassImp(AliPHOSReconstructioner)
-
-//____________________________________________________________________________
-AliPHOSReconstructioner::AliPHOSReconstructioner()
-{
- // ctor
-}
-
//____________________________________________________________________________
AliPHOSReconstructioner::AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer,
AliPHOSTrackSegmentMaker * Tracker,
AliPHOSPID * Pid)
{
+ // ctor
+
fClusterizer = Clusterizer ;
fTrackSegmentMaker = Tracker ;
fPID = Pid ;
}
-//____________________________________________________________________________
-AliPHOSReconstructioner::~AliPHOSReconstructioner()
-{
- // dtor
-}
//____________________________________________________________________________
void AliPHOSReconstructioner::Init(AliPHOSClusterizer * Clusterizer,
fPID = Pid ;
}
-
-
//____________________________________________________________________________
void AliPHOSReconstructioner::Make(TClonesArray * dl, RecPointsList * emccl, RecPointsList * ppsdl,
TrackSegmentsList * trsl, RecParticlesList * rpl)
{
+ // Launches the Reconstruction process in the sequence: Make the reconstructed poins (clusterize)
+ // Make the track segments
+ // Make the reconstructed particles
- cout << "Clusterizing" << endl;
+ cout << "Start making reconstructed points (clusterizing)" << endl;
fClusterizer->MakeClusters(dl, emccl, ppsdl);
- cout << "Segment Track Maker" << endl;
+ cout << "Start making track segments" << endl;
fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
- cout << "Particle Maker" << endl;
+ cout << "Start making reconstructed particles" << endl;
fPID->MakeParticles(trsl, rpl) ;
}
/* $Id$ */
-////////////////////////////////////////////////
-// Algorithme class for the reconstruction //
-// //
-// Author Gines MARTINEZ SUBATECH //
-// //
-// january 2000: //
-// added Particle identifier (YS) //
-// //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm class for the reconstruction: clusterizer
+// track segment maker
+// particle identifier
+//
+//*-- Author: Gines Martinez & Yves Schutz (SUBATECH)
// --- ROOT system ---
public:
- AliPHOSReconstructioner(); //ctor
+ AliPHOSReconstructioner(){} //ctor
AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker,
AliPHOSPID * Identifier); //ctor
- ~AliPHOSReconstructioner(); // dtor
+ ~AliPHOSReconstructioner(){} // dtor
AliPHOSClusterizer * GetClusterizer() { return fClusterizer ; }
void Init(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker,
AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Method for track segments finding
AliPHOSPID * fPID ; // Method for identifying the type of particle
- ClassDef(AliPHOSReconstructioner,1) // Reconstruction interface , version 1
+ ClassDef(AliPHOSReconstructioner,1) // Reconstruction algorithm class (Base Class)
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// class of PHOS Sub Track
-//*-- Author : Dmitri Peressounko RRC KI
-//////////////////////////////////////////////////////////////////////////////
+// Track segment in PHOS
+// Can be : 1 EmcRecPoint
+// 1 EmcRecPoint + 1 PPSD
+// 1 EmcRecPoint + 1 PPSD + 1 PPSD
+//
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , AliPHOSPpsdRecPoint * ppsdRP1,
AliPHOSPpsdRecPoint * ppsdRP2 )
-{
+{
+ // ctor
+
if( emc )
fEmcRecPoint = emc ;
//____________________________________________________________________________
AliPHOSTrackSegment::AliPHOSTrackSegment( const AliPHOSTrackSegment & ts)
{
+ // Copy ctor
+
( (AliPHOSTrackSegment &)ts ).Copy(*this) ;
}
-//____________________________________________________________________________
-AliPHOSTrackSegment::~AliPHOSTrackSegment() // dtor
-{
-// fEmcRecPoint.Delete() ; Not Owners !!!
-// fPpsdUp.Delete() ;
-// fPpsdLow.Delete() ;
-}
//____________________________________________________________________________
void AliPHOSTrackSegment::Copy(TObject & obj)
{
+ // Copy of a track segment into another track segment
+
TObject::Copy(obj) ;
- ( (AliPHOSTrackSegment &)obj ).fEmcRecPoint = fEmcRecPoint ;
- ( (AliPHOSTrackSegment &)obj ).fPpsdLow = fPpsdLow ;
- ( (AliPHOSTrackSegment &)obj ).fPpsdUp = fPpsdUp ;
+ ( (AliPHOSTrackSegment &)obj ).fEmcRecPointId = fEmcRecPointId ;
+ ( (AliPHOSTrackSegment &)obj ).fPpsdLowId = fPpsdLowId ;
+ ( (AliPHOSTrackSegment &)obj ).fPpsdUpId = fPpsdUpId ;
}
//____________________________________________________________________________
Int_t AliPHOSTrackSegment::DistancetoPrimitive(Int_t px, Int_t py)
{
- //Compute distance from point px,py to a AliPHOSTrackSegment considered as a Tmarker
- // Compute the closest distance of approach from point px,py to this marker.
- // The distance is computed in pixels units.
- //
+ // Compute distance from point px,py to a AliPHOSTrackSegment considered as a Tmarker
+ // Compute the closest distance of approach from point px,py to this marker.
+ // The distance is computed in pixels units.
+
Int_t div = 1 ;
TVector3 pos(0.,0.,0.) ;
-
+
fEmcRecPoint->GetLocalPosition( pos) ;
Float_t x = pos.X() ;
Float_t y = pos.Z() ;
void AliPHOSTrackSegment::Draw(Option_t *option)
{
// Draw this AliPHOSTrackSegment with its current attribute
-
+
AppendPad(option);
}
//
// If Left button is clicked on AliPHOSRecPoint, the digits are switched on
// and switched off when the mouse button is released.
- //
- static TPaveText* textTS = 0 ;
-
- if (!gPad->IsEditable())
- return;
-
- switch (event) {
-
- case kButton1Down:{
+
+ static TPaveText* textTS = 0 ;
+
+ if (!gPad->IsEditable())
+ return;
+
+ switch (event) {
- if (!textTS) {
+ case kButton1Down:{
+
+ if (!textTS) {
+
+ TVector3 pos(0.,0.,0.) ;
+ fEmcRecPoint->GetLocalPosition(pos) ;
+ textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ;
+ Text_t line1[40] ;
+ sprintf(line1,"See RecParticle for ID") ;
+ textTS ->AddText(line1) ;
+ textTS ->Draw("");
+ gPad->Update() ;
+ }
+ }
+
+ break;
- TVector3 pos(0.,0.,0.) ;
- fEmcRecPoint->GetLocalPosition(pos) ;
- textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ;
- Text_t line1[40] ;
- sprintf(line1,"See RecParticle for ID") ;
- textTS ->AddText(line1) ;
- textTS ->Draw("");
- gPad->Update() ;
- }
- }
-
- break;
-
- case kButton1Up:
- if (textTS) {
- delete textTS ;
- textTS = 0 ;
- }
- break;
- }
+ case kButton1Up:
+ if (textTS) {
+ delete textTS ;
+ textTS = 0 ;
+ }
+ break;
+ }
}
-
//____________________________________________________________________________
Float_t AliPHOSTrackSegment::GetDistanceInPHOSPlane()
{
-
+ // Calculates the distance between the EMC RecPoint and PPSD RecPoint
+
TVector3 vecEmc ;
fEmcRecPoint->GetLocalPosition(vecEmc) ;
-
+
TVector3 vecPpsd ;
if( fPpsdLow->GetMultiplicity() )
fPpsdLow->GetLocalPosition(vecPpsd) ;
//____________________________________________________________________________
TVector3 AliPHOSTrackSegment::GetMomentumDirection()
-{
- TVector3 dir, tempo ;
+{
+ // Calculates the momentum direction:
+ // 1. if only a EMC RecPoint, direction is given by IP and this RecPoint
+ // 2. if a EMC RecPoint and one PPSD RecPoint, direction is given by the line through the 2 recpoints
+ // 3. if a EMC RecPoint and two PPSD RecPoints, dirrection is given by the average line through
+ // the 2 pairs of recpoints
+ // However because of the poor position resolution of PPSD the direction is always taken as if we were
+ // in case 1.
+
+ TVector3 dir(0,0,0) ;
TMatrix mdummy ;
TVector3 posEmc ;
fEmcRecPoint->GetGlobalPosition(posEmc, mdummy) ;
- // need to correct here for the depth of the shower start point (TDR p 127) ?
+ // Correction for the depth of the shower starting point (TDR p 127)
Float_t energy = fEmcRecPoint->GetEnergy() ;
Float_t para = 0.925 ;
Float_t incidencephi = TMath::ATan(localpos.X() / radius) ;
Float_t incidencetheta = TMath::ATan(localpos.Z() / radius) ;
- Float_t depthx = - ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencephi) ;
- Float_t depthz = - ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencetheta) ;
+ Float_t depthx = ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencephi) ;
+ Float_t depthz = ( para * TMath::Log(energy) + parb ) * TMath::Sin(incidencetheta) ;
- TVector3 posPpsdl ;
- TVector3 posPpsdup ;
+ localpos.SetX(localpos.X() - depthx ) ;
+ localpos.SetZ(localpos.Z() - depthz ) ;
-// if( fPpsdLow ){
-// fPpsdLow->GetGlobalPosition(posPpsdl, mdummy) ;
-// if( !fPpsdUp ) { // draw line trough 2 points
-// tempo = posEmc - posPpsdl;
-// }
+ TVector3 emcglobalpos ;
+ TMatrix dummy ;
-// else { // draw line through 3 points
-// fPpsdUp->GetGlobalPosition(posPpsdup, mdummy) ;
-// posPpsdl = 0.5 * ( posPpsdup + posPpsdl ) ;
-// dir = posEmc - posPpsdl ;
-// }
-// }
-// else
- tempo = posEmc ;
-
- dir.SetX( tempo.X() + depthx ) ; // assumes that a neutral comes from the vertex
- dir.SetY( tempo.Y() ) ;
- dir.SetZ( -tempo.Z() - depthz ) ;
+ fEmcRecPoint->GetGlobalPosition(emcglobalpos, dummy) ;
+
+ emcglobalpos.SetX( emcglobalpos.X() - depthx ) ;
+ emcglobalpos.SetZ( emcglobalpos.Z() - depthz ) ;
+ // The following commeneted code becomes valid once the PPSD provides
+ // a reasonable position resolution, at least as good as EMC !
+
+// TVector3 ppsdlglobalpos ;
+// TVector3 ppsduglobalpos ;
+
+// if( fPpsdLow ){ // certainly a photon that has concerted
+
+// fPpsdLow->GetGlobalPosition(ppsdlglobalpos, mdummy) ;
+// dir = emcglobalpos - ppsdlglobalpos ;
+
+// if( fPpsdUp ){ // nop looks like a charged
+
+// fPpsdUp->GetGlobalPosition(ppsduglobalpos, mdummy) ;
+// dir = ( dir + emcglobalpos - ppsduglobalpos ) * 0.5 ;
+// }
+// }
+
+// else { // looks like a neutral
+
+ dir = emcglobalpos ;
+// }
+
+ dir.SetZ( -dir.Z() ) ; // why ?
dir.SetMag(1.) ;
+
return dir ;
}
+//____________________________________________________________________________
+Int_t * AliPHOSTrackSegment::GetPrimariesEmc(Int_t & number)
+{
+ // Retrieves the primary particle(s) at the origin of the EMC RecPoint
+
+ Int_t * rv = 0 ;
+ number = 0 ;
+ if ( fEmcRecPoint )
+ rv = fEmcRecPoint->GetPrimaries(number) ;
+
+ return rv ;
+}
+
+//____________________________________________________________________________
+Int_t * AliPHOSTrackSegment::GetPrimariesPpsdLow(Int_t & number)
+{
+ // Retrieves the primary particle(s) at the origin of the lower PPSD RecPoint
+
+ Int_t * rv = 0 ;
+ number = 0 ;
+ if ( fPpsdLow )
+ rv = fPpsdLow->GetPrimaries(number) ;
+
+ return rv ;
+}
+
+//____________________________________________________________________________
+Int_t * AliPHOSTrackSegment::GetPrimariesPpsdUp(Int_t & number)
+{
+ // Retrieves the primary particle(s) at the origin of the upper PPSD RecPoint
+
+ Int_t * rv = 0 ;
+ number = 0 ;
+ if ( fPpsdUp )
+ rv = fPpsdUp->GetPrimaries(number) ;
+
+ return rv ;
+}
//____________________________________________________________________________
void AliPHOSTrackSegment::GetPosition( TVector3 & pos )
{
- // Returns positions of hits
+ // Returns position of the EMC RecPoint
+
TMatrix dummy ;
fEmcRecPoint->GetGlobalPosition(pos, dummy) ;
}
+
//______________________________________________________________________________
void AliPHOSTrackSegment::Paint(Option_t *)
{
- //Paint this ALiPHOSTrackSegment as a TMarker with its current attributes
-
- TVector3 posemc(999., 999., 999.) ;
- TVector3 posppsdl(999., 999., 999.) ;
- TVector3 posppsdu(999., 999., 999.) ;
-
- fEmcRecPoint->GetLocalPosition(posemc) ;
- if (fPpsdLow !=0 )
- fPpsdLow->GetLocalPosition(posppsdl) ;
- if (fPpsdUp !=0 )
- fPpsdUp->GetLocalPosition(posppsdu) ;
-
- Coord_t xemc = posemc.X() ;
- Coord_t yemc = posemc.Z() ;
-
- Coord_t yppsdl = posppsdl.Z() ;
- Coord_t xppsdl = posppsdl.X() ;
-
- Coord_t yppsdu = posppsdu.Z() ;
- Coord_t xppsdu = posppsdu.X() ;
-
- Color_t markercolor = 1 ;
- Size_t markersize = 1.5 ;
- Style_t markerstyle = 20 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1, &xemc, &yemc, "") ;
-
- if (xppsdl != 999. && yppsdl != 999. ) {
+ // Paint this ALiPHOSTrackSegment as a TMarker with its current attributes
- markercolor = 2 ;
- markersize = 1.25 ;
- markerstyle = 21 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1, &xppsdl, &yppsdl, "") ;
- }
-
- if (xppsdu != 999. && yppsdu != 999. ) {
+ TVector3 posemc(999., 999., 999.) ;
+ TVector3 posppsdl(999., 999., 999.) ;
+ TVector3 posppsdu(999., 999., 999.) ;
- markercolor = 3 ;
- markersize = 1. ;
- markerstyle = 22 ;
-
- if (!gPad->IsBatch()) {
- gVirtualX->SetMarkerColor(markercolor) ;
- gVirtualX->SetMarkerSize (markersize) ;
- gVirtualX->SetMarkerStyle(markerstyle) ;
- }
- gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
- gPad->PaintPolyMarker(1, &xppsdu, &yppsdu, "") ;
+ fEmcRecPoint->GetLocalPosition(posemc) ;
+ if (fPpsdLow !=0 )
+ fPpsdLow->GetLocalPosition(posppsdl) ;
+ if (fPpsdUp !=0 )
+ fPpsdUp->GetLocalPosition(posppsdu) ;
+
+ Coord_t xemc = posemc.X() ;
+ Coord_t yemc = posemc.Z() ;
+
+ Coord_t yppsdl = posppsdl.Z() ;
+ Coord_t xppsdl = posppsdl.X() ;
+
+ Coord_t yppsdu = posppsdu.Z() ;
+ Coord_t xppsdu = posppsdu.X() ;
+
+ Color_t markercolor = 1 ;
+ Size_t markersize = 1.5 ;
+ Style_t markerstyle = 20 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1, &xemc, &yemc, "") ;
+
+ if (xppsdl != 999. && yppsdl != 999. ) {
+
+ markercolor = 2 ;
+ markersize = 1.25 ;
+ markerstyle = 21 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
+ }
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1, &xppsdl, &yppsdl, "") ;
+ }
+
+ if (xppsdu != 999. && yppsdu != 999. ) {
+
+ markercolor = 3 ;
+ markersize = 1. ;
+ markerstyle = 22 ;
+
+ if (!gPad->IsBatch()) {
+ gVirtualX->SetMarkerColor(markercolor) ;
+ gVirtualX->SetMarkerSize (markersize) ;
+ gVirtualX->SetMarkerStyle(markerstyle) ;
}
+ gPad->SetAttMarkerPS(markercolor,markerstyle,markersize) ;
+ gPad->PaintPolyMarker(1, &xppsdu, &yppsdu, "") ;
+ }
}
-
//____________________________________________________________________________
void AliPHOSTrackSegment::Print()
{
+ // Print all information on this track Segment
+
cout << "--------AliPHOSTrackSegment-------- "<<endl ;
cout << "EMC Reconstructed Point: " << fEmcRecPoint << endl;
/* $Id$ */
-/////////////////////////////////////////////////
-// Short description //
-// Version SUBATECH //
-// Author Dmitri Peressounko RRC KI //
-// comment: contains pairs (triplets) of //
-// EMC+PPSD(+PPSD) clusters, and //
-// evaluates particle type, //
-// energy, etc //
-/////////////////////////////////////////////////
+//_________________________________________________________________________
+// Track segment in PHOS
+// Can be : 1 EmcRecPoint
+// 1 EmcRecPoint + 1 PPSD
+// 1 EmcRecPoint + 1 PPSD + 1 PPSD
+//
+//*-- Author: Dmitri Peressounko (RRC KI & SUBATECH)
// --- ROOT system ---
public:
- AliPHOSTrackSegment() {} ; // ctor
+ AliPHOSTrackSegment() {} // ctor
AliPHOSTrackSegment(AliPHOSEmcRecPoint * EmcRecPoint , AliPHOSPpsdRecPoint * PpsdUp,
AliPHOSPpsdRecPoint * PpsdLow ) ; // ctor
AliPHOSTrackSegment(const AliPHOSTrackSegment & ts) ; // ctor
- virtual ~AliPHOSTrackSegment() ; // dtor
+ virtual ~AliPHOSTrackSegment() {} // dtor
void Copy(TObject & obj) ;
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
virtual Int_t GetPHOSMod(void) {return fEmcRecPoint->GetPHOSMod(); }
TVector3 GetMomentumDirection() ; // Returns the momentum direction
void GetPosition( TVector3 & pos ) ; // Returns positions of hit
+ Int_t * GetPrimariesEmc(Int_t & number) ;
+ Int_t * GetPrimariesPpsdLow(Int_t & number) ;
+ Int_t * GetPrimariesPpsdUp(Int_t & number) ;
AliPHOSEmcRecPoint * GetEmcRecPoint() const { return fEmcRecPoint ; }
AliPHOSPpsdRecPoint * GetPpsdLow() const { return fPpsdLow ; }
AliPHOSPpsdRecPoint * GetPpsdUp() const { return fPpsdUp ; }
private:
- AliPHOSEmcRecPoint * fEmcRecPoint ;
- AliPHOSPpsdRecPoint * fPpsdLow ;
- AliPHOSPpsdRecPoint * fPpsdUp ;
-
+ AliPHOSEmcRecPoint * fEmcRecPoint ; //! The EMC reconstructed point
+ AliPHOSPpsdRecPoint * fPpsdLow ; //! The PPSD reconstructed point from the lower layer
+ AliPHOSPpsdRecPoint * fPpsdUp ; //! The PPSD reconstructed point from the upper layer
+ Int_t fEmcRecPointId ; // The EMC reconstructed point Id in the list
+ Int_t fPpsdLowId ; // The PPSD reconstructed point from the lower layer Id in the list
+ Int_t fPpsdUpId ; // The PPSD reconstructed point from the upper layer Id in the list
- ClassDef(AliPHOSTrackSegment,1) // description , version 1
+ ClassDef(AliPHOSTrackSegment,1) // Track segment in PHOS
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// A brief description of the class
-//*-- Author : Yves Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Algorithm Base class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster
+//
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
+
// --- ROOT system ---
//____________________________________________________________________________
- AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() // ctor
+ AliPHOSTrackSegmentMaker:: AliPHOSTrackSegmentMaker() : fNTrackSegments(0)
{
-
+ // ctor
}
/* $Id$ */
-///////////////////////////////////////////////////
-// Subtrackin class for PHOS //
-// Version SUBATECH //
-// Author Dmitri Peressounko RRC Ki //
-// comment: finds pairs of clusters EMC+PPSD //
-// performs unfolding. //
-///////////////////////////////////////////////////
+//_________________________________________________________________________
+// Algorithm Base class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster
+//
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
// --- ROOT system ---
#include "AliPHOSEmcRecPoint.h"
#include "AliPHOSPpsdRecPoint.h"
-typedef TObjArray TrackSegmentsList ;
+typedef TClonesArray TrackSegmentsList ;
class AliPHOSTrackSegmentMaker : public TObject {
virtual void SetMaxEmcPpsdDistance(Float_t r) = 0 ;
virtual void SetUnfoldFlag() = 0 ;
virtual void UnsetUnfoldFlag() = 0 ;
-
- ClassDef( AliPHOSTrackSegmentMaker,1) // subtracking implementation , version 1
+
+ protected:
+
+ Int_t fNTrackSegments ; // number of track segments found
+
+ ClassDef( AliPHOSTrackSegmentMaker,1) // Algorithm class to make PHOS track segments (Base Class)
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Algorithm class to construct track segments connection RecPoints in
-// EMCA and Ppsd. Unfolds also the clusters in EMCA.
-//*-- Author : D. Peressounko SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version 1 of algorithm class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster
+//
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
+//
// --- ROOT system ---
//____________________________________________________________________________
- AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1()
+ AliPHOSTrackSegmentMakerv1::AliPHOSTrackSegmentMakerv1() : AliPHOSTrackSegmentMaker()
{
// ctor
+
fR0 = 4. ;
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
//clusters are sorted in "rows" and "columns" of width geom->GetCrystalSize(0),
AliPHOSTrackSegmentMakerv1::~AliPHOSTrackSegmentMakerv1()
{
// dtor
- delete fMinuit ;
+
+ delete fMinuit ;
}
+
//____________________________________________________________________________
Bool_t AliPHOSTrackSegmentMakerv1::FindFit(AliPHOSEmcRecPoint * emcRP, int * maxAt, Float_t * maxAtEnergy,
Int_t nPar, Float_t * fitparameters)
{
- // Calls TMinuit for fitting cluster with several maxima
+ // Calls TMinuit to fit the energy distribution of a cluster with several maxima
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
}
//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * Dl, RecPointsList * emcIn, TObjArray * emcOut,
+void AliPHOSTrackSegmentMakerv1::FillOneModule(DigitsList * dl, RecPointsList * emcIn, TObjArray * emcOut,
RecPointsList * ppsdIn, TObjArray * ppsdOutUp,
TObjArray * ppsdOutLow, Int_t & phosmod, Int_t & emcStopedAt,
Int_t & ppsdStopedAt)
if(nMax <= 1 ) // if cluster is very flat (no pronounced maximum) then nMax = 0
emcOut->Add(emcRecPoint) ;
else if (fUnfoldFlag) {
- UnfoldClusters(Dl, emcIn, emcRecPoint, nMax, maxAt, maxAtEnergy, emcOut) ;
+ UnfoldClusters(dl, emcIn, emcRecPoint, nMax, maxAt, maxAtEnergy, emcOut) ;
emcIn->Remove(emcRecPoint);
emcIn->Compress() ;
nEmcUnfolded-- ;
//____________________________________________________________________________
Float_t AliPHOSTrackSegmentMakerv1::GetDistanceInPHOSPlane(AliPHOSEmcRecPoint * emcclu,AliPHOSPpsdRecPoint * PpsdClu, Bool_t &toofar)
{
+ // Calculates the distance between the EMC RecPoint and the PPSD RecPoint
+
Float_t r = fR0 ;
TVector3 vecEmc ;
TObjArray * ppsdRecPointsLow, TClonesArray * linklowArray,
TClonesArray *linkupArray)
{
- //Finds distanses (links) between all EMC and PPSD clusters, which are not further from each other than fR0
-
+ // Finds distances (links) between all EMC and PPSD clusters, which are not further apart from each other than fR0
+
TIter nextEmc(emcRecPoints) ;
Int_t iEmcClu = 0 ;
} // while nextUp
nextUp.Reset();
- AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
- trsl->Add(subtr) ;
+// AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+// trsl->Add(subtr) ;
+ new( (*trsl)[fNTrackSegments] ) AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+ fNTrackSegments++ ;
emcRecPoints->AddAt(nullpointer,linkLow->GetEmc()) ;
ppsdRecPointsLow->AddAt(nullpointer,linkLow->GetPpsd()) ;
}
}
- AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
- trsl->Add(subtr) ;
-
+// AliPHOSTrackSegment * subtr = new AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+// trsl->Add(subtr) ;
+ new( (*trsl)[fNTrackSegments] ) AliPHOSTrackSegment(emc, ppsdUp, ppsdLow ) ;
+ fNTrackSegments++ ;
+
+
if(ppsdUp)
ppsdRecPointsUp->AddAt(nullpointer,linkUp->GetPpsd()) ;
}
}
//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * DL, RecPointsList * emcl,
+void AliPHOSTrackSegmentMakerv1::MakeTrackSegments(DigitsList * dl, RecPointsList * emcl,
RecPointsList * ppsdl, TrackSegmentsList * trsl)
{
- // main function, does the job
+ // Makes the track segments out of the list of EMC and PPSD Recpoints and stores them in a list
Int_t phosmod = 1 ;
Int_t emcStopedAt = 0 ;
while(phosmod <= geom->GetNModules() ){
- FillOneModule(DL, emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ;
+ FillOneModule(dl, emcl, emcRecPoints, ppsdl, ppsdRecPointsUp, ppsdRecPointsLow, phosmod, emcStopedAt, ppsdStopedAt) ;
MakeLinks(emcRecPoints, ppsdRecPointsUp, ppsdRecPointsLow, linklowArray, linkupArray) ;
//____________________________________________________________________________
Double_t AliPHOSTrackSegmentMakerv1::ShowerShape(Double_t r)
{
-// If you change this function, change also gradiend evaluation in ChiSquare()
+ // Shape of the shower (see PHOS TDR)
+ // If you change this function, change also the gradien evaluation in ChiSquare()
+
Double_t r4 = r*r*r*r ;
Double_t r295 = TMath::Power(r, 2.95) ;
Double_t shape = TMath::Exp( -r4 * (1. / (2.32 + 0.26 * r4) + 0.0316 / (1 + 0.0652 * r295) ) ) ;
}
//____________________________________________________________________________
-void AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * DL, RecPointsList * emcIn, AliPHOSEmcRecPoint * iniEmc,
+void AliPHOSTrackSegmentMakerv1::UnfoldClusters(DigitsList * dl, RecPointsList * emcIn, AliPHOSEmcRecPoint * iniEmc,
Int_t nMax, int * maxAt, Float_t * maxAtEnergy, TObjArray * emcList)
{
- // fits cluster with nMax overlapping showers
-
+ // Performs the unfolding of a cluster with nMax overlapping showers
+ // This is time consuming (use the (Un)SetUnfolFlag() )
+
Int_t nPar = 3 * nMax ;
Float_t fitparameters[nPar] ;
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
iparam += 3 ;
distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ;
distance = TMath::Sqrt(distance) ;
- efit[iDigit] += epar * ShowerShape(distance) ;
+ efit[iDigit] += epar * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) ;
}
}
geom->RelPosInModule(relid, xDigit, zDigit) ;
distance = (xDigit - xpar) * (xDigit - xpar) + (zDigit - zpar) * (zDigit - zpar) ;
distance = TMath::Sqrt(distance) ;
- ratio = epar * ShowerShape(distance) / efit[iDigit] ;
+ ratio = epar * AliPHOSTrackSegmentMakerv1::ShowerShape(distance) / efit[iDigit] ;
eDigit = emcEnergies[iDigit] * ratio ;
emcRP->AddDigit( *digit, eDigit ) ;
}
//______________________________________________________________________________
void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag)
{
-
-// Number of parameters, Gradient, Chi squared, parameters, what to do
+ // Calculates th Chi square for the cluster unfolding minimization
+ // Number of parameters, Gradient, Chi squared, parameters, what to do
AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
/* $Id$ */
-///////////////////////////////////////////////////
-// Track Segment Maker class for PHOS //
-// Version SUBATECH //
-// Author Dmitri Peressounko RRC Ki //
-// comment: finds pairs of clusters EMC+PPSD //
-// performs unfolding. //
-///////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version 1 of algorithm class to construct PHOS track segments
+// Associates EMC and PPSD clusters
+// Unfolds the EMC cluster
+//
+//*-- Author: Dmitri Peressounko (RRC Ki & SUBATECH)
// --- ROOT system ---
private:
- Float_t fDelta ; // parameter used for sorting
- TMinuit * fMinuit ; // Minuit object needed by cluster unfolding
- Float_t fR0 ;
- Bool_t fUnfoldFlag ;// Directive to unfold or not the clusters in case of multiple maxima
+ Float_t fDelta ; // parameter used for sorting
+ TMinuit * fMinuit ; // Minuit object needed by cluster unfolding
+ Float_t fR0 ; // Maximum distance between a EMC RecPoint and a PPSD RecPoint
+ Bool_t fUnfoldFlag ; // Directive to unfold or not the clusters in case of multiple maxima
- ClassDef( AliPHOSTrackSegmentMakerv1,1) // track segment maker implementation , version 1
+ ClassDef( AliPHOSTrackSegmentMakerv1,1) // Implementation version 1 of algorithm class to make PHOS track segments
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Manager class for PHOS version SUBATECH
-//*-- Author : Y. Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v0 of PHOS Manager class
+// Layout EMC + PPSD has name GPS2
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
// --- ROOT system ---
//____________________________________________________________________________
AliPHOSv0::AliPHOSv0()
{
+ // ctor
fNTmpHits = 0 ;
fTmpHits = 0 ;
}
AliPHOSv0::AliPHOSv0(const char *name, const char *title):
AliPHOS(name,title)
{
-
+ // ctor : title is used to identify the layout
+ // GPS2 = 5 modules (EMC + PPSD)
// We use 2 arrays of hits :
//
// - fHits (the "normal" one), which retains the hits associated with
AliPHOSv0::AliPHOSv0(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
AliPHOS(name,title)
{
-
+ // ctor : title is used to identify the layout
+ // GPS2 = 5 modules (EMC + PPSD)
// We use 2 arrays of hits :
//
// - fHits (the "normal" one), which retains the hits associated with
//
// - fTmpHits, which retains all the hits of the current event. It
// is used for the digitization part.
+
fPinElectronicNoise = 0.010 ;
fHits = new TClonesArray("AliPHOSHit",100) ;
fDigits = new TClonesArray("AliPHOSDigit",100) ;
//____________________________________________________________________________
AliPHOSv0::~AliPHOSv0()
{
+ // dtor
+
fTmpHits->Delete() ;
delete fTmpHits ;
fTmpHits = 0 ;
//____________________________________________________________________________
void AliPHOSv0::AddHit(Int_t primary, Int_t Id, Float_t * hits)
{
+ // Add a hit to the hit list.
+ // A PHOS hit is the sum of all hits in a single crystal
+ // or in a single PPSD gas cell
+
Int_t hitCounter ;
TClonesArray <mphits = *fTmpHits ;
AliPHOSHit *newHit ;
//____________________________________________________________________________
void AliPHOSv0::BuildGeometry()
{
+ // Build the PHOS geometry for the ROOT display
+ //BEGIN_HTML
+ /*
+ <H2>
+ PHOS in ALICE displayed by root
+ </H2>
+ <UL>
+ <LI> All Views
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="All Views" SRC="../images/AliPHOSv0AllViews.gif">
+ </CENTER></P></LI>
+ <LI> Front View
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="Front View" SRC="../images/AliPHOSv0FrontView.gif">
+ </CENTER></P></LI>
+ <LI> 3D View 1
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="3D View 1" SRC="../images/AliPHOSv03DView1.gif">
+ </CENTER></P></LI>
+ <LI> 3D View 2
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="3D View 2" SRC="../images/AliPHOSv03DView2.gif">
+ </CENTER></P></LI>
+ </UL>
+ */
+ //END_HTML
this->BuildGeometryforPHOS() ;
if ( ( strcmp(fGeom->GetName(), "GPS2" ) == 0 ) )
//____________________________________________________________________________
void AliPHOSv0:: BuildGeometryforPHOS(void)
{
- // Build the PHOS geometry for the ROOT display
+ // Build the PHOS-EMC geometry for the ROOT display
const Int_t kColorPHOS = kRed ;
const Int_t kColorXTAL = kBlue ;
//____________________________________________________________________________
void AliPHOSv0:: BuildGeometryforPPSD(void)
{
- // Build the PPSD geometry for the ROOT display
-
+ // Build the PHOS-PPSD geometry for the ROOT display
+ //BEGIN_HTML
+ /*
+ <H2>
+ PPSD displayed by root
+ </H2>
+ <UL>
+ <LI> Zoom on PPSD: Front View
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="PPSD Front View" SRC="../images/AliPHOSv0PPSDFrontView.gif">
+ </CENTER></P></LI>
+ <LI> Zoom on PPSD: Perspective View
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="PPSD Prespective View" SRC="../images/AliPHOSv0PPSDPerspectiveView.gif">
+ </CENTER></P></LI>
+ </UL>
+ */
+ //END_HTML
Double_t const kRADDEG = 180.0 / kPI ;
const Int_t kColorPHOS = kRed ;
//____________________________________________________________________________
void AliPHOSv0::CreateGeometry()
{
+ // Create the PHOS geometry for Geant
AliPHOSv0 *phostmp = (AliPHOSv0*)gAlice->GetModule("PHOS") ;
return;
}
-
// Get pointer to the array containing media indeces
Int_t *idtmed = fIdtmed->GetArray() - 699 ;
//____________________________________________________________________________
void AliPHOSv0::CreateGeometryforPHOS()
{
- // Get pointer to the array containing media indeces
+ // Create the PHOS-EMC geometry for GEANT
+ //BEGIN_HTML
+ /*
+ <H2>
+ Geant3 geometry tree of PHOS-EMC in ALICE
+ </H2>
+ <P><CENTER>
+ <IMG Align=BOTTOM ALT="EMC geant tree" SRC="../images/EMCinAlice.gif">
+ </CENTER><P>
+ */
+ //END_HTML
+
+ // Get pointer to the array containing media indexes
Int_t *idtmed = fIdtmed->GetArray() - 699 ;
// ---
//____________________________________________________________________________
void AliPHOSv0::CreateGeometryforPPSD()
{
- // Get pointer to the array containing media indeces
+ // Create the PHOS-PPSD geometry for GEANT
+
+ //BEGIN_HTML
+ /*
+ <H2>
+ Geant3 geometry tree of PHOS-PPSD in ALICE
+ </H2>
+ <P><CENTER>
+ <IMG Align=BOTTOM ALT="PPSD geant tree" SRC="../images/PPSDinAlice.gif">
+ </CENTER><P>
+ */
+ //END_HTML
+
+ // Get pointer to the array containing media indexes
Int_t *idtmed = fIdtmed->GetArray() - 699 ;
// The box containing all ppsd's for one PHOS module filled with air
}
//___________________________________________________________________________
-Int_t AliPHOSv0::Digitize(Float_t Energy){
+Int_t AliPHOSv0::Digitize(Float_t Energy)
+{
+ // Applies the energy calibration
+
Float_t fB = 100000000. ;
Float_t fA = 0. ;
Int_t chan = Int_t(fA + Energy*fB ) ;
//___________________________________________________________________________
void AliPHOSv0::FinishEvent()
{
-// cout << "//_____________________________________________________" << endl ;
-// cout << "<I> AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ;
+ // Makes the digits from the sum of summed hit in a single crystal or PPSD gas cell
+ // Adds to the energy the electronic noise
+ // Keeps digits with energy above fDigitThreshold
+
Int_t i ;
Int_t relid[4];
Int_t j ;
AliPHOSDigit * newdigit ;
AliPHOSDigit * curdigit ;
Bool_t deja = kFALSE ;
-
+
for ( i = 0 ; i < fNTmpHits ; i++ ) {
hit = (AliPHOSHit*)fTmpHits->At(i) ;
newdigit = new AliPHOSDigit( hit->GetPrimary(), hit->GetId(), Digitize( hit->GetEnergy() ) ) ;
//____________________________________________________________________________
void AliPHOSv0::Init(void)
{
-
+ // Just prints an information message
+
Int_t i;
printf("\n");
//___________________________________________________________________________
void AliPHOSv0::MakeBranch(Option_t* opt)
{
- //
- // Create a new branch in the current Root Tree
- // The branch of fHits is automatically split
- //
+ // Create new branche in the current Root Tree in the digit Tree
+
AliDetector::MakeBranch(opt) ;
char branchname[10];
if (fDigits && gAlice->TreeD() && cdD) {
gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize);
}
- char *cdR = strstr(opt,"R");
- if (fRecParticles && gAlice->TreeR() && cdR) {
- gAlice->TreeR()->Branch(branchname, &fRecParticles, fBufferSize);
- }
}
//_____________________________________________________________________________
void AliPHOSv0::Reconstruction(AliPHOSReconstructioner * Reconstructioner)
{
- // reinitializes the existing RecPoint Lists and steers the reconstruction processes
-
+ // 1. Reinitializes the existing RecPoint, TrackSegment, and RecParticles Lists and
+ // 2. Creates a branch in TreeR for each list
+ // 3. Steers the reconstruction processes
+ // 4. Saves the 3 lists in TreeR
+ // 5. Write the Tree to File
+
fReconstructioner = Reconstructioner ;
+
+ char branchname[10] ;
+ // 1.
+
if (fEmcClusters) {
fEmcClusters->Delete() ;
delete fEmcClusters ;
fEmcClusters = 0 ;
}
fEmcClusters= new RecPointsList("AliPHOSEmcRecPoint", 100) ;
-
+ if ( fEmcClusters && gAlice->TreeR() ) {
+ sprintf(branchname,"%sERP",GetName()) ;
+ gAlice->TreeR()->Branch(branchname, &fEmcClusters, fBufferSize);
+ }
+
if (fPpsdClusters) {
fPpsdClusters->Delete() ;
delete fPpsdClusters ;
fPpsdClusters = 0 ;
}
fPpsdClusters = new RecPointsList("AliPHOSPpsdRecPoint", 100) ;
+ if ( fPpsdClusters && gAlice->TreeR() ) {
+ sprintf(branchname,"%sPRP",GetName()) ;
+ gAlice->TreeR()->Branch(branchname, &fPpsdClusters, fBufferSize);
+ }
- if (fTrackSegments) {
+ if (fTrackSegments) {
fTrackSegments->Delete() ;
delete fTrackSegments ;
fTrackSegments = 0 ;
}
- fTrackSegments = new TrackSegmentsList(100) ;
-
+ fTrackSegments = new TrackSegmentsList("AliPHOSTrackSegment", 100) ;
+ if ( fTrackSegments && gAlice->TreeR() ) {
+ sprintf(branchname,"%sTS",GetName()) ;
+ gAlice->TreeR()->Branch(branchname, &fTrackSegments, fBufferSize);
+ }
+
if (fRecParticles) {
fRecParticles->Delete() ;
delete fRecParticles ;
fRecParticles = 0 ;
}
fRecParticles = new RecParticlesList("AliPHOSRecParticle", 100) ;
+ if ( fRecParticles && gAlice->TreeR() ) {
+ sprintf(branchname,"%sRP",GetName()) ;
+ gAlice->TreeR()->Branch(branchname, &fRecParticles, fBufferSize);
+ }
+
+ // 3.
fReconstructioner->Make(fDigits, fEmcClusters, fPpsdClusters, fTrackSegments, fRecParticles);
+ // 4.
+
+ gAlice->TreeR()->Fill() ;
+
+ // 5.
+
+ gAlice->TreeR()->Write() ;
+
}
//____________________________________________________________________________
void AliPHOSv0::StepManager(void)
{
+ // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
+
Int_t relid[4] ; // (box, layer, row, column) indices
Float_t xyze[4] ; // position wrt MRS and energy deposited
TLorentzVector pos ;
Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
TString name = fGeom->GetName() ;
-
if ( name == "GPS2" ) { // the CPV is a PPSD
- if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
+ if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") ) // We are inside a gas cell
{
gMC->TrackPosition(pos) ;
xyze[0] = pos[0] ;
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-////////////////////////////////////////////////
-// Manager class for PHOS //
-// Version SUBATECH //
-// Author Y. Schutz SUBATECH //
-// geometry parametrized for any //
-// shape of modules //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version v0 of PHOS Manager class
+// Layout EMC + PPSD has name GPS2
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
#include "TClonesArray.h"
protected:
- Float_t fDigitThreshold ; // Threshold for the digit registration
- RecPointsList * fEmcClusters ; // The RecPoints (clusters) list in EMC
- AliPHOSGeometry * fGeom ; // geometry definition
- Int_t fNTmpHits ; //! used internally for digitalization
- Float_t fPinElectronicNoise ; // Electronic Noise in the PIN
- RecPointsList * fPpsdClusters ; // The RecPoints (clusters) list in PPSD
- AliPHOSReconstructioner * fReconstructioner ; // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
- TClonesArray * fTmpHits ; //! used internally for digitalization
+ Float_t fDigitThreshold ; // Threshold for the digit registration
+ RecPointsList * fEmcClusters ; // The RecPoints (clusters) list in EMC
+ AliPHOSGeometry * fGeom ; // Geometry definition
+ Int_t fNTmpHits ; //! Used internally for digitalization
+ Float_t fPinElectronicNoise ; // Electronic Noise in the PIN
+ RecPointsList * fPpsdClusters ; // The RecPoints (clusters) list in PPSD
+ AliPHOSReconstructioner * fReconstructioner ; // Reconstrutioner of the PHOS event: Clusterization and subtracking procedures
+ TClonesArray * fTmpHits ; //! Used internally for digitalization
AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Reconstructioner of the PHOS track segment: 2 x PPSD + 1 x EMC
- TrackSegmentsList * fTrackSegments ; // The TrackSegment list in PHOS
- RecParticlesList * fRecParticles ; // The reconstructed particles list in PHOS
+ TrackSegmentsList * fTrackSegments ; // The TrackSegment list in PHOS
+ RecParticlesList * fRecParticles ; // The reconstructed particles list in PHOS
- ClassDef(AliPHOSv0,1) // PHOS main class , version subatech
+ ClassDef(AliPHOSv0,1) // Implementation of PHOS manager class for layout EMC+PPSD
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Manager class for PHOS version SUBATECH
-//*-- Author : Odd Harald Oddland & Gines Martinez Feb-2000
-// The main goal of this version of AliPHOS is to calculted the
-// induced charged in the PIN diode, taking into account light
-// tracking in the PbWO4 crystal, induced signal in the
-// PIN due to MIPS particle and electronic noise.
-// In this respect, this class derived from AliPHOSv0 and
-// only the StepManager function has been "surcharged"
-//////////////////////////////////////////////////////////////////////////////
+// Implementation version v0 of PHOS Manager class
+// Layout EMC + PPSD has name GPS2
+// The main goal of this version of AliPHOS is to calculte the
+// induced charged in the PIN diode, taking into account light
+// tracking in the PbWO4 crystal, induced signal in the
+// PIN due to MIPS particle and electronic noise.
+// This is done in the StepManager
+//
+//*-- Author: Odd Harald Oddland & Gines Martinez (SUBATECH)
+
// --- ROOT system ---
#include "TRandom.h"
#include <cstring>
#include <cstdlib>
#include <strstream>
-#include <cassert>
// --- AliRoot header files ---
ClassImp(AliPHOSv1)
-//____________________________________________________________________________
- AliPHOSv1::AliPHOSv1() :
- AliPHOSv0()
-{
-}
-
//____________________________________________________________________________
AliPHOSv1::AliPHOSv1(const char *name, const char *title):
AliPHOSv0(name,title)
{
+ // ctor
+
+ // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using
+ // following formula
+ // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
+ // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
+ // RecalibrationFactor ;
+ // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
+ // PINEfficiency is 0.1875 from Odd Harald Odland work
+ // k_0 is 0.0045 from Valery Antonenko
+
fLightYieldMean = 700000. ;
fIntrinsicPINEfficiency = 0.1875 ;
fLightYieldAttenuation = 0.0045 ;
fRecalibrationFactor = 6.2 / fLightYieldMean ;
fElectronsPerGeV = 2.77e+8 ;
}
+
//____________________________________________________________________________
AliPHOSv1::AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title):
AliPHOSv0(Reconstructioner,name,title)
-{
+{
+ // ctor
+
+ // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using
+ // following formula
+ // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
+ // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
+ // RecalibrationFactor ;
+ // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
+ // PINEfficiency is 0.1875 from Odd Harald Odland work
+ // k_0 is 0.0045 from Valery Antonenko
+
fLightYieldMean = 700000.;
fIntrinsicPINEfficiency = 0.1875 ;
fLightYieldAttenuation = 0.0045 ;
fRecalibrationFactor = 6.2 / fLightYieldMean ;
- fElectronsPerGeV = 2.77e+8 ; // Odd Harald work
+ fElectronsPerGeV = 2.77e+8 ;
}
-//____________________________________________________________________________
-AliPHOSv1::~AliPHOSv1()
-{
-
-}
-
-//____________________________________________________________________________
-
-
-
-
-
-
//____________________________________________________________________________
void AliPHOSv1::StepManager(void)
{
+ // Accumulates hits as long as the track stays in a single crystal or PPSD gas Cell
+ // Adds the energy deposited in the PIN diode
+
Int_t relid[4] ; // (box, layer, row, column) indices
Float_t xyze[4] ; // position wrt MRS and energy deposited
TLorentzVector pos ;
Int_t copy;
- Float_t lightyield ; // Light Yield per GeV
- Float_t nElectrons ; // Number of electrons in the PIN diode
+ Float_t lightyield ; // Light Yield per GeV
+ Float_t nElectrons ; // Number of electrons in the PIN diode
TString name = fGeom->GetName() ;
Float_t global[3] ;
Float_t local[3] ;
Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
if ( name == "GPS2" ) { // the CPV is a PPSD
- if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") )
- // if( strcmp ( gMC->CurrentVolName(), "GCEL" ) == 0 ) // We are inside a gas cell
+ if( gMC->CurrentVolID(copy) == gMC->VolId("GCEL") ) // We are inside a gas cell
{
gMC->TrackPosition(pos) ;
xyze[0] = pos[0] ;
} // We are inside the gas of the CPV
} // GPS2 configuration
- if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") )
- // if( strcmp ( gMC->CurrentVolName(), "PXTL" ) == 0 ) { // We are inside a PWO crystal
+ if(gMC->CurrentVolID(copy) == gMC->VolId("PXTL") )// We are inside a PBWO crystal
{
gMC->TrackPosition(pos) ;
xyze[0] = pos[0] ;
if ( xyze[3] != 0 ) {
gMC->CurrentVolOffID(11, relid[0]) ; // get the PHOS module number ;
- relid[1] = 0 ; // means PW04and PIN
+ relid[1] = 0 ; // means PW04 and PIN
gMC->CurrentVolOffID(5, relid[2]) ; // get the row number inside the module
gMC->CurrentVolOffID(4, relid[3]) ; // get the cell number inside the module
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-////////////////////////////////////////////////
-// Manager class for PHOS //
-// Version SUBATECH
-// Author : Odd Harald Oddland &
-// Gines Martinez Feb-2000
-// The main goal of this version of AliPHOS is to calculted the
-// induced charged in the PIN diode, taking into account light
-// tracking in the PbWO4 crystal, induced signal in the
-// PIN due to MIPS particle and electronic noise.
-// In this respect, this class derived from AliPHOSv0 and
-// only the StepManager function has been "surcharged"
-////////////////////////////////////////////////////////////////////
+//_________________________________________________________________________
+// Implementation version v0 of PHOS Manager class
+// Layout EMC + PPSD has name GPS2
+// The main goal of this version of AliPHOS is to calculte the
+// induced charged in the PIN diode, taking into account light
+// tracking in the PbWO4 crystal, induced signal in the
+// PIN due to MIPS particle and electronic noise.
+// This is done in the StepManager
+//
+//*-- Author: Odd Harald Oddland & Gines Martinez (SUBATECH)
// --- ROOT system ---
public:
- AliPHOSv1(void) ;
+ AliPHOSv1(void) : AliPHOSv0() {} // ctor
AliPHOSv1(const char *name, const char *title="") ;
AliPHOSv1(AliPHOSReconstructioner * Reconstructioner, const char *name, const char *title="") ;
- virtual ~AliPHOSv1(void) ;
+ virtual ~AliPHOSv1(void) {}
virtual void StepManager(void) ; // does the tracking through PHOS and a preliminary digitalization
private:
- //
- // Number of electrons created in the PIN due to light collected in the PbWo4 crystal is calculated using
- // following formula
- // NumberOfElectrons = EnergyLost * LightYield * PINEfficiency *
- // exp (-LightYieldAttenuation * DistanceToPINdiodeFromTheHit) *
- // RecalibrationFactor ;
- // LightYield is obtained as a Poissonian distribution with a mean at 700000 photons per GeV fromValery Antonenko
- // PINEfficiency is 0.1875 from Odd Harald Odland work
- // k_0 is 0.0045 from Valery Antonenko
- //
- Float_t fLightYieldMean ; // Mean of the Poisson distribution which is the mean lightyield in the PbOW4 xtal per GeV
- Float_t fIntrinsicPINEfficiency ;
- Float_t fLightYieldAttenuation ;
- Float_t fRecalibrationFactor ;
- Float_t fElectronsPerGeV ; //Number of electrons per GeV created in the PIN by a ionizing particle
-
- ClassDef(AliPHOSv1,1) // PHOS v1 main class , version subatech with light transportation, MIPS in PIN and electronic noise
+
+ Float_t fLightYieldMean ; // Mean lightyield in the PbOW4 xtal per GeV (Poisson distribution)
+ Float_t fIntrinsicPINEfficiency ; // Photo efficiency of the PIN diode
+ Float_t fLightYieldAttenuation ; // Attenuation of the light through the crystal
+ Float_t fRecalibrationFactor ; // Recalibration factor
+ Float_t fElectronsPerGeV ; // Number of electrons per GeV created in the PIN by a ionizing particle
+
+ ClassDef(AliPHOSv1,1) // Implementation of PHOS manager class for layout EMC+PPSD with light transport, MIPS in PIN and electronic noise
};
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Manager class for PHOS version for fast simulations
-//*-- Author : Y. Schutz SUBATECH
-//////////////////////////////////////////////////////////////////////////////
+// Implementation of the PHOS manager class for fast simulations
+// Tracks particles until the reach a grossly designed PHOS module
+// Modify the particles property (momentum, energy, type) according to
+// the PHOS response function. The result is called a virtual reconstructed
+// particle.
+//
+//*-- Author: Yves Schutz (SUBATECH)
// --- ROOT system ---
// --- Standard library ---
#include <cstdio>
-#include <cassert>
// --- AliRoot header files ---
//____________________________________________________________________________
AliPHOSvFast::AliPHOSvFast()
{
+ // ctor
+
fFastRecParticles = 0 ;
fNRecParticles = 0 ;
}
AliPHOSvFast::AliPHOSvFast(const char *name, const char *title):
AliPHOS(name,title)
{
+ // ctor
+
// gets an instance of the geometry parameters class
fGeom = AliPHOSGeometry::GetInstance(title, "") ;
//____________________________________________________________________________
AliPHOSvFast::~AliPHOSvFast()
{
+ // dtor
fFastRecParticles->Delete() ;
delete fFastRecParticles ;
//____________________________________________________________________________
void AliPHOSvFast::AddRecParticle(const AliPHOSFastRecParticle & rp)
{
+ // Add a virtually reconstructed particle to the list
+
new( (*fFastRecParticles)[fNRecParticles] ) AliPHOSFastRecParticle(rp) ;
fNRecParticles++ ;
}
//____________________________________________________________________________
void AliPHOSvFast::BuildGeometry()
{
-
// Build the PHOS geometry for the ROOT display
-
+ //BEGIN_HTML
+ /*
+ <H2>
+ PHOS FAST in ALICE displayed by root
+ </H2>
+ <H4> All Views </H4>
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="Fast All Views" SRC="../images/AliPHOSvFastAllViews.gif">
+ </CENTER></P>
+ <H4> Front View </H4>
+ <P>
+ <CENTER>
+ <IMG Align=BOTTOM ALT="Fast Front View" SRC="../images/AliPHOSvFastFrontView.gif">
+ </CENTER></P>
+ */
+ //END_HTML
+
const Int_t kColorPHOS = kRed ;
Double_t const kRADDEG = 180.0 / kPI ;
// position PHOS into ALICE
- Float_t r = fGeom->GetIPtoOuterCoverDistance() + GetBigBox(1) / 2.0 ;
+ Float_t r = fGeom->GetIPtoCrystalSurface() + GetBigBox(1) / 2.0 ;
Int_t number = 988 ;
- Float_t pphi = TMath::ATan( GetBigBox(0) / ( 2.0 * fGeom->GetIPtoOuterCoverDistance() ) ) ;
+ Float_t pphi = TMath::ATan( GetBigBox(0) / ( 2.0 * fGeom->GetIPtoCrystalSurface() ) ) ;
pphi *= kRADDEG ;
TNode * top = gAlice->GetGeometry()->GetNode("alice") ;
//____________________________________________________________________________
void AliPHOSvFast::CreateGeometry()
{
-
+ // Create the geometry for GEANT
+
AliPHOSvFast *phostmp = (AliPHOSvFast*)gAlice->GetModule("PHOS") ;
-
+
if ( phostmp == NULL ) {
fprintf(stderr, "PHOS detector not found!\n") ;
Float_t angle = fGeom->GetPHOSAngle(i) ;
AliMatrix(idrotm[i-1], 90.0, angle, 90.0, 90.0+angle, 0.0, 0.0) ;
- Float_t r = fGeom->GetIPtoOuterCoverDistance() + GetBigBox(1) / 2.0 ;
+ Float_t r = fGeom->GetIPtoCrystalSurface() + GetBigBox(1) / 2.0 ;
Float_t xP1 = r * TMath::Sin( angle / kRADDEG ) ;
Float_t yP1 = -r * TMath::Cos( angle / kRADDEG ) ;
//____________________________________________________________________________
void AliPHOSvFast::Init(void)
{
-
+ // Prints out an information message
+
Int_t i;
printf("\n");
//___________________________________________________________________________
Float_t AliPHOSvFast::GetBigBox(Int_t index)
{
+ // Get the X, Y or Z dimension of the box describing a PHOS module
+
Float_t rv = 0 ;
switch (index) {
//___________________________________________________________________________
void AliPHOSvFast::MakeBranch(Option_t* opt)
{
- //
- // Create a new branch in the current Root Tree
+ // Create new branch in the current reconstructed Root Tree
AliDetector::MakeBranch(opt) ;
//____________________________________________________________________________
Double_t AliPHOSvFast::MakeEnergy(const Double_t energy)
{
+ // Smears the energy according to the energy dependent energy resolution.
+ // A gaussian distribution is assumed
+
Double_t sigma = SigmaE(energy) ;
return fRan.Gaus(energy, sigma) ;
}
//____________________________________________________________________________
TVector3 AliPHOSvFast::MakePosition(const Double_t energy, const TVector3 pos, const Double_t theta, const Double_t phi)
{
+ // Smears the impact position according to the energy dependent position resolution
+ // A gaussian position distribution is assumed
+
TVector3 newpos ;
Double_t sigma = SigmaP( energy, theta*180./TMath::Pi() ) ;
Double_t x = fRan.Gaus( pos.X(), sigma ) ;
//____________________________________________________________________________
void AliPHOSvFast::MakeRecParticle(const Int_t modid, const TVector3 pos, AliPHOSFastRecParticle & rp)
{
- // get the detected type of particle
-
+ // Modify the primary particle properties according
+ // 1. the response function of PHOS
+ // 2. the performance of the EMC+PPSD setup
+
Int_t type = MakeType( rp ) ;
rp.SetType(type) ;
//____________________________________________________________________________
Int_t AliPHOSvFast::MakeType(AliPHOSFastRecParticle & rp )
{
+ // Generate a particle type using the performance of the EMC+PPSD setup
+
Int_t rv = kUNDEFINED ;
Int_t charge = (Int_t)rp.GetPDG()->Charge() ;
Int_t test ;
//___________________________________________________________________________
void AliPHOSvFast::ResetPoints()
{
+ // This overloads the method in AliDetector
+
ResetFastRecParticles() ;
}
//___________________________________________________________________________
void AliPHOSvFast::ResetFastRecParticles()
{
+ // Resets the list of virtual reconstructed particles
+
if (fFastRecParticles)
fFastRecParticles->Clear() ;
fNRecParticles = 0 ;
//___________________________________________________________________________
void AliPHOSvFast::SetBigBox(Int_t index, Float_t value)
{
-
+ // Set the size of the Box describing a PHOS module
+
switch (index) {
case 0:
fBigBoxX = value ;
//____________________________________________________________________________
Double_t AliPHOSvFast::SigmaE(Double_t energy)
{
+ // Calculates the energy dependent energy resolution
+
Double_t rv = -1 ;
rv = TMath::Sqrt( TMath::Power(fResPara1/energy, 2)
//____________________________________________________________________________
Double_t AliPHOSvFast::SigmaP(Double_t energy, Int_t incidence)
{
-
+ // Calculates the energy dependent position resolution
+
Double_t paraA = fPosParaA0 + fPosParaA1 * incidence ;
Double_t paraB = fPosParaB0 + fPosParaB1 * incidence + fPosParaB2 * incidence * incidence ;
//____________________________________________________________________________
void AliPHOSvFast::StepManager(void)
{
-
+ // Only verifies if the particle reaches PHOS and stops the tracking
+
Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() );
TLorentzVector lv ;
gMC->TrackPosition(lv) ;
TParticle * part = (TParticle *)particlelist->At(primary) ;
AliPHOSFastRecParticle rp(*part) ;
+ rp.SetPrimary(primary) ;
// Adds the response of PHOS to the particle
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-////////////////////////////////////////////////
-// Manager class for PHOS //
-// Version SUBATECH //
-// Author Y. Schutz SUBATECH //
-// This is the class to be used for //
-// fast simulations //
-////////////////////////////////////////////////
-
/* $Id$ */
+//_________________________________________________________________________
+// Implementation of the PHOS manager class for fast simulations
+// Tracks particles until the reach a grossly designed PHOS module
+// Modify the particles property (momentum, energy, type) according to
+// the PHOS response function. The result is called a virtual reconstructed
+// particle.
+//
+//*-- Author: Yves Schutz (SUBATECH)
+
// --- ROOT system ---
#include "TClonesArray.h"
#include "TRandom.h"
Double_t fPosParaB1 ; // parameter for the position resolution
Double_t fPosParaB2 ; // parameter for the position resolution
- ClassDef(AliPHOSvFast,1) // PHOS main class , version for fast simulation
+ ClassDef(AliPHOSvFast,1) // Implementation of the PHOS manager class for fast simulations
};
SRCS = AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSHit.cxx \
AliPHOSGeometry.cxx \
- AliPHOSDigit.cxx \
+ AliPHOSDigit.cxx \
AliPHOSRecPoint.cxx AliPHOSEmcRecPoint.cxx AliPHOSPpsdRecPoint.cxx \
AliPHOSClusterizer.cxx AliPHOSClusterizerv1.cxx AliPHOSLink.cxx \
AliPHOSReconstructioner.cxx AliPHOSTrackSegment.cxx \
AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \
AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \
- AliPHOSAnalyze.cxx AliPHOSvFast.cxx AliPHOSFastRecParticle.cxx
+ AliPHOSAnalyze.cxx AliPHOSvFast.cxx AliPHOSFastRecParticle.cxx \
+ AliPHOSArray.cxx
# C++ Headers
<P>
<center><img SRC="usecasefastsimulation.gif" ALT="[Use Case for fast simulation]" height=425 width=483></center>
+<P>
+This has been implemented in a new class <a href="html/AliPHOSvFast.html"> AliPHOSvFast </a> ( <a href="html/AliPHOSvFast_Tree.ps">
+inheritance tree </a> ). The synopsis goes as follow :
+<br> <br>
+<pre class="code">
+ AliPHOSvFast::AliDetector
+
+ <b>CreateGeometry() </b> {
+
+ describes the coarse outline of PHOS as 5 boxes }
+
+ <b>StepManager()</b> {
+
+ when particle reaches PHOS {
+ stop the tracking
+ modifiy the attributes (energy, momentum, type) of the primary particle according to the PHOS response
+ construct a "virtual" reconstructed particle }
+ save the reconstructed particle in a list }
+ <b>FinishEvent()</b> {
+ write the list in TreeR
+ write the TreeR to file }
+</pre>
<hr>
<address class="left">
© <a href="mailto:schutz@in2p3.fr">Groupe Photons Subatech</a> <a href="http://www-subatech.in2p3.fr/~photons/subatech/en_index.shtml">[Go
<address class="right">
<!-- Created: Tue Oct 26 19:52:56 CEST 1999 -->
<!-- hhmts start -->
-Last modified: Wed Dec 7 18:54:10 CET 1999
+Last modified: Sun Mar 12 23:52:09 CET 2000
<!-- hhmts end --></address>
<div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>
<meta name="GENERATOR" content="Mozilla/4.51 [en] (X11; I; Linux 2.2.5-15 i686) [Netscape]">
<title>PHOS Geometry in AliRoot</title>
<link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">
-</head>
-<body>
-
+ <body>
+
<h1 class="page-header">
Geometry & Materials
</h1>
x <i>fNumberOfPadsZ </i>gas cells, a Lead converter and a second layer
of gas detectors identical to the first layer. This second part is positionned
on top of the EMCA module.
+<P>
+The class <a href="html/AliPHOSv0.html"> AliPHOSv0 </a> ( <a href="html/AliPHOSv0_Tree.ps"> inheritance tree </a>) describes this geometry. We have defined also a class
+<a href="html/AliPHOSv1.html"> AliPHOSv1 </a> ( <a href="html/AliPHOSv1_Tree.ps"> inheritance tree </a>) which in addition contains the photodiode response and the light transport through the crystal.
+<P>
+The parameters of the geometry are given in class <a href="html/AliPHOSGeometry.html"> AliPHOSGeometry </a>( <a href="html/AliPHOSGeometry_Tree.ps"> inheritance tree </a>)
<br><br>
<center>
- <img SRC="PHOSGeantTree.gif" ALT="Geant Tree for PHOS" >
+ <img SRC=" html/images/EMCinAlice.gif" ALT="Geant Tree for PHOS" >
+ <br><br>
+ <b> Figure 1.a: </b> <i> GEANT Tree which describes the EMC-PHOS geometry </i>
+ </center>
+ <P>
+ <center>
+ <img SRC=" html/images/PPSDinAlice.gif" ALT="Geant Tree for PHOS" >
<br><br>
- <b> Figure 1.: </b> <i> GEANT Tree which describes the PHOS geometry </i>
+ <b> Figure 1.b: </b> <i> GEANT Tree which describes the PPSD-PHOS geometry </i>
</center>
<h4>
<i>GPS2</i>: will create EMCA plus PPSD
<br><br>
<center>
- <table>
- <tr>
- <td align=center valign=baseline>
- <img SRC="AlicebyGeant.gif" ALT="Geant display of PHOS" width="447" height="429" >
- </td>
- <td align=center valign=baseline>
- <img SRC="AlicebyRoot.gif" ALT="Root display of Alice" width="447" height="429" >
- </td>
- <tr>
- <td align=left valign=top>
- <b> Figure 3.: </b> <i> GEANT display of ALICE </i>
- </td>
- <td align=left valign=top>
- <b> Figure 4.: </b> <i> Root display of ALICE </i>
- </td>
- </tr>
- </table>
+ <img SRC="html/images/AliPHOSv0AllViews.gif" ALT="ROOT display of PHOS: All Views" >
+ <b> Figure 3a.: </b> <i> ROOT Display of ALICE: All Views </i>
+ <P>
+ <img SRC="html/images/AliPHOSv0FrontView.gif" ALT="ROOT display of PHOS: Front View" >
+ <b> Figure 3b.: </b> <i> ROOT Display of ALICE: Front Views </i>
+ <P>
+ <img SRC="html/images/AliPHOSv03DView1.gif" ALT="ROOT display of PHOS: 3D View" >
+ <b> Figure 3c.: </b> <i> ROOT Display of ALICE: All View3 </i>
+ <P>
+ <img SRC="html/images/AliPHOSv0PPSDFrontView.gif" ALT="Zoom on PPSD: Front View " >
+ <b> Figure 4.a: </b> <i> ROOT Display of ALICE: zoom on PPSD, Front Views </i>
+ <P>
+ <img SRC="html/images/AliPHOSv0PPSDPerspectiveView.gif" ALT="Zoom on PPSD: Perspective View " >
+ <b> Figure 4.b: </b> <i> ROOT Display of ALICE: zoom on PPSD, Perspective View </i>
</center> <br><br>
</li>
</address>
<!-- Created: Wed Nov 17 12:16:58 CET 1999 -->
<!-- hhmts start -->
-Last modified: Tue Nov 23 09:49:02 CET 1999
+Last modified: Sun Mar 12 23:49:58 CET 2000
<!-- hhmts end -->
<div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Mozilla/4.51 [en] (X11; I; Linux 2.2.5-15 i686) [Netscape]">
<title>PHOS in AliRoot</title>
- <!-- Changed by: Yves Schutz, 7-Dec-1999 -->
- <link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">
-
+ <!-- Changed by: Yves Schutz, 7-Dec-1999
+ <link REL="stylesheet" href="http://www-subatech.in2p3.fr/~photons/gps_alice.css" type="text/css">-->
+
<script type="text/javascript">
image1 = new Image(30,44);
image1.src = "tournesol.jpg";
<address class="right">
<!-- Created: Tue Oct 26 19:52:56 CEST 1999 -->
<!-- hhmts start -->
-Last modified: Wed Dec 1 10:10:38 CET 1999
+Last modified: Sun Mar 12 23:44:04 CET 2000
<!-- hhmts end --></address>
<!-- <div align=right><a href="http://validator.w3.org/check/referer"><img SRC="vh40.gif" ALT="Valid HTML 4.0!" BORDER=0 height=31 width=88></a><a href="http://jigsaw.w3.org/css-validator"><img SRC="vcss.gif" ALT="Valid CSS!" BORDER=0 height=31 width=88></a></div>-->
#pragma link off all functions;
#pragma link C++ class AliPHOS ;
+#pragma link C++ class AliPHOSArray ;
#pragma link C++ class AliPHOSClusterizer ;
#pragma link C++ class AliPHOSClusterizerv1 ;
#pragma link C++ class AliPHOSDigit ;
* provided "as is" without express or implied warranty. *
**************************************************************************/
+/* $Id$ */
+
//_________________________________________________________________________
-// Short description
-//*-- Author : SUBATECH
+// Short description
+//
+//*-- Author : (SUBATECH)
//////////////////////////////////////////////////////////////////////////////
// --- ROOT system ---
//____________________________________________________________________________
-AliPHOSxxx::AliPHOSxxx()
+ AliPHOSxxx::AliPHOSxxx()
{
// ctor
+
}
-//____________________________________________________________________________
-AliPHOSxxx::~AliPHOSxxx()
+//____________________________________________________________________________
+ AliPHOSxxx::~AliPHOSxxx()
{
- // dtor
-}
+ // ctor
+}
/* $Id$ */
-////////////////////////////////////////////////
-// Short description //
-// Author SUBATECH //
-// comment //
-// //
-////////////////////////////////////////////////
+//_________________________________________________________________________
+// Base Class for PHOS
+//
+//*-- Author: (SUBATECH)
+
// --- ROOT system ---
private:
- ClassDef(AliPHOSxxx,1) // description , version 1
+ ClassDef(AliPHOSxxx,1) // description
};