//
for (Int_t i=0; i<fgkNumberOfGainScenarios; i++) {fRes0[i]=0.07;fResN2[i]=0.0;}
}
-
+/*TODO remove?
//_________________________________________________________________________
AliTPCPIDResponse::AliTPCPIDResponse(const Double_t *param):
TNamed(),
//
for (Int_t i=0; i<fgkNumberOfGainScenarios; i++) {fRes0[i]=param[1];fResN2[i]=param[2];}
}
-
+*/
//_________________________________________________________________________
AliTPCPIDResponse::~AliTPCPIDResponse()
for (Int_t i=0; i<fgkNumberOfGainScenarios; i++) {fRes0[i]=that.fRes0[i];fResN2[i]=that.fResN2[i];}
// Copy eta maps
- if (that.fhEtaCorr){
+ if (that.fhEtaCorr) {
fhEtaCorr = new TH2D(*(that.fhEtaCorr));
fhEtaCorr->SetDirectory(0);
}
- if (that.fhEtaSigmaPar1){
+ if (that.fhEtaSigmaPar1) {
fhEtaSigmaPar1 = new TH2D(*(that.fhEtaSigmaPar1));
fhEtaSigmaPar1->SetDirectory(0);
}
delete fhEtaCorr;
fhEtaCorr=0x0;
- if (that.fhEtaCorr){
+ if (that.fhEtaCorr) {
fhEtaCorr = new TH2D(*(that.fhEtaCorr));
fhEtaCorr->SetDirectory(0);
}
delete fhEtaSigmaPar1;
fhEtaSigmaPar1=0x0;
- if (that.fhEtaSigmaPar1){
+ if (that.fhEtaSigmaPar1) {
fhEtaSigmaPar1 = new TH2D(*(that.fhEtaSigmaPar1));
fhEtaSigmaPar1->SetDirectory(0);
}
Bool_t AliTPCPIDResponse::ResponseFunctiondEdxN( const AliVTrack* track,
AliPID::EParticleType species,
ETPCdEdxSource dedxSource,
- Double_t& dEdx,
- Int_t& nPoints,
- ETPCgainScenario& gainScenario,
+ Double_t& dEdx,
+ Int_t& nPoints,
+ ETPCgainScenario& gainScenario,
TSpline3** responseFunction) const
{
// Calculates the right parameters for PID
Float_t& inphi,
Float_t& outphi,
Int_t& in,
- Int_t& out ) const
+ Int_t& out ) const
{
//calculate the sector numbers (equivalent to IROC chamber numbers) a track crosses
//for OROC chamber numbers add 36
}
return kTRUE;
}
-
-
+
+
//_____________________________________________________________________________
Int_t AliTPCPIDResponse::sectorNumber(Double_t phi) const
{
return TMath::Floor(phi/width);
}
+
//_____________________________________________________________________________
void AliTPCPIDResponse::Print(Option_t* /*option*/) const
{
fResponseFunctions.Print();
}
+
//_____________________________________________________________________________
AliTPCPIDResponse::EChamberStatus AliTPCPIDResponse::TrackStatus(const AliVTrack* track, Int_t layer) const
{
/////////////////////////////////////////////////////////////////////////////
//find out where track enters and leaves the layer.
//
- Double_t trackPositionInner[3];
- Double_t trackPositionOuter[3];
-
+ Double_t trackPositionInner[3];
+ Double_t trackPositionOuter[3];
+
//if there is no inner param this could mean we're using the AOD track,
//we still can extrapolate from the vertex - so use those params.
const AliExternalTrackParam* ip = track->GetInnerParam();
}
- if (!sectorNumbersInOut(trackPositionInner,
- trackPositionOuter,
- inphi,
- outphi,
- in,
+ if (!sectorNumbersInOut(trackPositionInner,
+ trackPositionOuter,
+ inphi,
+ outphi,
+ in,
out)) return kChamberInvalid;
/////////////////////////////////////////////////////////////////////////////
- //now we have the location of the track we can check
+ //now we have the location of the track we can check
//if it is in a good/bad chamber
//
Bool_t sideA = kTRUE;
-
+
if (((in/18)%2==1) && ((out/18)%2==1)) sideA=kFALSE;
in=in%18;
Float_t lengthFractionInBadSectors = 0.;
const Float_t sectorWidth = TMath::TwoPi()/18.;
-
+
for (Int_t i=in; i<=out; i++)
{
int j=i;
if (i<0) j+=18; //correct for the negative values
if (!sideA) j+=18; //move to the correct side
-
+
Float_t deltaPhi = 0.;
Float_t phiEdge=sectorWidth*i;
if (inphi>phiEdge) {deltaPhi=phiEdge+sectorWidth-inphi;}
else if ((outphi>=phiEdge) && (outphi<(phiEdge+sectorWidth))) {deltaPhi=outphi-phiEdge;}
else {deltaPhi=sectorWidth;}
-
+
Float_t v = fVoltageMap[(layer==1)?(j):(j+36)];
- if (v<=fBadIROCthreshhold)
- {
- trackLengthInBad+=deltaPhi;
+ if (v<=fBadIROCthreshhold)
+ {
+ trackLengthInBad+=deltaPhi;
lengthFractionInBadSectors=1.;
}
- if (v<=fLowGainIROCthreshold && v>fBadIROCthreshhold)
+ if (v<=fLowGainIROCthreshold && v>fBadIROCthreshhold)
{
trackLengthInLowGain+=deltaPhi;
lengthFractionInBadSectors=1.;
lengthFractionInBadSectors = (trackLengthInLowGain+trackLengthInBad)/trackLengthTotal;
//printf("### side: %s, pt: %.2f, pz: %.2f, in: %i, out: %i, phiIN: %.2f, phiOUT: %.2f, rIN: %.2f, rOUT: %.2f\n",(sideA)?"A":"C",track->Pt(),track->Pz(),in,out,inphi,outphi,innerRadius,outerRadius);
-
- if (lengthFractionInBadSectors>fMaxBadLengthFraction)
+
+ if (lengthFractionInBadSectors>fMaxBadLengthFraction)
{
//printf("%%%%%%%% %s kChamberLowGain\n",(layer==1)?"IROC":"OROC");
return kChamberLowGain;
}
-
+
return kChamberHighGain;
}
+
//_____________________________________________________________________________
Float_t AliTPCPIDResponse::MaxClusterRadius(const AliVTrack* track) const
{
if (!clusterMap) return 0.;
//from AliTPCParam, radius of first IROC row
- const Float_t rfirstIROC = 8.52249984741210938e+01;
+ const Float_t rfirstIROC = 8.52249984741210938e+01;
const Float_t padrowHeightIROC = 0.75;
const Float_t rfirstOROC0 = 1.35100006103515625e+02;
const Float_t padrowHeightOROC0 = 1.0;
return 0.0;
}
+
//_____________________________________________________________________________
Bool_t AliTPCPIDResponse::TrackApex(const AliVTrack* track, Float_t magField, Double_t position[3]) const
{
Double_t p[3];
track->GetPxPyPz(p);
Double_t r = 1./track->OneOverPt()/0.0299792458/magField; //signed - will determine the direction of b
- //printf("b: %.2f, x:%.2f, y:%.2f, pt: %.2f, px:%.2f, py%.2f, r: %.2f\n",magField, x[0],x[1],track->Pt(), p[0],p[1],r);
+ //printf("b: %.2f, x:%.2f, y:%.2f, pt: %.2f, px:%.2f, py%.2f, r: %.2f\n",magField, x[0],x[1],track->Pt(), p[0],p[1],r);
//find orthogonal vector (Gram-Schmidt)
Double_t alpha = (p[0]*x[0] + p[1]*x[1])/(p[0]*p[0] + p[1]*p[1]);
Double_t b[2];
- b[0]=x[0]-alpha*p[0];
- b[1]=x[1]-alpha*p[1];
-
+ b[0]=x[0]-alpha*p[0];
+ b[1]=x[1]-alpha*p[1];
+
Double_t norm = TMath::Sqrt(b[0]*b[0]+b[1]*b[1]);
if (TMath::AreEqualAbs(norm,0.0,1e-10)) return kFALSE;
- b[0]/=norm;
- b[1]/=norm;
- b[0]*=r;
- b[1]*=r;
- b[0]+=x[0];
+ b[0]/=norm;
+ b[1]/=norm;
+ b[0]*=r;
+ b[1]*=r;
+ b[0]+=x[0];
b[1]+=x[1];
//printf("center: x:%.2f, y:%.2f\n",b[0],b[1]);
-
+
norm = TMath::Sqrt(b[0]*b[0]+b[1]*b[1]);
if (TMath::AreEqualAbs(norm,0.0,1e-10)) return kFALSE;