AliInfo("no ESD track found. .....exiting");\r
return;\r
}\r
+ // TPC momentum\r
+ const AliExternalTrackParam *in=track->GetInnerParam();\r
+ if (in) {\r
+ aodpid->SetTPCmomentum(in->GetP());\r
+ }else{\r
+ aodpid->SetTPCmomentum(-1.);\r
+ }\r
+\r
\r
aodpid->SetITSsignal(track->GetITSsignal());\r
aodpid->SetTPCsignal(track->GetTPCsignal());\r
- //n TRD planes = 6\r
\r
+ //n TRD planes = 6\r
Int_t nslices = track->GetNumberOfTRDslices()*6;\r
Double_t *trdslices = new Double_t[nslices];\r
for(Int_t iSl =0; iSl < track->GetNumberOfTRDslices(); iSl++) {\r
- for(Int_t iPl =0; iPl<6; iPl++) trdslices[iPl*track->GetNumberOfTRDslices()+iSl] = track->GetTRDslice(iPl,iSl);\r
- }\r
-\r
+ for(Int_t iPl =0; iPl<6; iPl++) trdslices[iPl*track->GetNumberOfTRDslices()+iSl] = track->GetTRDslice(iPl,iSl);\r
+ }\r
+ \r
+//TRD momentum\r
+ for(Int_t iPl=0;iPl<6;iPl++){\r
+ Double_t trdmom=track->GetTRDmomentum(iPl);\r
+ aodpid->SetTRDmomentum(iPl,trdmom);\r
+ }\r
\r
aodpid->SetTRDsignal(track->GetNumberOfTRDslices()*6,trdslices);\r
Double_t times[AliAODPid::kSPECIES]; track->GetIntegratedTimes(times);\r
return *this;
}
//_______________________________________________________________________________
-void AliAODPid::GetIntegratedTimes(Double_t timeint[kSPECIES])
+void AliAODPid::GetIntegratedTimes(Double_t timeint[kSPECIES]) const
{
// Returns the array with integrated times for each particle hypothesis
for(Int_t i=0; i<kSPECIES; i++) timeint[i]=fIntTime[i];
for(Int_t i=0; i<kSPECIES; i++) fIntTime[i]=timeint[i];
}
//_______________________________________________________________________________
-void AliAODPid::GetEMCALPosition(Double_t emcalpos[3])
+void AliAODPid::GetEMCALPosition(Double_t emcalpos[3]) const
{
// Returns the array with extrapolated track position at the EMCAL surface
for(Int_t i=0; i<3; i++) emcalpos[i]=fEMCALPosition[i];
for(Int_t i=0; i<3; i++) fEMCALPosition[i]=emcpos[i];
}
//_______________________________________________________________________________
-void AliAODPid::GetEMCALMomentum(Double_t emcalmom[3])
+void AliAODPid::GetEMCALMomentum(Double_t emcalmom[3]) const
{
// Returns the array with extrapolated track momentum at the EMCAL surface
for(Int_t i=0; i<3; i++) emcalmom[i]=fEMCALMomentum[i];
//setters
void SetITSsignal(Double_t its) {fITSsignal=its;}
void SetTPCsignal(Double_t tpc) {fTPCsignal=tpc;}
+ void SetTPCmomentum(Double_t tpcMom) {fTPCmomentum=tpcMom;}
void SetTRDsignal(Int_t nslices, Double_t* trdslices) {fTRDnSlices = nslices; fTRDslices=trdslices;}
+ void SetTRDmomentum(Int_t nplane, Float_t trdMom) {fTRDmomentum[nplane]=trdMom;}
void SetTOFsignal(Double_t tof) {fTOFesdsignal=tof;}
void SetIntegratedTimes(Double_t timeint[5]);
void SetHMPIDsignal(Double_t hmpid) {fHMPIDsignal=hmpid;}
void SetEMCALPosition(Double_t emcalpos[3]);
void SetEMCALMomentum(Double_t emcalmom[3]);
- Double_t GetITSsignal() {return fITSsignal;}
- Double_t GetTPCsignal() {return fTPCsignal;}
- Int_t GetTRDnSlices() {return fTRDnSlices;}
- Double_t* GetTRDsignal() {return fTRDslices;}
- Double_t GetTOFsignal() {return fTOFesdsignal;}
- void GetIntegratedTimes(Double_t timeint[5]);
- Double_t GetHMPIDsignal() {return fHMPIDsignal;}
- void GetEMCALPosition(Double_t emcalpos[3]);
- void GetEMCALMomentum(Double_t emcalmom[3]);
+ Double_t GetITSsignal() const {return fITSsignal;}
+ Double_t GetTPCsignal() const {return fTPCsignal;}
+ Double_t GetTPCmomentum() const {return fTPCmomentum;}
+ Int_t GetTRDnSlices() const {return fTRDnSlices;}
+ Double_t* GetTRDsignal() const {return fTRDslices;}
+ Float_t* GetTRDmomentum() {return fTRDmomentum;}
+ Double_t GetTOFsignal() const {return fTOFesdsignal;}
+ Double_t GetHMPIDsignal() const {return fHMPIDsignal;}
+
+ void GetIntegratedTimes(Double_t timeint[5]) const;
+ void GetEMCALPosition (Double_t emcalpos[3]) const;
+ void GetEMCALMomentum (Double_t emcalmom[3]) const;
private :
- Double32_t fITSsignal; //[0.,0.,10] detector raw signal
- Double32_t fTPCsignal; //[0.,0.,10] detector raw signal
- Int_t fTRDnSlices; //N slices used for PID in the TRD
- Double32_t* fTRDslices; //[fTRDnSlices]
- Double32_t fTOFesdsignal; //TOF signal - t0 (T0 interaction time)
- Double32_t fIntTime[5]; //track time hypothesis
- Double32_t fHMPIDsignal; //detector raw signal
- Double32_t fEMCALPosition[3]; //global position of track
- //extrapolated to EMCAL surface
- Double32_t fEMCALMomentum[3]; //momentum of track
- //extrapolated to EMCAL surface
-
- ClassDef(AliAODPid,2);
+ Double32_t fITSsignal; //[0.,0.,10] detector raw signal
+ Double32_t fTPCsignal; //[0.,0.,10] detector raw signal
+ Double_t fTPCmomentum; // momentum at the inner wall of TPC;
+ Int_t fTRDnSlices; // N slices used for PID in the TRD
+ Double32_t* fTRDslices; //[fTRDnSlices]
+ Float_t fTRDmomentum[6]; // momentum at the TRD layers
+ Double32_t fTOFesdsignal; // TOF signal - t0 (T0 interaction time)
+ Double32_t fIntTime[5]; // track time hypothesis
+ Double32_t fHMPIDsignal; // detector raw signal
+ Double32_t fEMCALPosition[3]; // global position of track
+ // extrapolated to EMCAL surface
+ Double32_t fEMCALMomentum[3]; // momentum of track
+ // extrapolated to EMCAL surface
+
+ ClassDef(AliAODPid, 3);
};
#endif