// Origin: Iouri Belikov, CERN, Jouri.Belikov@cern.ch
//-----------------------------------------------------------------
+#include <TMath.h>
+
#include "AliITSpidESD.h"
#include "AliESDtrack.h"
/*if (bg<3.5)
bethe=(1.+ bg2)/bg2*(log(5940*bg2) - bg2/(1.+ bg2));
else*/ // not 100% clear why...
- bethe=(1.+ bg2)/bg2*(log(3.5*5940*bg) - bg2/(1.+ bg2));
+ bethe=(1.+ bg2)/bg2*(TMath::Log(3.5*5940*bg) - bg2/(1.+ bg2));
return bethe/11.091;
}
for (Int_t it = 0; it < nt; it++) {
AliESDtrack *track = fESD->GetTrack(it);
UInt_t status = track->GetStatus();
- p3 = track->P3();
+
+ Double_t mom[3];
+ track->GetPxPyPz(mom);
+
+ p3.SetXYZ(mom[0],mom[1],mom[2]);
pt = p3.Pt();
if (((status & AliESDtrack::kITSrefit) == 0) ||
((status & AliESDtrack::kTPCrefit) == 0)) continue; // quality check
/* History of cvs commits:
*
* $Log$
+ * Revision 1.12 2006/03/10 13:23:36 hristov
+ * Using AliESDCaloCluster instead of AliESDtrack
+ *
* Revision 1.11 2006/01/31 20:30:52 hristov
* Including TFile.h
*
AliESDtrack * track = esd->GetTrack(npar) ; // retrieve track from esd
Double_t en = track ->GetTPCsignal() ;
- TVector3 mom = track->P3() ;
- Double_t px = mom.Px();
- Double_t py = mom.Py();
- Double_t pz = mom.Pz(); //Check with TPC people if this is correct.
+ Double_t mom[3];
+ track->GetPxPyPz(mom) ;
+ Double_t px = mom[0];
+ Double_t py = mom[1];
+ Double_t pz = mom[2]; //Check with TPC people if this is correct.
//cout<<"TPC signal "<<en<<endl;
//cout<<"px "<<px<<"; py "<<py<<"; pz "<<pz<<endl;
for(Int_t iTrackN=0;iTrackN<iNtracks;iTrackN++){//ESD tracks loop
AliESDtrack *pTrack = pESD->GetTrack(iTrackN);// get next reconstructed track
- AliRICHHelix helix(pTrack->X3(),pTrack->P3(),(Int_t)pTrack->GetSign(),-0.1*pESD->GetMagneticField());
+ Double_t mom[3], pos[3];
+ pTrack->GetPxPyPz(mom); TVector3 mom3(mom[0],mom[1],mom[2]);
+ pTrack->GetXYZ(pos); TVector3 pos3(pos[0],pos[1],pos[2]);
+ AliRICHHelix helix(pos3,mom3,(Int_t)pTrack->GetSign(),-0.1*pESD->GetMagneticField());
Int_t iChamberOnRICH=helix.RichIntersect(AliRICHParam::Instance());
if(iChamberOnRICH==iChamber) {
TMarker *trackImpact = new TMarker(helix.PosPc().X(),helix.PosPc().Y(),kStar);
for(Int_t iTrk=0;iTrk<iNtracks;iTrk++){//ESD tracks loop
AliESDtrack *pTrack = pESD->GetTrack(iTrk);// get next reconstructed track
- AliRICHHelix helix(pTrack->X3(),pTrack->P3(),(Int_t)pTrack->GetSign(),-0.1*GetBz()); //construct helix out of track running parameters
+ Double_t mom[3], pos[3];
+ pTrack->GetPxPyPz(mom); TVector3 mom3(mom[0],mom[1],mom[2]);
+ pTrack->GetXYZ(pos); TVector3 pos3(pos[0],pos[1],pos[2]);
+ AliRICHHelix helix(pos3,mom3,(Int_t)pTrack->GetSign(),-0.1*GetBz()); //construct helix out of track running parameters
//Printf(" magnetic field %f charged %f\n",GetBz(),pTrack->GetSign()); helix.Print("Track");
Int_t iChamber=helix.RichIntersect(AliRICHParam::Instance());
if(!iChamber) continue; //no intersection with chambers, ignore this track go after the next one
//_____________________________________________________________________________
void AliAlignObj::Transform(AliTrackPointArray &array) const
{
+ // This method is used to transform all the track points
+ // from the input AliTrackPointArray
AliTrackPoint p;
for (Int_t i = 0; i < array.GetNPoints(); i++) {
array.GetPoint(p,i);
}
+//_____________________________________________________________________________
+AliAlignObj* AliAlignObj::GetAlignObj(UShort_t voluid) {
+ // Returns the alignment object for given volume ID
+ Int_t modId;
+ ELayerID layerId = VolUIDToLayer(voluid,modId);
+ return GetAlignObj(layerId,modId);
+}
+
//_____________________________________________________________________________
AliAlignObj* AliAlignObj::GetAlignObj(ELayerID layerId, Int_t modId)
{
+ // Returns pointer to alignment object givent its layer and module ID
if(modId<0 || modId>=fgLayerSize[layerId-kFirstLayer]){
AliWarningClass(Form("Module number %d not in the valid range (0->%d) !",modId,fgLayerSize[layerId-kFirstLayer]-1));
return NULL;
return fgAlignObjs[layerId-kFirstLayer][modId];
}
+//_____________________________________________________________________________
+const char* AliAlignObj::GetVolPath(UShort_t voluid) {
+ // Returns the volume path for given volume ID
+ Int_t modId;
+ ELayerID layerId = VolUIDToLayer(voluid,modId);
+ return GetVolPath(layerId,modId);
+}
+
//_____________________________________________________________________________
const char* AliAlignObj::GetVolPath(ELayerID layerId, Int_t modId)
{
+ // Returns volume path to alignment object givent its layer and module ID
if(modId<0 || modId>=fgLayerSize[layerId-kFirstLayer]){
AliWarningClass(Form("Module number %d not in the valid range (0->%d) !",modId,fgLayerSize[layerId-kFirstLayer]-1));
return NULL;
Int_t modnum = 0;
TString str1 = "ALIC_1/TPC_M_1/TPC_Drift_1/TPC_ENDCAP_1/TPC_SECT_";
TString str2 = "ALIC_1/TPC_M_1/TPC_Drift_1/TPC_ENDCAP_2/TPC_SECT_";
- TString str_in = "/TPC_IROC_1";
+ TString strIn = "/TPC_IROC_1";
TString volpath;
for(Int_t cnt=1; cnt<=18; cnt++){
volpath = str1;
volpath += cnt;
- volpath += str_in;
+ volpath += strIn;
fgVolPath[kTPC1-kFirstLayer][modnum] = volpath.Data();
modnum++;
}
for(Int_t cnt=1; cnt<=18; cnt++){
volpath = str2;
volpath += cnt;
- volpath += str_in;
+ volpath += strIn;
fgVolPath[kTPC1-kFirstLayer][modnum] = volpath.Data();
modnum++;
}
Int_t modnum = 0;
TString str1 = "ALIC_1/TPC_M_1/TPC_Drift_1/TPC_ENDCAP_1/TPC_SECT_";
TString str2 = "ALIC_1/TPC_M_1/TPC_Drift_1/TPC_ENDCAP_2/TPC_SECT_";
- TString str_out = "/TPC_OROC_1";
+ TString strOut = "/TPC_OROC_1";
TString volpath;
for(Int_t cnt=1; cnt<=18; cnt++){
volpath = str1;
volpath += cnt;
- volpath += str_out;
+ volpath += strOut;
fgVolPath[kTPC2-kFirstLayer][modnum] = volpath.Data();
modnum++;
}
for(Int_t cnt=1; cnt<=18; cnt++){
volpath = str2;
volpath += cnt;
- volpath += str_out;
+ volpath += strOut;
fgVolPath[kTPC2-kFirstLayer][modnum] = volpath.Data();
modnum++;
}
TString zeroStr = "0";
TString volpath;
- Int_t TRDlayId[6] = {kTRD1, kTRD2, kTRD3, kTRD4, kTRD5, kTRD6};
+ Int_t arTRDlayId[6] = {kTRD1, kTRD2, kTRD3, kTRD4, kTRD5, kTRD6};
for(Int_t layer=0; layer<6; layer++){
Int_t modnum=0;
if(chnum<10) volpath += zeroStr;
volpath += chnum;
volpath += strPost;
- fgVolPath[TRDlayId[layer]-kFirstLayer][modnum] = volpath.Data();
+ fgVolPath[arTRDlayId[layer]-kFirstLayer][modnum] = volpath.Data();
modnum++;
}
}
static ELayerID VolUIDToLayer(UShort_t voluid, Int_t &modId);
static ELayerID VolUIDToLayer(UShort_t voluid);
- static const char* GetVolPath(UShort_t voluid) {
- Int_t modId;
- ELayerID layerId = VolUIDToLayer(voluid,modId);
- return GetVolPath(layerId,modId);
- }
+ static const char* GetVolPath(UShort_t voluid);
static const char* GetVolPath(ELayerID layerId, Int_t modId);
Bool_t ApplyToGeometry();
static Bool_t GetFromGeometry(const char *path, AliAlignObj &alobj);
static void InitAlignObjFromGeometry();
- static AliAlignObj* GetAlignObj(UShort_t voluid) {
- Int_t modId;
- ELayerID layerId = VolUIDToLayer(voluid,modId);
- return GetAlignObj(layerId,modId);
- }
+ static AliAlignObj* GetAlignObj(UShort_t voluid);
static AliAlignObj* GetAlignObj(ELayerID layerId, Int_t modId);
protected:
TString fVolPath; // Volume path inside TGeo geometry
UShort_t fVolUID; // Unique volume ID
- static Int_t fgLayerSize[kLastLayer - kFirstLayer];
- static const char* fgLayerName[kLastLayer - kFirstLayer];
+ static Int_t fgLayerSize[kLastLayer - kFirstLayer]; // Size of layers
+ static const char* fgLayerName[kLastLayer - kFirstLayer]; // Name of layers
- static TString* fgVolPath[kLastLayer - kFirstLayer];
+ static TString* fgVolPath[kLastLayer - kFirstLayer]; // Volume path
- static AliAlignObj** fgAlignObjs[kLastLayer - kFirstLayer];
+ static AliAlignObj** fgAlignObjs[kLastLayer - kFirstLayer]; // Alignment objects
ClassDef(AliAlignObj, 2)
};
Bool_t Put(AliCDBEntry* entry);
void SetCacheFlag(Bool_t cacheFlag) {fCache=cacheFlag;}
- Bool_t GetCacheFlag() {return fCache;}
+ Bool_t GetCacheFlag() const {return fCache;}
void SetRun(Long64_t run);
- Long64_t GetRun() {return fRun;}
+ Long64_t GetRun() const {return fRun;}
// AliCDBEntry* Get(const char* path);
friend class AliCDBManager;
public:
+ virtual ~AliCDBStorageFactory(){}
virtual Bool_t Validate(const char* dbString) = 0;
virtual AliCDBParam* CreateParameter(const char* dbString) = 0;
///////////////////////////////////////////////////////////////////////////////
//
-// The TRD trigger stores the found tracks as ESDTrdTrack objects in the ESD
+// Tracks from the TRD Global Tracking Unit (GTU, trigger)
+// The TRD trigger stores the found tracks
+// as ESDTrdTrack objects in the ESD object
+// Related classes: AliTRDReconstructor, AliESD
+// Author: B.Vulpescu
//
///////////////////////////////////////////////////////////////////////////////
#ifndef ALIESDTRDTRACK_H
#define ALIESDTRDTRACK_H
-//
// Tracks from the TRD Global Tracking Unit (GTU, trigger)
-//
+// Stored in the ESD object
+// Author: B.Vulpescu
#include "TObject.h"
AliESDTrdTrack(const AliESDTrdTrack& track);
AliESDTrdTrack& operator=(const AliESDTrdTrack& track);
- Float_t GetYproj() { return fYproj; };
- Float_t GetZproj() { return fZproj; };
- Float_t GetSlope() { return fSlope; };
- Int_t GetDetector() { return fDetector; };
- Int_t GetTracklets() { return fNtracklets; };
- Int_t GetPlanes() { return fNplanes; };
- Int_t GetClusters() { return fNclusters; };
- Float_t GetPt() { return fPt; };
- Float_t GetPhi() { return fPhi; };
- Float_t GetEta() { return fEta; };
- Int_t GetLabel() { return fLabel; };
- Float_t GetPID() { return fPID; };
- Bool_t IsElectron() { return fIsElectron; }
+ Float_t GetYproj() const { return fYproj; };
+ Float_t GetZproj() const { return fZproj; };
+ Float_t GetSlope() const { return fSlope; };
+ Int_t GetDetector() const { return fDetector; };
+ Int_t GetTracklets() const { return fNtracklets; };
+ Int_t GetPlanes() const { return fNplanes; };
+ Int_t GetClusters() const { return fNclusters; };
+ Float_t GetPt() const { return fPt; };
+ Float_t GetPhi() const { return fPhi; };
+ Float_t GetEta() const { return fEta; };
+ Int_t GetLabel() const { return fLabel; };
+ Float_t GetPID() const { return fPID; };
+ Bool_t IsElectron() const { return fIsElectron; }
void SetYproj(Float_t val) { fYproj = val; };
void SetZproj(Float_t val) { fZproj = val; };
Float_t fYproj; // Average values calculated
Float_t fZproj; // from the tracklets
- Float_t fSlope; //
+ Float_t fSlope; // slope of the tracklet
Int_t fDetector; // First detector in the module
Int_t fNtracklets; // Number of tracklets
Int_t fNplanes; // Number of TRD planes
// e-mail: Jouri.Belikov@cern.ch
//-----------------------------------------------------------------
-#include "TMath.h"
+#include <TMath.h>
#include "AliESDVertex.h"
#include "AliESDtrack.h"
#include "AliPID.h"
#include "AliESDfriendTrack.h"
-#include <TVector3.h>
-
class AliESDVertex;
class AliKalmanTrack;
-class AliESDfriendTrack;
class AliTrackPointArray;
class AliESDtrack : public AliExternalTrackParam {
const AliESDfriendTrack *GetFriendTrack() const {return fFriendTrack;}
void MakeMiniESDtrack();
void SetID(Int_t id) { fID =id;}
- Int_t GetID(){ return fID;}
+ Int_t GetID() const { return fID;}
void SetStatus(ULong_t flags) {fFlags|=flags;}
void ResetStatus(ULong_t flags) {fFlags&=~flags;}
Bool_t UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags);
Double_t GetIntegratedLength() const {return fTrackLength;}
void GetIntegratedTimes(Double_t *times) const;
Double_t GetMass() const;
- TVector3 P3() const {Double_t p[3]; GetPxPyPz(p); return TVector3(p[0],p[1],p[2]);} //running track momentum
- TVector3 X3() const {Double_t x[3]; GetXYZ(x); return TVector3(x[0],x[1],x[2]);} //running track position
-
Bool_t GetConstrainedPxPyPz(Double_t *p) const {
if (!fCp) return kFALSE;
for (Int_t i=0;i<4;i++) fTPCPoints[i]=points[i];
}
void SetTPCPointsF(UChar_t findable){fTPCnclsF = findable;}
- Float_t GetTPCPoints(Int_t i){return fTPCPoints[i];}
+ Float_t GetTPCPoints(Int_t i) const {return fTPCPoints[i];}
void SetKinkIndexes(Int_t points[3]) {
for (Int_t i=0;i<3;i++) fKinkIndexes[i] = points[i];
}
};
protected:
- //AliESDtrack & operator=(const AliESDtrack & );
ULong_t fFlags; // Reconstruction status flags
Int_t fLabel; // Track label
Int_t fStopVertex; // Index of the stop vertex
-//Track parameters constrained to the primary vertex
- AliExternalTrackParam *fCp;
- Double_t fCchi2; //chi2 at the primary vertex
+ AliExternalTrackParam *fCp; // Track parameters constrained to the primary vertex
+ Double_t fCchi2; // chi2 at the primary vertex
+
-//Track parameters at the inner wall of the TPC
- AliExternalTrackParam *fIp;
+ AliExternalTrackParam *fIp; // Track parameters at the inner wall of the TPC
-//Track parameters at the inner wall of the TRD
- AliExternalTrackParam *fOp;
+
+ AliExternalTrackParam *fOp; // Track parameters at the inner wall of the TRD
// ITS related track information
Float_t fITSchi2; // chi2 in the ITS
Float_t fRICHmipX; // x of the MIP in LORS
Float_t fRICHmipY; // y of the MIP in LORS
- AliTrackPointArray *fPoints;//Array of track space points in the global frame
+ AliTrackPointArray *fPoints;// Array of track space points in the global frame
AliESDfriendTrack *fFriendTrack; //! All the complementary information
+ private:
+
+ AliESDtrack & operator=(const AliESDtrack & ) {return *this;}
+
ClassDef(AliESDtrack,27) //ESDtrack
};
#include <Riostream.h>
#include <TMath.h>
+#include <TVector2.h>
#include "AliESDtrack.h"
#include "AliTRDgeometry.h"