+ //Modify to take the tailing effect.
+ if(fIsTailEffect){
+ Double_t locX,locY,locZ,globXCenter,globYCenter,globZ;
+ Int_t para = 5; // This parameter is a natural number(excluding zero), higher the value less is the tailing effect
+ Double_t termA = 1.0;
+ Double_t termB = 1.0;
+ if(para>0){
+ for ( Int_t cath = AliMp::kCath0; cath <= AliMp::kCath1; ++cath )
+ {
+ // Get an iterator to loop over pads, within the given area.
+ const AliMpVSegmentation* seg =
+ AliMpSegmentation::Instance()
+ ->GetMpSegmentation(detElemId,AliMp::GetCathodType(cath));
+ AliMp::PlaneType plane = seg->PlaneType();
+
+ if(plane == AliMp::kBendingPlane) {
+ Global2Local(detElemId,hitX,hitY,hitZ,locX,locY,locZ);
+ AliMpPad pad = seg->PadByPosition(locX,locY,kFALSE);
+ if(pad.IsValid()){
+ Double_t locYCenter = pad.GetPositionY();
+ Double_t locXCenter = pad.GetPositionX();
+ const AliMUONGeometryTransformer* transformer = muon()->GetGeometryTransformer();
+ transformer->Local2Global(detElemId,locXCenter,locYCenter,locZ,globXCenter,globYCenter,globZ);
+ for(Int_t itime = 0; itime<para; itime++)
+ termA *= 10.0;
+
+ for(Int_t itime = 0; itime<Int_t((2*para) + 1); itime++)
+ termB *= (hitY - globYCenter) ;
+
+ hitY = hitY + termA*termB;
+ }// if the pad is a valid one
+ }// if bending plane
+ }// cathode loop
+ }// if para > 0 condn
+ }// if tail effect
+