/* $Id$ */
+#include <TClonesArray.h>
#include "AliLog.h"
#include "AliRun.h"
AliITSTrigger::AliITSTrigger()
: AliTriggerDetector(),
fGlobalFOThreshold(1),
-fHighMultFOThreshold(150){
+fHighMultFOThreshold(190){
//standard constructor
SetName("ITS");
- CreateInputs();
// set parameters to define trigger condition thresholds
//fGlobalFOThreshold = 1;
// Do not create inputs again!!
if( fInputs.GetEntriesFast() > 0 ) return;
- fInputs.AddLast( new AliTriggerInput( "ITS_SPD_GFO_L0", "Global, Fast OR all detectors", 0x01 ) );
- fInputs.AddLast( new AliTriggerInput( "ITS_SPD_HMULT_L0", "High Multiplicity", 0x02 ) );
+ fInputs.AddLast( new AliTriggerInput( "SPD_GFO_L0", "SPD", 0 ) );
+ fInputs.AddLast( new AliTriggerInput( "SPD_HMULT_L0", "SPD", 0 ) );
}
{
// simple FO triggers that only cares about the multiplicity
+ const Int_t nChipsInModule = 5;
Int_t startSPD = geom->GetStartSPD();
Int_t lastSPD = geom->GetLastSPD();
Int_t totalNumberOfFO = 0;
+ Int_t totalNumberOfFOLay1 = 0;
Int_t ndigitsInChip[5];
// loop over modules (ladders)
for (Int_t moduleIndex=startSPD; moduleIndex<lastSPD+1; moduleIndex++) {
treeD->GetEvent(moduleIndex);
TClonesArray* digits = (TClonesArray*) (digDet->At(0)); // SPD only.
+ Int_t lay,stav,det; geom->GetModuleId(moduleIndex,lay,stav,det);
// get number of digits in this module
Int_t ndigitsInModule = digits->GetEntriesFast();
for( Int_t iDig=0; iDig<ndigitsInModule; iDig++ ) {
AliITSdigitSPD* dp = (AliITSdigitSPD*) digits->At(iDig);
Int_t column = dp->GetCoord1();
- Int_t isChip = Int_t(column/32.);
+ Int_t isChip = nChipsInModule - Int_t(column/32.) - 1;
ndigitsInChip[isChip]++;
}
// get number of FOs in the module
for( Int_t ifChip=0; ifChip<5; ifChip++ ) {
if( ndigitsInChip[ifChip] >= 1 ) {
- totalNumberOfFO++;
+ totalNumberOfFO++;
+ if(lay==1) totalNumberOfFOLay1++;
}
}
// end of loop over modules
// produce input trigger condition
if (totalNumberOfFO>=fGlobalFOThreshold)
- SetInput( "ITS_SPD_GFO_L0" );
+ SetInput( "SPD_GFO_L0" );
- if (totalNumberOfFO>=fHighMultFOThreshold)
- SetInput( "ITS_SPD_HMULT_L0" );
+ if (totalNumberOfFOLay1>=fHighMultFOThreshold)
+ SetInput( "SPD_HMULT_L0" );
return;