37 #include "TGeoManager.h" 61 fFacSigmaPadRow = Float_t(kFacSigmaPadRow);
62 fFacSigmaPad = Float_t(kFacSigmaPad);
63 fFacSigmaTime = Float_t(kFacSigmaTime);
97 Error(
"AliTPCParamSR",
"response function was not adjusted");
118 Int_t fpadrow = TMath::Max(TMath::Nint(index[2]+xyz[0]-sfpadrow),0);
119 Int_t fpad = TMath::Nint(xyz[1]-sfpad);
121 Int_t lpadrow = TMath::Min(TMath::Nint(index[2]+xyz[0]+sfpadrow),fpadrow+19);
122 lpadrow = TMath::Min(
GetNRow(index[1])-1,lpadrow);
123 Int_t lpad = TMath::Min(TMath::Nint(xyz[1]+sfpad),fpad+19);
124 Int_t ltime = TMath::Min(TMath::Nint(xyz[2]+xyz[3]+
GetZOffset()/
GetZWidth()+sftime),ftime+19);
127 Int_t npads =
GetNPads(index[1],row);
132 if (ftime<0) ftime=0;
135 if (fpadrow<=row) fpadrow =row;
138 if (lpadrow>=row) lpadrow = row;
144 Float_t padres[20][20];
152 for (padrow = fpadrow;padrow<=lpadrow;padrow++)
153 for (pad = fpad;pad<=lpad;pad++){
154 Float_t dy = (xyz[0]+Float_t(index[2]-padrow));
155 Float_t dx = (xyz[1]+Float_t(pad));
165 for (time = ftime;time<=ltime;time++)
168 for (padrow = fpadrow;padrow<=lpadrow;padrow++)
169 for (pad = fpad;pad<=lpad;pad++)
170 for (time = ftime;time<=ltime;time++){
171 cweight = timeres[time-ftime]*padres[padrow-fpadrow][pad-fpad];
213 const Int_t §or,
const Int_t & padrow, Int_t option)
const 217 Bool_t rel = ( (option&2)!=0);
218 Int_t index[3]={sector,padrow,0};
224 Int_t §or, Int_t & padrow, Int_t option)
const 234 Bool_t rel = ( (option&2)!=0);
253 Float_t a1=TMath::Sin(angle[0]);
255 Float_t a2=TMath::Sin(angle[1]);
257 Float_t length =padlength*TMath::Sqrt(1+a1+a2);
266 Float_t a1=TMath::Sin(angle[0]);
268 Float_t a2=TMath::Sin(angle[1]);
270 Float_t length =padlength*TMath::Sqrt(1+a1+a2);
284 Float_t lx[3] = {x[0],x[1],x[2]};
285 Int_t li[3] = {index[0],index[1],index[2]};
316 Float_t , Int_t , Float_t *)
335 Float_t addangle = TMath::ASin(x[1]/
GetPadRowRadii(index[1],index[2]));
406 void AliTPCParamSR::Streamer(TBuffer &R__b)
410 if (R__b.IsReading()) {
411 Version_t R__v = R__b.ReadVersion();
if (R__v) { }
413 AliTPCParam::Streamer(R__b);
418 R__b.WriteVersion(AliTPCParamSR::IsA());
420 AliTPCParam::Streamer(R__b);
435 Error(
"AliTPCParamSR",
"response function was not adjusted");
439 const Int_t kpadn = 500;
440 const Float_t kfpadn = 500.;
441 const Int_t ktimen = 500;
442 const Float_t kftimen = 500.;
443 const Int_t kpadrn = 500;
444 const Float_t kfpadrn = 500.;
448 static Float_t prfinner[2*kpadrn][5*kpadn];
449 static Float_t prfouter1[2*kpadrn][5*kpadn];
450 static Float_t prfouter2[2*kpadrn][5*kpadn];
451 static Float_t kTanMax =0;
453 static Float_t rftime[5*ktimen];
454 static Int_t blabla=0;
455 static Float_t zoffset=0;
456 static Float_t zwidth=0;
457 static Float_t zoffset2=0;
458 static TH1F * hdiff=0;
459 static TH1F * hdiff1=0;
460 static TH1F * hdiff2=0;
463 kTanMax = TMath::ATan(10.*TMath::DegToRad());
464 hdiff =
new TH1F(
"prf_diff",
"prf_diff",10000,-1,1);
465 hdiff1 =
new TH1F(
"no_repsonse1",
"no_response1",10000,-1,1);
466 hdiff2 =
new TH1F(
"no_response2",
"no_response2",10000,-1,1);
471 zoffset2 = zoffset/zwidth;
472 for (Int_t i=0;i<5*ktimen;i++){
473 rftime[i] =
fTimeRF->
GetRF(((i-2.5*kftimen)/kftimen)*zwidth+zoffset);
475 for (Int_t i=0;i<5*kpadn;i++){
476 for (Int_t j=0;j<2*kpadrn;j++){
493 Int_t npads =
GetNPads(index[1],index[3]-1);
494 Int_t cpadrow = index[2];
495 Int_t cpad = TMath::Nint(xyz[1]);
496 Int_t ctime = TMath::Nint(xyz[2]+zoffset2+xyz[3]);
498 Float_t dpadrow = xyz[0];
499 Float_t dpad = xyz[1]-cpad;
500 Float_t dtime = xyz[2]+zoffset2+xyz[3]-ctime+phase*0.25;
509 fpadrow = row-cpadrow;
510 lpadrow = row-cpadrow;
512 fpadrow = (index[2]>1) ? -1 :0;
513 lpadrow = (index[2]<
GetNRow(index[1])-1) ? 1:0;
516 Int_t fpad = (cpad > -npads/2+1) ? -2: -npads/2-cpad;
517 Int_t lpad = (cpad < npads/2-2) ? 2: npads/2-1-cpad;
518 Int_t ftime = (ctime>1) ? -2: -ctime;
519 Int_t ltime = (ctime<maxt-2) ? 2: maxt-ctime-1;
530 if(dpadrow < 0.) dpadrow = -1.;
537 Int_t apadrow = TMath::Nint((dpadrow-fpadrow)*kfpadrn+kfpadrn);
538 for (Int_t ipadrow = fpadrow; ipadrow<=lpadrow;ipadrow++){
539 if ( (apadrow<0) || (apadrow>=2*kpadrn))
544 angle = kTanMax*2.*(cpad+0.5)/Float_t(npads);
545 Float_t dpadangle =0;
557 if (ipadrow==0) dpadangle *=-1;
560 Int_t apad= TMath::Nint((dpad+dpadangle-fpad)*kfpadn+2.5*kfpadn);
561 for (Int_t ipad = fpad; ipad<=lpad;ipad++){
564 cweight=prfinner[apadrow][apad];
568 cweight=prfouter1[apadrow][apad];
571 cweight=prfouter2[apadrow][apad];
575 Int_t atime = TMath::Nint((dtime-ftime)*kftimen+2.5*kftimen);
576 for (Int_t itime = ftime;itime<=ltime;itime++){
577 Float_t cweight2 = cweight*rftime[atime];
Float_t fInnerWireMount
space for wire mount, inner sector
Int_t * fResponseBin
! array with bins -calulated
Float_t GetPadPitchLength(Int_t isector=0, Int_t padrow=0) const
virtual Float_t GetAmp(Float_t *x, Int_t *index, Float_t *angle)
Float_t fLastWireUp1
position of the last wire in outer1 sector
Int_t Transform0to1(Float_t *xyz, Int_t *index) const
Float_t fInnerPadPitchWidth
Inner pad pitch width.
UInt_t GetNPads(UInt_t sector, UInt_t row) const
Float_t fOuterWWPitch
pitch between wires in outer sector -calculated
void CRXYZtoXYZ(Float_t *xyz, const Int_t §or, const Int_t &padrow, Int_t option=3) const
Float_t fPadRowLow[600]
Lower sector, pad row radii -calculated.
Manager and of geomety classes for set: TPC.
Bool_t fbStatus
indicates consistency of the data
AliTPCPRF2D * GetOuter2PRF() const
AliTPCPRF2D * fOuter1PRF
pad response function for outer sector
Manager and of geomety classes for set: TPC.
virtual Float_t * GetAnglesAccMomentum(Float_t *x, Int_t *index, Float_t *momentum, Float_t *angle)
AliTPCPRF2D * GetInnerPRF() const
void Transform4to3(Float_t *xyz, Int_t *index) const
virtual Bool_t ReadGeoMatrices()
Float_t fNPrimLoss
number of produced primary electrons per cm
AliTPCPRF2D * fInnerPRF
pad response function for inner sector
AliTPCPRF2D * GetOuter1PRF() const
Float_t GetPadPitchWidth(Int_t isector=0) const
virtual Float_t GetSigmaX() const
AliTPCRF1D * fTimeRF
time response function object
Float_t fOuterRadiusLow
lower radius of outer sector-IP
Float_t fInnerPadPitchLength
Inner pad pitch length.
void TransformTo8(Float_t *xyz, Int_t *index) const
void Transform4to8(Float_t *xyz, Int_t *index) const
Int_t CalcResponse(Float_t *x, Int_t *index, Int_t row)
Int_t Transform2to3(Float_t *xyz, Int_t *index) const
Int_t fNInnerSector
number of inner sectors -calculated
virtual void GetClusterSize(Float_t *x, Int_t *index, Float_t *angle, Int_t mode, Float_t *sigma)
void XYZtoCRXYZ(Float_t *xyz, Int_t §or, Int_t &padrow, Int_t option=3) const
static const Float_t kFacSigmaPad
Float_t fPadRowUp[600]
Upper sector, pad row radii -calculated.
virtual Float_t GetTotalLoss(Float_t *x, Int_t *index, Float_t *angle)
Float_t fOuterWireMount
space for wire mount, outer sector
Float_t fNTotalLoss
total number of produced electrons per cm
Float_t fYInner[600]
Inner sector, wire-length.
Int_t fNRowUp
number of pad rows per sector up -calculated
virtual Float_t GetZOffset() const
Float_t fOuterAngle
opening angle of outer sector
Float_t fFacSigmaPad
factor-how many sigma of response I accept
Float_t GetZWidth() const
Float_t fResponseThreshold
threshold for accepted response
Float_t GetYOuter(Int_t irow) const
Float_t * fResponseWeight
! array with response -calulated
Int_t fNPadsLow[600]
Lower sector, number of pads per row -calculated.
Int_t fNPadsUp[600]
Upper sector, number of pads per row -calculated.
TGeoManager * gGeoManager
virtual void SetDefault()
Float_t fInnerAngle
opening angle of Inner sector
Int_t CalcResponseFast(Float_t *x, Int_t *index, Int_t row, Float_t phase)
Int_t fCurrentMax
! current maximal dimension -calulated
virtual Float_t GetPRF(Float_t xin, Float_t yin)
virtual void GetSpaceResolution(Float_t *x, Int_t *index, Float_t *angle, Float_t amplitude, Int_t mode, Float_t *sigma)
static const Int_t kMaxRows
virtual Float_t * GetAnglesAccMomentum(Float_t *x, Int_t *index, Float_t *momentum, Float_t *angle)
Int_t GetNRow(Int_t isec) const
void Transform8to4(Float_t *xyz, Int_t *index) const
Float_t fYOuter[600]
Outer sector, wire-length.
Float_t fZWidth
derived value calculated using TSample and driftw -computed
Float_t fOuterPadPitchWidth
Outer pad pitch width.
Int_t GetNPads(Int_t isector, Int_t irow) const
Float_t fOuter1PadPitchLength
Outer pad pitch length.
virtual Float_t GetPrimaryLoss(Float_t *x, Int_t *index, Float_t *angle)
Float_t GetYInner(Int_t irow) const
Int_t fNOuterSector
number of outer sectors -calculated
static const Float_t kFacSigmaTime
Float_t GetRF(Float_t xin)
void Transform2to1(Float_t *xyz, Int_t *index) const
virtual Float_t GetSigmaY() const
Int_t fNRowLow
number of pad rows per low sector -set
static AliTPCROC * Instance()
Float_t fInnerRadiusLow
lower radius of inner sector-IP
Int_t fNRowUp1
number of short pad rows per sector up -set
void Transform3to4(Float_t *xyz, Int_t *index) const
Float_t GetPadRowRadii(Int_t isec, Int_t irow) const
Float_t fOuter2PadPitchLength
Outer pad pitch length.
AliTPCRF1D * GetTimeRF() const
void Transform1to2(Float_t *xyz, Int_t *index) const
void TransformTo2(Float_t *xyz, Int_t *index) const
static const Float_t kEdgeSectorSpace
Float_t fFacSigmaTime
factor-how many sigma of response I accept
Float_t fFacSigmaPadRow
factor-how many sigma of response I accept
Int_t fNtRows
total number of rows in TPC -calculated
static const Float_t kFacSigmaPadRow