/* $Id$ */
#include "AliMUONChamberTrigger.h"
-#include "AliMUONSegmentationTrigger.h"
#include "AliMUONResponseTrigger.h"
-#include "AliMUONResponseTriggerV1.h"
-#include <TObjArray.h>
-#include <TMath.h>
-#include <Riostream.h>
+#include "AliMUONHit.h"
+#include "AliMUONGeometrySegmentation.h"
+#include "AliLog.h"
ClassImp(AliMUONChamberTrigger)
//-------------------------------------------
AliMUONChamberTrigger::AliMUONChamberTrigger()
+ : AliMUONChamber()
{
// Default constructor
}
-AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id) : AliMUONChamber(id)
+AliMUONChamberTrigger::AliMUONChamberTrigger(Int_t id)
+ : AliMUONChamber(id)
{
// Constructor using chamber id
}
//-------------------------------------------
-void AliMUONChamberTrigger::DisIntegration(Float_t eloss, Float_t tof,
- Float_t xhit, Float_t yhit, Float_t zhit,
+void AliMUONChamberTrigger::DisIntegration(AliMUONHit* hit,
Int_t& nnew,
Float_t newclust[6][500])
{
// Generates pad hits (simulated cluster)
// using the segmentation and the response model
+
+ Float_t tof = hit->Age();
+ Float_t xhit = hit->X();
+ Float_t yhit = hit->Y();
+ Float_t zhit = hit->Z();
+ Int_t id = hit->DetElemId();
+
Int_t twentyNano;
if (tof<75*TMath::Power(10,-9)) {
twentyNano=1;
Float_t qp;
nnew=0;
for (Int_t i=1; i<=fnsec; i++) {
- AliSegmentation * segmentation=
- (AliSegmentation*) (*fSegmentation)[i-1];
+ AliMUONGeometrySegmentation * segmentation=
+ (AliMUONGeometrySegmentation*) (*fSegmentation2)[i-1];
// Find the module & strip Id. which has fired
Int_t ix,iy;
-
- segmentation->GetPadI(xhit,yhit,0,ix,iy);
- segmentation->SetPad(ix,iy);
+ segmentation->GetPadI(id,xhit,yhit,0,ix,iy);
+ segmentation->SetPad(id,ix,iy);
+ if (xhit<0) ix = -ix;
+// printf(" fId id fnsec xhit yhit zhit ix iy %i %i %i %f %f %f %i %i \n",fId,i,id,xhit,yhit,zhit,ix,iy);
+// if (ix < 0 || ix > 10000) return;
+// if (iy < 0 || iy > 10000) return;
// 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) {
- printf("AliMUONChamberTrigger hit w/o strip %f %f \n",xhit,yhit);
+ AliInfo(Form("AliMUONChamberTrigger hit w/o strip %f %f \n",xhit,yhit));
} else {
// --- store signal information for this strip
newclust[0][nnew]=1.; // total charge
if (((AliMUONResponseTrigger*) fResponse)->SetGenerCluster()) {
// set hits
- segmentation->SetHit(xhit,yhit,zhit);
+ segmentation->SetHit(id,xhit,yhit,zhit);
// get the list of nearest neighbours
Int_t nList, xList[10], yList[10];
- segmentation->Neighbours(ix,iy,&nList,xList,yList);
+ segmentation->Neighbours(id,ix,iy,&nList,xList,yList);
qp = 0;
for (Int_t j=0; j<nList; j++){ // loop over neighbours
// neighbour real coordinates (just for checks here)
Float_t x,y,z;
- segmentation->GetPadC(xList[j],yList[j],x,y,z);
+ segmentation->GetPadC(id,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]);
+ segmentation->SetPad(id,xList[j],yList[j]);
// get the chamber (i.e. current strip) response
- qp=fResponse->IntXY(segmentation);
+ qp=fResponse->IntXY(id,segmentation);
if (qp > 0.5) {
// --- store signal information for neighbours
-
-
-
-