**************************************************************************/
/*
$Log$
+Revision 1.33 2000/10/09 14:01:57 morsch
+Unused variables removed.
+
+Revision 1.32 2000/10/06 09:08:10 morsch
+Built geometry includes slat geometry for event display.
+
+Revision 1.31 2000/10/02 21:28:08 fca
+Removal of useless dependecies via forward declarations
+
+Revision 1.30 2000/10/02 16:58:29 egangler
+Cleaning of the code :
+-> coding conventions
+-> void Streamers
+-> some useless includes removed or replaced by "class" statement
+
+Revision 1.29 2000/07/28 13:49:38 morsch
+SetAcceptance defines inner and outer chamber radii according to angular acceptance.
+Can be used for simple acceptance studies.
+
+Revision 1.28 2000/07/22 16:43:15 morsch
+Same comment as before, but now done correctly I hope (sorry it's Saturday evening)
+
+Revision 1.27 2000/07/22 16:36:50 morsch
+Change order of indices in creation (new) of xhit and yhit
+
+Revision 1.26 2000/07/03 11:54:57 morsch
+AliMUONSegmentation and AliMUONHitMap have been replaced by AliSegmentation and AliHitMap in STEER
+The methods GetPadIxy and GetPadXxy of AliMUONSegmentation have changed name to GetPadI and GetPadC.
+
Revision 1.25 2000/06/29 12:34:09 morsch
AliMUONSegmentation class has been made independent of AliMUONChamber. This makes
it usable with any other geometry class. The link to the object to which it belongs is
#include <TTUBE.h>
#include <TBRIK.h>
#include <TRotMatrix.h>
+#include <TGeometry.h>
#include <TNode.h>
#include <TTree.h>
#include <TRandom.h>
#include "AliMUONRawCluster.h"
#include "AliMUONLocalTrigger.h"
#include "AliMUONGlobalTrigger.h"
+#include "AliMUONTriggerCircuit.h"
#include "AliHitMap.h"
#include "AliMUONHitMapA1.h"
#include "AliMUONChamberTrigger.h"
fNLocalTrigger = 0;
fLocalTrigger = 0;
fNLocalTrigger = 0;
+ fAccMin = 0.;
+ fAccMax = 0.;
+ fAccCut = kFALSE;
}
//___________________________________________
(*fRawClusters)[i] = new TClonesArray("AliMUONRawCluster",10000);
fNrawch[i]=0;
}
- cout << " here " << "\n";
fGlobalTrigger = new TClonesArray("AliMUONGlobalTrigger",1);
fNGlobalTrigger = 0;
fLocalTrigger = new TClonesArray("AliMUONLocalTrigger",234);
fNLocalTrigger = 0;
-//
-// Transport angular cut
- fAccCut=0;
- fAccMin=2;
- fAccMax=9;
-
SetMarkerColor(kRed);
//
//
chamber->SetZ(AliMUONConstants::DefaultChamberZ(ch));
//
chamber->InitGeo(AliMUONConstants::DefaultChamberZ(ch));
+// Set chamber inner and outer radius to default
chamber->SetRInner(AliMUONConstants::Dmin(st)/2);
chamber->SetROuter(AliMUONConstants::Dmax(st)/2);
//
//
fMaxIterPad = 0;
fCurIterPad = 0;
+//
+ fAccMin = 0.;
+ fAccMax = 0.;
+ fAccCut = kFALSE;
// cp new design of AliMUONTriggerDecision
fTriggerCircuits = new TObjArray(AliMUONConstants::NTriggerCircuit());
{
TNode *node, *nodeF, *top, *nodeS;
const int kColorMUON = kBlue;
- const int kColorMUON2 = kGreen;
+ const int kColorMUON2 = kYellow;
+ const int kColorMUON3 = kBlue;
//
top=gAlice->GetGeometry()->GetNode("alice");
// MUON
Float_t hole=102.; // x-y hole around beam pipe for trig. chambers
Float_t zscale; // scaling parameter trigger chambers
Float_t halfx, halfy;
- char nameChamber[9], nameSense[9], nameFrame[9], nameNode[8];
+ char nameChamber[9], nameSense[9], nameFrame[9], nameNode[9];
char nameSense1[9], nameSense2[9];
for (Int_t i=0; i<7; i++) {
for (Int_t j=0; j<2; j++) {
sprintf(nameSense1,"S1_MUON%d",id);
sprintf(nameSense2,"S2_MUON%d",id);
sprintf(nameFrame,"F_MUON%d",id);
- if (i<5) { // tracking chambers
+ if (i<3) { // tracking chambers
rmin = kDmin[i]/2.-3;
rmax = kDmax[i]/2.+3;
new TTUBE(nameChamber,"Mother","void",rmin,rmax,0.25,1.);
sprintf(nameNode,"MUON%d",600+id);
nodeF = new TNode(nameNode,"Frame3",frMUON,0,-dr,0,rot270,"");
nodeF->SetLineColor(kColorMUON);
+ } else if (i == 3 || i == 4) {
+ Int_t npcb[7] = {7, 7, 6, 6, 5, 4, 3};
+ char nameSlat[9];
+
+ Float_t xpos=4.;
+ Float_t ypos1=-0.75+20.;
+ Float_t ypos2= 0.75-20.;
+
+ new TBRIK(nameChamber,"Mother","void",340,340,5.);
+ top->cd();
+ sprintf(nameNode,"MUON%d",100+id);
+ node = new TNode(nameNode,"Chambernode",nameChamber,0,0,zpos,"");
+ node->SetLineColor(kBlack);
+ fNodes->Add(node);
+ TNode* nodeSlat;
+ Int_t color;
+
+ for (Int_t j=0; j<7; j++)
+ {
+ sprintf(nameSlat,"SLAT%d",100*id+j);
+ new TBRIK(nameSlat,"Slat Module","void",20.*npcb[j],20.,0.25);
+ node->cd();
+ xpos=20.*npcb[j]+4;
+ if (j==0) xpos+=30;
+
+ color = TMath::Even(j) ? kColorMUON2 : kColorMUON3;
+
+ sprintf(nameNode,"SLAT%d",100*id+j);
+ nodeSlat =
+ new TNode(nameNode,"Slat Module",nameSlat,xpos,ypos1,0,"");
+ nodeSlat->SetLineColor(color);
+
+ node->cd();
+ sprintf(nameNode,"SLAT%d",100*id+j+7);
+ nodeSlat =
+ new TNode(nameNode,"Slat Module",nameSlat,-xpos,ypos1,0,"");
+ nodeSlat->SetLineColor(color);
+
+ color = TMath::Even(j) ? kColorMUON3 : kColorMUON2;
+ sprintf(nameNode,"SLAT%d",100*id+j+14);
+ nodeSlat =
+ new TNode(nameNode,"Slat Module",nameSlat,xpos,ypos2,0,"");
+ nodeSlat->SetLineColor(color);
+
+ node->cd();
+ sprintf(nameNode,"SLAT%d",100*id+j+21);
+ nodeSlat =
+ new TNode(nameNode,"Slat Module",nameSlat,-xpos,ypos2,0,"");
+ nodeSlat->SetLineColor(color);
+
+ ypos1+=38.5;
+ ypos2-=38.5;
+ }
+
} else {
zscale=zpos/kCz[5];
Float_t xsize=kDmin[i]*zscale;
fMaxDestepAlu=p1;
}
//___________________________________________
-void AliMUON::SetMuonAcc(Bool_t acc, Float_t angmin, Float_t angmax)
+void AliMUON::SetAcceptance(Bool_t acc, Float_t angmin, Float_t angmax)
{
fAccCut=acc;
- fAccMin=angmin;
- fAccMax=angmax;
+ fAccMin=angmin*TMath::Pi()/180;
+ fAccMax=angmax*TMath::Pi()/180;
+ Int_t ch;
+ if (acc) {
+ for (Int_t st = 0; st < AliMUONConstants::NCh() / 2; st++) {
+ // Loop over 2 chambers in the station
+ for (Int_t stCH = 0; stCH < 2; stCH++) {
+ ch = 2 * st + stCH;
+// Set chamber inner and outer radius according to acceptance cuts
+ Chamber(ch).SetRInner(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMin));
+ Chamber(ch).SetROuter(AliMUONConstants::DefaultChamberZ(ch)*TMath::Tan(fAccMax));
+ } // chamber loop
+ } // station loop
+ }
}
//___________________________________________
void AliMUON::SetSegmentationModel(Int_t id, Int_t isec, AliSegmentation *segmentation)
clhits[0]=fNhits+1;
//
//
+// if (idvol == 6) printf("\n ->Disintegration %f %f %f", xhit, yhit, eloss );
+
+
((AliMUONChamber*) (*fChambers)[idvol])
->DisIntegration(eloss, tof, xhit, yhit, zhit, nnew, newclust);
Int_t ic=0;
-
+// if (idvol == 6) printf("\n nnew %d \n", nnew);
//
// Add new clusters
for (Int_t i=0; i<nnew; i++) {
TTree *treeH = gAlice->TreeH();
Int_t ntracks =(Int_t) treeH->GetEntries();
Int_t jj;
- Float_t ** xhit = new Float_t * [2];
- for (jj=0; jj<2; jj++) xhit[jj] = new Float_t [AliMUONConstants::NCh()];
- Float_t ** yhit = new Float_t * [2];
- for (jj=0; jj<2; jj++) yhit[jj] = new Float_t [AliMUONConstants::NCh()];
-
+
+ Float_t ** xhit = new Float_t * [AliMUONConstants::NCh()];
+ for (jj=0; jj<AliMUONConstants::NCh(); jj++) xhit[jj] = new Float_t[2];
+ Float_t ** yhit = new Float_t * [AliMUONConstants::NCh()];
+ for (jj=0; jj<AliMUONConstants::NCh(); jj++) yhit[jj] = new Float_t[2];
+
for (Int_t track=0; track<ntracks; track++) {
gAlice->ResetHits();
treeH->GetEvent(track);
-
//
// Loop over hits
for(AliMUONHit* mHit=(AliMUONHit*)pMUON->FirstHit(-1);
{
Int_t nch = mHit->fChamber-1; // chamber number
if (nch > AliMUONConstants::NCh()-1) continue;
+// if (nch > 9) continue;
iChamber = &(pMUON->Chamber(nch));
// new 17.07.99
if (addBackground) {
if (mHit->fParticle == kMuonPlus
|| mHit->fParticle == kMuonMinus) {
- xhit[nch][nmuon[nch]]=mHit->fX;
- yhit[nch][nmuon[nch]]=mHit->fY;
+ xhit[nch][nmuon[nch]]=mHit->X();
+ yhit[nch][nmuon[nch]]=mHit->Y();
nmuon[nch]++;
if (nmuon[nch] >2) printf("nmuon %d\n",nmuon[nch]);
}
Int_t ipx = mPad->fPadX; // pad number on X
Int_t ipy = mPad->fPadY; // pad number on Y
Int_t iqpad = Int_t(mPad->fQpad);// charge per pad
+// printf("\n Pad: %d %d %d %d", ipx, ipy, cathode,nch);
//
//
if (cathode != (icat+1)) continue;
// fill the info array
- Float_t thex, they, thez;
+// Float_t thex, they, thez;
segmentation=iChamber->SegmentationModel(cathode);
- segmentation->GetPadC(ipx,ipy,thex,they,thez);
+// segmentation->GetPadC(ipx,ipy,thex,they,thez);
// Float_t rpad=TMath::Sqrt(thex*thex+they*they);
// if (rpad < rmin || iqpad ==0 || rpad > rmax) continue;
Int_t lastEntry=trlist->GetLast();
TVector *pTrack=(TVector*)trlist->At(lastEntry);
TVector &ptrk=*pTrack;
- Int_t lastTrack=Int_t(ptrk(0));
- Int_t lastCharge=Int_t(ptrk(1));
+ Int_t lastTrack = Int_t(ptrk(0));
+ Int_t lastCharge = Int_t(ptrk(1));
if (lastTrack==track) {
lastCharge+=iqpad;
trlist->RemoveAt(lastEntry);
for (Int_t tr=0;tr<nptracks;tr++) {
TVector *ppTrack=(TVector*)trlist->At(tr);
TVector &pptrk=*ppTrack;
- trk[tr]=Int_t(pptrk(0));
- chtrk[tr]=Int_t(pptrk(1));
+ trk[tr] = Int_t(pptrk(0));
+ chtrk[tr] = Int_t(pptrk(1));
}
} // end if nptracks
} // end if pdigit
Int_t nch = mHit->fChamber-1; // chamber number
if (nch >9) continue;
iChamber = &(pMUON->Chamber(nch));
- Int_t rmin = (Int_t)iChamber->RInner();
- Int_t rmax = (Int_t)iChamber->ROuter();
- Float_t xbgr=mHit->fX;
- Float_t ybgr=mHit->fY;
+// Int_t rmin = (Int_t)iChamber->RInner();
+// Int_t rmax = (Int_t)iChamber->ROuter();
+ Float_t xbgr=mHit->X();
+ Float_t ybgr=mHit->Y();
Bool_t cond=kFALSE;
for (Int_t imuon =0; imuon < nmuon[nch]; imuon++) {
Int_t iqpad = Int_t(mPad->fQpad);// charge per pad
if (cathode != (icat+1)) continue;
- Float_t thex, they, thez;
- segmentation=iChamber->SegmentationModel(cathode);
- segmentation->GetPadC(ipx,ipy,thex,they,thez);
- Float_t rpad=TMath::Sqrt(thex*thex+they*they);
- if (rpad < rmin || iqpad ==0 || rpad > rmax) continue;
+ printf("\n Pad: %d %d %d", ipx, ipy, cathode);
+
+// Float_t thex, they, thez;
+// segmentation=iChamber->SegmentationModel(cathode);
+// segmentation->GetPadC(ipx,ipy,thex,they,thez);
+// Float_t rpad=TMath::Sqrt(thex*thex+they*they);
+// if (rpad < rmin || iqpad ==0 || rpad > rmax) continue;
new((*pAddress)[countadr++]) TVector(2);
TVector &trinfo=*((TVector*) (*pAddress)[countadr-1]);
trinfo(0)=-1; // tag background