X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=MUON%2FAliMUONChamberTrigger.cxx;h=7a61ca188cb89c721eaf38c3efcfa21f1c9ef652;hb=258fa37706599db2fb7b1834d37c02b6f0e53ada;hp=f9a4333749dc8b7743fe08645716a070bca80b54;hpb=802a864d183e400818d48e64ff2ba746ccb5987d;p=u%2Fmrichter%2FAliRoot.git diff --git a/MUON/AliMUONChamberTrigger.cxx b/MUON/AliMUONChamberTrigger.cxx index f9a4333749d..7a61ca188cb 100644 --- a/MUON/AliMUONChamberTrigger.cxx +++ b/MUON/AliMUONChamberTrigger.cxx @@ -13,40 +13,33 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* -$Log$ -Revision 1.2 2000/06/15 07:58:48 morsch -Code from MUON-dev joined - -Revision 1.1.2.3 2000/06/09 21:27:35 morsch -Most coding rule violations corrected. - -Revision 1.1.2.2 2000/04/26 12:28:25 morsch -- flag pad hits with condition on ToF (CP) -- Tof included in the method DisIntegration (CP) - -Revision 1.1.2.1 2000/02/17 14:30:54 morsch -Draft version - -*/ +/* $Id$ */ #include "AliMUONChamberTrigger.h" #include "AliMUONSegmentationTrigger.h" #include "AliMUONResponseTrigger.h" +#include "AliMUONResponseTriggerV1.h" #include #include -#include +#include ClassImp(AliMUONChamberTrigger) //------------------------------------------- -AliMUONChamberTrigger::AliMUONChamberTrigger() : AliMUONChamber() + +AliMUONChamberTrigger::AliMUONChamberTrigger() +{ +// Default constructor +} + + +AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id) { -// Default Constructor +// Constructor using chamber id } //------------------------------------------- -void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof, +void AliMUONChamberTrigger::DisIntegration(Float_t /*eloss*/, Float_t tof, Float_t xhit, Float_t yhit, Float_t zhit, Int_t& nnew, Float_t newclust[6][500]) @@ -56,30 +49,28 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof, // using the segmentation and the response model Int_t twentyNano; - if (tof<75*pow(10,-9)) { + if (tof<75*TMath::Power(10,-9)) { twentyNano=1; } else { twentyNano=100; } - // cout << " time = " << tof << " , " << twentyNano << "\n"; - Float_t qp; nnew=0; for (Int_t i=1; i<=fnsec; i++) { - AliMUONSegmentation * segmentation= - (AliMUONSegmentation*) (*fSegmentation)[i-1]; + AliSegmentation * segmentation= + (AliSegmentation*) (*fSegmentation)[i-1]; // Find the module & strip Id. which has fired Int_t ix,iy; - segmentation->GetPadIxy(xhit,yhit,0,ix,iy); + segmentation->GetPadI(xhit,yhit,0,ix,iy); segmentation->SetPad(ix,iy); // treatment of GEANT hits w/o corresponding strip (due to the fact that // the 2 geometries are computed in a very slightly different way) if (ix==0&&iy==0) { - cout << " AliMUONChamberTrigger hit w/o strip " << xhit << " , " << yhit << "\n"; + printf("AliMUONChamberTrigger hit w/o strip %f %f \n",xhit,yhit); } else { // --- store signal information for this strip newclust[0][nnew]=1.; // total charge @@ -89,35 +80,45 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof, newclust[4][nnew]=segmentation->ISector(); // sector id newclust[5][nnew]=(Float_t) i; // counter nnew++; - // set hits - segmentation->SetHit(xhit,yhit,zhit); - // get the list of nearest neighbours - Int_t nList, xList[2], yList[2]; - segmentation->Neighbours(ix,iy,&nList,xList,yList); - - for (Int_t j=0; jGetPadCxy(xList[j],yList[j],x,y,z); - // set pad (fx fy & fix fiy are the current pad coord. & Id.) - segmentation->SetPad(xList[j],yList[j]); - // get the chamber (i.e. current strip) response - qp=fResponse->IntXY(segmentation); + +// cluster-size if AliMUONResponseTriggerV1, nothing if AliMUONResponseTrigger + if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) { + + // set hits + segmentation->SetHit(xhit,yhit,zhit); + // get the list of nearest neighbours + Int_t nList, xList[10], yList[10]; + segmentation->Neighbours(ix,iy,&nList,xList,yList); - if (qp > 0.5) { - // --- store signal information for neighbours - newclust[0][nnew]=qp; // total charge - newclust[1][nnew]=segmentation->Ix(); // ix-position of pad - newclust[2][nnew]=segmentation->Iy(); // iy-position of pad - newclust[3][nnew]=twentyNano; // time of flight - newclust[4][nnew]=segmentation->ISector(); // sector id - newclust[5][nnew]=(Float_t) i; // counter - nnew++; - } // qp > 0.5 - } // loop on neighbour - } // endif hit w/o strip - } // loop over planes + qp = 0; + for (Int_t j=0; jGetPadC(xList[j],yList[j],x,y,z); + // set pad (fx fy & fix fiy are the current pad coord. & Id.) + segmentation->SetPad(xList[j],yList[j]); + // get the chamber (i.e. current strip) response + qp=fResponse->IntXY(segmentation); + + if (qp > 0.5) { + // --- store signal information for neighbours + newclust[0][nnew]=qp; // total charge + newclust[1][nnew]=segmentation->Ix(); // ix-pos. of pad + newclust[2][nnew]=segmentation->Iy(); // iy-pos. of pad + newclust[3][nnew]=twentyNano; // time of flight + newclust[4][nnew]=segmentation->ISector(); // sector id + newclust[5][nnew]=(Float_t) i; // counter + nnew++; + } // qp > 0.5 + } // built-up cluster-size + } // existing neighbour + } // loop over neighbours + } // endif hit w/o strip + } // loop over planes + } // if AliMUONResponseTriggerV1 } @@ -127,3 +128,5 @@ void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof, + +