60 void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg, Double_t& xl, Double_t& yl, Double_t& zl)
109 Float_t parA, parB, parC;
112 parB =
fBValues.At(72*cath+18*plane+rpc);
117 parA = 6.089 * hv - 52.70;
118 parC = 8.3e-4 * hv - 0.5e-3;
120 return (TMath::Cos(theta)*parA/(parA+TMath::Cos(theta)*TMath::Power(x4*10.,parB))+parC)/(TMath::Cos(theta)+parC);
130 Float_t xhit = hit.
X();
131 Float_t yhit = hit.
Y();
132 Float_t zhit = hit.
Z();
134 Int_t plane = detElemId/100 - 11;
135 Int_t rpc = detElemId%100;
140 Float_t tof = hit.
Age();
141 Int_t twentyNano(100);
155 Int_t ix = pad.
GetIx();
156 Int_t iy = pad.
GetIy();
158 AliDebug(1,Form(
"xhit,yhit=%e,%e lx,ly,lz=%e,%e,%e ix,iy=%d,%d",xhit,yhit,x,y,z,ix,iy));
162 AliWarning(Form(
"hit w/o strip %d-%d xhit,yhit=%e,%e local x,y,z ""%e,%e,%e ix,iy=%d,%d",detElemId,cath,xhit,yhit,x,y,z,ix,iy));
179 Int_t xList[30], yList[30];
184 for (Int_t i=0; i<30; i++)
186 if (i==0 || i==15 || qp!=0)
188 Int_t ixNeigh = (cath == 0) ? ix : xList[i];
189 Int_t iyNeigh = (cath == 0) ? yList[i] : iy;
194 Int_t dix=-(ixNeigh-ix);
195 Int_t diy=-(iyNeigh-iy);
200 Float_t distX = TMath::Abs((Float_t)dix) * ((Float_t)dix * dpx + xlocalNeigh - x);
201 Float_t distY = TMath::Abs((Float_t)diy) * ((Float_t)diy * dpy + ylocalNeigh - y);
202 Float_t dist = TMath::Sqrt(distX*distX+distY*distY);
231 Int_t newRPC=0,newPlane=0;
237 AliWarning(
"No map found in MUON/Calib/TriggerDCS");
240 TMap *hvMap =
dynamic_cast<TMap*
>(entry->
GetObject());
244 UInt_t time1,time2,timebegin=0,timeend=0;
248 for(Int_t iPlane=0; iPlane<4; iPlane++)
250 for(Int_t iRPC=0; iRPC<18; iRPC++)
252 if(iRPC>=5 && iRPC<=13)
270 case 0: newPlane = 11;
break;
271 case 1: newPlane = 12;
break;
272 case 2: newPlane = 21;
break;
273 case 3: newPlane = 22;
break;
276 objArr = (
TObjArray*)hvMap->GetValue(Form(
"MTR_%s_MT%d_RPC%d_HV.vEff",side.Data(),newPlane,newRPC));
277 nEntries = objArr->GetEntries();
279 for(Int_t i=0; i<nEntries-1; i++)
293 voltage += (dcsValue->
GetFloat())*(time2-time1);
296 Double_t deltaTime = timeend - timebegin;
297 Double_t meanVoltage = ( deltaTime == 0. ) ? 0. : voltage/deltaTime/1000.;
298 fHVvalues.AddAt(meanVoltage,18*iPlane+iRPC);
301 AliDebug(1,Form(
"HV value for MTR_%s_MT%d_RPC%d_HV.vEff = %g (kV)",side.Data(),newPlane,newRPC,meanVoltage));
315 Float_t bValues[2][4][18] = {{{1.97,2.47,2.47,2.47,2.97,2.97,2.47,2.47,1.97,2.22,1.97,2.47,1.97,2.97,2.97,2.47,2.47,1.97},
316 {2.22,2.22,1.97,2.47,2.97,2.97,1.97,2.47,1.97,1.97,1.97,2.47,1.97,2.97,2.97,1.97,1.97,1.97},
317 {2.22,2.22,2.47,2.47,2.97,2.97,2.47,2.47,2.22,1.97,1.97,2.47,1.97,2.97,2.97,1.97,1.97,1.97},
318 {1.97,1.97,2.97,2.97,2.97,2.97,2.47,1.97,1.97,1.97,1.72,2.47,2.22,2.97,2.97,1.97,1.97,1.97}},
319 {{1.97,2.47,2.47,2.97,2.97,2.97,2.97,2.47,1.97,1.97,2.22,2.47,2.97,2.97,2.97,2.97,1.97,1.72},
320 {2.47,1.97,2.22,2.97,2.97,2.97,2.47,2.97,1.97,1.97,1.97,2.97,2.97,2.97,2.97,2.97,1.97,1.97},
321 {1.97,2.47,2.47,2.97,2.97,2.97,2.97,2.47,2.22,1.97,2.22,2.47,2.97,2.97,2.97,2.47,1.97,1.97},
322 {1.72,1.97,2.97,2.97,2.97,2.97,2.97,1.97,1.72,2.22,1.97,2.47,2.97,2.47,2.97,1.97,1.97,1.97}}};
324 for(Int_t iCath=0; iCath<2; iCath++)
326 for(Int_t iPlane=0; iPlane<4; iPlane++)
328 for(Int_t iRPC=0; iRPC<18; iRPC++)
330 fBValues.AddAt(bValues[iCath][iPlane][iRPC],72*iCath+18*iPlane+iRPC);
359 for (Int_t i=0; i<30; i++)
365 Int_t iList[30]={29,28,27,26,25,24,23,22,21,20,19,18,17,16,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};
368 Int_t iNeigh = (cath == 0) ? iy : ix;
371 for (Int_t j=iNeigh-15; j<=iNeigh+15; j++)
377 Int_t ixNeigh = ( cath == 0 ) ? ix : j;
378 Int_t iyNeigh = ( cath == 0 ) ? j : iy;
383 Xlist[iList[i]]=ixNeigh;
384 Ylist[iList[i]]=iyNeigh;
const AliMpVSegmentation * GetMpSegmentation(Int_t detElemId, AliMp::CathodType cath, Bool_t warn=true) const
static AliMpSegmentation * Instance(Bool_t warn=true)
void Global2Local(Int_t detElemId, Double_t xg, Double_t yg, Double_t zg, Double_t &xl, Double_t &yl, Double_t &zl)
Float_t Age() const
Return Particle Age.
virtual ~AliMUONResponseTriggerV1()
AliDetector class for MUON subsystem providing simulation data management.
virtual AliMpPad PadByIndices(Int_t ix, Int_t iy, Bool_t warning=true) const =0
Find pad by indices.
#define AliWarning(message)
virtual void DisIntegrate(const AliMUONHit &hit, TList &digits, Float_t timeDif)
void Neighbours(const Int_t cath, const Int_t iX, const Int_t iY, Int_t Xlist[30], Int_t Ylist[30]) const
AliCDBEntry * Get(const AliCDBId &query, Bool_t forceCaching=kFALSE)
virtual void SetPadXY(Int_t padx, Int_t pady)
Set pad number along x.
Implementation of RPC response.
Float_t fGenerCluster
Random number.
AliModule * GetModule(const char *name) const
Implementation of RPC response.
Double_t GetPositionY() const
Return the pad x position (in cm)
virtual Int_t SetGenerCluster()
Set the GenerCluster parameter.
const AliMUONGeometryTransformer * GetGeometryTransformer() const
virtual void SetCharge(Float_t q)
Set charge.
AliMp::CathodType GetCathodType(Int_t cathodNumber)
Convert integer number in enum;.
Int_t GetLocalBoardId(Int_t i) const
TArrayF fHVvalues
Array containing HV values.
AliMUONResponseTriggerV1()
Int_t DetElemId() const
Return detection element ID.
Bool_t IsValid() const
Return validity.
virtual AliMpPad PadByPosition(Double_t x, Double_t y, Bool_t warning=true) const =0
Find pad by position.
#define AliDebug(logLevel, message)
The abstract base class for the segmentation.
Double_t GetDimensionY() const
Return the y pad dimension - half length (in cm)
UInt_t GetTimeStamp() const
Class which encapsuate all information about a pad.
TArrayF fBValues
Array containing b parameters.
Double_t GetPositionX() const
Return the pad x position (in cm)
static AliCDBManager * Instance(TMap *entryCache=NULL, Int_t run=-1)
static Float_t TriggerTofLimit()
Return Trigger ToF Limit (75 ns)
Int_t fWorkCondition
1=streamer - 2=avalanche
Int_t GetLocalBoardChannel(Int_t i) const
Double_t GetDimensionX() const
Return the x pad dimension - half length (in cm)
Float_t FireStripProb(Float_t x4, Float_t theta, Int_t rpc, Int_t plane, Int_t cath) const