}
return rv ;
}
-
//____________________________________________________________________________
void AliPHOSGeometry::GetGlobal(const AliRecPoint* recPoint, TVector3 & gpos) const
+{
+ AliFatal(Form("Please use GetGlobalPHOS(recPoint,gpos) instead of GetGlobal!"));
+}
+
+//____________________________________________________________________________
+void AliPHOSGeometry::GetGlobalPHOS(const AliPHOSRecPoint* recPoint, TVector3 & gpos) const
{
// Calculates the coordinates of a RecPoint and the error matrix in the ALICE global coordinate system
- AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) recPoint ;
+ const AliPHOSRecPoint * tmpPHOS = recPoint ;
TVector3 localposition ;
tmpPHOS->GetLocalPosition(gpos) ;
#include "AliPHOSCPVGeometry.h"
#include "AliPHOSSupportGeometry.h"
+class AliPHOSRecPoint;
+class TVector3;
class AliPHOSGeometry : public AliGeometry {
virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const
{GetGlobal(RecPoint,gpos); }
virtual void GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const ;
+ virtual void GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos) const ;
+ virtual void GetGlobalPHOS(const AliPHOSRecPoint* RecPoint, TVector3 & gpos, TMatrixF & /* gmat */) const
+ {GetGlobalPHOS(RecPoint,gpos); }
virtual Bool_t Impact(const TParticle * particle) const ;
AliPHOSGeometry & operator = (const AliPHOSGeometry & /*rvalue*/) {
/* History of cvs commits:
*
* $Log$
+ * Revision 1.110 2007/04/24 10:08:03 kharlov
+ * Vertex extraction from GenHeader
+ *
* Revision 1.109 2007/04/18 09:34:05 kharlov
* Geometry bug fixes
*
AliPHOSTrackSegment * ts = gime->TrackSegment(rp->GetPHOSTSIndex()) ;
AliPHOSEmcRecPoint * erp = gime->EmcRecPoint(ts->GetEmcIndex()) ;
TVector3 pos ;
- geom->GetGlobal(erp, pos) ;
+ geom->GetGlobalPHOS(erp, pos) ;
rp->SetPos(pos);
index++ ;
}
//____________________________________________________________________________
AliPHOSRecPoint::AliPHOSRecPoint()
- : AliRecPoint(),
- fPHOSMod(0)
+ : AliCluster(),fPHOSMod(0),
+ fMulTrack(0),fMaxDigit(100),fMulDigit(0),fMaxTrack(0),
+ fDigitsList(0),fTracksList(0),fAmp(0),
+ fIndexInList(-1), // to be set when the point is already stored
+ fLocPos(0,0,0),fLocPosM(0)
{
// ctor
- fMaxTrack = 0 ;
}
//____________________________________________________________________________
-AliPHOSRecPoint::AliPHOSRecPoint(const char * opt)
- : AliRecPoint(opt),
- fPHOSMod(0)
+AliPHOSRecPoint::AliPHOSRecPoint(const char * )
+ : AliCluster(),fPHOSMod(0),
+ fMulTrack(0),fMaxDigit(100),fMulDigit(0),fMaxTrack(200),
+ fDigitsList(new int[fMaxDigit]),fTracksList(new int[fMaxTrack]),fAmp(0),
+ fIndexInList(-1), // to be set when the point is already stored
+ fLocPos(0,0,0),fLocPosM(new TMatrixF(3,3))
+
{
// ctor
- fMaxTrack = 200 ;
}
+//_______________________________________________________________________
+AliPHOSRecPoint::~AliPHOSRecPoint()
+{
+ // dtor
+
+ delete fLocPosM ;
+ delete [] fDigitsList ;
+ delete [] fTracksList ;
+
+}
+//____________________________________________________________________________
+AliPHOSRecPoint::AliPHOSRecPoint(const AliPHOSRecPoint &rp) :
+ AliCluster(rp),
+ fPHOSMod(rp.fPHOSMod),fMulTrack(rp.fMulTrack),fMaxDigit(rp.fMaxDigit),
+ fMulDigit(rp.fMulDigit),fMaxTrack(rp.fMaxTrack),fDigitsList(new int[rp.fMaxDigit]),
+ fTracksList(new int[rp.fMaxTrack]),fAmp(rp.fAmp),fIndexInList(rp.fIndexInList),
+ fLocPos(rp.fLocPos),fLocPosM(rp.fLocPosM)
+{
+ //copy ctor
+ for(Int_t i=0; i<fMaxDigit; i++)
+ fDigitsList[i] = rp.fDigitsList[i];
+
+ for(Int_t i=0; i<fMaxTrack; i++)
+ fTracksList[i] = rp.fTracksList[i];
+
+}
+//____________________________________________________________________________
+AliPHOSRecPoint& AliPHOSRecPoint::operator= (const AliPHOSRecPoint &rp)
+{
+ if(&rp == this) return *this;
+
+ fPHOSMod = rp.fPHOSMod;
+ fMulTrack = rp.fMulTrack;
+ fMaxDigit = rp.fMaxDigit;
+ fMulDigit = rp.fMulDigit;
+ fMaxTrack = rp.fMaxTrack;
+ fAmp = rp.fAmp;
+ fIndexInList = rp.fIndexInList;
+ fLocPos = rp.fLocPos;
+ fLocPosM = rp.fLocPosM;
+
+ for(Int_t i=0; i<fMaxDigit; i++)
+ fDigitsList[i] = rp.fDigitsList[i];
+
+ for(Int_t i=0; i<fMaxTrack; i++)
+ fTracksList[i] = rp.fTracksList[i];
+
+ return *this;
+}
//____________________________________________________________________________
Int_t AliPHOSRecPoint::DistancetoPrimitive(Int_t px, Int_t py)
{
{
// returns the position of the cluster in the global reference system of ALICE
// and the uncertainty on this position
- (AliPHOSGetter::Instance())->PHOSGeometry()->GetGlobal(this, gpos, gmat);
+
+ (AliPHOSGetter::Instance())->PHOSGeometry()->GetGlobalPHOS(this, gpos, gmat);
+
+// Float_t xyz[3];
+// GetGlobalXYZ(xyz);
+// gpos.SetXYZ(xyz[0],xyz[1],xyz[2]);
+
+
}
gPad->PaintPolyMarker(1,&x,&y,"") ;
}
//______________________________________________________________________________
-
+void AliPHOSRecPoint::GetLocalPosition(TVector3 & pos) const
+{
+ // returns the position of the cluster in the local reference system
+ // of the sub-detector
+
+ pos = fLocPos;
+}
//*-- Author: Gines Martinez (SUBATECH)
// --- ROOT system ---
-
-//#include "TMarker.h"
-//#include "TGraph.h"
-//#include "TPaveText.h"
- class TClonesArray ;
-// --- Standard library ---
+#include <TVector3.h>
// --- AliRoot header files ---
+#include "AliCluster.h"
-#include "AliRecPoint.h"
-class AliPHOSDigit ;
+class TClonesArray ;
+class AliPHOSDigit ;
+class AliDigitNew;
+class TMAtrixF;
-class AliPHOSRecPoint : public AliRecPoint {
+class AliPHOSRecPoint : public AliCluster {
public:
AliPHOSRecPoint() ; // ctor
AliPHOSRecPoint(const char * opt) ; // ctor
+
+ AliPHOSRecPoint(const AliPHOSRecPoint &rp);
+ AliPHOSRecPoint& operator= (const AliPHOSRecPoint &rp);
+
- virtual ~AliPHOSRecPoint(){
- // dtor
- }
+ virtual ~AliPHOSRecPoint();
+
virtual void AddDigit(AliDigitNew &){
Fatal("AddDigit", "use AddDigit(AliPHOSDigit & digit, Float_t Energy)") ;
}
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) ;
- void EvalAll(TClonesArray * digits) ;
+ void EvalAll(TClonesArray * digits) ;
virtual void EvalPHOSMod(AliPHOSDigit * digit) ;
- virtual void EvalPrimaries(TClonesArray * digits) ;
+ virtual void EvalPrimaries(TClonesArray * digits) ;
+ virtual int * GetDigitsList(void) const { return fDigitsList ; }
+ virtual Float_t GetEnergy() const {return fAmp; }
+ virtual void GetLocalPosition(TVector3 & pos) const ;
virtual void GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const ; // return global position in ALICE
virtual Int_t GetPHOSMod(void) const {return fPHOSMod ; }
virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ;
return fTracksList ; }
+ virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
+ Int_t GetIndexInList() const { return fIndexInList ; }
virtual Bool_t IsEmc(void)const { return kTRUE ; }
virtual Bool_t IsSortable() const {
// tells that this is a sortable object
return kTRUE ;
}
+ void SetIndexInList(Int_t val) { fIndexInList = val ; }
virtual void Paint(Option_t * option="");
virtual void Print(Option_t *) const {
// Print prototype
protected:
- Int_t fPHOSMod ; // PHOS Module number in which the RecPoint is found
-
- ClassDef(AliPHOSRecPoint,1) // RecPoint for PHOS (Base Class)
+ Int_t fPHOSMod ; // PHOS Module number in which the RecPoint is found
+ Int_t fMulTrack ; // total multiplicity of tracks to which the point was assigned
+ Int_t fMaxDigit ; //! max initial size of digits array (not saved)
+ Int_t fMulDigit ; // total multiplicity of digits
+ Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
+ Int_t* fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
+ Int_t* fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
+ Float_t fAmp ; // summed amplitude of digits
+ Int_t fIndexInList ;// the index of this RecPoint in the list stored in TreeR (to be set by analysis)
+ TVector3 fLocPos ; // local position in the sub-detector coordinate
+ TMatrixF* fLocPosM ; // covariance matrix ;
+
+
+ ClassDef(AliPHOSRecPoint,2) // RecPoint for PHOS (Base Class)
};
/* History of cvs commits:
*
* $Log$
+ * Revision 1.86 2007/04/02 15:00:16 cvetan
+ * No more calls to gAlice in the reconstruction
+ *
* Revision 1.85 2007/03/28 19:18:15 kharlov
* RecPoints recalculation in TSM removed
*
Double_t xCPV,zCPV ; //EMC-projected coordinates of CPV cluster
TVector3 cpvGlobal; // Global position of the CPV recpoint
- geom->GetGlobal((AliRecPoint*)cpvClu,cpvGlobal);
+ geom->GetGlobalPHOS((AliPHOSRecPoint*)cpvClu,cpvGlobal);
Double_t vtxCPV[3]={cpvGlobal.X(),cpvGlobal.Y(),cpvGlobal.Z()} ;
if (fESD == 0x0) {
/* History of cvs commits:
*
* $Log$
+ * Revision 1.3 2007/04/25 19:39:42 kharlov
+ * Track extracpolation improved
+ *
* Revision 1.2 2007/04/01 19:16:52 kharlov
* D.P.: Produce EMCTrackSegments using TPC/ITS tracks (no CPV)
*
const AliPHOSGeometry * geom = AliPHOSGeometry::GetInstance() ;
TVector3 emcGlobal; // Global position of the EMC recpoint
- geom->GetGlobal((AliRecPoint*)emcClu,emcGlobal);
+ geom->GetGlobalPHOS((AliPHOSRecPoint*)emcClu,emcGlobal);
//Calculate actual distance to the PHOS surface
Double_t modAngle=270.+geom->GetPHOSAngle(emcClu->GetPHOSMod()) ;