/**************************************************************************
* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- * *
+ * *
* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
**************************************************************************/
/*
$Log$
+Revision 1.2 2000/06/15 07:58:49 morsch
+Code from MUON-dev joined
+
Revision 1.1.2.8 2000/06/14 14:54:34 morsch
Complete redesign, make use of TriggerCircuit and TriggerLut (PC)
// Note : with iprint>2, the strips detailed info is given for all circuits
// Global Trigger information
- for (Int_t i=0; i<3; i++) { // [0] : Low pt, [1] : High pt, [2] : All pt
+ Int_t i;
+ Int_t icirc;
+ Int_t istrip;
+
+ for (i=0; i<3; i++) { // [0] : Low pt, [1] : High pt, [2] : All pt
fGlobalSinglePlus[i]=0; // tot num of single plus
fGlobalSingleMinus[i]=0; // tot num of single minus
fGlobalSingleUndef[i]=0; // tot num of single undefined
fGlobalPairLike[i]=0; // tot num of like-sign pairs
}
// Local Trigger information
- for (Int_t icirc=0; icirc<234; icirc++){
+ for (icirc=0; icirc<234; icirc++){
fiTrigger[icirc]=0; // trigger or not
fStripX11[icirc]=0; // X strip in MC11 which triggers
fdev[icirc]=0; // deviation which triggers
fStripY11[icirc]=0; // Y strip in MC11 which triggers
- for (Int_t i=0; i<2; i++) { // pt information via LuT
+ for (i=0; i<2; i++) { // pt information via LuT
fLutLpt[icirc][i]=fLutHpt[icirc][i]=fLutApt[icirc][i]=0;
}
}
// bit pattern
- for (Int_t icirc=0; icirc<234; icirc++) {
- for (Int_t istrip=0; istrip<16; istrip++) {
+ for (icirc=0; icirc<234; icirc++) {
+ for (istrip=0; istrip<16; istrip++) {
fXbit11[icirc][istrip]=fXbit12[icirc][istrip]=0;
fYbit11[icirc][istrip]=fYbit12[icirc][istrip]=0;
fYbit21[icirc][istrip]=fYbit22[icirc][istrip]=0;
fYbit21U[icirc][istrip]=fYbit22U[icirc][istrip]=0;
fYbit21D[icirc][istrip]=fYbit22D[icirc][istrip]=0;
}
- for (Int_t istrip=0; istrip<32; istrip++) {
+ for (istrip=0; istrip<32; istrip++) {
fXbit21[icirc][istrip]=fXbit22[icirc][istrip]=0;
}
}
void AliMUONTriggerDecision::ResetBit(){
// reset bit pattern, global and local trigger output tables to 0
- for (Int_t icirc=0; icirc<234; icirc++) {
- for (Int_t istrip=0; istrip<16; istrip++) {
+ Int_t i;
+ Int_t icirc;
+ Int_t istrip;
+
+ for (icirc=0; icirc<234; icirc++) {
+ for (istrip=0; istrip<16; istrip++) {
fXbit11[icirc][istrip]=fXbit12[icirc][istrip]=0;
fYbit11[icirc][istrip]=fYbit12[icirc][istrip]=0;
fYbit21[icirc][istrip]=fYbit22[icirc][istrip]=0;
fYbit21U[icirc][istrip]=fYbit22U[icirc][istrip]=0;
fYbit21D[icirc][istrip]=fYbit22D[icirc][istrip]=0;
}
- for (Int_t istrip=0; istrip<32; istrip++) {
+ for (istrip=0; istrip<32; istrip++) {
fXbit21[icirc][istrip]=fXbit22[icirc][istrip]=0;
}
}
- for (Int_t i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
fGlobalSinglePlus[i]=0;
fGlobalSingleMinus[i]=0;
fGlobalSingleUndef[i]=0;
fGlobalPairLike[i]=0;
fGlobalPairLike[i]=0;
}
- for (Int_t icirc=0; icirc<234; icirc++){
+ for (icirc=0; icirc<234; icirc++){
fiTrigger[icirc]=0;
fStripX11[icirc]=0;
fdev[icirc]=0;
fStripY11[icirc]=0;
- for (Int_t i=0; i<2; i++) {
+ for (i=0; i<2; i++) {
fLutLpt[icirc][i]=fLutHpt[icirc][i]=fLutApt[icirc][i]=0;
}
}
// code pad
Int_t code=TMath::Abs(ix)*100+iy;
if (ix<0) { code=-code; }
+
+ Int_t icirc;
+ Int_t istrip;
+ Int_t nStrip;
if (cathode==1) {
switch (chamber)
{
case 11:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- for (Int_t istrip=0; istrip<16; istrip++) {
+ for (istrip=0; istrip<16; istrip++) {
if (triggerCircuit->GetXcode(0,istrip)==code)
fXbit11[icirc][istrip]=1;
}
}
break;
case 12:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- for (Int_t istrip=0; istrip<16; istrip++) {
+ for (istrip=0; istrip<16; istrip++) {
if (triggerCircuit->GetXcode(1,istrip)==code)
fXbit12[icirc][istrip]=1;
}
}
break;
case 13:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- for (Int_t istrip=0; istrip<32; istrip++) {
+ for (istrip=0; istrip<32; istrip++) {
if (triggerCircuit->GetXcode(2,istrip)==code)
fXbit21[icirc][istrip]=1;
}
}
break;
case 14:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- for (Int_t istrip=0; istrip<32; istrip++) {
+ for (istrip=0; istrip<32; istrip++) {
if (triggerCircuit->GetXcode(3,istrip)==code)
fXbit22[icirc][istrip]=1;
}
switch (chamber)
{
case 11:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- Int_t nStrip=triggerCircuit->GetNstripY();
- for (Int_t istrip=0; istrip<nStrip; istrip++) {
+ nStrip=triggerCircuit->GetNstripY();
+ for (istrip=0; istrip<nStrip; istrip++) {
if (triggerCircuit->GetYcode(0,istrip)==code)
fYbit11[icirc][istrip]=1;
}
}
break;
case 12:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- Int_t nStrip=triggerCircuit->GetNstripY();
- for (Int_t istrip=0; istrip<nStrip; istrip++) {
+ nStrip=triggerCircuit->GetNstripY();
+ for (istrip=0; istrip<nStrip; istrip++) {
if (triggerCircuit->GetYcode(1,istrip)==code)
fYbit12[icirc][istrip]=1;
}
}
break;
case 13:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- Int_t nStrip=triggerCircuit->GetNstripY();
- for (Int_t istrip=0; istrip<nStrip; istrip++) {
+ nStrip=triggerCircuit->GetNstripY();
+ for (istrip=0; istrip<nStrip; istrip++) {
if (triggerCircuit->GetYcode(2,istrip)==code)
fYbit21[icirc][istrip]=1;
}
}
break;
case 14:
- for (Int_t icirc=0; icirc<234; icirc++) {
+ for (icirc=0; icirc<234; icirc++) {
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
- Int_t nStrip=triggerCircuit->GetNstripY();
- for (Int_t istrip=0; istrip<nStrip; istrip++) {
+ nStrip=triggerCircuit->GetNstripY();
+ for (istrip=0; istrip<nStrip; istrip++) {
if (triggerCircuit->GetYcode(3,istrip)==code)
fYbit22[icirc][istrip]=1;
}
Int_t sgleHit1[31], sgleHit2[63];
Int_t dbleHit1[31], dbleHit2[63];
- for (Int_t i=0; i<31; i++) {
+ Int_t i;
+ Int_t j;
+ Int_t istrip;
+
+ for (i=0; i<31; i++) {
sgleHit1[i]=0;
dbleHit1[i]=0;
}
- for (Int_t i=0; i<63; i++) {
+ for (i=0; i<63; i++) {
sgleHit2[i]=0;
dbleHit2[i]=0;
}
//--- inititialize che using chq
- for (Int_t i=0; i<19; i++) {
+ for (i=0; i<19; i++) {
if (i<1||i>16) ch1e[i]=0;
else ch1e[i]=ch1q[i-1];
}
- for (Int_t i=0; i<20; i++) {
+ for (i=0; i<20; i++) {
if (i<2||i>17) ch2e[i]=0;
else ch2e[i]=ch2q[i-2];
}
- for (Int_t i=0; i<35; i++) {
+ for (i=0; i<35; i++) {
if (i<1||i>32) ch3e[i]=0;
else ch3e[i]=ch3q[i-1];
}
- for (Int_t i=0; i<36; i++) {
+ for (i=0; i<36; i++) {
if (i<2||i>33) ch4e[i]=0;
else ch4e[i]=ch4q[i-2];
}
//--- calculate dble & sgle first station
- for (Int_t i=0; i<=15; i++) {
+ for (i=0; i<=15; i++) {
sgleHit1[2*i] = (!ch1e[i+1]|(ch1e[i]^ch1e[i+2])) &
(!ch2e[i+2] | (ch2e[i+1]^ch2e[i+3]));
(ch2e[i+2] | (!ch2e[i]&ch2e[i+1]) | (ch2e[i+3]&!ch2e[i+4]));
}
- for (Int_t i=0; i<=14; i++) {
+ for (i=0; i<=14; i++) {
sgleHit1[2*i+1] = (!ch1e[i+1]|!ch1e[i+2]|(ch1e[i]^ch1e[i+3])) &
(!ch2e[i+2] | !ch2e[i+3] | (ch2e[i+1]^ch2e[i+4]));
dbleHit1[2*i+1] = ch1e[i+1]&ch1e[i+2]&!(ch1e[i]^ch1e[i+3]) &
}
//--- calculate dble & sgle second station
- for (Int_t i=0; i<=31; i++) {
+ for (i=0; i<=31; i++) {
sgleHit2[2*i] = (!ch3e[i+1]|(ch3e[i]^ch3e[i+2])) &
(!ch4e[i+2] | (ch4e[i+1]^ch4e[i+3]));
dbleHit2[2*i] = ch3e[i+1]&!(ch3e[i+2]^ch3e[i]) &
(ch4e[i+2] | (!ch4e[i]&ch4e[i+1]) | (ch4e[i+3]&!ch4e[i+4]));
}
- for (Int_t i=0; i<=30; i++) {
+ for (i=0; i<=30; i++) {
sgleHit2[2*i+1] = (!ch3e[i+1]|!ch3e[i+2]|(ch3e[i]^ch3e[i+3])) &
(!ch4e[i+2] | !ch4e[i+3] | (ch4e[i+1]^ch4e[i+4]));
dbleHit2[2*i+1] = ch3e[i+1]&ch3e[i+2]&!(ch3e[i]^ch3e[i+3]) &
cout << " X plane after sgle and dble " << " \n";
cout << " 0987654321098765432109876543210";
cout << "\n SGLE1 ";
- for (Int_t istrip=30; istrip>=0; istrip--) { cout << (!sgleHit1[istrip]); }
+ for (istrip=30; istrip>=0; istrip--) { cout << (!sgleHit1[istrip]); }
cout << "\n DBLE1 ";
- for (Int_t istrip=30; istrip>=0; istrip--) { cout << dbleHit1[istrip]; }
+ for (istrip=30; istrip>=0; istrip--) { cout << dbleHit1[istrip]; }
cout << "\n SGLE2 ";
- for (Int_t istrip=62; istrip>=0; istrip--) { cout << (!sgleHit2[istrip]); }
+ for (istrip=62; istrip>=0; istrip--) { cout << (!sgleHit2[istrip]); }
cout << "\n DBLE2 ";
- for (Int_t istrip=62; istrip>=0; istrip--) { cout << dbleHit2[istrip]; }
+ for (istrip=62; istrip>=0; istrip--) { cout << dbleHit2[istrip]; }
cout << "\n 210987654321098765432109876543210987654321098765432109876543210" << "\n";
}
// step # 2 : coincidence 3/4
//---------------------------------------------------------
Int_t rearImage[31][31];
- for (Int_t i=0; i<31; i++) {
- for (Int_t j=0; j<31; j++) {
+ for (i=0; i<31; i++) {
+ for (j=0; j<31; j++) {
rearImage[i][j]=0;
}
}
!dbleHit2[2] & !dbleHit2[1] & !dbleHit2[0] & !coinc44;
// DS reduction
- for (Int_t i=0; i<31; i++) {
+ for (i=0; i<31; i++) {
sgleHit1[i] = !sgleHit1[i]¬Or1;
}
- for (Int_t i=0; i<63; i++) {
+ for (i=0; i<63; i++) {
sgleHit2[i] = !sgleHit2[i]¬Or2;
}
// extract rearImage
- for (Int_t i=0; i<31; i++){
+ for (i=0; i<31; i++){
Int_t tmpSgleHit2[31];
Int_t tmpDbleHit2[31];
- for (Int_t j=0; j<31; j++){
+ for (j=0; j<31; j++){
tmpSgleHit2[j] = sgleHit2[i+j+1];
tmpDbleHit2[j] = dbleHit2[i+j+1];
}
//-----------
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
- for (Int_t i=30; i>=0; i--) {
+ for (i=30; i>=0; i--) {
cout << i << "\t ";
- for (Int_t istrip=31; istrip>=0; istrip--) {
+ for (istrip=31; istrip>=0; istrip--) {
cout << rearImage[i][istrip];
}
cout << " " << "\n";
// step # 3 : calculate deviation
//---------------------------------------------------------
Int_t dev[31][6];
- for (Int_t i=0; i<31; i++) {
- for (Int_t j=0; j<6; j++) {
+ for (i=0; i<31; i++) {
+ for (j=0; j<6; j++) {
dev[i][j]=0;
}
}
- for (Int_t i=0; i<31; i++){
+ for (i=0; i<31; i++){
Int_t leftDev[5], rightDev[5];
Int_t orL1, andL1, andL2, orR1, orR2, andR1, andR2, andR3;
// compare Left & Right deviations
Int_t tmpLeftDev=0, tmpRightDev=0;
- for (Int_t j=0; j<5; j++){
- tmpLeftDev = tmpLeftDev + Int_t(leftDev[j]*pow(2,j));
- tmpRightDev = tmpRightDev + Int_t(rightDev[j]*pow(2,j));
+ for (j=0; j<5; j++){
+ tmpLeftDev = tmpLeftDev + Int_t(leftDev[j]*TMath::Power(2,j));
+ tmpRightDev = tmpRightDev + Int_t(rightDev[j]*TMath::Power(2,j));
}
// assign mimimum deviation do dev[][]
if (tmpLeftDev < tmpRightDev ){
- for (Int_t j=0; j<5; j++){ dev[i][j]=leftDev[j];}
+ for (j=0; j<5; j++){ dev[i][j]=leftDev[j];}
dev[i][5]=1;
} else {
- for (Int_t j=0; j<5; j++){ dev[i][j]=rightDev[j];}
+ for (j=0; j<5; j++){ dev[i][j]=rightDev[j];}
dev[i][5]=0;
}
}
//---
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
- for (Int_t i=30; i>=0; i--) {
+ for (i=30; i>=0; i--) {
cout << i << "\t ";
- for (Int_t istrip=5; istrip>=0; istrip--) { cout << dev[i][istrip]; }
+ for (istrip=5; istrip>=0; istrip--) { cout << dev[i][istrip]; }
cout << " " << "\n";
}
}
Int_t tmpbga1[16][6], tmpbga2[8][6], tmpbga3[4][6], tmpbga4[2][6], tmpbga5[6];
Int_t tmpMax[6]={1,1,1,1,1,0};
- for (Int_t i=0; i<15; i++) {
+ for (i=0; i<15; i++) {
Sort2x5(dev[2*i],dev[2*i+1],tmpbga1[i],bga1[i]);
}
Sort2x5(dev[30],tmpMax,tmpbga1[15],bga1[15]);
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
cout << " sorting : 1st level " << "\n";
- for (Int_t i=15; i>=0; i--) {
+ for (i=15; i>=0; i--) {
cout << i << "\t " << bga1[i] << "\t";
- for (Int_t j=5; j>=0; j--) {
+ for (j=5; j>=0; j--) {
cout << tmpbga1[i][j];
}
cout << " " << "\n";
}
}
- for (Int_t i=0; i<8; i++) {
+ for (i=0; i<8; i++) {
Sort2x5(tmpbga1[2*i],tmpbga1[2*i+1],tmpbga2[i],bga2[i]);
}
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
cout << " sorting : 2nd level " << "\n";
- for (Int_t i=7; i>=0; i--) {
+ for (i=7; i>=0; i--) {
cout << i << "\t " << bga2[i] << "\t";
- for (Int_t j=5; j>=0; j--) {
+ for (j=5; j>=0; j--) {
cout << tmpbga2[i][j];
}
cout << " " << "\n";
}
}
- for (Int_t i=0; i<4; i++) {
+ for (i=0; i<4; i++) {
Sort2x5(tmpbga2[2*i],tmpbga2[2*i+1],tmpbga3[i],bga3[i]);
}
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
cout << " sorting : 3rd level " << "\n";
- for (Int_t i=3; i>=0; i--) {
+ for (i=3; i>=0; i--) {
cout << i << "\t " << bga3[i] << "\t";
- for (Int_t j=5; j>=0; j--) {
+ for (j=5; j>=0; j--) {
cout << tmpbga3[i][j];
}
cout << " " << "\n";
}
}
- for (Int_t i=0; i<2; i++) {
+ for (i=0; i<2; i++) {
Sort2x5(tmpbga3[2*i],tmpbga3[2*i+1],tmpbga4[i],bga4[i]);
}
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
cout << " sorting : 4th level " << "\n";
- for (Int_t i=1; i>=0; i--) {
+ for (i=1; i>=0; i--) {
cout << i << "\t " << bga4[i] << "\t";
- for (Int_t j=5; j>=0; j--) {
+ for (j=5; j>=0; j--) {
cout << tmpbga4[i][j];
}
cout << " " << "\n";
// coding from 6 to 5 bits
minDev[4] = tmpbga5[5] | tmpbga5[4];
- for (Int_t i=0; i<4; i++) {
+ for (i=0; i<4; i++) {
minDev[i]=tmpbga5[i] & !tmpbga5[4];
}
if(fiDebug==3||fiDebug==5) {
cout << "===============================================================" << "\n";
cout << "minDevStrip = ";
- for (Int_t i=4; i>=0; i--) {cout << minDevStrip[i];}
+ for (i=4; i>=0; i--) {cout << minDevStrip[i];}
cout << " minDev = ";
- for (Int_t i=4; i>=0; i--) {cout << minDev[i];}
+ for (i=4; i>=0; i--) {cout << minDev[i];}
cout << " " << "\n";
cout << "===============================================================" << "\n";
}
// returns minimun between dev1 and dev2
Int_t tmpDev1=0, tmpDev2=0;
for (Int_t j=0; j<5; j++){
- tmpDev1 = tmpDev1 + Int_t(dev1[j]*pow(2,j));
- tmpDev2 = tmpDev2 + Int_t(dev2[j]*pow(2,j));
+ tmpDev1 = tmpDev1 + Int_t(dev1[j]*TMath::Power(2,j));
+ tmpDev2 = tmpDev2 + Int_t(dev2[j]*TMath::Power(2,j));
}
if (tmpDev1 <= tmpDev2 ){
for (Int_t j=0; j<=5; j++) { minDev[j]=dev1[j];}
//---------------------------------------------------------
// step # 1 : prehandling Y
//---------------------------------------------------------
- for (Int_t i=0; i<16; i++){
+ Int_t i;
+ Int_t istrip;
+
+ for (i=0; i<16; i++){
y3[i]=y3[i]&!resetMid;
y4[i]=y4[i]&!resetMid;
}
Int_t tmpy3to16[16], tmpy4to16[16];
Int_t tmpy3uto16[16], tmpy3dto16[16], tmpy4uto16[16], tmpy4dto16[16];
- for (Int_t i=0; i<8; i++){
+ for (i=0; i<8; i++){
ch1[2*i] = y1[i]&x2m | y1[2*i]&!x2m;
ch1[2*i+1] = y1[i]&x2m | y1[2*i+1]&!x2m;
}
if (orMud[0]==0&&orMud[1]==0){
- for (Int_t i=0; i<16; i++){
+ for (i=0; i<16; i++){
ch3[i] = tmpy3to16[i];
ch4[i] = tmpy4to16[i];
}
}
if (orMud[0]==0&&orMud[1]==1){
- for (Int_t i=0; i<16; i++){
+ for (i=0; i<16; i++){
ch3[i] = tmpy3uto16[i]|tmpy3to16[i];
ch4[i] = tmpy4uto16[i]|tmpy4to16[i];
}
}
if (orMud[0]==1&&orMud[1]==0){
- for (Int_t i=0; i<16; i++){
+ for (i=0; i<16; i++){
ch3[i] = tmpy3dto16[i]|tmpy3to16[i];
ch4[i] = tmpy4dto16[i]|tmpy4to16[i];
}
}
if (orMud[0]==1&&orMud[1]==1){
- for (Int_t i=0; i<16; i++){
+ for (i=0; i<16; i++){
ch3[i] = tmpy3dto16[i]|tmpy3to16[i]|tmpy3uto16[i];
ch4[i] = tmpy4dto16[i]|tmpy4to16[i]|tmpy4uto16[i];
}
cout << " Y plane after PreHandling x2m x2ud orMud "
<< x2m << " , " << x2ud << " , " << orMud[0] << orMud[1] << "\n";
cout << " ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
if (istrip>9) cout << istrip-10*Int_t(istrip/10);
if (istrip<10) cout << istrip;
}
cout << "\n YMC11 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << ch1[istrip];
}
cout << "\n YMC12 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << ch2[istrip];
}
cout << "\n YMC21 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << ch3[istrip];
}
cout << "\n YMC22 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << ch4[istrip];
}
cout << " \n";
Int_t sgle2[16], dble2[16];
// Calculate simple and double hits
- for (Int_t i=0; i<16; i++) {
+ for (i=0; i<16; i++) {
dble1[i] = ch1[i] & ch2[i];
dble2[i] = ch3[i] & ch4[i];
cout << "===============================================================" << "\n";
cout << " Y plane after sgle dble " << "\n";
cout << " ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
if (istrip>9) { cout << istrip-10*Int_t(istrip/10);}
if (istrip<10) { cout << istrip;}
}
cout << "\n SGLE1 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << sgle1[istrip];
}
cout << "\n DBLE1 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << dble1[istrip];
}
cout << "\n SGLE2 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << sgle2[istrip];
}
cout << "\n DBLE2 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << dble2[istrip];
}
cout << " \n";
!dble2[7] & !dble2[6] & !dble2[5] & !dble2[4] &
!dble2[3] & !dble2[2] & !dble2[1] & !dble2[0];
- for (Int_t i=0; i<16; i++) {
+ for (i=0; i<16; i++) {
sgle1[i] = sgle1[i] & notOr1 & !coinc44;
sgle2[i] = sgle2[i] & notOr2 & !coinc44;
}
//---------------------------------------------------------
Int_t frontImage[16];
- for (Int_t i=1; i<15; i++) {
+ for (i=1; i<15; i++) {
frontImage[i] = (dble1[i] | sgle1[i]) &
(dble2[i+1] | dble2[i] | dble2[i-1]) |
dble1[i] & (sgle2[i+1] | sgle2[i] | sgle2[i-1]);
cout << "===============================================================" << "\n";
cout << " Y plane frontImage\n";
cout << " ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
if (istrip>9) cout << istrip-10*Int_t(istrip/10);
if (istrip<10) cout << istrip;
}
cout << "\n ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << frontImage[istrip];
}
cout << "\n";
Int_t minDev[5], Int_t coordY[5],
Int_t &iTrigger){
// returns local trigger answer for circuit icirc
-
+ Int_t i;
+
AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
AliMUONTriggerCircuit* triggerCircuit;
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
Int_t signDev=minDev[4];
Int_t deviation=0;
- for (Int_t i=0; i<4; i++) { // extract deviation
- deviation = deviation+Int_t(minDev[i]*pow(2,i));
+ for (i=0; i<4; i++) { // extract deviation
+ deviation = deviation+Int_t(minDev[i]*TMath::Power(2,i));
}
Int_t istripX1Circ=0;
- for (Int_t i=0; i<5; i++) { // extract X1 strip fired
- istripX1Circ = istripX1Circ+Int_t(minDevStrip[i]*pow(2,i));
+ for (i=0; i<5; i++) { // extract X1 strip fired
+ istripX1Circ = istripX1Circ+Int_t(minDevStrip[i]*TMath::Power(2,i));
}
Int_t iStripY=0;
- for (Int_t i=0; i<4; i++) { // extract Y strip fired
- iStripY = iStripY+Int_t(coordY[i]*pow(2,i));
+ for (i=0; i<4; i++) { // extract Y strip fired
+ iStripY = iStripY+Int_t(coordY[i]*TMath::Power(2,i));
}
// trigger or not
cout << " pt = " << pt << " (GeV/c) " << "\n";
cout << "-------------------------------------------" << "\n";
cout << " Local Trigger Lut Output = Lpt : " ;
- for (Int_t i=1; i>=0; i--) { cout << fLutLpt[icirc][i] ; }
+ for (i=1; i>=0; i--) { cout << fLutLpt[icirc][i] ; }
cout << " Hpt : ";
- for (Int_t i=1; i>=0; i--) { cout << fLutHpt[icirc][i] ; }
+ for (i=1; i>=0; i--) { cout << fLutHpt[icirc][i] ; }
cout << " Apt : ";
- for (Int_t i=1; i>=0; i--) { cout << fLutApt[icirc][i] ; }
+ for (i=1; i>=0; i--) { cout << fLutApt[icirc][i] ; }
cout << "\n";
cout << "-------------------------------------------" << "\n";
} // fiDebug > 1
//----------------------------------------------------------------------
void AliMUONTriggerDecision::GlobalTrigger(){
// loop on Lut[icirc] and give Global Trigger output
+ Int_t i;
for (Int_t icirc=0; icirc<234; icirc++){
if (fLutLpt[icirc][0]==1&&fLutLpt[icirc][1]==1)
}
// like sign low, high and all pt
- for (Int_t i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
fGlobalPairLike[i]=fGlobalSingleMinus[i]*(fGlobalSingleMinus[i]-1)/2 +
fGlobalSinglePlus[i]*(fGlobalSinglePlus[i]-1)/2 +
fGlobalSingleUndef[i]*(fGlobalSingleUndef[i]-1)/2 +
}
// unlike sign low, high and all pt
- for (Int_t i=0; i<3; i++) {
+ for (i=0; i<3; i++) {
fGlobalPairUnlike[i]=fGlobalSingleMinus[i]*fGlobalSinglePlus[i] +
fGlobalSingleUndef[i]*(fGlobalSingleUndef[i]-1)/2 +
fGlobalSingleUndef[i]*fGlobalSinglePlus[i] +
cout << "===================================================" << "\n";
cout << " Global Trigger output " << "Low pt High pt All" << "\n";
cout << " number of Single Plus :\t";
- for (Int_t i=0; i<3; i++) { cout << fGlobalSinglePlus[i] <<"\t";}
+ for (i=0; i<3; i++) { cout << fGlobalSinglePlus[i] <<"\t";}
cout << "\n";
cout << " number of Single Minus :\t";
- for (Int_t i=0; i<3; i++) { cout << fGlobalSingleMinus[i] <<"\t";}
+ for (i=0; i<3; i++) { cout << fGlobalSingleMinus[i] <<"\t";}
cout << "\n";
cout << " number of Single Undefined :\t";
- for (Int_t i=0; i<3; i++) { cout << fGlobalSingleUndef[i] <<"\t";}
+ for (i=0; i<3; i++) { cout << fGlobalSingleUndef[i] <<"\t";}
cout << "\n";
cout << " number of UnlikeSign pair :\t";
- for (Int_t i=0; i<3; i++) { cout << fGlobalPairUnlike[i] <<"\t";}
+ for (i=0; i<3; i++) { cout << fGlobalPairUnlike[i] <<"\t";}
cout << "\n";
cout << " number of LikeSign pair :\t";
- for (Int_t i=0; i<3; i++) { cout << fGlobalPairLike[i] <<"\t";}
+ for (i=0; i<3; i++) { cout << fGlobalPairLike[i] <<"\t";}
cout << "\n";
cout << "===================================================" << "\n";
}
//----------------------------------------------------------------------
void AliMUONTriggerDecision::PrintBitPatXInput(Int_t icirc){
// print bit pattern for X strips
-
+
+ Int_t istrip;
+
cout << "-------- TRIGGER INPUT ---------" << "\n";
cout << "===============================================================" << "\n";
cout << " 5432109876543210";
cout << "\n XMC11 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fXbit11[icirc][istrip];
}
cout << "\n XMC12 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fXbit12[icirc][istrip];
}
cout << "\n XMC21 ";
- for (Int_t istrip=31; istrip>=0; istrip--) {
+ for (istrip=31; istrip>=0; istrip--) {
cout << fXbit21[icirc][istrip];
}
cout << "\n XMC22 ";
- for (Int_t istrip=31; istrip>=0; istrip--) {
+ for (istrip=31; istrip>=0; istrip--) {
cout << fXbit22[icirc][istrip];
}
cout << "\n ";
//----------------------------------------------------------------------
void AliMUONTriggerDecision::PrintBitPatYInput(Int_t icirc){
// print bit pattern for Y strips
-
+
+ Int_t istrip;
+
AliMUON *pMUON = (AliMUON*)gAlice->GetModule("MUON");
AliMUONTriggerCircuit* triggerCircuit;
triggerCircuit = &(pMUON->TriggerCircuit(icirc));
cout << "---------------------------------------------------------------" << "\n";
cout << " ";
- for (Int_t istrip=nStrip-1; istrip>=0; istrip--) {
+ for (istrip=nStrip-1; istrip>=0; istrip--) {
if (istrip>9) { cout << istrip-10*Int_t(istrip/10);}
if (istrip<10) { cout << istrip;}
}
cout << "\n YMC11 ";
- for (Int_t istrip=nStrip-1; istrip>=0; istrip--) {
+ for (istrip=nStrip-1; istrip>=0; istrip--) {
cout << fYbit11[icirc][istrip];
}
cout << "\n YMC12 ";
- for (Int_t istrip=nStrip-1; istrip>=0; istrip--) {
+ for (istrip=nStrip-1; istrip>=0; istrip--) {
cout << fYbit12[icirc][istrip];
}
cout << "\n YMC21 ";
- for (Int_t istrip=nStrip-1; istrip>=0; istrip--) {
+ for (istrip=nStrip-1; istrip>=0; istrip--) {
cout << fYbit21[icirc][istrip];
}
cout << "\n YMC22 ";
- for (Int_t istrip=nStrip-1; istrip>=0; istrip--) {
+ for (istrip=nStrip-1; istrip>=0; istrip--) {
cout << fYbit22[icirc][istrip];
}
cout << "\n";
cout << "---------------------------------------------------------------";
cout << "\n upper part of circuit " << idCircuit ;
cout << "\n UMC21 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fYbit21U[icirc][istrip];
}
cout << "\n UMC22 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fYbit22U[icirc][istrip];
}
cout << "\n lower part of circuit " << idCircuit ;
cout << "\n LMC21 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fYbit21D[icirc][istrip];
}
cout << "\n LMC22 ";
- for (Int_t istrip=15; istrip>=0; istrip--) {
+ for (istrip=15; istrip>=0; istrip--) {
cout << fYbit22D[icirc][istrip];
}
cout << "\n";
Int_t minDev[5],
Int_t coordY[5]){
// print Local trigger output before the LuT step
+
+ Int_t i;
+
cout << "===============================================================" << "\n";
cout << "-------- TRIGGER OUTPUT --------" << "\n";
cout << "minDevStrip = ";
- for (Int_t i=4; i>=0; i--) {cout << minDevStrip[i];}
+ for (i=4; i>=0; i--) {cout << minDevStrip[i];}
cout << " minDev = ";
- for (Int_t i=4; i>=0; i--) {cout << minDev[i];}
+ for (i=4; i>=0; i--) {cout << minDev[i];}
cout << " coordY = ";
- for (Int_t i=4; i>=0; i--) {cout << coordY[i];}
+ for (i=4; i>=0; i--) {cout << coordY[i];}
cout << " " << "\n";
}