//_____________________________________________________________________________
void AliTRDTriggerL1::CreateInputs()
{
-
//
- // See TRIGGER/DAQ/HLT/DCS Techical Design Report, p. 58, Table 4.1 for the proposed inputs
+ // See TRIGGER/DAQ/HLT/DCS Techical Design Report,
+ // p. 58, Table 4.1 for the proposed inputs
//
- fInputs.AddLast(new AliTriggerInput( "TRD_Unlike_EPair_L1", "Unlike electron pair", 0x01 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_Like_EPair_L1", "Like electron pair", 0x02 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_Jet_LPt_L1", "Jet low pt", 0x04 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_Jet_HPt_L1", "Jet high pt", 0x08 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_Electron_L1", "Single electron", 0x10 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_HadrLPt_L1", "Single hadron low pt ", 0x20 ));
- fInputs.AddLast(new AliTriggerInput( "TRD_HadrHPt_L1", "Single hadron high pt", 0x40 ));
-
+ fInputs.AddLast(new AliTriggerInput("TRD_Unlike_EPair_L1"
+ ,"Unlike electron pair"
+ ,0x01 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_Like_EPair_L1"
+ ,"Like electron pair"
+ ,0x02 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_Jet_LPt_L1"
+ ,"Jet low pt"
+ ,0x04 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_Jet_HPt_L1"
+ ,"Jet high pt"
+ ,0x08 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_Electron_L1"
+ ,"Single electron"
+ ,0x10 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_HadrLPt_L1"
+ ,"Single hadron low pt "
+ ,0x20 ));
+ fInputs.AddLast(new AliTriggerInput("TRD_HadrHPt_L1"
+ ,"Single hadron high pt"
+ ,0x40 ));
}
// Trigger (tracks, GTU)
- Float_t highPt = trigp->GetHighPt();
+ Float_t highPt = trigp->GetHighPt();
Float_t jetLowPt = trigp->GetJetLowPt();
Float_t jetHighPt = trigp->GetJetHighPt();
public:
- AliTRDTriggerL1(); // constructor
- virtual ~AliTRDTriggerL1(){} // destructor
+ AliTRDTriggerL1();
+ virtual ~AliTRDTriggerL1() {}
virtual void CreateInputs();
virtual void Trigger();
// Returns an instance of this class, it is created if neccessary
//
- if (fgTerminated != kFALSE)
+ if (fgTerminated != kFALSE) {
return 0;
+ }
- if (fgInstance == 0)
+ if (fgInstance == 0) {
fgInstance = new AliTRDcalibDB();
+ }
return fgInstance;
}
fgTerminated = kTRUE;
- if (fgInstance != 0)
- {
+ if (fgInstance != 0) {
delete fgInstance;
fgInstance = 0;
}
AliTRDcalibDB::AliTRDcalibDB()
:TObject()
,fRun(-1)
+ ,fPRFsmp(0)
+ ,fPRFbin(0)
+ ,fPRFlo(0)
+ ,fPRFhi(0)
+ ,fPRFwid(0)
+ ,fPRFpad(0)
{
//
// Default constructor
// TODO invalid calibration data to be used.
//
- fPadResponse.fPRFbin = 0;
- fPadResponse.fPRFlo = 0.0;
- fPadResponse.fPRFhi = 0.0;
- fPadResponse.fPRFwid = 0.0;
- fPadResponse.fPRFpad = 0;
- fPadResponse.fPRFsmp = 0;
-
- for (Int_t i=0; i<kCDBCacheSize; ++i)
- {
+ for (Int_t i=0; i<kCDBCacheSize; ++i) {
fCDBCache[i] = 0;
fCDBEntries[i] = 0;
}
//_____________________________________________________________________________
AliTRDcalibDB::AliTRDcalibDB(const AliTRDcalibDB &c)
:TObject(c)
- ,fRun(0)
+ ,fRun(-1)
+ ,fPRFsmp(0)
+ ,fPRFbin(0)
+ ,fPRFlo(0)
+ ,fPRFhi(0)
+ ,fPRFwid(0)
+ ,fPRFpad(0)
{
//
// Copy constructor (not that it make any sense for a singleton...)
//
- fPadResponse.fPRFbin = 0;
- fPadResponse.fPRFlo = 0.0;
- fPadResponse.fPRFhi = 0.0;
- fPadResponse.fPRFwid = 0.0;
- fPadResponse.fPRFpad = 0;
- fPadResponse.fPRFsmp = 0;
-
- for (Int_t i=0; i<kCDBCacheSize; ++i)
- {
+ for (Int_t i=0; i<kCDBCacheSize; ++i) {
fCDBCache[i] = 0;
fCDBEntries[i] = 0;
}
// destructor
//
- if (fPadResponse.fPRFsmp) {
- delete [] fPadResponse.fPRFsmp;
- fPadResponse.fPRFsmp = 0;
+ if (fPRFsmp) {
+ delete [] fPRFsmp;
+ fPRFsmp = 0;
}
Invalidate();
// See function CacheMergeCDBEntry for details.
//
- switch (id)
- {
+ switch (id) {
// Parameters defined per pad and chamber
case kIDVdriftPad :
- return CacheCDBEntry(kIDVdriftPad, "TRD/Calib/LocalVdrift");
+ return CacheCDBEntry(kIDVdriftPad ,"TRD/Calib/LocalVdrift");
break;
case kIDVdriftChamber :
- return CacheCDBEntry(kIDVdriftChamber, "TRD/Calib/ChamberVdrift");
+ return CacheCDBEntry(kIDVdriftChamber ,"TRD/Calib/ChamberVdrift");
break;
case kIDT0Pad :
- return CacheCDBEntry(kIDT0Pad, "TRD/Calib/LocalT0");
+ return CacheCDBEntry(kIDT0Pad ,"TRD/Calib/LocalT0");
break;
case kIDT0Chamber :
- return CacheCDBEntry(kIDT0Chamber, "TRD/Calib/ChamberT0");
+ return CacheCDBEntry(kIDT0Chamber ,"TRD/Calib/ChamberT0");
break;
case kIDGainFactorPad :
- return CacheCDBEntry(kIDGainFactorPad, "TRD/Calib/LocalGainFactor");
+ return CacheCDBEntry(kIDGainFactorPad ,"TRD/Calib/LocalGainFactor");
break;
case kIDGainFactorChamber :
- return CacheCDBEntry(kIDGainFactorChamber, "TRD/Calib/ChamberGainFactor");
+ return CacheCDBEntry(kIDGainFactorChamber ,"TRD/Calib/ChamberGainFactor");
break;
// Parameters defined per pad
case kIDPRFWidth :
- return CacheCDBEntry(kIDPRFWidth, "TRD/Calib/PRFWidth");
+ return CacheCDBEntry(kIDPRFWidth ,"TRD/Calib/PRFWidth");
break;
// Status values
case kIDSuperModuleStatus :
- return CacheCDBEntry(kIDSuperModuleStatus, "TRD/Calib/SuperModuleStatus");
+ return CacheCDBEntry(kIDSuperModuleStatus ,"TRD/Calib/SuperModuleStatus");
break;
case kIDChamberStatus :
- return CacheCDBEntry(kIDChamberStatus, "TRD/Calib/ChamberStatus");
+ return CacheCDBEntry(kIDChamberStatus ,"TRD/Calib/ChamberStatus");
break;
case kIDMCMStatus :
- return CacheCDBEntry(kIDMCMStatus, "TRD/Calib/MCMStatus");
+ return CacheCDBEntry(kIDMCMStatus ,"TRD/Calib/MCMStatus");
break;
case kIDPadStatus :
- return CacheCDBEntry(kIDPadStatus, "TRD/Calib/PadStatus");
+ return CacheCDBEntry(kIDPadStatus ,"TRD/Calib/PadStatus");
break;
// Global parameters
case kIDMonitoringData :
- return CacheCDBEntry(kIDMonitoringData, "TRD/Calib/MonitoringData");
+ return CacheCDBEntry(kIDMonitoringData ,"TRD/Calib/MonitoringData");
break;
case kIDGlobals :
- return CacheCDBEntry(kIDGlobals, "TRD/Calib/Globals");
+ return CacheCDBEntry(kIDGlobals ,"TRD/Calib/Globals");
break;
case kIDPIDLQ :
- return CacheCDBEntry(kIDPIDLQ, "TRD/Calib/PIDLQ");
+ return CacheCDBEntry(kIDPIDLQ ,"TRD/Calib/PIDLQ");
break;
}
// When the run number changes the caching is invalidated.
//
- if (fRun == run)
+ if (fRun == run) {
return;
+ }
fRun = run;
Invalidate();
// Returns the drift velocity for the given pad.
//
- const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*> (GetCachedCDBObject(kIDVdriftPad));
- if (!calPad)
+ const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*>
+ (GetCachedCDBObject(kIDVdriftPad));
+ if (!calPad) {
return -1;
+ }
AliTRDCalROC* roc = calPad->GetCalROC(det);
- if (!roc)
+ if (!roc) {
return -1;
+ }
- const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDVdriftChamber));
- if (!calChamber)
+ const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDVdriftChamber));
+ if (!calChamber) {
return -1;
+ }
return calChamber->GetValue(det) * roc->GetValue(col, row);
// Returns the average drift velocity for the given detector
//
- const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDVdriftChamber));
- if (!calDet)
+ const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDVdriftChamber));
+ if (!calDet) {
return -1;
+ }
return calDet->GetValue(det);
// Returns t0 for the given pad.
//
- const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*> (GetCachedCDBObject(kIDT0Pad));
- if (!calPad)
+ const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*>
+ (GetCachedCDBObject(kIDT0Pad));
+ if (!calPad) {
return -1;
+ }
AliTRDCalROC* roc = calPad->GetCalROC(det);
- if (!roc)
+ if (!roc) {
return -1;
+ }
- const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDT0Chamber));
- if (!calChamber)
+ const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDT0Chamber));
+ if (!calChamber) {
return -1;
+ }
return calChamber->GetValue(det) * roc->GetValue(col, row);
// Returns the average t0 for the given detector
//
- const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDT0Chamber));
- if (!calDet)
+ const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDT0Chamber));
+ if (!calDet) {
return -1;
+ }
return calDet->GetValue(det);
// Returns the gain factor for the given pad.
//
- const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*> (GetCachedCDBObject(kIDGainFactorPad));
- if (!calPad)
+ const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*>
+ (GetCachedCDBObject(kIDGainFactorPad));
+ if (!calPad) {
return -1;
+ }
AliTRDCalROC* roc = calPad->GetCalROC(det);
if (!roc)
return -1;
- const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDGainFactorChamber));
- if (!calChamber)
+ const AliTRDCalDet* calChamber = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDGainFactorChamber));
+ if (!calChamber) {
return -1;
+ }
return calChamber->GetValue(det) * roc->GetValue(col, row);
// Returns the average gain factor for the given detector
//
- const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*> (GetCachedCDBObject(kIDGainFactorChamber));
- if (!calDet)
+ const AliTRDCalDet* calDet = dynamic_cast<const AliTRDCalDet*>
+ (GetCachedCDBObject(kIDGainFactorChamber));
+ if (!calDet) {
return -1;
+ }
return calDet->GetValue(det);
// Returns the PRF width for the given pad.
//
- const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*> (GetCachedCDBObject(kIDPRFWidth));
- if (!calPad)
+ const AliTRDCalPad* calPad = dynamic_cast<const AliTRDCalPad*>
+ (GetCachedCDBObject(kIDPRFWidth));
+ if (!calPad) {
return -1;
+ }
AliTRDCalROC* roc = calPad->GetCalROC(det);
- if (!roc)
+ if (!roc) {
return -1;
+ }
return roc->GetValue(col, row);
// Returns the sampling frequency of the TRD read-out.
//
- const AliTRDCalGlobals* calGlobal = dynamic_cast<const AliTRDCalGlobals*> (GetCachedCDBObject(kIDGlobals));
- if (!calGlobal)
+ const AliTRDCalGlobals* calGlobal = dynamic_cast<const AliTRDCalGlobals*>
+ (GetCachedCDBObject(kIDGlobals));
+ if (!calGlobal) {
return -1;
-
+ }
+
return calGlobal->GetSamplingFrequency();
}
// Returns the number of time bins which are read-out.
//
- const AliTRDCalGlobals* calGlobal = dynamic_cast<const AliTRDCalGlobals*> (GetCachedCDBObject(kIDGlobals));
- if (!calGlobal)
+ const AliTRDCalGlobals* calGlobal = dynamic_cast<const AliTRDCalGlobals*>
+ (GetCachedCDBObject(kIDGlobals));
+ if (!calGlobal) {
return -1;
+ }
return calGlobal->GetNumberOfTimeBins();
// Returns the status of the given pad
//
- const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*> (GetCachedCDBObject(kIDPadStatus));
- if (!cal)
+ const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*>
+ (GetCachedCDBObject(kIDPadStatus));
+ if (!cal) {
return -1;
+ }
const AliTRDCalSingleChamberStatus* roc = cal->GetCalROC(det);
- if (!roc)
+ if (!roc) {
return -1;
+ }
return roc->GetStatus(col, row);
// Returns the status of the given MCM
//
+ // To translate pad column number into MCM number
Int_t mcm = ((Int_t) col / 18);
- const AliTRDCalMCMStatus* cal = dynamic_cast<const AliTRDCalMCMStatus*> (GetCachedCDBObject(kIDMCMStatus));
- if (!cal)
+ const AliTRDCalMCMStatus* cal = dynamic_cast<const AliTRDCalMCMStatus*>
+ (GetCachedCDBObject(kIDMCMStatus));
+ if (!cal) {
return -1;
+ }
const AliTRDCalSingleChamberStatus* roc = cal->GetCalROC(det);
- if (!roc)
+ if (!roc) {
return -1;
+ }
return roc->GetStatus(mcm, row);
// Returns the status of the given chamber
//
- const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*> (GetCachedCDBObject(kIDChamberStatus));
- if (!cal)
+ const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*>
+ (GetCachedCDBObject(kIDChamberStatus));
+ if (!cal) {
return -1;
+ }
return cal->GetStatus(det);
// Returns the status of the given chamber
//
- const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*> (GetCachedCDBObject(kIDSuperModuleStatus));
- if (!cal)
+ const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*>
+ (GetCachedCDBObject(kIDSuperModuleStatus));
+ if (!cal) {
return -1;
+ }
return cal->GetStatus(sm);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*> (GetCachedCDBObject(kIDPadStatus));
- if (!cal)
+ const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*>
+ (GetCachedCDBObject(kIDPadStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsMasked(det, col, row);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*> (GetCachedCDBObject(kIDPadStatus));
- if (!cal)
+ const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*>
+ (GetCachedCDBObject(kIDPadStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsBridgedLeft(det, col, row);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*> (GetCachedCDBObject(kIDPadStatus));
- if (!cal)
+ const AliTRDCalPadStatus* cal = dynamic_cast<const AliTRDCalPadStatus*>
+ (GetCachedCDBObject(kIDPadStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsBridgedRight(det, col, row);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalMCMStatus* cal = dynamic_cast<const AliTRDCalMCMStatus*> (GetCachedCDBObject(kIDMCMStatus));
- if (!cal)
+ const AliTRDCalMCMStatus* cal = dynamic_cast<const AliTRDCalMCMStatus*>
+ (GetCachedCDBObject(kIDMCMStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsMasked(det, col, row);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*> (GetCachedCDBObject(kIDChamberStatus));
- if (!cal)
+ const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*>
+ (GetCachedCDBObject(kIDChamberStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsInstalled(det);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*> (GetCachedCDBObject(kIDChamberStatus));
- if (!cal)
+ const AliTRDCalChamberStatus* cal = dynamic_cast<const AliTRDCalChamberStatus*>
+ (GetCachedCDBObject(kIDChamberStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsMasked(det);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*> (GetCachedCDBObject(kIDSuperModuleStatus));
- if (!cal)
+ const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*>
+ (GetCachedCDBObject(kIDSuperModuleStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsInstalled(det);
// Returns status, see name of functions for details ;-)
//
- const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*> (GetCachedCDBObject(kIDSuperModuleStatus));
- if (!cal)
+ const AliTRDCalSuperModuleStatus* cal = dynamic_cast<const AliTRDCalSuperModuleStatus*>
+ (GetCachedCDBObject(kIDSuperModuleStatus));
+ if (!cal) {
return -1;
+ }
return cal->IsMasked(det);
const Int_t kPRFbin = 61;
- Float_t prf[kNplan][kPRFbin] = { {2.9037e-02, 3.3608e-02, 3.9020e-02, 4.5292e-02,
+ Float_t prf[kNplan][kPRFbin] = {
+ {2.9037e-02, 3.3608e-02, 3.9020e-02, 4.5292e-02,
5.2694e-02, 6.1362e-02, 7.1461e-02, 8.3362e-02,
9.7063e-02, 1.1307e-01, 1.3140e-01, 1.5235e-01,
1.7623e-01, 2.0290e-01, 2.3294e-01, 2.6586e-01,
1.5096e-02}};
// More sampling precision with linear interpolation
- fPadResponse.fPRFlo = -1.5;
- fPadResponse.fPRFhi = 1.5;
+ fPRFlo = -1.5;
+ fPRFhi = 1.5;
Float_t pad[kPRFbin];
Int_t sPRFbin = kPRFbin;
- Float_t sPRFwid = (fPadResponse.fPRFhi - fPadResponse.fPRFlo) / ((Float_t) sPRFbin);
+ Float_t sPRFwid = (fPRFhi - fPRFlo) / ((Float_t) sPRFbin);
for (Int_t iPad = 0; iPad < sPRFbin; iPad++) {
- pad[iPad] = ((Float_t) iPad + 0.5) * sPRFwid + fPadResponse.fPRFlo;
+ pad[iPad] = ((Float_t) iPad + 0.5) * sPRFwid + fPRFlo;
}
- fPadResponse.fPRFbin = 500;
- fPadResponse.fPRFwid = (fPadResponse.fPRFhi - fPadResponse.fPRFlo) / ((Float_t) fPadResponse.fPRFbin);
- fPadResponse.fPRFpad = ((Int_t) (1.0 / fPadResponse.fPRFwid));
+ fPRFbin = 500;
+ fPRFwid = (fPRFhi - fPRFlo) / ((Float_t) fPRFbin);
+ fPRFpad = ((Int_t) (1.0 / fPRFwid));
- if (fPadResponse.fPRFsmp) delete [] fPadResponse.fPRFsmp;
- fPadResponse.fPRFsmp = new Float_t[kNplan*fPadResponse.fPRFbin];
+ if (fPRFsmp) delete [] fPRFsmp;
+ fPRFsmp = new Float_t[kNplan*fPRFbin];
Int_t ipos1;
Int_t ipos2;
for (Int_t iPla = 0; iPla < kNplan; iPla++) {
- for (Int_t iBin = 0; iBin < fPadResponse.fPRFbin; iBin++) {
+ for (Int_t iBin = 0; iBin < fPRFbin; iBin++) {
- Float_t bin = (((Float_t) iBin) + 0.5) * fPadResponse.fPRFwid + fPadResponse.fPRFlo;
+ Float_t bin = (((Float_t) iBin) + 0.5) * fPRFwid + fPRFlo;
ipos1 = ipos2 = 0;
diff = 0;
do {
diff = bin - pad[ipos2++];
} while ((diff > 0) && (ipos2 < kPRFbin));
if (ipos2 == kPRFbin) {
- fPadResponse.fPRFsmp[iPla*fPadResponse.fPRFbin+iBin] = prf[iPla][ipos2-1];
+ fPRFsmp[iPla*fPRFbin+iBin] = prf[iPla][ipos2-1];
}
else if (ipos2 == 1) {
- fPadResponse.fPRFsmp[iPla*fPadResponse.fPRFbin+iBin] = prf[iPla][ipos2-1];
+ fPRFsmp[iPla*fPRFbin+iBin] = prf[iPla][ipos2-1];
}
else {
ipos2--;
if (ipos2 >= kPRFbin) ipos2 = kPRFbin - 1;
ipos1 = ipos2 - 1;
- fPadResponse.fPRFsmp[iPla*fPadResponse.fPRFbin+iBin] = prf[iPla][ipos2]
+ fPRFsmp[iPla*fPRFbin+iBin] = prf[iPla][ipos2]
+ diff * (prf[iPla][ipos2] - prf[iPla][ipos1])
/ sPRFwid;
}
// Applies the pad response
//
- Int_t iBin = ((Int_t) (( - dist - fPadResponse.fPRFlo) / fPadResponse.fPRFwid));
- Int_t iOff = plane * fPadResponse.fPRFbin;
+ Int_t iBin = ((Int_t) (( - dist - fPRFlo) / fPRFwid));
+ Int_t iOff = plane * fPRFbin;
- Int_t iBin0 = iBin - fPadResponse.fPRFpad + iOff;
+ Int_t iBin0 = iBin - fPRFpad + iOff;
Int_t iBin1 = iBin + iOff;
- Int_t iBin2 = iBin + fPadResponse.fPRFpad + iOff;
+ Int_t iBin2 = iBin + fPRFpad + iOff;
pad[0] = 0.0;
pad[1] = 0.0;
pad[2] = 0.0;
- if ((iBin1 >= 0) && (iBin1 < (fPadResponse.fPRFbin*kNplan))) {
+ if ((iBin1 >= 0) && (iBin1 < (fPRFbin*kNplan))) {
if (iBin0 >= 0) {
- pad[0] = signal * fPadResponse.fPRFsmp[iBin0];
+ pad[0] = signal * fPRFsmp[iBin0];
}
- pad[1] = signal * fPadResponse.fPRFsmp[iBin1];
- if (iBin2 < (fPadResponse.fPRFbin*kNplan)) {
- pad[2] = signal * fPadResponse.fPRFsmp[iBin2];
+ pad[1] = signal * fPRFsmp[iBin1];
+ if (iBin2 < (fPRFbin*kNplan)) {
+ pad[2] = signal * fPRFsmp[iBin2];
}
return 1;
static AliTRDcalibDB *fgInstance; // Instance of this class (singleton implementation)
static Bool_t fgTerminated; // Defines if this class has already been terminated
+
AliCDBEntry *fCDBEntries[kCDBCacheSize]; // Cache for CDB entries
TObject *fCDBCache[kCDBCacheSize]; // Cache for calibration objects.
Long64_t fRun; // Run Number
- struct
- {
- Float_t *fPRFsmp; //! Sampled pad response
- Int_t fPRFbin; // Number of bins for the PRF
- Float_t fPRFlo; // Lower boundary of the PRF
- Float_t fPRFhi; // Higher boundary of the PRF
- Float_t fPRFwid; // Bin width of the sampled PRF
- Int_t fPRFpad; // Distance to next pad in PRF
- } fPadResponse;
+ Float_t *fPRFsmp; //! Sampled pad response
+ Int_t fPRFbin; // Number of bins for the PRF
+ Float_t fPRFlo; // Lower boundary of the PRF
+ Float_t fPRFhi; // Higher boundary of the PRF
+ Float_t fPRFwid; // Bin width of the sampled PRF
+ Int_t fPRFpad; // Distance to next pad in PRF
private:
AliTRDcalibDB &operator=(const AliTRDcalibDB &c);
virtual ~AliTRDcalibDB();
- ClassDef(AliTRDcalibDB, 2) // Provides central access to the CDB
+ ClassDef(AliTRDcalibDB,3) // Provides central access to the CDB
};
ClassImp(AliTRDcluster)
-
- //___________________________________________________________________________
-
- AliTRDcluster::AliTRDcluster() : AliCluster() {
+//___________________________________________________________________________
+AliTRDcluster::AliTRDcluster()
+ :AliCluster()
+ ,fDetector(0)
+ ,fX(0)
+ ,fTimeBin(0)
+ ,fQ(0)
+ ,fNPads(0)
+ ,fCenter(0)
+{
//
// default constructor
//
- fQ=0;
- fTimeBin=0;
- fDetector=0;
- fNPads=0;
- fX =0;
- for (Int_t i = 0;i<7; i++) fSignals[i]=0;
+
+ for (Int_t i = 0; i < 7; i++) {
+ fSignals[i] = 0;
+ }
+
}
+
//_____________________________________________________________________________
- AliTRDcluster::AliTRDcluster(const AliTRDrecPoint &p):AliCluster()
+AliTRDcluster::AliTRDcluster(const AliTRDrecPoint &p)
+ :AliCluster()
+ ,fDetector(p.GetDetector())
+ ,fX(0)
+ ,fTimeBin(p.GetLocalTimeBin())
+ ,fQ(p.GetEnergy())
+ ,fNPads(0)
+ ,fCenter(0)
{
//
// Constructor from AliTRDrecPoint
//
- fDetector = p.GetDetector();
- fTimeBin = p.GetLocalTimeBin();
-
- fTracks[0] = p.GetTrackIndex(0);
- fTracks[1] = p.GetTrackIndex(1);
- fTracks[2] = p.GetTrackIndex(2);
+ fTracks[0] = p.GetTrackIndex(0);
+ fTracks[1] = p.GetTrackIndex(1);
+ fTracks[2] = p.GetTrackIndex(2);
+ fY = p.GetY();
+ fZ = p.GetZ();
- fQ = p.GetEnergy();
+ //fSigmaY2 = p.GetSigmaY2();
+ //fSigmaZ2 = p.GetSigmaZ2();
+ // Why is this ????
+ fSigmaY2 = 0.2;
+ fSigmaZ2 = 5.0;
- fY = p.GetY();
- fZ = p.GetZ();
- fSigmaY2 = p.GetSigmaY2();
- fSigmaZ2 = p.GetSigmaZ2();
-
- fSigmaY2 = 0.2;
- fSigmaZ2 = 5.;
- fNPads =0;
- fCenter = 0;
}
//_____________________________________________________________________________
-AliTRDcluster::AliTRDcluster(const AliTRDcluster &c):AliCluster()
+AliTRDcluster::AliTRDcluster(const AliTRDcluster &c)
+ :AliCluster()
+ ,fDetector(c.fDetector)
+ ,fX(c.fX)
+ ,fTimeBin(c.fTimeBin)
+ ,fQ(c.fQ)
+ ,fNPads(c.fNPads)
+ ,fCenter(c.fCenter)
{
//
// Copy constructor
//
- fTracks[0] = c.GetLabel(0);
- fTracks[1] = c.GetLabel(1);
- fTracks[2] = c.GetLabel(2);
-
- fX = c.GetX();
- fY = c.GetY();
- fZ = c.GetZ();
- fSigmaY2 = c.GetSigmaY2();
- fSigmaZ2 = c.GetSigmaZ2();
-
- fDetector = c.GetDetector();
- fTimeBin = c.GetLocalTimeBin();
- fQ = c.GetQ();
- fNPads = c.fNPads;
- fCenter = c.fCenter;
- for (Int_t i=0;i<7;i++) fSignals[i] = c.fSignals[i];
+ fTracks[0] = c.GetLabel(0);
+ fTracks[1] = c.GetLabel(1);
+ fTracks[2] = c.GetLabel(2);
+
+ fY = c.GetY();
+ fZ = c.GetZ();
+ fSigmaY2 = c.GetSigmaY2();
+ fSigmaZ2 = c.GetSigmaZ2();
+
+ for (Int_t i = 0; i < 7; i++) {
+ fSignals[i] = c.fSignals[i];
+ }
+
}
//_____________________________________________________________________________
//
const Int_t kSize = 9;
+ Int_t entries[kSize][2];
- Int_t entries[kSize][2], i, j, index;
-
+ Int_t i = 0;
+ Int_t j = 0;
+ Int_t k = 0;
+ Int_t index;
Bool_t indexAdded;
- for (i=0; i<kSize; i++) {
- entries[i][0]=-1;
- entries[i][1]=0;
+ for (i = 0; i < kSize; i++) {
+ entries[i][0] = -1;
+ entries[i][1] = 0;
}
- for (Int_t k=0; k<kSize; k++) {
- index=track[k];
- indexAdded=kFALSE;
- j=0;
+ for (k = 0; k < kSize; k++) {
+
+ index = track[k];
+ indexAdded = kFALSE;
+
+ j = 0;
if (index >= 0) {
- while ( (!indexAdded) && ( j < kSize ) ) {
- if ((entries[j][0]==index) || (entries[j][1]==0)) {
- entries[j][0]=index;
- entries[j][1]=entries[j][1]+1;
- indexAdded=kTRUE;
+ while ((!indexAdded) && (j < kSize)) {
+ if ((entries[j][0] == index) ||
+ (entries[j][1] == 0)) {
+ entries[j][0] = index;
+ entries[j][1] = entries[j][1] + 1;
+ indexAdded = kTRUE;
}
j++;
}
}
- }
-
- // sort by number of appearances and index value
- Int_t swap=1, tmp0, tmp1;
- while ( swap > 0) {
- swap=0;
- for(i=0; i<(kSize-1); i++) {
- if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
+
+ }
+
+ // Sort by number of appearances and index value
+ Int_t swap = 1;
+ Int_t tmp0;
+ Int_t tmp1;
+ while (swap > 0) {
+ swap = 0;
+ for (i = 0; i < (kSize - 1); i++) {
+ if ((entries[i][0] >= 0) &&
+ (entries[i+1][0] >= 0)) {
if ((entries[i][1] < entries[i+1][1]) ||
((entries[i][1] == entries[i+1][1]) &&
- (entries[i][0] > entries[i+1][0]))) {
- tmp0=entries[i][0];
- tmp1=entries[i][1];
- entries[i][0]=entries[i+1][0];
- entries[i][1]=entries[i+1][1];
- entries[i+1][0]=tmp0;
- entries[i+1][1]=tmp1;
- swap++;
+ (entries[i][0] > entries[i+1][0]))) {
+ tmp0 = entries[i][0];
+ tmp1 = entries[i][1];
+ entries[i][0] = entries[i+1][0];
+ entries[i][1] = entries[i+1][1];
+ entries[i+1][0] = tmp0;
+ entries[i+1][1] = tmp1;
+ swap++;
}
}
}
}
- // set track indexes
- for(i=0; i<3; i++) SetLabel(entries[i][0],i);
+ // Set track indexes
+ for (i = 0; i < 3; i++) {
+ SetLabel(entries[i][0],i);
+ }
return;
}
-void AliTRDcluster::SetSignals(Short_t*signals){
+//_____________________________________________________________________________
+void AliTRDcluster::SetSignals(Short_t *signals)
+{
//
- // write signals in the cluster
+ // Write signals in the cluster
//
- for (Int_t i = 0;i<7;i++) fSignals[i]=signals[i];
+
+ for (Int_t i = 0; i < 7; i++) {
+ fSignals[i] = signals[i];
+ }
+
}
+//_____________________________________________________________________________
Float_t AliTRDcluster::GetSumS() const
{
//
- // return total charge in non unfolded cluster
+ // Returns the total charge from a not unfolded cluster
//
- Float_t sum=0;
- for (Int_t i = 0;i<7;i++) sum+=fSignals[i];
- return sum;
-}
-Float_t AliTRDcluster::GetCenterS() const
-{
- //
- //
- //
- Float_t sum=0;
- Float_t sum2=0;
- for (Int_t i = 0;i<7;i++) {
- sum+=fSignals[i];
- sum2+=i*fSignals[i];
+
+ Float_t sum = 0.0;
+ for (Int_t i = 0; i < 7; i++) {
+ sum += fSignals[i];
}
- if (sum>0) return sum2/sum-2;
- return 0;
+
+ return sum;
}
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster //
+// //
+///////////////////////////////////////////////////////////////////////////////
#include "AliCluster.h"
AliTRDcluster(const AliTRDcluster &c);
AliTRDcluster(const AliTRDrecPoint &p);
- virtual void AddTrackIndex(Int_t *i);
+ virtual void AddTrackIndex(Int_t *i);
-
- Int_t IsUsed() const { return (fQ < 0) ? 1 : 0; }
- void Use(Int_t = 0) { fQ = -fQ; }
+ Int_t IsUsed() const { return (fQ < 0) ? 1 : 0; }
+ void Use(Int_t = 0) { fQ = -fQ; }
- Bool_t From2pad() const { return TestBit(k2pad); }
- Bool_t From3pad() const { return TestBit(k3pad); }
- Bool_t From4pad() const { return TestBit(k4pad); }
- Bool_t From5pad() const { return TestBit(k5pad); }
- Bool_t FromLarge() const { return TestBit(kLarge);}
- Bool_t Isolated() const { return (TestBit(k2pad) || TestBit(k3pad)); }
+ Bool_t From2pad() const { return TestBit(k2pad); }
+ Bool_t From3pad() const { return TestBit(k3pad); }
+ Bool_t From4pad() const { return TestBit(k4pad); }
+ Bool_t From5pad() const { return TestBit(k5pad); }
+ Bool_t FromLarge() const { return TestBit(kLarge); }
+ Bool_t Isolated() const { return (TestBit(k2pad) || TestBit(k3pad)); }
- virtual void SetDetector(Int_t d) { fDetector = d; }
- void SetLocalTimeBin(Int_t t) { fTimeBin = t; }
- void SetQ(Float_t q) { fQ = q; }
- virtual void SetX(Float_t x) { fX = x; }
- void SetSignals(Short_t *signals);
+ virtual void SetDetector(Int_t d) { fDetector = d; }
+ void SetLocalTimeBin(Int_t t) { fTimeBin = t; }
+ void SetQ(Float_t q) { fQ = q; }
+ virtual void SetX(Float_t x) { fX = x; }
+ void SetCenter(Float_t c) { fCenter = c; }
+ void SetSignals(Short_t *signals);
+ void Set2pad() { SetBit(k2pad); fNPads = 2; }
+ void Set3pad() { SetBit(k3pad); fNPads = 3; }
+ void Set4pad() { SetBit(k4pad); fNPads = 4; }
+ void Set5pad() { SetBit(k5pad); fNPads = 5; }
+ void SetLarge() { SetBit(kLarge); fNPads = 6; }
- virtual Int_t GetDetector() const { return fDetector; }
- Int_t GetLocalTimeBin() const { return fTimeBin; }
- Float_t GetQ() const { return fQ; }
- virtual Float_t GetX() const { return fX; }
+ virtual Int_t GetDetector() const { return fDetector; }
+ Int_t GetLocalTimeBin() const { return fTimeBin; }
+ Float_t GetQ() const { return fQ; }
+ virtual Float_t GetX() const { return fX; }
+ Int_t GetNPads() const { return fNPads; }
+ Float_t GetCenter() const { return fCenter; }
+ Float_t GetSumS() const;
- void Set2pad() { SetBit(k2pad); fNPads=2; }
- void Set3pad() { SetBit(k3pad); fNPads=3; }
- void Set4pad() { SetBit(k4pad); fNPads=4; }
- void Set5pad() { SetBit(k5pad); fNPads=5; }
- void SetLarge() { SetBit(kLarge);fNPads=6; }
- Int_t GetNPads() const {return fNPads;}
- void SetCenter(Float_t center){fCenter =center;}
- Float_t GetCenter() const {return fCenter;}
- Float_t GetSumS() const;
- Float_t GetCenterS() const;
protected:
- enum {
- k2pad = 0x00000001, // 2 pad cluster
- k3pad = 0x00000002, // 3 pad cluster
- k4pad = 0x00000004, // 4 pad cluster
- k5pad = 0x00000008, // 5 pad cluster
- kLarge = 0x00000016 // Large cluster
- };
+ enum {
+ k2pad = 0x00000001, // 2 pad cluster
+ k3pad = 0x00000002, // 3 pad cluster
+ k4pad = 0x00000004, // 4 pad cluster
+ k5pad = 0x00000008, // 5 pad cluster
+ kLarge = 0x00000016 // Large cluster
+ };
- Int_t fDetector; // TRD detector number
- Float_t fX; // local (in this detector) x pos (first order proportional to time bin (depends on local drift velocity!), (x=0 corresponds timebin=0, thus x increases TOWARDS interaction point )
- Char_t fTimeBin; // Time bin number within the detector
- Float_t fQ; // amplitude
- Char_t fNPads; // number of pads in cluster
- Float_t fCenter; // center of the cluster relative to the pad
- Short_t fSignals[7]; // signals in the cluster
+ Int_t fDetector; // TRD detector number
+ Float_t fX; // Local x position (first order proportional to time bin)
+ Char_t fTimeBin; // Time bin number within the detector
+ Float_t fQ; // Amplitude
+ Char_t fNPads; // Number of pads in cluster
+ Float_t fCenter; // Center of the cluster relative to the pad
+ Short_t fSignals[7]; // Signals in the cluster
- ClassDef(AliTRDcluster,3) // Cluster for the TRD
+ ClassDef(AliTRDcluster,3) // Cluster for the TRD
};
/* $Id$ */
-
///////////////////////////////////////////////////////////////////////////////
// //
-// TRD cluster //
+// TRD cluster, alternative version //
// //
///////////////////////////////////////////////////////////////////////////////
ClassImp(AliTRDclusterMI)
- //___________________________________________________________________________
-
-AliTRDclusterMI::AliTRDclusterMI() : AliTRDcluster()
+//___________________________________________________________________________
+AliTRDclusterMI::AliTRDclusterMI()
+ :AliTRDcluster()
+ ,fRmsY(0)
+ ,fNPads(0)
+ ,fRelPos(0)
{
- fNPads = 0;
- fRelPos = 0;
- fRmsY = 0;
+ //
+ // Default constructor
+ //
+
}
-AliTRDclusterMI::AliTRDclusterMI(AliTRDcluster & cl): AliTRDcluster(cl)
+//___________________________________________________________________________
+AliTRDclusterMI::AliTRDclusterMI(const AliTRDcluster &c)
+ :AliTRDcluster(c)
+ ,fRmsY(0)
+ ,fNPads(0)
+ ,fRelPos(0)
{
- fNPads = 0;
- fRelPos = 0;
- fRmsY = 0;
+ //
+ // Copy constructor
+ //
+
}
+
//_____________________________________________________________________________
- AliTRDclusterMI::AliTRDclusterMI(const AliTRDrecPoint &p):AliTRDcluster(p)
+AliTRDclusterMI::AliTRDclusterMI(const AliTRDrecPoint &p)
+ :AliTRDcluster(p)
+ ,fRmsY(0)
+ ,fNPads(0)
+ ,fRelPos(0)
{
//
// Constructor from AliTRDrecPoint
//
- fNPads = 0;
- fRelPos =0;
}
/* $Id$ */
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster, alternative version //
+// //
+///////////////////////////////////////////////////////////////////////////////
#include "AliTRDcluster.h"
#include "TMath.h"
class AliTRDclusterMI : public AliTRDcluster {
public:
+
AliTRDclusterMI();
- AliTRDclusterMI(AliTRDcluster&cl);
+ AliTRDclusterMI(const AliTRDcluster &c);
AliTRDclusterMI(const AliTRDrecPoint &p);
- void SetRelPos(Float_t pos){fRelPos = TMath::Nint(pos*128.);}
- Float_t GetRelPos(){return float(fRelPos)/128.;}
- void SetNPads(Int_t npads){fNPads = npads;}
- Char_t GetNPads(){return fNPads;}
- Float_t fRmsY;
+
+ void SetRmsY(Float_t rmsy) { fRmsY = rmsy; }
+ void SetNPads(Int_t npads) { fNPads = npads; }
+ void SetRelPos(Float_t pos) { fRelPos = TMath::Nint(pos*128.0); }
+
+ Float_t GetRmsY() const { return fRmsY; }
+ Char_t GetNPads() const { return fNPads; }
+ Float_t GetRelPos() const { return float(fRelPos)/128.0; }
+
protected:
- Char_t fNPads;
- Char_t fRelPos;
- ClassDef(AliTRDclusterMI,1) // ClusterMI for the TRD
+
+ Float_t fRmsY; // RMS in y direction ????
+ Char_t fNPads; // Number of pads ????
+ Char_t fRelPos; // Relative position ????
+
+ ClassDef(AliTRDclusterMI,2) // ClusterMI for the TRD
};
#include <TROOT.h>
#include <TTree.h>
#include <TFile.h>
+#include <TObjArray.h>
#include "AliRun.h"
#include "AliRunLoader.h"
#include "AliLoader.h"
+#include "AliLog.h"
#include "AliTRDclusterizer.h"
#include "AliTRDcluster.h"
ClassImp(AliTRDclusterizer)
//_____________________________________________________________________________
-AliTRDclusterizer::AliTRDclusterizer():TNamed()
+AliTRDclusterizer::AliTRDclusterizer()
+ :TNamed()
+ ,fRunLoader(NULL)
+ ,fClusterTree(NULL)
+ ,fRecPoints(NULL)
{
//
// AliTRDclusterizer default constructor
//
- fClusterTree = NULL;
- fRecPoints = 0;
- fVerbose = 0;
-
}
//_____________________________________________________________________________
AliTRDclusterizer::AliTRDclusterizer(const Text_t* name, const Text_t* title)
- :TNamed(name, title)
+ :TNamed(name,title)
+ ,fRunLoader(NULL)
+ ,fClusterTree(NULL)
+ ,fRecPoints(NULL)
{
//
- // AliTRDclusterizer default constructor
+ // AliTRDclusterizer constructor
//
- fClusterTree = NULL;
- fRecPoints = 0;
- fVerbose = 0;
-
}
//_____________________________________________________________________________
-AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c):TNamed(c)
+AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
+ :TNamed(c)
+ ,fRunLoader(NULL)
+ ,fClusterTree(NULL)
+ ,fRecPoints(NULL)
{
//
// AliTRDclusterizer copy constructor
//
- ((AliTRDclusterizer &) c).Copy(*this);
-
}
//_____________________________________________________________________________
fRecPoints->Delete();
delete fRecPoints;
}
+
}
//_____________________________________________________________________________
((AliTRDclusterizer &) c).fClusterTree = NULL;
((AliTRDclusterizer &) c).fRecPoints = NULL;
- ((AliTRDclusterizer &) c).fVerbose = fVerbose;
}
//
// Opens the AliROOT file. Output and input are in the same file
//
+
TString evfoldname = AliConfig::GetDefaultEventFolderName();
- fRunLoader = AliRunLoader::GetRunLoader(evfoldname);
- if (!fRunLoader)
+ fRunLoader = AliRunLoader::GetRunLoader(evfoldname);
+
+ if (!fRunLoader) {
fRunLoader = AliRunLoader::Open(name);
- if (!fRunLoader)
- {
- Error("Open","Can not open session for file %s.",name);
- return kFALSE;
- }
+ }
+
+ if (!fRunLoader) {
+ AliError(Form("Can not open session for file %s.",name));
+ return kFALSE;
+ }
OpenInput(nEvent);
OpenOutput();
+
return kTRUE;
-}
+}
//_____________________________________________________________________________
Bool_t AliTRDclusterizer::OpenOutput()
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
loader->MakeTree("R");
+
fClusterTree = loader->TreeR();
fClusterTree->Branch("TRDcluster","TObjArray",&ioArray,32000,0);
-
return kTRUE;
}
//
// Connect the AliRoot file containing Geometry, Kine, and Hits
- if (fRunLoader->GetAliRun() == 0x0) fRunLoader->LoadgAlice();
+ if (fRunLoader->GetAliRun() == 0x0) {
+ fRunLoader->LoadgAlice();
+ }
gAlice = fRunLoader->GetAliRun();
if (!(gAlice)) {
fRunLoader->LoadgAlice();
gAlice = fRunLoader->GetAliRun();
- if (!(gAlice)) {
- printf("AliTRDclusterizer::OpenInput -- ");
- printf("Could not find AliRun object.\n");
- return kFALSE;
- }
+ if (!(gAlice)) {
+ AliError("Could not find AliRun object.\n");
+ return kFALSE;
+ }
}
// Import the Trees for the event nEvent in the file
// found in detector = det. For det=-1 writes the tree.
//
- if ((det < -1) || (det >= AliTRDgeometry::Ndet())) {
- printf("AliTRDclusterizer::WriteClusters -- ");
- printf("Unexpected detector index %d.\n",det);
+ if ((det < -1) ||
+ (det >= AliTRDgeometry::Ndet())) {
+ AliError(Form("Unexpected detector index %d.\n",det));
return kFALSE;
}
-
TBranch *branch = fClusterTree->GetBranch("TRDcluster");
if (!branch) {
TObjArray *ioArray = 0;
branch = fClusterTree->Branch("TRDcluster","TObjArray",&ioArray,32000,0);
}
- if ((det >= 0) && (det < AliTRDgeometry::Ndet())) {
+ if ((det >= 0) &&
+ (det < AliTRDgeometry::Ndet())) {
Int_t nRecPoints = RecPoints()->GetEntriesFast();
TObjArray *detRecPoints = new TObjArray(400);
detRecPoints->AddLast(c);
}
else {
- printf("AliTRDclusterizer::WriteClusters --");
- printf("Attempt to write a cluster with unexpected detector index\n");
+ AliError("Attempt to write a cluster with unexpected detector index\n");
}
}
if (det == -1) {
- Info("WriteClusters","Writing the cluster tree %s for event %d."
- ,fClusterTree->GetName(),fRunLoader->GetEventNumber());
- /*
- fClusterTree->Write();
- AliTRDgeometry *geo = fTRD->GetGeometry();
- geo->SetName("TRDgeometry");
- geo->Write();
- */
- AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
+ AliInfo(Form("Writing the cluster tree %s for event %d."
+ ,fClusterTree->GetName(),fRunLoader->GetEventNumber()));
+
+ AliLoader *loader = fRunLoader->GetLoader("TRDLoader");
loader->WriteRecPoints("OVERWRITE");
return kTRUE;
}
- /*
- AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
- loader->WriteDigits("OVERWRITE");
- */
- printf("AliTRDclusterizer::WriteClusters -- ");
- printf("Unexpected detector index %d.\n",det);
+
+ AliError(Form("Unexpected detector index %d.\n",det));
return kFALSE;
//_____________________________________________________________________________
-AliTRDcluster* AliTRDclusterizer::AddCluster(Double_t *pos, Int_t timebin, Int_t det, Double_t amp
- , Int_t *tracks, Double_t *sig, Int_t iType, Float_t center)
+AliTRDcluster* AliTRDclusterizer::AddCluster(Double_t *pos, Int_t timebin
+ , Int_t det, Double_t amp
+ , Int_t *tracks, Double_t *sig
+ , Int_t iType, Float_t center)
{
//
// Add a cluster for the TRD
c->SetSigmaZ2(sig[1]);
c->SetLocalTimeBin(timebin);
c->SetCenter(center);
+
switch (iType) {
case 0:
c->Set2pad();
RecPoints()->Add(c);
return c;
+
}
//_____________________________________________________________________________
-Double_t AliTRDclusterizer::CalcXposFromTimebin(Float_t timebin, Int_t idet, Int_t col, Int_t row)
+Double_t AliTRDclusterizer::CalcXposFromTimebin(Float_t timebin, Int_t idet
+ , Int_t col, Int_t row)
{
//
- // Calculates the local x position in the detector from the timebin, depends on the drift velocity
- // and t0
+ // Calculates the local x position in the detector from the timebin,
+ // depends on the drift velocity and t0
//
- AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
- if (!calibration)
+ AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
+ if (!calibration) {
+ AliError("Cannot calibration object");
return -1;
+ }
- Float_t vdrift = calibration->GetVdrift(idet, col, row);
- Float_t t0 = calibration->GetT0(idet, col, row);
+ Float_t vdrift = calibration->GetVdrift(idet,col,row);
+ Float_t t0 = calibration->GetT0(idet,col,row);
Float_t samplingFrequency = calibration->GetSamplingFrequency();
timebin -= t0;
return timebin / samplingFrequency * vdrift;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDclusterizer::ResetRecPoints()
+{
+ //
+ // Resets the list of rec points
+ //
+
+ if (fRecPoints) {
+ fRecPoints->Delete();
+ }
+
+}
+
+//_____________________________________________________________________________
+TObjArray* AliTRDclusterizer::RecPoints()
+{
+ //
+ // Returns the list of rec points
+ //
+
+ if (!fRecPoints) {
+ fRecPoints = new TObjArray(400);
+ }
+
+ return fRecPoints;
+
}
/* $Id$ */
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster finder base class //
+// //
+////////////////////////////////////////////////////////////////////////////
+
#include <TNamed.h>
-#include <TObjArray.h>
class TFile;
class TTree;
+class TObjArray;
+
class AliRunLoader;
+
class AliTRD;
class AliTRDcluster;
-///////////////////////////////////////////////////////
-// Finds and handles cluster //
-///////////////////////////////////////////////////////
class AliTRDclusterizer : public TNamed {
AliTRDclusterizer();
AliTRDclusterizer(const Text_t* name, const Text_t* title);
AliTRDclusterizer(const AliTRDclusterizer &c);
- virtual ~AliTRDclusterizer();
+ virtual ~AliTRDclusterizer();
AliTRDclusterizer &operator=(const AliTRDclusterizer &c);
- virtual void Copy(TObject &c) const;
- virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
-
- virtual Bool_t OpenInput(Int_t nEvent = 0);
- virtual Bool_t OpenOutput();
- virtual Bool_t MakeClusters() = 0;
- virtual Bool_t WriteClusters(Int_t det);
- void SetVerbose(Int_t v = 1) { fVerbose = v; };
+ virtual void Copy(TObject &c) const;
+ virtual Bool_t Open(const Char_t *name, Int_t nEvent = 0);
+ virtual Bool_t OpenInput(Int_t nEvent = 0);
+ virtual Bool_t OpenOutput();
+ virtual Bool_t MakeClusters() = 0;
+ virtual Bool_t WriteClusters(Int_t det);
+ void ResetRecPoints();
- TObjArray* RecPoints() {if (!fRecPoints) fRecPoints = new TObjArray(400); return fRecPoints;}
- virtual AliTRDcluster * AddCluster(Double_t *pos, Int_t timebin, Int_t det, Double_t amp, Int_t *tracks
- , Double_t *sig, Int_t iType, Float_t center = 0);
- void ResetRecPoints() {if (fRecPoints) fRecPoints->Delete();}
+ TObjArray *RecPoints();
+ virtual AliTRDcluster *AddCluster(Double_t *pos, Int_t timebin, Int_t det
+ , Double_t amp, Int_t *tracks
+ , Double_t *sig, Int_t iType, Float_t center = 0);
protected:
- Double_t CalcXposFromTimebin(Float_t timebin, Int_t idet, Int_t col, Int_t row);
+ Double_t CalcXposFromTimebin(Float_t timebin, Int_t idet, Int_t col, Int_t row);
- AliRunLoader *fRunLoader; //! Run Loader
-
- TTree *fClusterTree; //! Tree with the cluster
-
- TObjArray* fRecPoints; //! Array of clusters
- Int_t fVerbose; // Sets the verbose level
+ AliRunLoader *fRunLoader; //! Run Loader
+ TTree *fClusterTree; //! Tree with the cluster
+ TObjArray *fRecPoints; //! Array of clusters
- ClassDef(AliTRDclusterizer,3) // TRD-Cluster manager base class
+ ClassDef(AliTRDclusterizer,4) // TRD-Cluster manager base class
};
///////////////////////////////////////////////////////////////////////////////
// //
-// TRD cluster finder for the slow simulator.
+// TRD cluster finder //
// //
///////////////////////////////////////////////////////////////////////////////
#include "AliRunLoader.h"
#include "AliLoader.h"
#include "AliRawReader.h"
+#include "AliLog.h"
#include "AliTRDclusterizerV1.h"
#include "AliTRDgeometry.h"
ClassImp(AliTRDclusterizerV1)
//_____________________________________________________________________________
-AliTRDclusterizerV1::AliTRDclusterizerV1():AliTRDclusterizer()
+AliTRDclusterizerV1::AliTRDclusterizerV1()
+ :AliTRDclusterizer()
+ ,fDigitsManager(NULL)
{
//
// AliTRDclusterizerV1 default constructor
//
- fDigitsManager = 0;
-
}
//_____________________________________________________________________________
AliTRDclusterizerV1::AliTRDclusterizerV1(const Text_t* name, const Text_t* title)
- :AliTRDclusterizer(name,title)
+ :AliTRDclusterizer(name,title)
+ ,fDigitsManager(new AliTRDdigitsManager())
{
//
- // AliTRDclusterizerV1 default constructor
+ // AliTRDclusterizerV1 constructor
//
- fDigitsManager = new AliTRDdigitsManager();
fDigitsManager->CreateArrays();
}
//_____________________________________________________________________________
AliTRDclusterizerV1::AliTRDclusterizerV1(const AliTRDclusterizerV1 &c)
-:AliTRDclusterizer(c)
+ :AliTRDclusterizer(c)
+ ,fDigitsManager(NULL)
{
//
// AliTRDclusterizerV1 copy constructor
//
- ((AliTRDclusterizerV1 &) c).Copy(*this);
-
}
//_____________________________________________________________________________
//
if (!fRunLoader) {
- printf("<AliTRDclusterizerV1::ReadDigits> ");
- printf("No input file open\n");
+ AliError("No run loader available");
return kFALSE;
}
+
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
- if (!loader->TreeD()) loader->LoadDigits();
+ if (!loader->TreeD()) {
+ loader->LoadDigits();
+ }
// Read in the digit arrays
return (fDigitsManager->ReadDigits(loader->TreeD()));
//
AliTRDrawData raw;
-
fDigitsManager = raw.Raw2Digits(rawReader);
return kTRUE;
// Generates the cluster.
//
- Int_t row, col, time;
-
- /*
- if (fTRD->IsVersion() != 1) {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("TRD must be version 1 (slow simulator).\n");
- return kFALSE;
- }
- */
+ Int_t row = 0;
+ Int_t col = 0;
+ Int_t time = 0;
+ Int_t icham = 0;
+ Int_t iplan = 0;
+ Int_t isect = 0;
+ Int_t iPad = 0;
+
+ AliTRDdataArrayI *digitsIn;
+ AliTRDdataArrayI *track0;
+ AliTRDdataArrayI *track1;
+ AliTRDdataArrayI *track2;
// Get the geometry
- AliTRDgeometry *geo = AliTRDgeometry::GetGeometry(fRunLoader);
- AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
- if (!calibration)
- {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("ERROR getting instance of AliTRDcalibDB");
+ AliTRDgeometry *geo = AliTRDgeometry::GetGeometry(fRunLoader);
+ AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
+ if (!calibration) {
+ AliError("No AliTRDcalibDB instance available\n");
return kFALSE;
}
- AliTRDSimParam* simParam = AliTRDSimParam::Instance();
- if (!simParam)
- {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("ERROR getting instance of AliTRDSimParam");
+ AliTRDSimParam *simParam = AliTRDSimParam::Instance();
+ if (!simParam) {
+ AliError("No AliTRDSimParam instance available\n");
return kFALSE;
}
- AliTRDRecParam* recParam = AliTRDRecParam::Instance();
- if (!recParam)
- {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("ERROR getting instance of AliTRDRecParam");
+ AliTRDRecParam *recParam = AliTRDRecParam::Instance();
+ if (!recParam) {
+ AliError("No AliTRDRecParam instance available\n");
return kFALSE;
}
- AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
- if (!commonParam)
- {
- printf("<AliTRDclusterizerV1::MakeDigits> ");
- printf("Could not get common params\n");
+ AliTRDCommonParam *commonParam = AliTRDCommonParam::Instance();
+ if (!commonParam) {
+ AliError("Could not get common parameters\n");
return kFALSE;
}
-
- Float_t ADCthreshold = simParam->GetADCthreshold();
-
- if (fVerbose > 0) {
- //printf("<AliTRDclusterizerV1::MakeCluster> ");
- //printf("OmegaTau = %f \n",omegaTau);
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("Start creating clusters.\n");
- }
-
- AliTRDdataArrayI *digitsIn;
- AliTRDdataArrayI *track0;
- AliTRDdataArrayI *track1;
- AliTRDdataArrayI *track2;
+ // ADC threshols
+ Float_t ADCthreshold = simParam->GetADCthreshold();
// Threshold value for the maximum
- Float_t maxThresh = recParam->GetClusMaxThresh();
+ Float_t maxThresh = recParam->GetClusMaxThresh();
// Threshold value for the digit signal
- Float_t sigThresh = recParam->GetClusSigThresh();
+ Float_t sigThresh = recParam->GetClusSigThresh();
+
// Iteration limit for unfolding procedure
const Float_t kEpsilon = 0.01;
-
const Int_t kNclus = 3;
const Int_t kNsig = 5;
const Int_t kNtrack = 3 * kNclus;
Double_t ratioLeft = 1.0;
Double_t ratioRight = 1.0;
- //
Double_t padSignal[kNsig];
Double_t clusterSignal[kNclus];
Double_t clusterPads[kNclus];
Int_t clusterTracks[kNtrack];
- Int_t chamBeg = 0;
- Int_t chamEnd = AliTRDgeometry::Ncham();
- Int_t planBeg = 0;
- Int_t planEnd = AliTRDgeometry::Nplan();
- Int_t sectBeg = 0;
- Int_t sectEnd = AliTRDgeometry::Nsect();
+ Int_t chamBeg = 0;
+ Int_t chamEnd = AliTRDgeometry::Ncham();
+ Int_t planBeg = 0;
+ Int_t planEnd = AliTRDgeometry::Nplan();
+ Int_t sectBeg = 0;
+ Int_t sectEnd = AliTRDgeometry::Nsect();
+ Int_t nTimeTotal = calibration->GetNumberOfTimeBins();
- Int_t nTimeTotal = calibration->GetNumberOfTimeBins();
-
- if (fVerbose > 0) {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("Number of Time Bins = %d.\n",nTimeTotal);
- }
+ AliDebug(1,Form("Number of Time Bins = %d.\n",nTimeTotal));
// Start clustering in every chamber
- for (Int_t icham = chamBeg; icham < chamEnd; icham++) {
- for (Int_t iplan = planBeg; iplan < planEnd; iplan++) {
- for (Int_t isect = sectBeg; isect < sectEnd; isect++) {
+ for (icham = chamBeg; icham < chamEnd; icham++) {
+ for (iplan = planBeg; iplan < planEnd; iplan++) {
+ for (isect = sectBeg; isect < sectEnd; isect++) {
Int_t idet = geo->GetDetector(iplan,icham,isect);
Int_t nRowMax = commonParam->GetRowMax(iplan,icham,isect);
Int_t nColMax = commonParam->GetColMax(iplan);
+ AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham);
+
Int_t nClusters = 0;
Int_t nClusters2pad = 0;
Int_t nClusters3pad = 0;
Int_t nClusters5pad = 0;
Int_t nClustersLarge = 0;
- if (fVerbose > 0) {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("Analyzing chamber %d, plane %d, sector %d.\n"
- ,icham,iplan,isect);
- }
-
- AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham);
+ AliDebug(1,Form("Analyzing chamber %d, plane %d, sector %d.\n"
+ ,icham,iplan,isect));
// Get the digits
digitsIn = fDigitsManager->GetDigits(idet);
digitsIn->Expand();
- AliTRDdataArrayF *digitsOut = new AliTRDdataArrayF(digitsIn->GetNrow(), digitsIn->GetNcol(), digitsIn->GetNtime());
-
- Transform(digitsIn, digitsOut, idet, nRowMax, nColMax, nTimeTotal, ADCthreshold);
-
- track0 = fDigitsManager->GetDictionary(idet,0);
+ track0 = fDigitsManager->GetDictionary(idet,0);
track0->Expand();
- track1 = fDigitsManager->GetDictionary(idet,1);
+ track1 = fDigitsManager->GetDictionary(idet,1);
track1->Expand();
- track2 = fDigitsManager->GetDictionary(idet,2);
+ track2 = fDigitsManager->GetDictionary(idet,2);
track2->Expand();
+ AliTRDdataArrayF *digitsOut = new AliTRDdataArrayF(digitsIn->GetNrow()
+ ,digitsIn->GetNcol()
+ ,digitsIn->GetNtime());
+ Transform(digitsIn, digitsOut,idet,nRowMax,nColMax,nTimeTotal,ADCthreshold);
+
// Loop through the chamber and find the maxima
for ( row = 0; row < nRowMax; row++) {
for ( col = 2; col < nColMax; col++) {
- //for ( col = 4; col < nColMax-2; col++) {
for (time = 0; time < nTimeTotal; time++) {
Float_t signalL = TMath::Abs(digitsOut->GetDataUnchecked(row,col ,time));
Float_t signalM = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time));
Float_t signalR = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
-// // Lonok for the maximum
-// if (signalM >= maxThresh) {
-// if (((signalL >= sigThresh) &&
-// (signalL < signalM)) ||
-// ((signalR >= sigThresh) &&
-// (signalR < signalM))) {
-// // Maximum found, mark the position by a negative signal
-// digitsOut->SetDataUnchecked(row,col-1,time,-signalM);
-// }
-// }
// Look for the maximum
if (signalM >= maxThresh) {
- if ( (TMath::Abs(signalL)<=signalM) && (TMath::Abs(signalR)<=signalM) &&
- (TMath::Abs(signalL)+TMath::Abs(signalR))>sigThresh ) {
+ if ((TMath::Abs(signalL) <= signalM) &&
+ (TMath::Abs(signalR) <= signalM) &&
+ ((TMath::Abs(signalL) + TMath::Abs(signalR)) > sigThresh)) {
// Maximum found, mark the position by a negative signal
digitsOut->SetDataUnchecked(row,col-1,time,-signalM);
}
}
- }
- }
- }
+
+ }
+ }
+ }
// Now check the maxima and calculate the cluster position
for ( row = 0; row < nRowMax ; row++) {
// Maximum found ?
if (digitsOut->GetDataUnchecked(row,col,time) < 0) {
- Int_t iPad;
for (iPad = 0; iPad < kNclus; iPad++) {
Int_t iPadCol = col - 1 + iPad;
clusterSignal[iPad] = TMath::Abs(digitsOut->GetDataUnchecked(row
- ,iPadCol
- ,time));
+ ,iPadCol
+ ,time));
clusterTracks[3*iPad ] = track0->GetDataUnchecked(row,iPadCol,time) - 1;
clusterTracks[3*iPad+1] = track1->GetDataUnchecked(row,iPadCol,time) - 1;
clusterTracks[3*iPad+2] = track2->GetDataUnchecked(row,iPadCol,time) - 1;
// Count the number of pads in the cluster
Int_t nPadCount = 0;
Int_t ii = 0;
- while (TMath::Abs(digitsOut->GetDataUnchecked(row,col-ii ,time))
- >= sigThresh) {
+ while (TMath::Abs(digitsOut->GetDataUnchecked(row,col-ii ,time)) >= sigThresh) {
nPadCount++;
ii++;
if (col-ii < 0) break;
}
ii = 0;
- while (TMath::Abs(digitsOut->GetDataUnchecked(row,col+ii+1,time))
- >= sigThresh) {
+ while (TMath::Abs(digitsOut->GetDataUnchecked(row,col+ii+1,time)) >= sigThresh) {
nPadCount++;
ii++;
if (col+ii+1 >= nColMax) break;
break;
};
- // Look for 5 pad cluster with minimum in the middle
+ // Look for 5 pad cluster with minimum in the middle
Bool_t fivePadCluster = kFALSE;
- if (col < nColMax-3) {
+ if (col < (nColMax - 3)) {
if (digitsOut->GetDataUnchecked(row,col+2,time) < 0) {
fivePadCluster = kTRUE;
}
- if ((fivePadCluster) && (col < nColMax-5)) {
+ if ((fivePadCluster) && (col < (nColMax - 5))) {
if (digitsOut->GetDataUnchecked(row,col+4,time) >= sigThresh) {
fivePadCluster = kFALSE;
}
}
- if ((fivePadCluster) && (col > 1)) {
+ if ((fivePadCluster) && (col > 1)) {
if (digitsOut->GetDataUnchecked(row,col-2,time) >= sigThresh) {
fivePadCluster = kFALSE;
}
// Take the shift of the additional time bins into account
clusterPads[2] = time + 0.5;
-
if (recParam->LUTOn()) {
// Calculate the position of the cluster by using the
// lookup table method
clusterPads[1] = recParam->LUTposition(iplan,clusterSignal[0]
- ,clusterSignal[1]
- ,clusterSignal[2]);
+ ,clusterSignal[1]
+ ,clusterSignal[2]);
}
else {
// Calculate the position of the cluster by using the
// center of gravity method
- for (Int_t i=0;i<5;i++) padSignal[i]=0;
- padSignal[2] = TMath::Abs(digitsOut->GetDataUnchecked(row,col,time)); // central pad
+ for (Int_t i = 0; i < 5; i++) {
+ padSignal[i] = 0;
+ }
+ padSignal[2] = TMath::Abs(digitsOut->GetDataUnchecked(row,col ,time)); // central pad
padSignal[1] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-1,time)); // left pad
padSignal[3] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+1,time)); // right pad
- if (col>2 &&TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time)<padSignal[1])){
+ if ((col > 2) &&
+ (TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time)) < padSignal[1])) {
padSignal[0] = TMath::Abs(digitsOut->GetDataUnchecked(row,col-2,time));
}
- if (col<nColMax-3 &&TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time)<padSignal[3])){
+ if ((col < nColMax - 3) &&
+ (TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time)) < padSignal[3])) {
padSignal[4] = TMath::Abs(digitsOut->GetDataUnchecked(row,col+2,time));
}
- clusterPads[1] = GetCOG(padSignal);
-
+ clusterPads[1] = GetCOG(padSignal);
}
Double_t q0 = clusterSignal[0];
Double_t clusterSigmaY2 = (q1*(q0+q2)+4*q0*q2) /
(clusterCharge*clusterCharge);
-
-
+ //
// Calculate the position and the error
-
- // correct for t0
- Int_t clusterTimeBin = TMath::Nint(time - calibration->GetT0(idet, col, row));
+ //
+
+ // Correct for t0
+ Int_t clusterTimeBin = TMath::Nint(time - calibration->GetT0(idet, col, row));
+
+ Double_t colSize = padPlane->GetColSize(col);
+ Double_t rowSize = padPlane->GetRowSize(row);
- Double_t colSize = padPlane->GetColSize(col);
- Double_t rowSize = padPlane->GetRowSize(row);
Double_t clusterPos[3];
- clusterPos[0] = padPlane->GetColPos(col) - (clusterPads[1]+0.5)*colSize; // MI change
- clusterPos[1] = padPlane->GetRowPos(row) - 0.5*rowSize; //MI change
- clusterPos[2] = CalcXposFromTimebin(clusterPads[2], idet, col, row);
+ clusterPos[0] = padPlane->GetColPos(col) - (clusterPads[1]+0.5)*colSize;
+ clusterPos[1] = padPlane->GetRowPos(row) - 0.5*rowSize;
+ clusterPos[2] = CalcXposFromTimebin(clusterPads[2],idet,col,row);
Double_t clusterSig[2];
clusterSig[0] = (clusterSigmaY2 + 1./12.) * colSize*colSize;
clusterSig[1] = rowSize * rowSize / 12.;
// Add the cluster to the output array
AliTRDcluster * cluster = AddCluster(clusterPos
- ,clusterTimeBin
- ,idet
- ,clusterCharge
- ,clusterTracks
- ,clusterSig
- ,iType,clusterPads[1]);
- //
- //
- Short_t signals[7]={0,0,0,0,0,0,0};
- for (Int_t jPad = col-3;jPad<=col+3;jPad++){
- if (jPad<0 ||jPad>=nColMax-1) continue;
+ ,clusterTimeBin
+ ,idet
+ ,clusterCharge
+ ,clusterTracks
+ ,clusterSig
+ ,iType
+ ,clusterPads[1]);
+
+ Short_t signals[7]={ 0, 0, 0, 0, 0, 0, 0 };
+ for (Int_t jPad = col-3; jPad <= col+3; jPad++) {
+ if ((jPad < 0) || (jPad >= nColMax-1)) {
+ continue;
+ }
signals[jPad-col+3] = TMath::Nint(TMath::Abs(digitsOut->GetDataUnchecked(row,jPad,time)));
}
cluster->SetSignals(signals);
+
}
+
}
}
}
// Write the cluster and reset the array
WriteClusters(idet);
ResetRecPoints();
+
}
}
}
- if (fVerbose > 0) {
- printf("<AliTRDclusterizerV1::MakeCluster> ");
- printf("Done.\n");
- }
-
- //delete digitsIn;
-
return kTRUE;
}
Double_t AliTRDclusterizerV1::GetCOG(Double_t signal[5])
{
//
- // get COG position
- // used for clusters with more than 3 pads - where LUT not applicable
+ // Get COG position
+ // Used for clusters with more than 3 pads - where LUT not applicable
+ //
+
Double_t sum = signal[0]+signal[1]+signal[2]+signal[3]+signal[4];
Double_t res = (0.0*(-signal[0]+signal[4])+(-signal[1]+signal[3]))/sum;
+
return res;
+
}
//_____________________________________________________________________________
//
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
- if (!calibration)
- {
- printf("<AliTRDclusterizerMI::Unfold> ");
- printf("ERROR getting instance of AliTRDcalibDB");
+ if (!calibration) {
+ AliError("No AliTRDcalibDB instance available\n");
return kFALSE;
}
Int_t nColMax, Int_t nTimeTotal,
Float_t ADCthreshold)
{
-
//
// Apply gain factor
// Apply tail cancellation: Transform digitsIn to digitsOut
//
+ Int_t iRow = 0;
+ Int_t iCol = 0;
+ Int_t iTime = 0;
AliTRDRecParam* recParam = AliTRDRecParam::Instance();
- if (!recParam)
- {
- printf("<AliTRDclusterizerV1::Transform> ");
- printf("ERROR getting instance of AliTRDRecParam");
+ if (!recParam) {
+ AliError("No AliTRDRecParam instance available\n");
return;
}
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
+ if (!calibration) {
+ AliError("No AliTRDcalibDB instance available\n");
+ return;
+ }
Double_t *inADC = new Double_t[nTimeTotal]; // adc data before tail cancellation
Double_t *outADC = new Double_t[nTimeTotal]; // adc data after tail cancellation
- if (fVerbose > 0) {
- printf("<AliTRDclusterizerV1::Transform> ");
- printf("Tail cancellation (nExp = %d) for detector %d.\n",
- recParam->GetTCnexp(),idet);
- }
+ AliDebug(1,Form("Tail cancellation (nExp = %d) for detector %d.\n"
+ ,recParam->GetTCnexp(),idet));
+
+ for (iRow = 0; iRow < nRowMax; iRow++ ) {
+ for (iCol = 0; iCol < nColMax; iCol++ ) {
+ for (iTime = 0; iTime < nTimeTotal; iTime++) {
- for (Int_t iRow = 0; iRow < nRowMax; iRow++ ) {
- for (Int_t iCol = 0; iCol < nColMax; iCol++ ) {
- for (Int_t iTime = 0; iTime < nTimeTotal; iTime++) {
//
- // add gain
+ // Add gain
//
- Double_t gain = calibration->GetGainFactor(idet, iCol, iRow);
- if (gain==0) {
+ Double_t gain = calibration->GetGainFactor(idet,iCol,iRow);
+ if (gain == 0) {
AliError("Not a valid gain\n");
}
- inADC[iTime] = digitsIn->GetDataUnchecked(iRow, iCol, iTime);
-
+ inADC[iTime] = digitsIn->GetDataUnchecked(iRow,iCol,iTime);
inADC[iTime] /= gain;
outADC[iTime] = inADC[iTime];
+
}
// Apply the tail cancelation via the digital filter
- if (recParam->TCOn())
- {
+ if (recParam->TCOn()) {
DeConvExp(inADC,outADC,nTimeTotal,recParam->GetTCnexp());
}
- for (Int_t iTime = 0; iTime < nTimeTotal; iTime++) {
+ for (iTime = 0; iTime < nTimeTotal; iTime++) {
+
// Store the amplitude of the digit if above threshold
if (outADC[iTime] > ADCthreshold) {
- if (fVerbose > 1)
- {
- printf(" iRow = %d, iCol = %d, iTime = %d, adc = %f\n"
- ,iRow,iCol,iTime,outADC[iTime]);
- }
+ AliDebug(2,Form(" iRow = %d, iCol = %d, iTime = %d, adc = %f\n"
+ ,iRow,iCol,iTime,outADC[iTime]));
digitsOut->SetDataUnchecked(iRow,iCol,iTime,outADC[iTime]);
}
}
}
-
}
delete [] inADC;
}
-
//_____________________________________________________________________________
void AliTRDclusterizerV1::DeConvExp(Double_t *source, Double_t *target,
Int_t n, Int_t nexp)
{
//
- // Tail Cancellation by Deconvolution for PASA v4 TRF
+ // Tail cancellation by deconvolution for PASA v4 TRF
//
Double_t rates[2];
Double_t coefficients[2];
- // initialize (coefficient = alpha, rates = lambda)
-
+ // Initialization (coefficient = alpha, rates = lambda)
Double_t R1 = 1.0;
Double_t R2 = 1.0;
Double_t C1 = 0.5;
rates[0] = TMath::Exp(-Dt/(R1));
rates[1] = TMath::Exp(-Dt/(R2));
- Int_t i, k;
- Double_t reminder[2];
- Double_t correction, result;
-
- /* attention: computation order is important */
- correction=0.0;
+ Int_t i = 0;
+ Int_t k = 0;
- for ( k=0; k<nexp; k++ ) reminder[k]=0.0;
+ Double_t reminder[2];
+ Double_t correction;
+ Double_t result;
- for ( i=0; i<n; i++ ) {
- result = ( source[i] - correction ); // no rescaling
+ // Attention: computation order is important
+ correction = 0.0;
+ for (k = 0; k < nexp; k++) {
+ reminder[k] = 0.0;
+ }
+ for (i = 0; i < n; i++) {
+ result = (source[i] - correction); // no rescaling
target[i] = result;
- for ( k=0; k<nexp; k++ ) reminder[k] = rates[k] *
- ( reminder[k] + coefficients[k] * result);
- correction=0.0;
- for ( k=0; k<nexp; k++ ) correction += reminder[k];
+ for (k = 0; k < nexp; k++) {
+ reminder[k] = rates[k] * (reminder[k] + coefficients[k] * result);
+ }
+ correction = 0.0;
+ for (k = 0; k < nexp; k++) {
+ correction += reminder[k];
+ }
}
}
/* $Id$ */
-#include "AliTRDclusterizer.h"
+////////////////////////////////////////////////////////////////////////////
+// //
+// TRD cluster finder //
+// //
+////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////
-// Finds and handles cluster (slow simulation) //
-///////////////////////////////////////////////////////
+#include "AliTRDclusterizer.h"
class AliTRDdataArrayI;
class AliTRDdataArrayF;
AliTRDclusterizerV1();
AliTRDclusterizerV1(const Text_t* name, const Text_t* title);
AliTRDclusterizerV1(const AliTRDclusterizerV1 &c);
- virtual ~AliTRDclusterizerV1();
+ virtual ~AliTRDclusterizerV1();
AliTRDclusterizerV1 &operator=(const AliTRDclusterizerV1 &c);
virtual void Copy(TObject &c) const;
protected:
- AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
-
- private:
- void DeConvExp(Double_t *source, Double_t *target, Int_t nTimeTotal, Int_t nexp);
- void Transform(AliTRDdataArrayI* digitsIn, AliTRDdataArrayF* digitsOut,
- Int_t idet, Int_t nRowMax, Int_t nColMax, Int_t nTimeTotal, Float_t ADCthreshold);
+ void DeConvExp(Double_t *source, Double_t *target
+ , Int_t nTimeTotal, Int_t nexp);
+ void Transform(AliTRDdataArrayI* digitsIn, AliTRDdataArrayF* digitsOut
+ , Int_t idet, Int_t nRowMax, Int_t nColMax
+ , Int_t nTimeTotal, Float_t ADCthreshold);
virtual Double_t Unfold(Double_t eps, Int_t plane, Double_t *padSignal);
- Double_t GetCOG(Double_t signal[5]); // get COG position
+ Double_t GetCOG(Double_t signal[5]);
+
+ AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
- ClassDef(AliTRDclusterizerV1,5) // TRD-Cluster finder, slow simulator
+ ClassDef(AliTRDclusterizerV1,5) // TRD-Cluster finder, slow simulator
};
#include <TMatrixD.h>
#include <TObjArray.h>
+#include "AliLog.h"
+
#include "AliTRDgeometry.h"
#include "AliTRDcalibDB.h"
-#include "Cal/AliTRDCalPIDLQ.h"
-
#include "AliTRDltuTracklet.h"
-
#include "AliTRDgtuTrack.h"
+#include "Cal/AliTRDCalPIDLQ.h"
ClassImp(AliTRDgtuTrack)
//_____________________________________________________________________________
AliTRDgtuTrack::AliTRDgtuTrack()
+ :TObject()
+ ,fTracklets(new TObjArray(400))
+ ,fYproj(0)
+ ,fZproj(0)
+ ,fSlope(0)
+ ,fDetector(-1)
+ ,fNtracklets(0)
+ ,fNplanes(0)
+ ,fNclusters(0)
+ ,fPt(0)
+ ,fPhi(0)
+ ,fEta(0)
+ ,fLabel(-1)
+ ,fPID(0)
+ ,fIsElectron(kFALSE)
{
//
// Default constructor
//
- fYproj = 0.0;
- fZproj = 0.0;
- fSlope = 0.0;
- fDetector = -1;
- fNtracklets = 0;
- fNplanes = 0;
- fNclusters = 0;
- fPt = 0.0;
- fPhi = 0.0;
- fEta = 0.0;
- fLabel = -1;
- fPID = 0.0;
- fIsElectron = kFALSE;
-
- fTracklets = new TObjArray(400);
-
}
//_____________________________________________________________________________
-AliTRDgtuTrack::AliTRDgtuTrack(const AliTRDgtuTrack& track):
- TObject(track),
- fTracklets(NULL),
- fYproj(track.fYproj),
- fZproj(track.fZproj),
- fSlope(track.fSlope),
- fDetector(track.fDetector),
- fNtracklets(track.fNtracklets),
- fNplanes(track.fNplanes),
- fNclusters(track.fNclusters),
- fPt(track.fPt),
- fPhi(track.fPhi),
- fEta(track.fEta),
- fLabel(track.fLabel),
- fPID(track.fPID),
- fIsElectron(track.fIsElectron)
+AliTRDgtuTrack::AliTRDgtuTrack(const AliTRDgtuTrack& t)
+ :TObject(t)
+ ,fTracklets(NULL)
+ ,fYproj(t.fYproj)
+ ,fZproj(t.fZproj)
+ ,fSlope(t.fSlope)
+ ,fDetector(t.fDetector)
+ ,fNtracklets(t.fNtracklets)
+ ,fNplanes(t.fNplanes)
+ ,fNclusters(t.fNclusters)
+ ,fPt(t.fPt)
+ ,fPhi(t.fPhi)
+ ,fEta(t.fEta)
+ ,fLabel(t.fLabel)
+ ,fPID(t.fPID)
+ ,fIsElectron(t.fIsElectron)
{
//
- // copy contructor
+ // Copy contructor
//
}
AliTRDgtuTrack &AliTRDgtuTrack::operator=(const AliTRDgtuTrack &t)
{
//
- // assignment operator
+ // Assignment operator
//
if (this != &t) ((AliTRDgtuTrack &) t).Copy(*this);
return *this;
-}
+}
//_____________________________________________________________________________
void AliTRDgtuTrack::Copy(TObject &t) const
{
//
- // copy function
+ // Copy function
//
((AliTRDgtuTrack &) t).fTracklets = NULL;
AliTRDgtuTrack::~AliTRDgtuTrack()
{
//
- // destructor
+ // Destructor
//
+ if (fTracklets) {
+ fTracklets->Delete();
+ delete fTracklets;
+ }
+
}
//_____________________________________________________________________________
// Return LTU tracklet at position "pos"
//
- if (fTracklets == 0) return 0;
- void * trk = fTracklets->UncheckedAt(pos);
- if (trk == 0) return 0;
+ if (fTracklets == 0) {
+ return 0;
+ }
+ void *trk = fTracklets->UncheckedAt(pos);
+ if (trk == 0) {
+ return 0;
+ }
- return (AliTRDltuTracklet*)trk;
+ return (AliTRDltuTracklet *) trk;
}
// Reset the track information
//
- fYproj = 0.0;
- fZproj = 0.0;
- fSlope = 0.0;
- fDetector = -1;
+ fYproj = 0.0;
+ fZproj = 0.0;
+ fSlope = 0.0;
+ fDetector = -1;
fNtracklets = 0;
- fNplanes = 0;
- fNclusters = 0;
- fPt = 0.0;
- fPhi = 0.0;
- fEta = 0.0;
- fLabel = -1;
- fPID = 0.0;
+ fNplanes = 0;
+ fNclusters = 0;
+ fPt = 0.0;
+ fPhi = 0.0;
+ fEta = 0.0;
+ fLabel = -1;
+ fPID = 0.0;
fIsElectron = kFALSE;
}
// Calculate the kinematics of the found track
//
+ Int_t i = 0;
+ Int_t iDet = 0;
+ Int_t nDet = 0;
+ Bool_t newDetector;
+
AliTRDltuTracklet *trk;
Int_t nTracklets = GetNtracklets();
Float_t fC[kNmaxTrk][3]; // X, Y, Z coordinates of segments
- fYproj = 0.0;
- fZproj = 0.0;
- fSlope = 0.0;
- fNclusters = 0;
- fNplanes = 0;
+ fYproj = 0.0;
+ fZproj = 0.0;
+ fSlope = 0.0;
+ fNclusters = 0;
+ fNplanes = 0;
fNtracklets = GetNtracklets();
Int_t inDetector[kNplan];
- for (Int_t i = 0; i < kNplan; i++) inDetector[i] = -1;
- Int_t iDet, nDet = 0;
- Bool_t newDetector;
- for (Int_t i = 0; i < nTracklets; i++) {
+ for (i = 0; i < kNplan; i++) {
+ inDetector[i] = -1;
+ }
+
+ for (i = 0; i < nTracklets; i++) {
trk = GetTracklet(i);
fYproj += trk->GetYproj(xpl);
smatrix.Zero();
sums.Zero();
- for (Int_t i = 0; i < nTracklets; i++) {
+ for (i = 0; i < nTracklets; i++) {
xv = (Double_t)x[i+1];
yv = (Double_t)y[i+1];
smatrix(0,0) += 1.0;
a = res(0,0);
b = res(1,0);
- Float_t dist = AliTRDgeometry::GetTime0(1) - AliTRDgeometry::GetTime0(0);
-
- Float_t fx1 = x[1] + dist * (Float_t)(nTracklets-1)/6.0;
- Float_t fy1 = a + b * fx1;
- Float_t fx2 = x[nTracklets] - dist * (Float_t)(nTracklets-1)/6.0;
- Float_t fy2 = a + b * fx2;
- Float_t d12 = TMath::Sqrt((fx2-fx1)*(fx2-fx1)+(fy2-fy1)*(fy2-fy1));
+ Float_t dist = AliTRDgeometry::GetTime0(1) - AliTRDgeometry::GetTime0(0);
+ Float_t fx1 = x[1] + dist * (Float_t)(nTracklets-1)/6.0;
+ Float_t fy1 = a + b * fx1;
+ Float_t fx2 = x[nTracklets] - dist * (Float_t)(nTracklets-1)/6.0;
+ Float_t fy2 = a + b * fx2;
+ Float_t d12 = TMath::Sqrt((fx2-fx1)*(fx2-fx1)+(fy2-fy1)*(fy2-fy1));
Float_t alpha = TMath::ATan(fy2/fx2) - TMath::ATan(fy1/fx1);
- Float_t r = (d12/2.0)/TMath::Sin(alpha);
+ Float_t r = (d12/2.0)/TMath::Sin(alpha);
fPt = 0.3 * field * 0.01 * r;
if (yc != 0.0) {
fPhi = TMath::ATan(xc/yc);
- } else {
+ }
+ else {
fPhi = TMath::PiOver2();
}
smatrix.Zero();
sums.Zero();
- for (Int_t i = 0; i < nTracklets+1; i++) {
+ for (i = 0; i < nTracklets+1; i++) {
xv = (Double_t)z[i];
yv = (Double_t)x[i];
smatrix(0,0) += 1.0;
b = res(1,0);
Float_t theta = TMath::ATan(b);
- if (theta < 0.0) theta = TMath::Pi() + theta;
-
+ if (theta < 0.0) {
+ theta = TMath::Pi() + theta;
+ }
if (theta == 0.0) {
fEta = 0.0;
- } else {
+ }
+ else {
fEta = -TMath::Log(TMath::Tan(theta/2.0));
}
// Electron likelihood signal
//
+ Int_t i = 0;
+
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
if (!calibration)
{
- Error("MakePID","No instance of AliTRDcalibDB.");
+ AliError("No instance of AliTRDcalibDB.");
return;
}
const AliTRDCalPIDLQ *pd = calibration->GetPIDLQObject();
Int_t nTracklets = GetNtracklets();
Int_t det, pla;
Float_t sl, th, q, probPio = 1.0, probEle = 1.0;
- for (Int_t i = 0; i < nTracklets; i++) {
+ for (i = 0; i < nTracklets; i++) {
trk = GetTracklet(i);
if ((probEle+probPio) > 0.0) {
fPID = probEle/(probEle+probPio);
- } else {
+ }
+ else {
fPID = 0.0;
}
}
+//_____________________________________________________________________________
+void AliTRDgtuTrack::ResetTracklets()
+{
+ //
+ // Resets the list of tracklets
+ //
+
+ if (fTracklets) {
+ fTracklets->Delete();
+ }
+
+}
+
+//_____________________________________________________________________________
+TObjArray* AliTRDgtuTrack::Tracklets()
+{
+ //
+ // Returns the list of tracklets
+ //
+
+ if (!fTracklets) {
+ fTracklets = new TObjArray(400);
+ }
+
+ return fTracklets;
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDgtuTrack::GetNtracklets() const
+{
+ //
+ // Returns the number of tracklets
+ //
+
+ if (fTracklets) {
+ return fTracklets->GetEntriesFast();
+ }
+
+ return 0;
+
+}
#ifndef ALITRDGTUTRACK_H
#define ALITRDGTUTRACK_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// //
// //
///////////////////////////////////////////////////////////////////////////////
-#include <TObjArray.h>
+#include <TObject.h>
class AliTRDltuTracklet;
enum { kNmaxTrk = 12, kNplan = 6 };
AliTRDgtuTrack();
- AliTRDgtuTrack(const AliTRDgtuTrack& track);
- virtual ~AliTRDgtuTrack();
- AliTRDgtuTrack &operator=(const AliTRDgtuTrack &t);
- virtual void Copy(TObject &t) const;
-
- Bool_t IsSortable() const { return kTRUE; }
- virtual Int_t Compare(const TObject *o) const;
-
- void Reset();
- void ResetTracklets() { if(fTracklets) fTracklets->Delete(); };
- void AddTracklet(AliTRDltuTracklet *trk);
- AliTRDltuTracklet *GetTracklet(Int_t pos) const;
- TObjArray *Tracklets() {
- if(!fTracklets) fTracklets = new TObjArray(400); return fTracklets;
- };
- Int_t GetNtracklets() const {
- if (fTracklets) return fTracklets->GetEntriesFast();
- return 0;
- };
-
- Float_t GetYproj() const { return fYproj; };
- Float_t GetZproj() const { return fZproj; };
- Float_t GetSlope() const { return fSlope; };
- Int_t GetTracklets() const { return fNtracklets; };
- Int_t GetPlanes() const { return fNplanes; };
- Int_t GetClusters() const { return fNclusters; };
- Float_t GetPt() const { return fPt; };
- Float_t GetPhi() const { return fPhi; };
- Float_t GetEta() const { return fEta; };
- Int_t GetLabel() const { return fLabel; };
- Int_t GetDetector() const { return fDetector; };
- Float_t GetPID() const { return fPID; };
- Bool_t IsElectron() const { return fIsElectron; };
-
- void Track(Float_t xpl, Float_t field);
- void CookLabel();
- void SetDetector(Int_t det) { fDetector = det; };
- void MakePID();
+ AliTRDgtuTrack(const AliTRDgtuTrack &t);
+ virtual ~AliTRDgtuTrack();
+ AliTRDgtuTrack &operator=(const AliTRDgtuTrack &t);
+
+ virtual void Copy(TObject &t) const;
+
+ Bool_t IsSortable() const { return kTRUE; }
+ virtual Int_t Compare(const TObject *o) const;
+ void Reset();
+ void ResetTracklets();
+ void Track(Float_t xpl, Float_t field);
+ void CookLabel();
+ void SetDetector(Int_t det) { fDetector = det; };
+ void MakePID();
+ void AddTracklet(AliTRDltuTracklet *trk);
+ Int_t GetNtracklets() const;
+
+ AliTRDltuTracklet *GetTracklet(Int_t pos) const;
+ TObjArray *Tracklets();
+
+ Float_t GetYproj() const { return fYproj; };
+ Float_t GetZproj() const { return fZproj; };
+ Float_t GetSlope() const { return fSlope; };
+ Int_t GetTracklets() const { return fNtracklets; };
+ Int_t GetPlanes() const { return fNplanes; };
+ Int_t GetClusters() const { return fNclusters; };
+ Float_t GetPt() const { return fPt; };
+ Float_t GetPhi() const { return fPhi; };
+ Float_t GetEta() const { return fEta; };
+ Int_t GetLabel() const { return fLabel; };
+ Int_t GetDetector() const { return fDetector; };
+ Float_t GetPID() const { return fPID; };
+ Bool_t IsElectron() const { return fIsElectron; };
protected:
- TObjArray *fTracklets; //! Array of LTU tracklets
+ TObjArray *fTracklets; //! Array of LTU tracklets
- Float_t fYproj; // Average y-projection
- Float_t fZproj; // Average z-projection
- Float_t fSlope; // Average slope
+ Float_t fYproj; // Average y-projection
+ Float_t fZproj; // Average z-projection
+ Float_t fSlope; // Average slope
- Int_t fDetector; // First detector in the module
+ Int_t fDetector; // First detector in the module
- Int_t fNtracklets; // Number of tracklets
- Int_t fNplanes; // Number of TRD planes
- Int_t fNclusters; // Total number of clusters
+ Int_t fNtracklets; // Number of tracklets
+ Int_t fNplanes; // Number of TRD planes
+ Int_t fNclusters; // Total number of clusters
- Float_t fPt; // Transverse momentum
- Float_t fPhi; // Phi angle at the vertex
- Float_t fEta; // Eta at the vertex
- Int_t fLabel; // Track label
- Float_t fPID; // PID electron likelihood
- Bool_t fIsElectron; // Electron flag
+ Float_t fPt; // Transverse momentum
+ Float_t fPhi; // Phi angle at the vertex
+ Float_t fEta; // Eta at the vertex
+ Int_t fLabel; // Track label
+ Float_t fPID; // PID electron likelihood
+ Bool_t fIsElectron; // Electron flag
- ClassDef(AliTRDgtuTrack,2)
+ ClassDef(AliTRDgtuTrack,2) // TRD module global track (GTU)
};
// //
// TRD chamber local track (LTU, tracklet) //
// //
+// Author: //
+// Bogdan Vulpescu //
// //
///////////////////////////////////////////////////////////////////////////////
ClassImp(AliTRDltuTracklet)
//_____________________________________________________________________________
-AliTRDltuTracklet::AliTRDltuTracklet(Int_t det,
- Int_t row,
- Float_t rowz,
- Float_t slope,
- Float_t offset,
- Float_t time,
- Int_t ncl,
- Int_t label,
- Float_t q)
+AliTRDltuTracklet::AliTRDltuTracklet()
+ :TObject()
+ ,fX(0)
+ ,fY(0)
+ ,fSlope(0)
+ ,fRowz(0)
+ ,fDetector(0)
+ ,fRow(0)
+ ,fNclusters(0)
+ ,fLabel(0)
+ ,fQ(0)
{
//
- // AliTRDltuTracklet constructor
+ // AliTRDltuTracklet default constructor
//
+}
- fDetector = det;
- fRow = row;
- fRowz = rowz;
- fSlope = slope;
- fX = time;
- fY = offset;
- fNclusters = ncl;
- fLabel = label;
- fQ = q;
+//_____________________________________________________________________________
+AliTRDltuTracklet::AliTRDltuTracklet(Int_t det, Int_t row, Float_t rowz
+ , Float_t slope, Float_t offset, Float_t time
+ , Int_t ncl, Int_t label, Float_t q)
+ :TObject()
+ ,fX(time)
+ ,fY(offset)
+ ,fSlope(slope)
+ ,fRowz(rowz)
+ ,fDetector(det)
+ ,fRow(row)
+ ,fNclusters(ncl)
+ ,fLabel(label)
+ ,fQ(q)
+{
+ //
+ // AliTRDltuTracklet constructor
+ //
}
//_____________________________________________________________________________
Float_t AliTRDltuTracklet::GetPt(Float_t field) const
{
- // transverse momentum calculation
- // curvature R = (fX*fX + fY*fY) / (2 * sin(alpha))
+ //
+ // Transverse momentum calculation
+ // Curvature R = (fX*fX + fY*fY) / (2 * sin(alpha))
// alpha = angle deviation from "infinite momentum"
//
- // consistent with AliTRDmcmTracklet::GetPt(...)
+ // Consistent with AliTRDmcmTracklet::GetPt(...)
+ //
Float_t infSlope = TMath::ATan(fY/fX)/TMath::Pi()*180.0;
- Float_t alpha = fSlope - infSlope;
- Float_t r = TMath::Sqrt(fX*fX + fY*fY)/(2.0*TMath::Sin(alpha/180.0*TMath::Pi()));
+ Float_t alpha = fSlope - infSlope;
+ Float_t r = TMath::Sqrt(fX*fX + fY*fY)
+ / (2.0*TMath::Sin(alpha/180.0*TMath::Pi()));
- Float_t pt = 0.3 * field * 0.01 * r;
+ Float_t pt = 0.3 * field * 0.01 * r;
return pt;
// y-projection (bending plane) onto the median plane
//
- Float_t yproj;
-
- yproj = fY + TMath::Tan(fSlope/180.0*TMath::Pi()) * (xpl - fX);
+ Float_t yproj = fY + TMath::Tan(fSlope/180.0*TMath::Pi()) * (xpl - fX);
return yproj;
// z-projection (using pad row center) onto the median plane
//
- Float_t zproj;
-
- zproj = fRowz * xpl / fX;
+ Float_t zproj = fRowz * xpl / fX;
return zproj;
#ifndef ALITRDLTUTRACKLET_H
#define ALITRDLTUTRACKLET_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
+
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD LTU tracklet //
+// //
+///////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
enum { kNplan = 6 };
- AliTRDltuTracklet(Int_t det,
- Int_t row,
- Float_t rowz,
- Float_t slope,
- Float_t offset,
- Float_t time,
- Int_t ncl,
- Int_t label,
- Float_t q);
-
- virtual ~AliTRDltuTracklet();
-
- Bool_t IsSortable() const { return kTRUE; }
- virtual Int_t Compare(const TObject *o) const;
-
- Int_t GetDetector() const { return fDetector; };
- Int_t GetPlane(Int_t det) const { return ((Int_t) (det % kNplan)); };
- Int_t GetRow() const { return fRow; };
- Int_t GetNclusters() const { return fNclusters; };
- Float_t GetSlope() const { return fSlope; };
- Float_t GetOffset() const { return fY; };
- Float_t GetTime0() const { return fX; };
- Float_t GetRowz() const { return fRowz; };
- Float_t GetYproj(Float_t xpl) const;
- Float_t GetZproj(Float_t xpl) const;
- Int_t GetLabel() const { return fLabel; };
- Float_t GetPt(Float_t field) const;
- Float_t GetQ() const { return fQ; };
+ AliTRDltuTracklet();
+ AliTRDltuTracklet(Int_t det, Int_t row, Float_t rowz, Float_t slope, Float_t offset
+ ,Float_t time, Int_t ncl, Int_t label, Float_t q);
+ virtual ~AliTRDltuTracklet();
+
+ Bool_t IsSortable() const { return kTRUE; }
+ virtual Int_t Compare(const TObject *o) const;
+
+ Int_t GetDetector() const { return fDetector; };
+ Int_t GetPlane(Int_t det) const { return ((Int_t) (det % kNplan)); };
+ Int_t GetRow() const { return fRow; };
+ Int_t GetNclusters() const { return fNclusters; };
+ Float_t GetSlope() const { return fSlope; };
+ Float_t GetOffset() const { return fY; };
+ Float_t GetTime0() const { return fX; };
+ Float_t GetRowz() const { return fRowz; };
+ Float_t GetYproj(Float_t xpl) const;
+ Float_t GetZproj(Float_t xpl) const;
+ Int_t GetLabel() const { return fLabel; };
+ Float_t GetPt(Float_t field) const;
+ Float_t GetQ() const { return fQ; };
protected:
- Float_t fX; // distance vertex to entrance window
- Float_t fY; // tracklet offset at entrance window
- Float_t fSlope; // tracklet slope
- Float_t fRowz; // z coordinate of the pad row center
- Int_t fDetector; // detector number
- Int_t fRow; // pad row number
- Int_t fNclusters; // number of clusters
- Int_t fLabel; // mc track label
- Float_t fQ; // charge sum divided by number of clusters
-
- ClassDef(AliTRDltuTracklet,2)
+ Float_t fX; // Distance vertex to entrance window
+ Float_t fY; // Tracklet offset at entrance window
+ Float_t fSlope; // Tracklet slope
+ Float_t fRowz; // z coordinate of the pad row center
+ Int_t fDetector; // Detector number
+ Int_t fRow; // Pad row number
+ Int_t fNclusters; // Number of clusters
+ Int_t fLabel; // MC track label
+ Float_t fQ; // Charge sum divided by number of clusters
+
+ ClassDef(AliTRDltuTracklet,2) // LTU tracklet
};
/*
$Log$
+Revision 1.2 2006/04/05 12:45:40 hristov
+Updated TRD trigger code. Now the trigger code can run:
+
+- in the simulation step, through the central trigger interface, to
+produce and store "tracklets" and to produce and analyze tracks, with
+inputs to the central trigger
+
+- in the reconstruction step: if the tracklets have already been produced
+in the simulation step (by the trigger option), then only the tracks are
+produced and stored in the ESD event; if not, the trigger start by
+producing the tracklets, etc.
+
+Bogdan
+
Revision 1.1.1.1 2004/08/19 14:58:11 vulpescu
CVS head
#include <TMath.h>
+#include "AliLog.h"
+
#include "AliTRDmcm.h"
#include "AliTRDtrigParam.h"
//_____________________________________________________________________________
AliTRDmcm::AliTRDmcm()
+ :TObject()
+ ,fTrigParam(0)
+ ,fNtrk(0)
+ ,fRobId(0)
+ ,fChaId(0)
+ ,fRow(0)
+ ,fColFirst(0)
+ ,fColLast(0)
+ ,fTime1(0)
+ ,fTime2(0)
+ ,fClusThr(0)
+ ,fPadThr(0)
+ ,fNtrkSeeds(0)
+ ,fR1(0)
+ ,fR2(0)
+ ,fC1(0)
+ ,fC2(0)
+ ,fPedestal(0)
+ ,fId(0)
{
//
// AliTRDmcm default constructor
//
- fTrigParam = 0;
+ Int_t i = 0;
+ Int_t j = 0;
- fNtrk = 0;
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
+ for (i = 0; i < kMaxTrackletsPerMCM; i++) {
fTrkIndex[i] = 0;
+ fSeedCol[i] = -1;
}
- fRobId = 0;
- fChaId = 0;
- fRow = 0;
- fColFirst = 0;
- fColLast = 0;
- for (Int_t i = 0; i < kMcmCol; i++) {
- fPadHits[i] = 0;
- for (Int_t j = 0; j < kMcmTBmax; j++) {
- fADC[i][j] = 0.0;
+ for (i = 0; i < kMcmCol; i++) {
+ fPadHits[i] = 0;
+ for (j = 0; j < kMcmTBmax; j++) {
+ fADC[i][j] = 0.0;
fIsClus[i][j] = kFALSE;
}
}
- fPadThr = 0;
- fClusThr = 0;
- fTime1 = 0;
- fTime2 = 0;
- fNtrkSeeds = 0;
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
- fSeedCol[i] = -1;
- }
-
- fR1 = 0.0;
- fR2 = 0.0;
- fC1 = 0.0;
- fC2 = 0.0;
- fPedestal = 0.0;
-
- fId = 0;
}
//_____________________________________________________________________________
AliTRDmcm::AliTRDmcm(AliTRDtrigParam *trigp, const Int_t id)
+ :TObject()
+ ,fTrigParam(trigp)
+ ,fNtrk(0)
+ ,fRobId(0)
+ ,fChaId(0)
+ ,fRow(0)
+ ,fColFirst(0)
+ ,fColLast(0)
+ ,fTime1(trigp->GetTime1())
+ ,fTime2(trigp->GetTime2())
+ ,fClusThr(trigp->GetClusThr())
+ ,fPadThr(trigp->GetPadThr())
+ ,fNtrkSeeds(0)
+ ,fR1(0)
+ ,fR2(0)
+ ,fC1(0)
+ ,fC2(0)
+ ,fPedestal(0)
+ ,fId(id)
{
//
// AliTRDmcm constructor
//
- fTrigParam = trigp;
+ Int_t i = 0;
+ Int_t j = 0;
- fNtrk = 0;
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
+ for (i = 0; i < kMaxTrackletsPerMCM; i++) {
fTrkIndex[i] = 0;
+ fSeedCol[i] = -1;
}
- fRobId = 0;
- fChaId = 0;
- fRow = 0;
- fColFirst = 0;
- fColLast = 0;
- for (Int_t i = 0; i < kMcmCol; i++) {
- fPadHits[i] = 0;
- for (Int_t j = 0; j < kMcmTBmax; j++) {
- fADC[i][j] = 0.0;
+ for (i = 0; i < kMcmCol; i++) {
+ fPadHits[i] = 0;
+ for (j = 0; j < kMcmTBmax; j++) {
+ fADC[i][j] = 0.0;
fIsClus[i][j] = kFALSE;
}
}
- fPadThr = fTrigParam->GetPadThr();
- fClusThr = fTrigParam->GetClusThr();
- fTime1 = fTrigParam->GetTime1();
- fTime2 = fTrigParam->GetTime2();
- fNtrkSeeds = 0;
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
- fSeedCol[i] = -1;
- }
- fR1 = 0.0;
- fR2 = 0.0;
- fC1 = 0.0;
- fC2 = 0.0;
- fPedestal = 0.0;
-
fTrigParam->GetFilterParam(fR1,fR2,fC1,fC2,fPedestal);
- fId = id;
+}
+
+//_____________________________________________________________________________
+AliTRDmcm::AliTRDmcm(const AliTRDmcm &m)
+ :TObject(m)
+ ,fTrigParam(NULL)
+ ,fNtrk(m.fNtrk)
+ ,fRobId(m.fRobId)
+ ,fChaId(m.fChaId)
+ ,fRow(m.fRow)
+ ,fColFirst(m.fColFirst)
+ ,fColLast(m.fColLast)
+ ,fTime1(m.fTime1)
+ ,fTime2(m.fTime2)
+ ,fClusThr(m.fClusThr)
+ ,fPadThr(m.fPadThr)
+ ,fNtrkSeeds(m.fNtrkSeeds)
+ ,fR1(m.fR1)
+ ,fR2(m.fR2)
+ ,fC1(m.fC1)
+ ,fC2(m.fC2)
+ ,fPedestal(m.fPedestal)
+ ,fId(m.fId)
+{
+ //
+ // AliTRDmcm copy constructor
+ //
+
+ Int_t i = 0;
+ Int_t j = 0;
+
+ for (i = 0; i < kMaxTrackletsPerMCM; i++) {
+ ((AliTRDmcm &) m).fTrkIndex[i] = 0;
+ ((AliTRDmcm &) m).fSeedCol[i] = -1;
+ }
+ for (i = 0; i < kMcmCol; i++) {
+ ((AliTRDmcm &) m).fPadHits[i] = 0;
+ for (j = 0; j < kMcmTBmax; j++) {
+ ((AliTRDmcm &) m).fADC[i][j] = 0.0;
+ ((AliTRDmcm &) m).fIsClus[i][j] = kFALSE;
+ }
+ }
}
AliTRDmcm &AliTRDmcm::operator=(const AliTRDmcm &m)
{
//
- // assignment operator
+ // Assignment operator
//
if (this != &m) ((AliTRDmcm &) m).Copy(*this);
void AliTRDmcm::Copy(TObject &m) const
{
//
- // copy function
+ // Copy function
//
+ Int_t i = 0;
+ Int_t j = 0;
+
((AliTRDmcm &) m).fTrigParam = NULL;
((AliTRDmcm &) m).fNtrk = fNtrk;
((AliTRDmcm &) m).fRobId = fRobId;
((AliTRDmcm &) m).fPedestal = fPedestal;
((AliTRDmcm &) m).fId = fId;
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
+ for (i = 0; i < kMaxTrackletsPerMCM; i++) {
((AliTRDmcm &) m).fTrkIndex[i] = 0;
+ ((AliTRDmcm &) m).fSeedCol[i] = -1;
}
- for (Int_t i = 0; i < kMcmCol; i++) {
- ((AliTRDmcm &) m).fPadHits[i] = 0;
- for (Int_t j = 0; j < kMcmTBmax; j++) {
- ((AliTRDmcm &) m).fADC[i][j] = 0.0;
+ for (i = 0; i < kMcmCol; i++) {
+ ((AliTRDmcm &) m).fPadHits[i] = 0;
+ for (j = 0; j < kMcmTBmax; j++) {
+ ((AliTRDmcm &) m).fADC[i][j] = 0.0;
((AliTRDmcm &) m).fIsClus[i][j] = kFALSE;
}
}
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
- ((AliTRDmcm &) m).fSeedCol[i] = -1;
- }
}
// Reset MCM data
//
- for (Int_t i = 0; i < kMcmCol; i++) {
+ Int_t i = 0;
+ Int_t j = 0;
+
+ for (i = 0; i < kMcmCol; i++) {
fPadHits[i] = 0;
- for (Int_t j = 0; j < kMcmTBmax; j++) {
- fADC[i][j] = 0.0;
+ for (j = 0; j < kMcmTBmax; j++) {
+ fADC[i][j] = 0.0;
fIsClus[i][j] = kFALSE;
}
}
- for (Int_t i = 0; i < kMaxTrackletsPerMCM; i++) {
+ for (i = 0; i < kMaxTrackletsPerMCM; i++) {
fSeedCol[i] = -1;
}
// Run MCM
//
- if ( fTrigParam->GetDebugLevel() > 1 ) printf("AliTRDmcm::Run MCM %d\n",Id());
+ AliDebug(2,(Form("Run MCM %d\n",Id())));
+
+ Int_t iTime = 0;
+ Int_t iCol = 0;
+ Int_t iPad = 0;
+ Int_t iPlus = 0;
+ Int_t i = 0;
+ Int_t j = 0;
- Float_t amp[3] = {0.0, 0.0, 0.0};
+ Float_t amp[3] = { 0.0, 0.0, 0.0 };
Int_t nClus;
Int_t clusCol[kMcmCol/2];
Float_t clusAmp[kMcmCol/2];
Float_t veryLarge;
Int_t clusMin = -1;
- for (Int_t iTime = fTime1; iTime <= fTime2; iTime++) { // main TB loop
+ // Main TB loop
+ for (iTime = fTime1; iTime <= fTime2; iTime++) {
- // find clusters...
+ // Find clusters...
nClus = 0;
- for (Int_t iCol = 1; iCol < (kMcmCol-1); iCol++) {
+ for (iCol = 1; iCol < (kMcmCol-1); iCol++) {
amp[0] = fADC[iCol-1][iTime];
amp[1] = fADC[iCol ][iTime];
amp[2] = fADC[iCol+1][iTime];
if (IsCluster(amp)) {
fIsClus[iCol][iTime] = kTRUE;
- clusCol[nClus] = iCol;
- clusAmp[nClus] = amp[0]+amp[1]+amp[2];
+ clusCol[nClus] = iCol;
+ clusAmp[nClus] = amp[0]+amp[1]+amp[2];
nClus++;
if (nClus == kMcmCol/2) {
- printf("Too many clusters in time bin %2d MCM %d...\n",iTime,Id());
- //return kFALSE;
+ AliWarning(Form("Too many clusters in time bin %2d MCM %d...\n",iTime,Id()));
break;
}
}
}
// ...but no more than six...
- if (nClus > (Int_t)kSelClus) {
- for (Int_t j = kSelClus/2; j < nClus-kSelClus/2; j++) {
+ if (nClus > (Int_t) kSelClus) {
+ for (j = kSelClus/2; j < nClus-kSelClus/2; j++) {
fIsClus[clusCol[j]][iTime] = kFALSE;
}
}
// ...and take the largest four.
-
Int_t nClusPlus = nClus - kMaxClus;
- for (Int_t iPlus = 0; iPlus < nClusPlus; iPlus++ ) {
+ for (iPlus = 0; iPlus < nClusPlus; iPlus++ ) {
veryLarge = 1.E+10;
- for (Int_t i = 0; i < nClus; i++) {
+ for (i = 0; i < nClus; i++) {
if (fIsClus[clusCol[i]][iTime]) {
if (clusAmp[i] <= veryLarge) {
veryLarge = clusAmp[i];
} // end main TB loop
if (fTrigParam->GetDebugLevel() > 1) {
- for (Int_t i = fTime1; i <= fTime2; i++) {
+ for (i = fTime1; i <= fTime2; i++) {
printf("%2d: ",i);
- for (Int_t j = 0; j < kMcmCol; j++) {
+ for (j = 0; j < kMcmCol; j++) {
printf("%1d ",fIsClus[j][i]);
}
printf("\n");
}
printf("PadHits: ");
- for (Int_t iPad = 0; iPad < kMcmCol; iPad++) {
+ for (iPad = 0; iPad < kMcmCol; iPad++) {
printf("%2d ",fPadHits[iPad]);
}
printf("\n");
}
if ((fNtrkSeeds = CreateSeeds())) {
-
return kTRUE;
-
}
return kFALSE;
}
+
//_____________________________________________________________________________
Int_t AliTRDmcm::CreateSeeds()
{
// Make column seeds (from Falk Lesser, ex KIP)
//
- if ( fTrigParam->GetDebugLevel() > 1 ) printf("AliTRDmcm::CreateSeeds MCM %d \n",Id());
-
+ Int_t i = 0;
+ Int_t j = 0;
Int_t nSeeds = 0;
- // working array for hit sums
+ AliDebug(2,Form("AliTRDmcm::CreateSeeds MCM %d \n",Id()));
+
+ // Working array for hit sums
Int_t fHit2padSum[2][kMcmCol];
- // initialize the array
- for( Int_t i = 0; i < 2; i++ ) {
- for( Int_t j = 0; j < kMcmCol; j++ ) {
- if( i == 0 ) {
+ // Initialize the array
+ for (i = 0; i < 2; i++) {
+ for (j = 0; j < kMcmCol; j++ ) {
+ if (i == 0) {
fHit2padSum[i][j] = j;
} else {
fHit2padSum[i][j] = -1;
Int_t sum10 = fTrigParam->GetSum10();
Int_t sum12 = fTrigParam->GetSum12();
- // build the 2padSum
+ // Build the 2padSum
Int_t nsum2seed = 0;
- for( Int_t i = 0; i < kMcmCol; i++ ) {
- if( i < (kMcmCol-1) ) {
- if( (fPadHits[i] >= sum10) && ((fPadHits[i] + fPadHits[i+1]) >= sum12) ) {
+ for (i = 0; i < kMcmCol; i++) {
+ if (i < (kMcmCol-1)) {
+ if ((fPadHits[i] >= sum10) && ((fPadHits[i] + fPadHits[i+1]) >= sum12)) {
fHit2padSum[1][i] = fPadHits[i] + fPadHits[i+1];
- } else {
+ }
+ else {
fHit2padSum[1][i] = -1;
}
- } else {
- if ( fPadHits[i] >= sum12 ) {
+ }
+ else {
+ if (fPadHits[i] >= sum12) {
fHit2padSum[1][i] = fPadHits[i];
- } else {
+ }
+ else {
fHit2padSum[1][i] = -1;
}
}
if (fTrigParam->GetDebugLevel() > 1) {
printf("fHit2padSum: ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++) {
printf("%2d ",fHit2padSum[0][i]);
}
printf("\n");
printf(" ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++) {
printf("%2d ",fHit2padSum[1][i]);
}
printf("\n");
if (fTrigParam->GetDebugLevel() > 1) {
printf("fHit2padSum: ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++) {
printf("%2d ",fHit2padSum[0][i]);
}
printf("\n");
printf(" ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++ ) {
printf("%2d ",fHit2padSum[1][i]);
}
printf("\n");
nSeeds = TMath::Min(nsum2seed,kMaxTrackletsPerMCM);
Sort(nSeeds,&fHit2padSum[1][0],&fHit2padSum[0][0],0);
- for (Int_t i = 0; i < nSeeds; i++) {
+ for (i = 0; i < nSeeds; i++) {
fSeedCol[i] = fHit2padSum[0][i];
}
if (fTrigParam->GetDebugLevel() > 1) {
printf("Found %d seeds before multiple rejection. \n",nSeeds);
printf("fHit2padSum: ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++) {
printf("%2d ",fHit2padSum[0][i]);
}
printf("\n");
printf(" ");
- for( Int_t i = 0; i < kMcmCol; i++ ) {
+ for (i = 0; i < kMcmCol; i++) {
printf("%2d ",fHit2padSum[1][i]);
}
printf("\n");
// reject multiple found tracklets
Int_t imax = nSeeds-1;
- for (Int_t i = 0; i < imax; i++) {
+ for (i = 0; i < imax; i++) {
if ((fHit2padSum[0][i]+1) == fHit2padSum[0][i+1]) {
nSeeds--;
if (fHit2padSum[1][i] >= fHit2padSum[1][i+1]) {
- if (fTrigParam->GetDebugLevel() > 1)
- printf("Reject seed %1d in col %02d. \n",i,fHit2padSum[0][i+1]);
+ if (fTrigParam->GetDebugLevel() > 1) {
+ AliWarning(Form("Reject seed %1d in col %02d. \n",i,fHit2padSum[0][i+1]));
+ }
fSeedCol[i+1] = -1;
} else {
- if (fTrigParam->GetDebugLevel() > 1)
- printf("Reject seed %1d in col %02d. \n",i,fHit2padSum[0][i]);
- fSeedCol[i] = -1;
+ if (fTrigParam->GetDebugLevel() > 1) {
+ AliWarning(Form("Reject seed %1d in col %02d. \n",i,fHit2padSum[0][i]));
+ }
+ fSeedCol[i] = -1;
}
}
}
- if ( fTrigParam->GetDebugLevel() > 1 ) {
+ if (fTrigParam->GetDebugLevel() > 1) {
printf("Found %d seeds in MCM %d ",nSeeds,Id());
for (Int_t i = 0; i < (imax+1); i++) {
if (fSeedCol[i] >= 0) printf(", %02d ",fSeedCol[i]);
// dir = 1 descending order
//
+ Int_t i = 0;
Bool_t sort;
- Int_t tmp1, tmp2;
+ Int_t tmp1;
+ Int_t tmp2;
- if ( dir == 0 ) {
+ if (dir == 0) {
do {
sort = kTRUE;
- for ( Int_t i = 0; i < (nel-1); i++ )
- if ( x2[i+1] < x2[i] ) {
- tmp2 = x2[i];
- x2[i] = x2[i+1];
+ for (i = 0; i < (nel-1); i++) {
+ if (x2[i+1] < x2[i]) {
+ tmp2 = x2[i];
+ x2[i] = x2[i+1];
x2[i+1] = tmp2;
- tmp1 = x1[i];
- x1[i] = x1[i+1];
+ tmp1 = x1[i];
+ x1[i] = x1[i+1];
x1[i+1] = tmp1;
- sort = kFALSE;
+ sort = kFALSE;
}
- } while ( sort == kFALSE );
+ }
+ } while (sort == kFALSE);
}
- if ( dir == 1 ) {
+ if (dir == 1) {
do {
sort = kTRUE;
- for ( Int_t i = 0; i < (nel-1); i++ )
- if ( x2[i+1] > x2[i] ) {
- tmp2 = x2[i];
- x2[i] = x2[i+1];
+ for (i = 0; i < (nel-1); i++) {
+ if (x2[i+1] > x2[i]) {
+ tmp2 = x2[i];
+ x2[i] = x2[i+1];
x2[i+1] = tmp2;
- tmp1 = x1[i];
- x1[i] = x1[i+1];
+ tmp1 = x1[i];
+ x1[i] = x1[i+1];
x1[i+1] = tmp1;
- sort = kFALSE;
+ sort = kFALSE;
}
- } while ( sort == kFALSE );
+ }
+ } while (sort == kFALSE);
}
//
// -> shape
- if (amp[0] > amp[1] || amp[2] > amp[1]) return kFALSE;
+ if (amp[0] > amp[1] || amp[2] > amp[1]) {
+ return kFALSE;
+ }
// -> cluster amplitude
- if ((amp[0]+amp[1]+amp[2]) < fClusThr) return kFALSE;
+ if ((amp[0]+amp[1]+amp[2]) < fClusThr) {
+ return kFALSE;
+ }
// -> pad amplitude
- if (amp[0] < fPadThr && amp[2] < fPadThr) return kFALSE;
+ if (amp[0] < fPadThr && amp[2] < fPadThr) {
+ return kFALSE;
+ }
return kTRUE;
void AliTRDmcm::Filter(Int_t nexp, Int_t ftype)
{
//
- // exponential filter
+ // Exponential filter
//
+ Int_t iCol = 0;
+ Int_t iTime = 0;
+
Double_t sour[kMcmTBmax];
Double_t dtarg[kMcmTBmax];
Int_t itarg[kMcmTBmax];
switch(ftype) {
- case 0:
+ case 0:
- for (Int_t iCol = 0; iCol < kMcmCol; iCol++) {
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
+ for (iCol = 0; iCol < kMcmCol; iCol++) {
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
sour[iTime] = fADC[iCol][iTime];
}
DeConvExpA(sour,dtarg,kMcmTBmax,nexp);
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
- //fADC[iCol][iTime] = (Int_t)TMath::Max(0.0,dtarg[iTime]);
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
fADC[iCol][iTime] = TMath::Max(0.0,dtarg[iTime]);
}
}
case 1:
- for (Int_t iCol = 0; iCol < kMcmCol; iCol++) {
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
+ for (iCol = 0; iCol < kMcmCol; iCol++) {
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
sour[iTime] = fADC[iCol][iTime];
}
DeConvExpD(sour,itarg,kMcmTBmax,nexp);
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
fADC[iCol][iTime] = itarg[iTime];
}
}
case 2:
- for (Int_t iCol = 0; iCol < kMcmCol; iCol++) {
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
+ for (iCol = 0; iCol < kMcmCol; iCol++) {
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
sour[iTime] = fADC[iCol][iTime];
}
DeConvExpMI(sour,dtarg,kMcmTBmax);
- for (Int_t iTime = 0; iTime < kMcmTBmax; iTime++) {
- //fADC[iCol][iTime] = (Int_t)TMath::Max(0.0,dtarg[iTime]);
+ for (iTime = 0; iTime < kMcmTBmax; iTime++) {
fADC[iCol][iTime] = TMath::Max(0.0,dtarg[iTime]);
}
}
default:
- printf("Invalid filter type %d ! \n",ftype);
+ AliError(Form("Invalid filter type %d ! \n",ftype));
return;
}
// Exponential filter "analog"
//
+ Int_t i = 0;
+ Int_t k = 0;
+ Double_t reminder[2];
+ Double_t correction;
+ Double_t result;
Double_t rates[2];
Double_t coefficients[2];
- // initialize (coefficient = alpha, rates = lambda)
+ // Initialize (coefficient = alpha, rates = lambda)
// FilterOpt.C (aliroot@pel:/homel/aliroot/root/work/beamt/CERN02)
Double_t r1, r2, c1, c2;
Double_t dt = 0.100;
rates[0] = TMath::Exp(-dt/(r1));
rates[1] = TMath::Exp(-dt/(r2));
-
- Int_t i, k;
- Double_t reminder[2];
- Double_t correction, result;
- /* attention: computation order is important */
- correction=0.0;
- for ( k=0; k<nexp; k++ ) reminder[k]=0.0;
+ // Attention: computation order is important
+ correction = 0.0;
+ for (k = 0; k < nexp; k++) {
+ reminder[k] = 0.0;
+ }
- for ( i=0; i<n; i++ ) {
- result = ( source[i] - correction ); // no rescaling
+ for (i = 0; i < n; i++) {
+
+ result = (source[i] - correction); // no rescaling
target[i] = result;
- for ( k=0; k<nexp; k++ ) reminder[k] = rates[k] * ( reminder[k] + coefficients[k] * result);
+ for (k = 0; k < nexp; k++) {
+ reminder[k] = rates[k] * (reminder[k] + coefficients[k] * result);
+ }
- correction=0.0;
- for ( k=0; k<nexp; k++ ) correction += reminder[k];
+ correction = 0.0;
+ for (k = 0; k < nexp; k++) {
+ correction += reminder[k];
+ }
+
}
}
// Exponential filter "digital"
//
+ Int_t i = 0;
+
Int_t fAlphaL, fAlphaS, fLambdaL, fLambdaS, fTailPed;
Int_t iAlphaL, iAlphaS, iLambdaL, iLambdaS;
Int_t correction, result;
Int_t iFactor = ((Int_t)fPedestal)<<2;
- Double_t xi = 1-(iLl*iAs + iLs*iAl); // calculation of equilibrium values of the
+ Double_t xi = 1 - (iLl*iAs + iLs*iAl); // calculation of equilibrium values of the
rem1 = (Int_t)((iFactor/xi) * ((1-iLs)*iLl*iAl)); // internal registers to prevent switch on effects.
rem2 = (Int_t)((iFactor/xi) * ((1-iLl)*iLs*iAs));
// further initialization
- if ( (rem1 + rem2) > 0x0FFF ) {
+ if ((rem1 + rem2) > 0x0FFF) {
correction = 0x0FFF;
- } else {
+ }
+ else {
correction = (rem1 + rem2) & 0x0FFF;
}
fTailPed = iFactor - correction;
- for (Int_t i=0; i<n; i++) {
+ for (i = 0; i < n; i++) {
- result = ( (Int_t)source[i] - correction );
- if ( result<0 ) {
+ result = ((Int_t)source[i] - correction);
+ if (result < 0) {
result = 0;
}
target[i] = result;
- h1 = ( rem1 + ((iAlphaL * result) >> 11) );
- if ( h1 > 0x0FFF ) {
+ h1 = (rem1 + ((iAlphaL * result) >> 11));
+ if (h1 > 0x0FFF) {
h1 = 0x0FFF;
- } else {
+ }
+ else {
h1 &= 0x0FFF;
}
- h2 = ( rem2 + ((iAlphaS * result) >> 11));
- if ( h2 > 0x0FFF ) {
+ h2 = (rem2 + ((iAlphaS * result) >> 11));
+ if (h2 > 0x0FFF) {
h2 = 0x0FFF;
- } else {
+ }
+ else {
h2 &= 0x0FFF;
}
rem1 = (iLambdaL * h1 ) >> 11;
rem2 = (iLambdaS * h2 ) >> 11;
- if ( (rem1 + rem2) > 0x0FFF ) {
+ if ((rem1 + rem2) > 0x0FFF) {
correction = 0x0FFF;
- } else {
+ }
+ else {
correction = (rem1 + rem2) & 0x0FFF;
}
}
// Exponential filter (M. Ivanov)
//
- Double_t sig1[100], sig2[100], sig3[100];//, sig4[100];
- for (Int_t i = 0; i < n; i++) sig1[i] = source[i];
+ Int_t i = 0;
- Float_t dt = 0.100;
+ Double_t sig1[100];
+ Double_t sig2[100];
+ Double_t sig3[100];
- //Float_t lambda0 = 9.8016*dt; // short
- //Float_t lambda1 = 1.0778*dt; // long
+ for (i = 0; i < n; i++) {
+ sig1[i] = source[i];
+ }
- Float_t lambda0 = (1.0/fR2)*dt;
- Float_t lambda1 = (1.0/fR1)*dt;
+ Float_t dt = 0.100;
- TailMakerSpline(sig1,sig2,lambda0,n);
- TailCancelationMI(sig2,sig3,0.7,lambda1,n);
+ Float_t lambda0 = (1.0/fR2)*dt;
+ Float_t lambda1 = (1.0/fR1)*dt;
- for (Int_t i = 0; i < n; i++) target[i] = sig3[i];
+ TailMakerSpline(sig1,sig2,lambda0,n);
+ TailCancelationMI(sig2,sig3,0.7,lambda1,n);
+
+ for (i = 0; i < n; i++) {
+ target[i] = sig3[i];
+ }
}
// Special filter (M. Ivanov)
//
- Double_t l = TMath::Exp(-lambda*0.5);
- //
- //
- Double_t in[1000];
- Double_t out[1000];
- // initialize in[] and out[] goes 0 ... 2*n+19
- for (Int_t i=0; i<n*2+20; i++){
- in[i] = 0;
- out[i]= 0;
- }
-
- // in[] goes 0, 1
- in[0] = ampin[0];
- in[1] = (ampin[0]+ampin[1])*0.5;
+ Int_t i = 0;
+
+ Double_t l = TMath::Exp(-lambda*0.5);
+ Double_t in[1000];
+ Double_t out[1000];
+
+ // Initialize in[] and out[] goes 0 ... 2*n+19
+ for (i = 0; i < n*2+20; i++) {
+ in[i] = 0;
+ out[i] = 0;
+ }
+
+ // in[] goes 0, 1
+ in[0] = ampin[0];
+ in[1] = (ampin[0]+ampin[1])*0.5;
- // add charge to the end
- for (Int_t i=0; i<22; i++){
- // in[] goes 2*n-2, 2*n-1, ... , 2*n+19
- in[2*(n-1)+i] = ampin[n-1];
- }
-
- // use arithm mean
- for (Int_t i=1; i<n-1; i++){
- // in[] goes 2, 3, ... , 2*n-4, 2*n-3
- in[2*i] = ampin[i];
- in[2*i+1] = ((ampin[i]+ampin[i+1]))/2.;
- }
- /*
- // add charge to the end
- for (Int_t i=-2; i<22; i++){
- // in[] goes 2*n-4, 2*n-3, ... , 2*n+19
- in[2*(n-1)+i] = ampin[n-1];
- }
-
- // use spline mean
- for (Int_t i=1; i<n-2; i++){
- // in[] goes 2, 3, ... , 2*n-6, 2*n-5
- in[2*i] = ampin[i];
- in[2*i+1] = (9.*(ampin[i]+ampin[i+1])-(ampin[i-1]+ampin[i+2]))/16;
- }
- */
- //
- Double_t temp;
- out[2*n] = in[2*n];
- temp = 0;
- for (int i=2*n; i>=0; i--){
- out[i] = in[i] + temp;
- temp = l*(temp+in[i]);
- }
-
- //
- for (int i=0;i<n;i++){
- //ampout[i] = out[2*i+1]; // org
- ampout[i] = out[2*i];
- }
+ // Add charge to the end
+ for (i = 0; i < 22; i++) {
+ // in[] goes 2*n-2, 2*n-1, ... , 2*n+19
+ in[2*(n-1)+i] = ampin[n-1];
+ }
+
+ // Use arithmetic mean
+ for (i = 1; i < n-1; i++) {
+ // in[] goes 2, 3, ... , 2*n-4, 2*n-3
+ in[2*i] = ampin[i];
+ in[2*i+1] = ((ampin[i]+ampin[i+1]))/2.;
+ }
+
+
+// // add charge to the end
+// for (i = -2; i < 22; i++) {
+// // in[] goes 2*n-4, 2*n-3, ... , 2*n+19
+// in[2*(n-1)+i] = ampin[n-1];
+// }
+
+// // Use spline mean
+// for (i = 1; i < n-2; i++) {
+// // in[] goes 2, 3, ... , 2*n-6, 2*n-5
+// in[2*i] = ampin[i];
+// in[2*i+1] = (9.*(ampin[i]+ampin[i+1])-(ampin[i-1]+ampin[i+2]))/16;
+// }
+
+ Double_t temp;
+ out[2*n] = in[2*n];
+ temp = 0;
+ for (i = 2*n; i >= 0; i--) {
+ out[i] = in[i] + temp;
+ temp = l*(temp+in[i]);
+ }
+
+ for (i = 0; i < n; i++){
+ //ampout[i] = out[2*i+1]; // org
+ ampout[i] = out[2*i];
+ }
}
//______________________________________________________________________________
-void AliTRDmcm::TailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n)
+void AliTRDmcm::TailCancelationMI(Double_t *ampin, Double_t *ampout
+ , Double_t norm, Double_t lambda, Int_t n)
{
//
// Special filter (M. Ivanov)
//
- Double_t l = TMath::Exp(-lambda*0.5);
- Double_t k = l*(1.-norm*lambda*0.5);
- //
- //
- Double_t in[1000];
- Double_t out[1000];
- // initialize in[] and out[] goes 0 ... 2*n+19
- for (Int_t i=0; i<n*2+20; i++){
- in[i] = 0;
- out[i]= 0;
- }
-
- // in[] goes 0, 1
- in[0] = ampin[0];
- in[1] = (ampin[0]+ampin[1])*0.5;
-
- // add charge to the end
- for (Int_t i=-2; i<22; i++){
- // in[] goes 2*n-4, 2*n-3, ... , 2*n+19
- in[2*(n-1)+i] = ampin[n-1];
- }
-
- //
- for (Int_t i=1; i<n-2; i++){
- // in[] goes 2, 3, ... , 2*n-6, 2*n-5
- in[2*i] = ampin[i];
- in[2*i+1] = (9.*(ampin[i]+ampin[i+1])-(ampin[i-1]+ampin[i+2]))/16.;
- //in[2*i+1] = ((ampin[i]+ampin[i+1]))/2.;
- }
-
- //
- Double_t temp;
- out[0] = in[0];
- temp = in[0];
- for (int i=1; i<=2*n; i++){
- out[i] = in[i] + (k-l)*temp;
- temp = in[i] + k*temp;
- }
- //
- //
- for (int i=0; i<n; i++){
- //ampout[i] = out[2*i+1]; // org
- //ampout[i] = TMath::Max(out[2*i+1], 0.0); // org
- ampout[i] = TMath::Max(out[2*i], 0.0);
- }
+ Int_t i = 0;
+
+ Double_t l = TMath::Exp(-lambda*0.5);
+ Double_t k = l*(1.-norm*lambda*0.5);
+ Double_t in[1000];
+ Double_t out[1000];
+
+ // Initialize in[] and out[] goes 0 ... 2*n+19
+ for (i = 0; i < n*2+20; i++) {
+ in[i] = 0;
+ out[i] = 0;
+ }
+
+ // in[] goes 0, 1
+ in[0] = ampin[0];
+ in[1] = (ampin[0]+ampin[1])*0.5;
+
+ // Add charge to the end
+ for (i =-2; i < 22; i++) {
+ // in[] goes 2*n-4, 2*n-3, ... , 2*n+19
+ in[2*(n-1)+i] = ampin[n-1];
+ }
+
+ for (i = 1; i < n-2; i++) {
+ // in[] goes 2, 3, ... , 2*n-6, 2*n-5
+ in[2*i] = ampin[i];
+ in[2*i+1] = (9.*(ampin[i]+ampin[i+1])-(ampin[i-1]+ampin[i+2]))/16.;
+ //in[2*i+1] = ((ampin[i]+ampin[i+1]))/2.;
+ }
+
+ Double_t temp;
+ out[0] = in[0];
+ temp = in[0];
+ for (i = 1; i <= 2*n; i++) {
+ out[i] = in[i] + (k-l)*temp;
+ temp = in[i] + k *temp;
+ }
+
+ for (i = 0; i < n; i++) {
+ //ampout[i] = out[2*i+1]; // org
+ //ampout[i] = TMath::Max(out[2*i+1], 0.0); // org
+ ampout[i] = TMath::Max(out[2*i], 0.0);
+ }
}
enum { kMaxTrackletsPerMCM = 4, kMcmCol = 21, kMcmTBmax = 60, kSelClus = 6, kMaxClus = 4 };
AliTRDmcm();
+ AliTRDmcm(const AliTRDmcm &m);
AliTRDmcm(AliTRDtrigParam *trigp, Int_t id);
- virtual ~AliTRDmcm();
- AliTRDmcm &operator=(const AliTRDmcm &m);
- virtual void Copy(TObject &m) const;
-
- Int_t Ntrk() const { return fNtrk; };
- Int_t *GetTrkIndex() { return &fTrkIndex[0]; };
- Int_t GetRobId() const { return fRobId; };
- Int_t GetChaId() const { return fChaId; };
- void SetRobId(Int_t id) { fRobId = id; };
- void SetChaId(Int_t id) { fChaId = id; };
- void SetRow(Int_t row) { fRow = row; };
- Int_t GetRow() const { return fRow; };
- void SetColRange(Int_t colf, Int_t coll) { fColFirst = colf; fColLast = coll; };
- void GetColRange(Int_t &colf, Int_t &coll) const { colf = fColFirst; coll = fColLast; };
- void AddTrk(Int_t id);
- void SetADC(Int_t icol, Int_t itb, Float_t adc)
- { fADC[icol][itb] = adc; };
- Float_t GetADC(Int_t icol, Int_t itb) const { return fADC[icol][itb]; };
- void Reset();
- Bool_t Run();
- void SetCluster(Int_t icol, Int_t itb) { fIsClus[icol][itb] = kTRUE; };
- void UnSetCluster(Int_t icol, Int_t itb) { fIsClus[icol][itb] = kFALSE; };
- Bool_t IsCluster(Float_t amp[3]) const;
- void AddTimeBin(Int_t itime);
- Int_t CreateSeeds();
- void Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir);
- Int_t GetNtrkSeeds() const { return fNtrkSeeds; };
- Int_t *GetSeedCol() { return &fSeedCol[0]; };
- Int_t *GetPadHits() { return &fPadHits[0]; };
- Bool_t IsCluster(Int_t icol, Int_t itim) const { return fIsClus[icol][itim]; };
-
- void Filter(Int_t nexp, Int_t ftype = 0);
- void DeConvExpA(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
- void DeConvExpD(Double_t *source, Int_t *target, Int_t n, Int_t nexp);
- void DeConvExpMI(Double_t *source, Double_t *target, Int_t n);
- void TailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n);
- void TailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n);
-
- Int_t Id() const { return fId; };
+ virtual ~AliTRDmcm();
+ AliTRDmcm &operator=(const AliTRDmcm &m);
+
+ virtual void Copy(TObject &m) const;
+
+ void SetRobId(Int_t id) { fRobId = id; };
+ void SetChaId(Int_t id) { fChaId = id; };
+ void SetRow(Int_t row) { fRow = row; };
+ void SetColRange(Int_t colf, Int_t coll) { fColFirst = colf; fColLast = coll; };
+ void SetADC(Int_t icol, Int_t itb, Float_t adc) { fADC[icol][itb] = adc; };
+ void SetCluster(Int_t icol, Int_t itb) { fIsClus[icol][itb] = kTRUE; };
+ void UnSetCluster(Int_t icol, Int_t itb) { fIsClus[icol][itb] = kFALSE; };
+
+ Int_t *GetTrkIndex() { return &fTrkIndex[0]; };
+ Int_t GetRobId() const { return fRobId; };
+ Int_t GetChaId() const { return fChaId; };
+ Int_t GetRow() const { return fRow; };
+ void GetColRange(Int_t &colf, Int_t &coll) const { colf = fColFirst; coll = fColLast; };
+ Float_t GetADC(Int_t icol, Int_t itb) const { return fADC[icol][itb]; };
+ Int_t GetNtrkSeeds() const { return fNtrkSeeds; };
+ Int_t *GetSeedCol() { return &fSeedCol[0]; };
+ Int_t *GetPadHits() { return &fPadHits[0]; };
+ Bool_t IsCluster(Int_t icol, Int_t itim) const { return fIsClus[icol][itim]; };
+ Int_t Ntrk() const { return fNtrk; };
+ Int_t Id() const { return fId; };
+
+ void AddTrk(Int_t id);
+ void Reset();
+ Bool_t Run();
+ Bool_t IsCluster(Float_t amp[3]) const;
+ void AddTimeBin(Int_t itime);
+ Int_t CreateSeeds();
+ void Sort(Int_t nel, Int_t *x1, Int_t *x2, Int_t dir);
+
+ void Filter(Int_t nexp, Int_t ftype = 0);
+ void DeConvExpA(Double_t *source, Double_t *target, Int_t n, Int_t nexp);
+ void DeConvExpD(Double_t *source, Int_t *target, Int_t n, Int_t nexp);
+ void DeConvExpMI(Double_t *source, Double_t *target, Int_t n);
+ void TailMakerSpline(Double_t *ampin, Double_t *ampout, Double_t lambda, Int_t n);
+ void TailCancelationMI(Double_t *ampin, Double_t *ampout, Double_t norm, Double_t lambda, Int_t n);
protected:
- AliTRDtrigParam *fTrigParam; //! pointer to the trigger parameters class
-
- Int_t fNtrk; // number of found tracklets
- Int_t fTrkIndex[kMaxTrackletsPerMCM]; // index of found tracklets
- Int_t fRobId; // ROB id
- Int_t fChaId; // Chamber id
- Int_t fRow; // pad row number (0-11 or 0-15)
- Int_t fColFirst; // first pad column
- Int_t fColLast; // last pad column (<)
- Float_t fADC[kMcmCol][kMcmTBmax]; //! array with MCM ADC values
- Bool_t fIsClus[kMcmCol][kMcmTBmax]; //! flag of a cluster maximum
- Int_t fTime1; // first time bin for tracking (incl.)
- Int_t fTime2; // last time bin for tracking (incl.)
- Float_t fClusThr; // cluster threshold
- Float_t fPadThr; // pad threshold
- Int_t fPadHits[kMcmCol]; // hit counter in pads
- Int_t fNtrkSeeds; // number of found seeds
- Int_t fSeedCol[kMaxTrackletsPerMCM]; // column number of found tracklet seeds
- // filter parameters (1 = long, 2 = short component)
- Float_t fR1; // time constant [microseconds]
- Float_t fR2; // time constant [microseconds]
- Float_t fC1; // weight
- Float_t fC2; // weight
- Float_t fPedestal; // ADC baseline (pedestal)
-
- Int_t fId; // dummy id
-
- ClassDef(AliTRDmcm,2) // TRD MCM class
+ AliTRDtrigParam *fTrigParam; //! Pointer to the trigger parameters class
+
+ Int_t fNtrk; // Number of found tracklets
+ Int_t fTrkIndex[kMaxTrackletsPerMCM]; // Index of found tracklets
+ Int_t fRobId; // ROB id
+ Int_t fChaId; // Chamber id
+ Int_t fRow; // Pad row number (0-11 or 0-15)
+ Int_t fColFirst; // First pad column
+ Int_t fColLast; // Last pad column (<)
+ Float_t fADC[kMcmCol][kMcmTBmax]; //! Array with MCM ADC values
+ Bool_t fIsClus[kMcmCol][kMcmTBmax]; //! Flag of a cluster maximum
+ Int_t fTime1; // First time bin for tracking (incl.)
+ Int_t fTime2; // Last time bin for tracking (incl.)
+ Float_t fClusThr; // Cluster threshold
+ Float_t fPadThr; // Pad threshold
+ Int_t fPadHits[kMcmCol]; // Hit counter in pads
+ Int_t fNtrkSeeds; // Number of found seeds
+ Int_t fSeedCol[kMaxTrackletsPerMCM]; // Column number of found tracklet seeds
+ // Filter parameters (1 = long, 2 = short component)
+ Float_t fR1; // Time constant [microseconds]
+ Float_t fR2; // Time constant [microseconds]
+ Float_t fC1; // Weight
+ Float_t fC2; // Weight
+ Float_t fPedestal; // ADC baseline (pedestal)
+
+ Int_t fId; // Dummy id
+
+ ClassDef(AliTRDmcm,2) // TRD MCM class
};
#include <TMath.h>
#include <TF1.h>
+#include "AliLog.h"
+
#include "AliTRDcalibDB.h"
#include "AliTRDCommonParam.h"
#include "AliTRDpadPlane.h"
#include "AliTRDgeometry.h"
-
#include "AliTRDmcmTracklet.h"
ClassImp(AliTRDmcmTracklet)
//_____________________________________________________________________________
AliTRDmcmTracklet::AliTRDmcmTracklet()
+ :TObject()
+ ,fDetector(-1)
+ ,fRow(-1)
+ ,fTrackLabel(-1)
+ ,fNclusters(0)
+ ,fN(0)
+ ,fGPos(0)
+ ,fGAmp(0)
+ ,fTime0(0)
+ ,fRowz(0)
+ ,fSlope(0)
+ ,fOffset(0)
+ ,fPt(0)
+ ,fdQdl(0)
{
//
// AliTRDmcmTracklet default constructor
//
- fDetector = -1;
- fRow = -1;
-
for (Int_t time = 0; time < kNtimeBins; time++) {
for (Int_t icl = 0; icl < kNclsPads; icl++) {
fADC[time][icl] = 0;
fCol[time] = 0;
}
- fNclusters = 0;
- fN = 0;
- fTrackLabel = -1;
-
- fGPos = 0;
- fGAmp = 0;
-
- fSlope = 0.0;
- fOffset = 0.0;
- fTime0 = 0.0;
- fRowz = 0.0;
- fPt = 0.0;
- fdQdl = 0.0;
-
}
//_____________________________________________________________________________
AliTRDmcmTracklet::AliTRDmcmTracklet(Int_t det, Int_t row, Int_t n)
+ :TObject()
+ ,fDetector(det)
+ ,fRow(row)
+ ,fTrackLabel(-1)
+ ,fNclusters(0)
+ ,fN(n)
+ ,fGPos(0)
+ ,fGAmp(0)
+ ,fTime0(0)
+ ,fRowz(0)
+ ,fSlope(0)
+ ,fOffset(0)
+ ,fPt(0)
+ ,fdQdl(0)
{
//
// AliTRDmcmTracklet default constructor
//
- fDetector = det;
- fRow = row;
-
for (Int_t time = 0; time < kNtimeBins; time++) {
for (Int_t icl = 0; icl < kNclsPads; icl++) {
fADC[time][icl] = 0;
fCol[time] = 0;
}
- fNclusters = 0;
-
- fN = n;
-
- fTrackLabel = -1;
-
fGPos = new TGraph(0);
fGAmp = new TGraph(0);
- fSlope = 0.0;
- fOffset = 0.0;
- fTime0 = 0.0;
- fRowz = 0.0;
- fPt = 0.0;
- fdQdl = 0.0;
+}
+
+//_____________________________________________________________________________
+AliTRDmcmTracklet::AliTRDmcmTracklet(const AliTRDmcmTracklet &t)
+ :TObject(t)
+ ,fDetector(t.fDetector)
+ ,fRow(t.fRow)
+ ,fTrackLabel(t.fTrackLabel)
+ ,fNclusters(t.fNclusters)
+ ,fN(t.fN)
+ ,fGPos(NULL)
+ ,fGAmp(NULL)
+ ,fTime0(t.fTime0)
+ ,fRowz(t.fRowz)
+ ,fSlope(t.fSlope)
+ ,fOffset(t.fOffset)
+ ,fPt(t.fPt)
+ ,fdQdl(t.fdQdl)
+{
+ //
+ // AliTRDmcmTracklet copy constructor
+ //
+
+ for (Int_t time = 0; time < kNtimeBins; time++) {
+ for (Int_t icl = 0; icl < kNclsPads; icl++) {
+ ((AliTRDmcmTracklet &) t).fADC[time][icl] = 0;
+ }
+ for (Int_t it = 0; it < kNdict; it++) {
+ ((AliTRDmcmTracklet &) t).fTrack[time][it] = -1;
+ }
+ ((AliTRDmcmTracklet &) t).fTime[time] = 0;
+ ((AliTRDmcmTracklet &) t).fCol[time] = 0;
+ }
}
AliTRDmcmTracklet &AliTRDmcmTracklet::operator=(const AliTRDmcmTracklet &t)
{
//
- // assignment operator
+ // Assignment operator
//
if (this != &t) ((AliTRDmcmTracklet &) t).Copy(*this);
void AliTRDmcmTracklet::Copy(TObject &t) const
{
//
- // copy function
+ // Copy function
//
((AliTRDmcmTracklet &) t).fDetector = fDetector;
if (fNclusters >= kNtimeBins) return;
for (Int_t icl = 0; icl < kNclsPads; icl++) {
- //fADC[fNclusters][icl] = (Int_t)adc[icl];
fADC[fNclusters][icl] = adc[icl];
}
//
if (!geo) {
- Error("MakeTrackletGraph","No geometry.");
+ AliError("No geometry.");
return;
}
AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
- if (!commonParam)
- {
- Error("MakeTrackletGraph","No common params.");
+ if (!commonParam) {
+ AliError("No common parameters.");
return;
}
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
- if (!calibration)
- {
- Error("MakeTrackletGraph","No instance of AliTRDcalibDB.");
+ if (!calibration) {
+ AliError("No instance of AliTRDcalibDB.");
return;
}
// From v4-03-Release to HEAD28Mar06 the sign has changed from "-" to "+"
// due to a change in the digitizer
- omegaTau = +TMath::Sign(1.0,(Double_t)field)*GetOmegaTau(vDrift,TMath::Abs(field));
+ omegaTau = TMath::Sign(1.0,(Double_t)field)*GetOmegaTau(vDrift,TMath::Abs(field));
lorentzAngle = TMath::ATan(omegaTau)*180.0/TMath::Pi();
xpos = (time+0.5) * timeBinSize;
fTime0 = geo->GetTime0(iplan) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
fRowz = padPlane->GetRowPos(fRow) - padPlane->GetRowSize(fRow)/2.0;
- Double_t xMin = 0, xMax = 0, x, y;
- fGPos->GetPoint(0 ,x,y); xMax = x + 0.1;
- fGPos->GetPoint(npg-1,x,y); xMin = x - 0.1;
+ Double_t xMin = 0;
+ Double_t xMax = 0;
+ Double_t x, y;
+ fGPos->GetPoint(0 ,x,y);
+ xMax = x + 0.1;
+ fGPos->GetPoint(npg-1,x,y);
+ xMin = x - 0.1;
TF1 *line = new TF1("line","[0]+x*[1]",xMin,xMax);
fGPos->Fit(line,"WRQ0");
Float_t fy = fOffset;
Float_t infSlope = TMath::ATan(fy/fx)/TMath::Pi()*180.0;
- Float_t alpha = fSlope - infSlope;
- Float_t r = TMath::Sqrt(fx*fx + fy*fy)/(2.0*TMath::Sin(alpha/180.0*TMath::Pi()));
+ Float_t alpha = fSlope - infSlope;
+ Float_t r = TMath::Sqrt(fx*fx + fy*fy)/(2.0*TMath::Sin(alpha/180.0*TMath::Pi()));
fPt = 0.3 * field * 0.01 * r;
// Tracklet graph of cluster charges
//
- Int_t time;
+ Int_t time;
Float_t amp[3];
- Int_t npg = 0;
+ Int_t npg = 0;
+
fdQdl = 0.0;
for (Int_t icl = 0; icl < fNclusters; icl++) {
case 5:
sigma = 0.463; break;
default:
- Error("GetClusY","Wrong plane number.");
+ AliError("Wrong plane number.");
return 0.0;
}
trackCount[nTracks]++;
nTracks++;
if (nTracks == kMaxTracks) {
- Warning("CookLabel","Too many tracks for this tracklet.");
+ AliWarning("Too many tracks for this tracklet.");
nTracks--;
break;
}
ib = TMath::Min(kNb,ib);
Float_t alphaL = p0[ib]
- + p1[ib] * vdrift
- + p2[ib] * vdrift*vdrift
- + p3[ib] * vdrift*vdrift*vdrift;
+ + p1[ib] * vdrift
+ + p2[ib] * vdrift*vdrift
+ + p3[ib] * vdrift*vdrift*vdrift;
return TMath::Tan(alphaL);
AliTRDmcmTracklet();
AliTRDmcmTracklet(Int_t det, Int_t row, Int_t n);
- virtual ~AliTRDmcmTracklet();
+ AliTRDmcmTracklet(const AliTRDmcmTracklet &t);
+ virtual ~AliTRDmcmTracklet();
AliTRDmcmTracklet &operator=(const AliTRDmcmTracklet &t);
- virtual void Copy(TObject &t) const;
-
- void Reset();
-
- void AddCluster(Int_t icol, Int_t itb, Float_t *adc, Int_t *track);
- void MakeTrackletGraph(AliTRDgeometry *geo = 0, Float_t field = 0);
- void MakeClusAmpGraph();
- void CookLabel(Float_t frac);
-
- void SetRow(Int_t row) { fRow = row; };
- void SetDetector(Int_t det) { fDetector = det; };
- void SetN(Int_t n) { fN = n; };
-
- Int_t GetNclusters() const { return fNclusters; };
- Int_t GetDetector() const { return fDetector; };
- Int_t GetRow() const { return fRow; };
- Float_t GetOffset() const { return fOffset; };
- Float_t GetSlope() const { return fSlope; };
- Float_t GetTime0() const { return fTime0; };
- Float_t GetRowz() const { return fRowz; };
- Float_t GetPt() const { return fPt; };
- Float_t GetdQdl() const { return fdQdl; };
- Int_t GetLabel() const { return fTrackLabel; };
- Int_t GetNumber() const { return fN; };
+ virtual void Copy(TObject &t) const;
+
+ void Reset();
+
+ void AddCluster(Int_t icol, Int_t itb, Float_t *adc, Int_t *track);
+ void MakeTrackletGraph(AliTRDgeometry *geo = 0, Float_t field = 0);
+ void MakeClusAmpGraph();
+ void CookLabel(Float_t frac);
+
+ void SetRow(Int_t row) { fRow = row; };
+ void SetDetector(Int_t det) { fDetector = det; };
+ void SetN(Int_t n) { fN = n; };
+
+ Int_t GetNclusters() const { return fNclusters; };
+ Int_t GetDetector() const { return fDetector; };
+ Int_t GetRow() const { return fRow; };
+ Float_t GetOffset() const { return fOffset; };
+ Float_t GetSlope() const { return fSlope; };
+ Float_t GetTime0() const { return fTime0; };
+ Float_t GetRowz() const { return fRowz; };
+ Float_t GetPt() const { return fPt; };
+ Float_t GetdQdl() const { return fdQdl; };
+ Int_t GetLabel() const { return fTrackLabel; };
+ Int_t GetNumber() const { return fN; };
Float_t GetOmegaTau(Float_t vdrift, Float_t field) const;
Float_t GetClusY(Float_t *adc, Int_t pla) const;
- TGraph *GetTrackletGraph() const { return fGPos; };
- TGraph *GetClusAmpGraph() const { return fGAmp; };
- Float_t *GetClusterADC(Int_t icl) { return fADC[icl]; };
- Int_t GetClusterTime(Int_t icl) const { return fTime[icl]; };
- Int_t GetClusterCol(Int_t icl) const { return fCol[icl]; };
+ TGraph *GetTrackletGraph() const { return fGPos; };
+ TGraph *GetClusAmpGraph() const { return fGAmp; };
+ Float_t *GetClusterADC(Int_t icl) { return fADC[icl]; };
+ Int_t GetClusterTime(Int_t icl) const { return fTime[icl]; };
+ Int_t GetClusterCol(Int_t icl) const { return fCol[icl]; };
protected:
Int_t fCol[kNtimeBins]; // Array of pad column values
Int_t fNclusters; // Number of clusters in the tracklet
- Int_t fN; // Tracklet number
+ Int_t fN; // Tracklet number
TGraph *fGPos; //! Positions
TGraph *fGAmp; //! Amplitudes
- Float_t fTime0; // X position at the entrance window
- Float_t fRowz; // Z position of the row center
- Float_t fSlope; // Slope [deg]
- Float_t fOffset; // Offset
- Float_t fPt; // Transverse momentum
- Float_t fdQdl; // Charge per unit length
+ Float_t fTime0; // X position at the entrance window
+ Float_t fRowz; // Z position of the row center
+ Float_t fSlope; // Slope [deg]
+ Float_t fOffset; // Offset
+ Float_t fPt; // Transverse momentum
+ Float_t fdQdl; // Charge per unit length
- ClassDef(AliTRDmcmTracklet,2) // Track segment for the TRD (Tracklet)
+ ClassDef(AliTRDmcmTracklet,2) // Track segment for the TRD (Tracklet)
};
// //
///////////////////////////////////////////////////////////////////////////////
+#include <TObject.h>
+
+#include "AliLog.h"
+
#include "AliTRDgeometry.h"
#include "AliTRDmodule.h"
#include "AliTRDltuTracklet.h"
ClassImp(AliTRDmodule)
//_____________________________________________________________________________
-AliTRDmodule::AliTRDmodule(AliTRDtrigParam *trigp)
+AliTRDmodule::AliTRDmodule()
+ :TObject()
+ ,fXprojPlane(0)
+ ,fField(0)
+ ,fTracklets(NULL)
+ ,fTracks(NULL)
+ ,fDeltaY(0)
+ ,fDeltaS(0)
+ ,fLTUtrk(0)
+ ,fGTUtrk(0)
{
-
//
// AliTRDmodule default constructor
//
- fDeltaY = trigp->GetDeltaY();
- fDeltaS = trigp->GetDeltaS();
- fXprojPlane = trigp->GetXprojPlane();
- fField = trigp->GetField();
- fLTUtrk = 0;
- fGTUtrk = 0;
- fTracklets = new TObjArray(400);
- fTracks = new TObjArray(400);
+}
+
+//_____________________________________________________________________________
+AliTRDmodule::AliTRDmodule(AliTRDtrigParam *trigp)
+ :TObject()
+ ,fXprojPlane(trigp->GetXprojPlane())
+ ,fField(trigp->GetField())
+ ,fTracklets(new TObjArray(400))
+ ,fTracks(new TObjArray(400))
+ ,fDeltaY(trigp->GetDeltaY())
+ ,fDeltaS(trigp->GetDeltaS())
+ ,fLTUtrk(0)
+ ,fGTUtrk(0)
+{
+ //
+ // AliTRDmodule constructor
+ //
for (Int_t iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
for (Int_t i = 0; i < kNsubZchan; i++) {
}
+//_____________________________________________________________________________
+AliTRDmodule::AliTRDmodule(const AliTRDmodule &m)
+ :TObject(m)
+ ,fXprojPlane(m.fXprojPlane)
+ ,fField(m.fField)
+ ,fTracklets(NULL)
+ ,fTracks(NULL)
+ ,fDeltaY(m.fDeltaY)
+ ,fDeltaS(m.fDeltaS)
+ ,fLTUtrk(NULL)
+ ,fGTUtrk(NULL)
+{
+ //
+ // AliTRDmodule copy constructor
+ //
+
+ for (Int_t iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
+ for (Int_t i = 0; i < kNsubZchan; i++) {
+ ((AliTRDmodule &) m).fZnchan[iPlan][i] = 0;
+ for (Int_t j = 0; j < kNmaxZchan; j++) {
+ ((AliTRDmodule &) m).fZtrkid[iPlan][j][i] = -1;
+ }
+ }
+ }
+
+}
+
//_____________________________________________________________________________
AliTRDmodule::~AliTRDmodule()
{
//
- // destructor
+ // Destructor
//
}
AliTRDmodule &AliTRDmodule::operator=(const AliTRDmodule &m)
{
//
- // assignment operator
+ // Assignment operator
//
if (this != &m) ((AliTRDmodule &) m).Copy(*this);
// copy function
//
- ((AliTRDmodule &) m).fXprojPlane = fXprojPlane;
- ((AliTRDmodule &) m).fField = fField;
- ((AliTRDmodule &) m).fTracklets = NULL;
- ((AliTRDmodule &) m).fTracks = NULL;
- ((AliTRDmodule &) m).fDeltaY = fDeltaY;
- ((AliTRDmodule &) m).fDeltaS = fDeltaS;
- ((AliTRDmodule &) m).fLTUtrk = NULL;
- ((AliTRDmodule &) m).fGTUtrk = NULL;
+ ((AliTRDmodule &) m).fXprojPlane = fXprojPlane;
+ ((AliTRDmodule &) m).fField = fField;
+ ((AliTRDmodule &) m).fTracklets = NULL;
+ ((AliTRDmodule &) m).fTracks = NULL;
+ ((AliTRDmodule &) m).fDeltaY = fDeltaY;
+ ((AliTRDmodule &) m).fDeltaS = fDeltaS;
+ ((AliTRDmodule &) m).fLTUtrk = NULL;
+ ((AliTRDmodule &) m).fGTUtrk = NULL;
for (Int_t iPlan = 0; iPlan < AliTRDgeometry::Nplan(); iPlan++) {
for (Int_t i = 0; i < kNsubZchan; i++) {
ResetTracklets();
ResetTracks();
- fLTUtrk = 0;
- fGTUtrk = 0;
- fTracklets = new TObjArray(400);
- fTracks = new TObjArray(400);
+ fLTUtrk = 0;
+ fGTUtrk = 0;
+ fTracklets = new TObjArray(400);
+ fTracks = new TObjArray(400);
}
// Return track at position "pos"
//
- if (fTracks == 0) return 0;
- void * trk = fTracks->UncheckedAt(pos);
- if (trk == 0) return 0;
+ if (fTracks == 0) {
+ return 0;
+ }
- return (AliTRDgtuTrack*)trk;
+ void *trk = fTracks->UncheckedAt(pos);
+ if (trk == 0) {
+ return 0;
+ }
+
+ return (AliTRDgtuTrack *) trk;
}
// Remove the track at position "pos"
//
- if (fTracks == 0) return;
+ if (fTracks == 0) {
+ return;
+ }
+
fTracks->RemoveAt(pos);
fTracks->Compress();
}
//_____________________________________________________________________________
-void AliTRDmodule::AddTracklet(Int_t det,
- Int_t row,
- Float_t rowz,
- Float_t slope,
- Float_t offset,
- Float_t time,
- Int_t ncl,
- Int_t label,
- Float_t q)
+void AliTRDmodule::AddTracklet(Int_t det, Int_t row, Float_t rowz, Float_t slope
+ , Float_t offset, Float_t time, Int_t ncl
+ , Int_t label, Float_t q)
{
//
// Add a tracklet to this track
//
fLTUtrk = new AliTRDltuTracklet(det,row,rowz,slope,offset,time,ncl,label,q);
-
Tracklets()->Add(fLTUtrk);
}
// Get the tracklet at position "pos"
//
- if (fTracklets == 0) return 0;
- void * trk = fTracklets->UncheckedAt(pos);
- if (trk == 0) return 0;
+ if (fTracklets == 0) {
+ return 0;
+ }
+
+ void *trk = fTracklets->UncheckedAt(pos);
+ if (trk == 0) {
+ return 0;
+ }
- return (AliTRDltuTracklet*)trk;
+ return (AliTRDltuTracklet *) trk;
}
// Remove the tracklet at position "pos"
//
- if (fTracklets == 0) return;
+ if (fTracklets == 0) {
+ return;
+ }
+
fTracklets->RemoveAt(pos);
fTracklets->Compress();
Float_t offDiffMin = 0.5; // [cm]
AliTRDltuTracklet *trk;
- Int_t det1, det2, row1, row2, ncl1, ncl2, label1, label2;
+ Int_t det1, det2, row1, row2, ncl1, ncl2, label1, label2;
Float_t off1, off2;
- Int_t itrk = 0;
- while (itrk < (GetNtracklets()-1)) {
-
- trk = GetTracklet(itrk );
-
- det1 = trk->GetDetector();
- row1 = trk->GetRow();
- off1 = trk->GetOffset();
- ncl1 = trk->GetNclusters();
+ Int_t itrk = 0;
+ while (itrk < (GetNtracklets() - 1)) {
+
+ trk = GetTracklet(itrk);
+ det1 = trk->GetDetector();
+ row1 = trk->GetRow();
+ off1 = trk->GetOffset();
+ ncl1 = trk->GetNclusters();
label1 = trk->GetLabel();
- trk = GetTracklet(itrk+1);
-
- det2 = trk->GetDetector();
- row2 = trk->GetRow();
- off2 = trk->GetOffset();
- ncl2 = trk->GetNclusters();
+ trk = GetTracklet(itrk+1);
+ det2 = trk->GetDetector();
+ row2 = trk->GetRow();
+ off2 = trk->GetOffset();
+ ncl2 = trk->GetNclusters();
label2 = trk->GetLabel();
- if (det1 == det2 && row1 == row2) {
- if ((off2-off1) < offDiffMin) {
+ if ((det1 == det2) && (row1 == row2)) {
+ if ((off2 - off1) < offDiffMin) {
if (ncl1 < ncl2) {
RemoveTracklet(itrk );
- } else {
+ }
+ else {
RemoveTracklet(itrk+1);
}
}
AliTRDltuTracklet *trk;
Int_t row, pla, det;
+
for (Int_t iTrk = 0; iTrk < GetNtracklets(); iTrk++) {
trk = GetTracklet(iTrk);
-
row = trk->GetRow();
det = trk->GetDetector();
pla = trk->GetPlane(det);
void AliTRDmodule::FindTracksCombi(Int_t zchan)
{
//
- // find tracks by pure combinatorics...
+ // Find tracks by pure combinatorics...
//
static Int_t trkTrack[12];
- Int_t nTracklets, nPlanes;
- Int_t ntrk1, trkId1, ntrk2, trkId2;
+ Int_t nTracklets, nPlanes;
+ Int_t ntrk1, trkId1, ntrk2, trkId2;
Float_t y1, y1min, y1max, s1, z1, s1min, s1max, y2, s2, z2;
AliTRDltuTracklet *trk1;
AliTRDltuTracklet *trk2;
for (Int_t iTrk1 = 0; iTrk1 < ntrk1; iTrk1++) {
- for (Int_t iPlan = 0; iPlan < kNplan; iPlan++) isPlane[iPlan] = kFALSE;
+ for (Int_t iPlan = 0; iPlan < kNplan; iPlan++) {
+ isPlane[iPlan] = kFALSE;
+ }
trkId1 = fZtrkid[iPlan1][iTrk1][zchan];
for (Int_t iList = 0; iList < kNmaxTrk; iList++) {
trkTrack[iList] = -1;
}
-
trkTrack[nTracklets++] = trkId1;
isPlane[iPlan1] = kTRUE;
- trk1 = GetTracklet(trkId1);
-
+ trk1 = GetTracklet(trkId1);
y1 = trk1->GetYproj(fXprojPlane);
y1min = y1 - fDeltaY;
y1max = y1 + fDeltaY;
if (trkId2 == trkId1) continue;
trk2 = GetTracklet(trkId2);
-
- y2 = trk2->GetYproj(fXprojPlane);
- s2 = trk2->GetSlope();
- z2 = trk2->GetZproj(fXprojPlane);
+ y2 = trk2->GetYproj(fXprojPlane);
+ s2 = trk2->GetSlope();
+ z2 = trk2->GetZproj(fXprojPlane);
if ((y1min < y2 && y2 < y1max) &&
(s1min < s2 && s2 < s1max)) {
if (nTracklets >= kNmaxTrk) {
- Warning("FindTracksCombi","Too many tracklets for this track.");
- } else {
+ AliWarning("Too many tracklets for this track.");
+ }
+ else {
trkTrack[nTracklets++] = trkId2;
isPlane[iPlan2] = kTRUE;
}
nPlanes = 0;
for (Int_t iPlan = 0; iPlan < kNplan; iPlan++) {
- nPlanes += (Int_t)isPlane[iPlan];
+ nPlanes += (Int_t) isPlane[iPlan];
}
if (nPlanes >= 4) {
Int_t cha1, cha2, npoints1, npoints2;
- for (Int_t iList = 0; iList < (nTracklets-1); iList++) {
+ for (Int_t iList = 0; iList < (nTracklets - 1); iList++) {
if (trkTrack[iList] == -1 || trkTrack[iList+1] == -1) continue;
trk1 = GetTracklet(trkTrack[iList ]);
if (npoints1 == npoints2) {
trkTrack[iList] = -1;
- } else {
+ }
+ else {
if (npoints1 > npoints2) trkTrack[iList+1] = -1;
if (npoints1 < npoints2) trkTrack[iList ] = -1;
}
}
fGTUtrk->Track(fXprojPlane,fField);
AddTrack();
+
}
} // end trk 1
AliTRDgtuTrack *trk2;
Float_t yproj1, yproj2, alpha1, alpha2;
- Int_t ntrk1, ntrk2;
- Int_t iTrack = 0;
+ Int_t ntrk1, ntrk2;
+ Int_t iTrack = 0;
while (iTrack < (GetNtracks()-1)) {
- trk1 = GetTrack(iTrack );
- trk2 = GetTrack(iTrack+1);
+ trk1 = GetTrack(iTrack );
+ trk2 = GetTrack(iTrack+1);
ntrk1 = trk1->GetNtracklets();
yproj1 = trk1->GetYproj();
yproj2 = trk2->GetYproj();
alpha2 = trk2->GetSlope();
- if (TMath::Abs(yproj1-yproj2) < fDeltaY && TMath::Abs(alpha1-alpha2) < fDeltaS) {
+ if ((TMath::Abs(yproj1-yproj2) < fDeltaY) &&
+ (TMath::Abs(alpha1-alpha2) < fDeltaS)) {
if (ntrk1 < ntrk2) {
RemoveTrack(iTrack );
- } else {
+ }
+ else {
RemoveTrack(iTrack+1);
}
- } else {
+ }
+ else {
iTrack++;
}
}
+//_____________________________________________________________________________
+TObjArray* AliTRDmodule::Tracklets()
+{
+ //
+ // Returns the list of tracklets
+ //
+
+ if (!fTracklets) {
+ fTracklets = new TObjArray(400);
+ }
+
+ return fTracklets;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDmodule::ResetTracklets()
+{
+ //
+ // Resets the list of tracklets
+ //
+
+ if (fTracklets) {
+ fTracklets->Delete();
+ }
+
+}
+
+//_____________________________________________________________________________
+void AliTRDmodule::SortTracklets()
+{
+ //
+ // Sorts the list of tracklets
+ //
+
+ if (fTracklets) {
+ fTracklets->Sort();
+ }
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDmodule::GetNtracklets() const
+{
+ //
+ // Returns the number of tracklets
+ //
+
+ if (fTracklets) {
+ return fTracklets->GetEntriesFast();
+ }
+
+ return 0;
+
+}
+
+//_____________________________________________________________________________
+TObjArray* AliTRDmodule::Tracks()
+{
+ //
+ // Returns the list of tracks
+ //
+
+ if (!fTracks) {
+ fTracks = new TObjArray(400);
+ }
+
+ return fTracks;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDmodule::SortTracks()
+{
+ //
+ // Sort the list of tracks
+ //
+
+ if (fTracks) {
+ fTracks->Sort();
+ }
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDmodule::GetNtracks() const
+{
+ //
+ // Returns the number of tracks
+ //
+
+ if (fTracks) {
+ return fTracks->GetEntriesFast();
+ }
+
+ return 0;
+
+}
#ifndef ALITRDMODULE_H
#define ALITRDMODULE_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice */
-#include <TObjArray.h>
+/* $Id$ */
+
+///////////////////////////////////////////////////////////////////////////////
+// //
+// TRD module class //
+// //
+///////////////////////////////////////////////////////////////////////////////
+
+#include <TObject.h>
class AliTRDgtuTrack;
class AliTRDltuTracklet;
enum { kNplan = 6, kNmaxZchan = 100, kNsubZchan = 16, kNmaxTrk = 12 };
+ AliTRDmodule();
+ AliTRDmodule(const AliTRDmodule &m);
AliTRDmodule(AliTRDtrigParam *trigp);
- virtual ~AliTRDmodule();
- AliTRDmodule &operator=(const AliTRDmodule &m);
- virtual void Copy(TObject &m) const;
-
- void Reset();
-
- void AddTracklet(Int_t det,
- Int_t row,
- Float_t rowz,
- Float_t slope,
- Float_t offset,
- Float_t time,
- Int_t ncl,
- Int_t label,
- Float_t q);
-
- TObjArray *Tracklets() {
- if(!fTracklets) fTracklets = new TObjArray(400); return fTracklets;
- };
-
- void ResetTracklets() { if(fTracklets) fTracklets->Delete(); };
- void SortTracklets() { if(fTracklets) fTracklets->Sort(); };
- AliTRDltuTracklet *GetTracklet(Int_t pos) const;
- void RemoveMultipleTracklets();
- void RemoveTracklet(Int_t pos);
- Int_t GetNtracklets() const {
- if (fTracklets) return fTracklets->GetEntriesFast();
- return 0;
- };
- void AddTrack();
- TObjArray *Tracks() {
- if(!fTracks) fTracks = new TObjArray(400); return fTracks;
- };
-
- void ResetTracks();
- void SortTracks() { if(fTracks) fTracks->Sort(); };
- AliTRDgtuTrack *GetTrack(Int_t pos) const;
- void RemoveMultipleTracks();
- void RemoveTrack(Int_t pos);
- Int_t GetNtracks() const {
- if (fTracks) return fTracks->GetEntriesFast();
- return 0;
- };
- void SortZ(Int_t cha);
- void InitZLUT();
- void FindTracks();
- void FindTracksCombi(Int_t zchan);
+ virtual ~AliTRDmodule();
+ AliTRDmodule &operator=(const AliTRDmodule &m);
+
+ virtual void Copy(TObject &m) const;
+
+ Int_t GetNtracklets() const;
+ Int_t GetNtracks() const;
+
+ void Reset();
+ void AddTracklet(Int_t det, Int_t row, Float_t rowz, Float_t slope, Float_t offset
+ , Float_t time, Int_t ncl, Int_t label, Float_t q);
+ void AddTrack();
+
+ void ResetTracklets();
+ void ResetTracks();
+ void SortTracklets();
+ void SortTracks();
+ void RemoveMultipleTracklets();
+ void RemoveMultipleTracks();
+ void RemoveTracklet(Int_t pos);
+ void RemoveTrack(Int_t pos);
+ void SortZ(Int_t cha);
+ void InitZLUT();
+ void FindTracks();
+ void FindTracksCombi(Int_t zchan);
+
+ TObjArray *Tracklets();
+ TObjArray *Tracks();
+ AliTRDltuTracklet *GetTracklet(Int_t pos) const;
+ AliTRDgtuTrack *GetTrack(Int_t pos) const;
protected:
- Float_t fXprojPlane; //! X (time) coordinate of the
- // projection plane
- Float_t fField; //! Magnetic field
- TObjArray *fTracklets; //! Array of LTU tracklets
- TObjArray *fTracks; //! Array of GTU tracks
+ Float_t fXprojPlane; //! X (time) coordinate of the projection plane
+ Float_t fField; //! Magnetic field
+ TObjArray *fTracklets; //! Array of LTU tracklets
+ TObjArray *fTracks; //! Array of GTU tracks
- Int_t fZnchan[kNplan][kNsubZchan]; //! number of LTU tracklets in each
- // subchannel
- Int_t fZtrkid[kNplan][kNmaxZchan][kNsubZchan]; //! list of LTU tracklet id's for
- // each subchannel
+ Int_t fZnchan[kNplan][kNsubZchan]; //! Number of LTU tracklets in each subchannel
+ Int_t fZtrkid[kNplan][kNmaxZchan][kNsubZchan]; //! List of LTU tracklet id's for each subchannel
- Float_t fDeltaY; // Y (offset) matching window in the GTU
- Float_t fDeltaS; // Slope matching window in the GTU
+ Float_t fDeltaY; // Y (offset) matching window in the GTU
+ Float_t fDeltaS; // Slope matching window in the GTU
- AliTRDltuTracklet *fLTUtrk; //! Current LTU tracklet
- AliTRDgtuTrack *fGTUtrk; //! Current GTU track
+ AliTRDltuTracklet *fLTUtrk; //! Current LTU tracklet
+ AliTRDgtuTrack *fGTUtrk; //! Current GTU track
- ClassDef(AliTRDmodule,2)
+ ClassDef(AliTRDmodule,2) // TRD module class
};
ClassImp(AliTRDrecPoint)
//_____________________________________________________________________________
-AliTRDrecPoint::AliTRDrecPoint():AliRecPoint()
+AliTRDrecPoint::AliTRDrecPoint()
+ :AliRecPoint()
+ ,fDetector(0)
+ ,fTimeBin(0)
+ ,fUsed(0)
+ ,fY(0)
+ ,fZ(0)
+ ,fSigmaY2(0)
+ ,fSigmaZ2(0)
{
//
- // Standard constructor
+ // Default constructor
//
- fDetector = 0;
-
+ for (Int_t i = 0; i < 3; i++) {
+ fTracks[i] = 0;
+ }
fGeom = AliTRDgeometry::GetGeometry();
}
//_____________________________________________________________________________
-AliTRDrecPoint::AliTRDrecPoint(const char * opt):AliRecPoint(opt)
+AliTRDrecPoint::AliTRDrecPoint(const char * opt)
+ :AliRecPoint(opt)
+ ,fDetector(0)
+ ,fTimeBin(0)
+ ,fUsed(0)
+ ,fY(0)
+ ,fZ(0)
+ ,fSigmaY2(0)
+ ,fSigmaZ2(0)
{
//
// Standard constructor
//
- fDetector = 0;
-
+ for (Int_t i = 0; i < 3; i++) {
+ fTracks[i] = 0;
+ }
fGeom = AliTRDgeometry::GetGeometry();
}
// First resize the list
// (no clusters with more than 3 digits for the TRD
- if ((fMulDigit == 0) && (fMaxDigit >= 5)) {
+ if ((fMulDigit == 0) &&
+ (fMaxDigit >= 5)) {
fMaxDigit = 5;
delete fDigitsList;
fDigitsList = new int[fMaxDigit];
if (fMulDigit >= fMaxDigit) {
fMaxDigit *= 2;
Int_t *tempo = new Int_t[fMaxDigit];
- Int_t index;
- for (index = 0; index < fMulDigit; index++)
+ Int_t index;
+ for (index = 0; index < fMulDigit; index++) {
tempo[index] = fDigitsList[index];
+ }
delete fDigitsList;
fDigitsList = tempo;
}
// system.
//
- //const Float_t kSq12 = 3.464101615;
-
- // Set the position
- //fLocPos = pos;
-
- // Set the error matrix
- // row: pad-size / sqrt(12)
- // col: not defined yet
- // time: bin-size / sqrt(12)
- //Int_t plane = ((AliTRDgeometry *) fGeom)->GetPlane(fDetector);
- //Int_t chamber = ((AliTRDgeometry *) fGeom)->GetChamber(fDetector);
- //Int_t sector = ((AliTRDgeometry *) fGeom)->GetSector(fDetector);
- //fLocPosM->operator()(0,0) = ((AliTRDgeometry *) fGeom)->GetRowPadSize(plane
- // ,chamber
- // ,sector)
- // / kSq12;
- //fLocPosM->operator()(1,1) = 0.0;
- //fLocPosM->operator()(2,2) = ((AliTRDgeometry *) fGeom)->GetTimeBinSize()
- // / kSq12;
-
- // printf("rec. point: row = %f, col = %f, time = %f \n",
- // fLocPos[0],fLocPos[1],fLocPos[2]);
+ AliFatal("Not implemented");
}
//_____________________________________________________________________________
void AliTRDrecPoint::SetTrackingYZ(Float_t /*sigmaY*/, Float_t /*sigmaZ*/)
{
- //
- // Sets the position of the point in the local coordinate system
- // of tracking sector
- //
-
- //Int_t plane = ((AliTRDgeometry *) fGeom)->GetPlane(fDetector);
- //Int_t chamber = ((AliTRDgeometry *) fGeom)->GetChamber(fDetector);
- //Int_t sector = ((AliTRDgeometry *) fGeom)->GetSector(fDetector);
-
-
- // Set the position
-
- //Float_t padRow = fLocPos[0]; // Pad Row position
- //Float_t padCol = fLocPos[1]; // Pad Column position
-
- //Float_t col0 = ((AliTRDgeometry *) fGeom)->GetCol0(plane);
- //Float_t row0 = ((AliTRDgeometry *) fGeom)->GetRow0(plane,chamber,sector);
-
- // Float_t offset = 0.5 * ((AliTRDgeometry *) fGeom)->GetChamberWidth(plane);
-
- //fY = - (col0 + padCol * ((AliTRDgeometry *) fGeom)->GetColPadSize(plane));
- //fZ = row0 + padRow * ((AliTRDgeometry *) fGeom)->GetRowPadSize(plane
- // ,chamber
- // ,sector);
-
- // fSigmaY = sigmaY * sigmaY;
- // fSigmaZ = sigmaZ * sigmaZ;
-
-//fSigmaY2 = 0.05 * 0.05;
-
-//fSigmaZ2 = ((AliTRDgeometry *) fGeom)->GetRowPadSize(plane,chamber,sector)
-// * ((AliTRDgeometry *) fGeom)->GetRowPadSize(plane,chamber,sector)
-// / 12.;
+ //
+ // Sets the position of the point in the local coordinate system
+ // of tracking sector
+ //
+
+ AliFatal("Not implemented");
}
//_____________________________________________________________________________
void AliTRDrecPoint::AddTrackIndex(Int_t *track)
{
- // Adds track index. Currently assumed that track is an array of
- // size 9, and up to 3 track indexes are stored in fTracks[3].
- // Indexes are sorted according to:
- // 1) index of max number of appearances is stored first
- // 2) if two or more indexes appear equal number of times, the lowest
- // ones are stored first;
+ //
+ // Adds track index. Currently assumed that track is an array of
+ // size 9, and up to 3 track indexes are stored in fTracks[3].
+ // Indexes are sorted according to:
+ // 1) index of max number of appearances is stored first
+ // 2) if two or more indexes appear equal number of times, the lowest
+ // ones are stored first;
+ //
const Int_t kSize = 9;
+ Int_t entries[kSize][2];
- Int_t entries[kSize][2], i, j, index;
+ Int_t i = 0;
+ Int_t j = 0;
+ Int_t k = 0;
+ Int_t index;
Bool_t indexAdded;
- for (i=0; i<kSize; i++) {
- entries[i][0]=-1;
- entries[i][1]=0;
+ for (i = 0; i < kSize; i++) {
+ entries[i][0] = -1;
+ entries[i][1] = 0;
}
-
- for (Int_t k=0; k<kSize; k++) {
- index=track[k];
- indexAdded=kFALSE; j=0;
+ for (k = 0; k < kSize; k++) {
+ index = track[k];
+ indexAdded = kFALSE;
+ j = 0;
if (index >= 0) {
- while ( (!indexAdded) && ( j < kSize ) ) {
- if ((entries[j][0]==index) || (entries[j][1]==0)) {
- entries[j][0]=index;
- entries[j][1]=entries[j][1]+1;
- indexAdded=kTRUE;
+ while ((!indexAdded) && (j < kSize)) {
+ if ((entries[j][0] == index) ||
+ (entries[j][1] == 0)) {
+ entries[j][0] = index;
+ entries[j][1] = entries[j][1]+1;
+ indexAdded = kTRUE;
}
j++;
}
}
- }
-
- // sort by number of appearances and index value
- Int_t swap=1, tmp0, tmp1;
- while ( swap > 0) {
- swap=0;
- for(i=0; i<(kSize-1); i++) {
- if ((entries[i][0] >= 0) && (entries[i+1][0] >= 0)) {
+ }
+
+ // Sort by number of appearances and index value
+ Int_t swap = 1;
+ Int_t tmp0;
+ Int_t tmp1;
+ while (swap > 0) {
+ swap = 0;
+ for (i = 0; i < (kSize - 1); i++) {
+ if ((entries[i][0] >= 0) &&
+ (entries[i+1][0] >= 0)) {
if ((entries[i][1] < entries[i+1][1]) ||
((entries[i][1] == entries[i+1][1]) &&
- (entries[i][0] > entries[i+1][0]))) {
- tmp0=entries[i][0];
- tmp1=entries[i][1];
- entries[i][0]=entries[i+1][0];
- entries[i][1]=entries[i+1][1];
- entries[i+1][0]=tmp0;
- entries[i+1][1]=tmp1;
+ (entries[i][0] > entries[i+1][0]))) {
+ tmp0 = entries[i][0];
+ tmp1 = entries[i][1];
+ entries[i][0] = entries[i+1][0];
+ entries[i][1] = entries[i+1][1];
+ entries[i+1][0] = tmp0;
+ entries[i+1][1] = tmp1;
swap++;
}
}
}
}
- // set track indexes
-
- for(i=0; i<3; i++) {
+ // Set track indexes
+ for(i = 0; i < 3; i++) {
fTracks[i] = entries[i][0];
}
AliTRDrecPoint();
AliTRDrecPoint(const char * opt);
- virtual ~AliTRDrecPoint();
-
- virtual void Print(Option_t* ) const {};
- virtual void AddDigit(Int_t digit);
- virtual void AddDigit(AliDigitNew& ) {};
-
- virtual void SetEnergy(Float_t amp) { fAmp = amp; };
- virtual void SetDetector(Int_t det) { fDetector = det; };
- virtual void SetLocalPosition(TVector3 &pos);
- virtual void SetLocalRow(Float_t r) { fLocPos.SetX(r); };
- virtual void SetLocalCol(Float_t c) { fLocPos.SetY(c); };
- virtual void SetLocalTime(Float_t t) { fLocPos.SetZ(t); };
-
- virtual void SetLocalTimeBin(Int_t tb) { fTimeBin = tb; }
- virtual void SetTrackingYZ(Float_t fSigmaY = 0.0, Float_t fSigmaZ = 0.0);
-
- virtual Int_t GetDetector() const { return fDetector; };
- virtual Int_t GetDigit(Int_t i = 0) const { if (i < fMulDigit)
- return fDigitsList[i];
- else
- return -1;};
- virtual Float_t GetLocalRow() const { return fLocPos(0); };
- virtual Float_t GetLocalCol() const { return fLocPos(1); };
- virtual Float_t GetLocalTime() const { return fLocPos(2); };
-
- virtual Int_t GetLocalTimeBin() const { return Int_t(fLocPos(2)); }
- virtual Float_t GetSigmaY2() const { return fSigmaY2; }
- virtual Float_t GetSigmaZ2() const { return fSigmaZ2; }
- virtual Float_t GetY() const { return fY; }
- virtual Float_t GetZ() const { return fZ; }
- Int_t IsUsed() const { return fUsed; }
- void Use() { fUsed++; }
- Int_t GetTrackIndex(Int_t i) const { return fTracks[i]; }
- void AddTrackIndex(Int_t *i);
+ virtual ~AliTRDrecPoint();
+
+ virtual void Print(Option_t* ) const {};
+ virtual void AddDigit(Int_t digit);
+ virtual void AddDigit(AliDigitNew& ) {};
+
+ void SetEnergy(Float_t amp) { fAmp = amp; }
+ void SetDetector(Int_t det) { fDetector = det; }
+ void SetLocalPosition(TVector3 &pos);
+ void SetLocalRow(Float_t r) { fLocPos.SetX(r); }
+ void SetLocalCol(Float_t c) { fLocPos.SetY(c); }
+ void SetLocalTime(Float_t t) { fLocPos.SetZ(t); }
+
+ void SetLocalTimeBin(Int_t tb) { fTimeBin = tb; }
+ void SetTrackingYZ(Float_t fSigmaY = 0.0, Float_t fSigmaZ = 0.0);
+
+ Int_t GetDetector() const { return fDetector; }
+ Int_t GetDigit(Int_t i = 0) const { if (i < fMulDigit) return fDigitsList[i];
+ else return -1; }
+ Float_t GetLocalRow() const { return fLocPos(0); }
+ Float_t GetLocalCol() const { return fLocPos(1); }
+ Float_t GetLocalTime() const { return fLocPos(2); }
+
+ Int_t GetLocalTimeBin() const { return Int_t(fLocPos(2)); }
+ Float_t GetSigmaY2() const { return fSigmaY2; }
+ Float_t GetSigmaZ2() const { return fSigmaZ2; }
+ Float_t GetY() const { return fY; }
+ Float_t GetZ() const { return fZ; }
+
+ Int_t IsUsed() const { return fUsed; }
+ void Use() { fUsed++; }
+ Int_t GetTrackIndex(Int_t i) const { return fTracks[i]; }
+ void AddTrackIndex(Int_t *i);
protected:
- Int_t fDetector; // TRD detector number
- Int_t fTimeBin; // Time bin number within the detector
- Int_t fUsed; // 0 initially and incremented if the point is "used"
- Int_t fTracks[3]; // labels of overlapped tracks
- Float_t fY; // local Rphi coordinate (cm) within tracking sector
- Float_t fZ; // local Z coordinate (cm) within tracking sector
- Float_t fSigmaY2; // Y variance (cm)
- Float_t fSigmaZ2; // Z variance (cm)
+ Int_t fDetector; // TRD detector number
+ Int_t fTimeBin; // Time bin number within the detector
+ Int_t fUsed; // 0 initially and incremented if the point is "used"
+ Int_t fTracks[3]; // Labels of overlapped tracks
+ Float_t fY; // Local Rphi coordinate (cm) within tracking sector
+ Float_t fZ; // Local Z coordinate (cm) within tracking sector
+ Float_t fSigmaY2; // Y variance (cm)
+ Float_t fSigmaZ2; // Z variance (cm)
- ClassDef(AliTRDrecPoint,1) // Reconstructed point for the TRD
+ ClassDef(AliTRDrecPoint,1) // Reconstructed point for the TRD
};
// //
// TRD trigger parameters class //
// //
+// Author: //
+// Bogdan Vulpescu //
// //
///////////////////////////////////////////////////////////////////////////////
ClassImp(AliTRDtrigParam)
//_____________________________________________________________________________
-AliTRDtrigParam::AliTRDtrigParam():TNamed()
+AliTRDtrigParam::AliTRDtrigParam()
+ :TNamed()
+ ,fDebug(0)
+ ,fTime1(0)
+ ,fTime2(0)
+ ,fClusThr(0)
+ ,fPadThr(0)
+ ,fSum10(0)
+ ,fSum12(0)
+ ,fTCOn(0)
+ ,fTCnexp(0)
+ ,fFilterType(0)
+ ,fR1(0)
+ ,fR2(0)
+ ,fC1(0)
+ ,fC2(0)
+ ,fPedestal(0)
+ ,fADCnoise(0)
+ ,fDeltaY(0)
+ ,fDeltaS(0)
+ ,fXprojPlane(0)
+ ,fLtuPtCut(0)
+ ,fGtuPtCut(0)
+ ,fField(0)
+ ,fHighPt(0)
+ ,fNPartJetLow(0)
+ ,fNPartJetHigh(0)
+ ,fJetLowPt(0)
+ ,fJetHighPt(0)
{
//
// AliTRDtrigParam default constructor
//
- fDebug = 0;
- fTime1 = 0;
- fTime2 = 0;
- fClusThr = 0;
- fPadThr = 0;
- fSum10 = 0;
- fSum12 = 0;
- fTCOn = 0;
- fTCnexp = 0;
- fFilterType = 0;
- fR1 = 0;
- fR2 = 0;
- fC1 = 0;
- fC2 = 0;
- fPedestal = 0;
- fDeltaY = 0.0;
- fDeltaS = 0.0;
- fXprojPlane = 0.0;
- fField = 0.0;
- fLtuPtCut = 0.0;
- fGtuPtCut = 0.0;
- fHighPt = 0.0;
-
- fNPartJetLow = 0;
- fNPartJetHigh = 0;
- fJetLowPt = 0.0;
- fJetHighPt = 0.0;
-
}
//_____________________________________________________________________________
AliTRDtrigParam::AliTRDtrigParam(const Text_t *name, const Text_t *title)
- :TNamed(name,title)
+ :TNamed(name,title)
+ ,fDebug(0)
+ ,fTime1(2)
+ ,fTime2(22)
+ ,fClusThr(10.0)
+ ,fPadThr(1)
+ ,fSum10(2)
+ ,fSum12(10)
+ ,fTCOn(1)
+ ,fTCnexp(1)
+ ,fFilterType(0)
+ ,fR1(0)
+ ,fR2(0)
+ ,fC1(0)
+ ,fC2(0)
+ ,fPedestal(0)
+ ,fADCnoise(0)
+ ,fDeltaY(2.0)
+ ,fDeltaS(2.5)
+ ,fXprojPlane(0)
+ ,fLtuPtCut(2.3)
+ ,fGtuPtCut(3.0)
+ ,fField(0)
+ ,fHighPt(10.0)
+ ,fNPartJetLow(5)
+ ,fNPartJetHigh(3)
+ ,fJetLowPt(3.0)
+ ,fJetHighPt(5.0)
{
//
// AliTRDtrigParam constructor
//
- fDebug = 0;
- fTime1 = 2;
- fTime2 = 22;
- fClusThr = 10.0;
- fPadThr = 1;
- fSum10 = 2;
- fSum12 = 10;
- fTCOn = 1;
- fTCnexp = 1;
- fFilterType = 0;
- fR1 = 0.0;
- fR2 = 0.0;
- fC1 = 0.0;
- fC2 = 0.0;
- fPedestal = 0.0;
- fDeltaY = 2.0;
- fDeltaS = 2.5;
- fXprojPlane = 0.0;
- fField = 0.0;
- fLtuPtCut = 2.3;
- fGtuPtCut = 3.0;
- fHighPt = 10.0;
-
- fNPartJetLow = 5;
- fNPartJetHigh = 3;
- fJetLowPt = 3.0;
- fJetHighPt = 5.0;
-
// PASA.v.4
-
- if (fTCnexp == 1) {
- fR1 = 1.1563;
- fR2 = 0.1299;
- fC1 = 0.0657;
- fC2 = 0.0000;
+ if (fTCnexp == 1) {
+ fR1 = 1.1563;
+ fR2 = 0.1299;
+ fC1 = 0.0657;
+ fC2 = 0.0000;
}
-
- if (fTCnexp == 2) {
- fR1 = 1.1563;
- fR2 = 0.1299;
- fC1 = 0.1141;
- fC2 = 0.6241;
+ else if (fTCnexp == 2) {
+ fR1 = 1.1563;
+ fR2 = 0.1299;
+ fC1 = 0.1141;
+ fC2 = 0.6241;
}
}
//_____________________________________________________________________________
-AliTRDtrigParam::AliTRDtrigParam(const AliTRDtrigParam &p):TNamed(p)
+AliTRDtrigParam::AliTRDtrigParam(const AliTRDtrigParam &p)
+ :TNamed(p)
+ ,fDebug(p.fDebug)
+ ,fTime1(p.fTime1)
+ ,fTime2(p.fTime2)
+ ,fClusThr(p.fClusThr)
+ ,fPadThr(p.fPadThr)
+ ,fSum10(p.fSum10)
+ ,fSum12(p.fSum12)
+ ,fTCOn(p.fTCOn)
+ ,fTCnexp(p.fTCnexp)
+ ,fFilterType(p.fFilterType)
+ ,fR1(p.fR1)
+ ,fR2(p.fR2)
+ ,fC1(p.fC1)
+ ,fC2(p.fC2)
+ ,fPedestal(p.fPedestal)
+ ,fADCnoise(p.fADCnoise)
+ ,fDeltaY(p.fDeltaY)
+ ,fDeltaS(p.fDeltaS)
+ ,fXprojPlane(p.fXprojPlane)
+ ,fLtuPtCut(p.fLtuPtCut)
+ ,fGtuPtCut(p.fGtuPtCut)
+ ,fField(p.fField)
+ ,fHighPt(p.fHighPt)
+ ,fNPartJetLow(p.fNPartJetLow)
+ ,fNPartJetHigh(p.fNPartJetHigh)
+ ,fJetLowPt(p.fJetLowPt)
+ ,fJetHighPt(p.fJetHighPt)
{
//
// AliTRDtrigParam copy constructor
//
- ((AliTRDtrigParam &) p).Copy(*this);
-
}
//_____________________________________________________________________________
//
// AliTRDtrigParam destructor
//
+
}
//_____________________________________________________________________________
// Copy function
//
- ((AliTRDtrigParam &) p).fDebug = fDebug;
- ((AliTRDtrigParam &) p).fTime1 = fTime1;
- ((AliTRDtrigParam &) p).fTime2 = fTime2;
- ((AliTRDtrigParam &) p).fClusThr = fClusThr;
- ((AliTRDtrigParam &) p).fPadThr = fPadThr;
- ((AliTRDtrigParam &) p).fSum10 = fSum10;
- ((AliTRDtrigParam &) p).fSum12 = fSum12;
- ((AliTRDtrigParam &) p).fTCOn = fTCOn;
- ((AliTRDtrigParam &) p).fTCnexp = fTCnexp;
- ((AliTRDtrigParam &) p).fFilterType = fFilterType;
- ((AliTRDtrigParam &) p).fR1 = fR1;
- ((AliTRDtrigParam &) p).fR2 = fR2;
- ((AliTRDtrigParam &) p).fC1 = fC1;
- ((AliTRDtrigParam &) p).fC2 = fC2;
- ((AliTRDtrigParam &) p).fPedestal = fPedestal;
- ((AliTRDtrigParam &) p).fADCnoise = fADCnoise;
- ((AliTRDtrigParam &) p).fDeltaY = fDeltaY;
- ((AliTRDtrigParam &) p).fDeltaS = fDeltaS;
- ((AliTRDtrigParam &) p).fXprojPlane = fXprojPlane;
- ((AliTRDtrigParam &) p).fField = fField;
- ((AliTRDtrigParam &) p).fLtuPtCut = fLtuPtCut;
- ((AliTRDtrigParam &) p).fGtuPtCut = fGtuPtCut;
- ((AliTRDtrigParam &) p).fHighPt = fHighPt;
+ ((AliTRDtrigParam &) p).fDebug = fDebug;
+ ((AliTRDtrigParam &) p).fTime1 = fTime1;
+ ((AliTRDtrigParam &) p).fTime2 = fTime2;
+ ((AliTRDtrigParam &) p).fClusThr = fClusThr;
+ ((AliTRDtrigParam &) p).fPadThr = fPadThr;
+ ((AliTRDtrigParam &) p).fSum10 = fSum10;
+ ((AliTRDtrigParam &) p).fSum12 = fSum12;
+ ((AliTRDtrigParam &) p).fTCOn = fTCOn;
+ ((AliTRDtrigParam &) p).fTCnexp = fTCnexp;
+ ((AliTRDtrigParam &) p).fFilterType = fFilterType;
+ ((AliTRDtrigParam &) p).fR1 = fR1;
+ ((AliTRDtrigParam &) p).fR2 = fR2;
+ ((AliTRDtrigParam &) p).fC1 = fC1;
+ ((AliTRDtrigParam &) p).fC2 = fC2;
+ ((AliTRDtrigParam &) p).fPedestal = fPedestal;
+ ((AliTRDtrigParam &) p).fADCnoise = fADCnoise;
+ ((AliTRDtrigParam &) p).fDeltaY = fDeltaY;
+ ((AliTRDtrigParam &) p).fDeltaS = fDeltaS;
+ ((AliTRDtrigParam &) p).fXprojPlane = fXprojPlane;
+ ((AliTRDtrigParam &) p).fField = fField;
+ ((AliTRDtrigParam &) p).fLtuPtCut = fLtuPtCut;
+ ((AliTRDtrigParam &) p).fGtuPtCut = fGtuPtCut;
+ ((AliTRDtrigParam &) p).fHighPt = fHighPt;
((AliTRDtrigParam &) p).fNPartJetLow = fNPartJetLow;
((AliTRDtrigParam &) p).fNPartJetHigh = fNPartJetHigh;
((AliTRDtrigParam &) p).fJetLowPt = fJetLowPt;
// Initialize the other parameters
//
- Float_t fXplane0, fXplane5;
-
- fXplane0 = AliTRDgeometry::GetTime0(0) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
-
- fXplane5 = AliTRDgeometry::GetTime0(5) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
-
- fXprojPlane = 0.5 * (fXplane0 + fXplane5);
+ Float_t xPlane0;
+ Float_t xPlane5;
+
+ xPlane0 = AliTRDgeometry::GetTime0(0)
+ - AliTRDgeometry::CdrHght()
+ - 0.5*AliTRDgeometry::CamHght();
+ xPlane5 = AliTRDgeometry::GetTime0(5)
+ - AliTRDgeometry::CdrHght()
+ - 0.5*AliTRDgeometry::CamHght();
+ fXprojPlane = 0.5 * (xPlane0 + xPlane5);
}
AliTRDtrigParam();
AliTRDtrigParam(const Text_t* name, const Text_t* title);
AliTRDtrigParam(const AliTRDtrigParam &p);
- virtual ~AliTRDtrigParam();
+ virtual ~AliTRDtrigParam();
AliTRDtrigParam &operator=(const AliTRDtrigParam &p);
- virtual void Copy(TObject &p) const;
-
- void Init();
-
- void SetTimeRange(Int_t time1, Int_t time2) { fTime1 = time1; fTime2 = time2; };
- Int_t GetTime1() const { return fTime1; };
- Int_t GetTime2() const { return fTime2; };
- void SetClusThr(Float_t clth) { fClusThr = clth; };
- void SetPadThr(Float_t path) { fPadThr = path; };
- Float_t GetClusThr() const { return fClusThr; };
- Float_t GetPadThr() const { return fPadThr; };
- void SetSum10(Int_t sum) { fSum10 = sum; };
- void SetSum12(Int_t sum) { fSum12 = sum; };
- Int_t GetSum10() const { return fSum10; };
- Int_t GetSum12() const { return fSum12; };
-
- void SetTailCancelation(Int_t tcOn = 0) { fTCOn = tcOn; };
- void SetNexponential(Int_t nexp = 1) { fTCnexp = nexp; };
- void SetFilterType(Int_t ftype = 0) { fFilterType = ftype; };
- void SetFilterParam(Float_t r1, Float_t r2, Float_t c1, Float_t c2, Float_t ped)
- { fR1 = r1; fR2 = r2; fC1 = c1; fC2 = c2; fPedestal = ped; };
-
- Int_t GetTailCancelation() const { return fTCOn; };
- Int_t GetNexponential() const { return fTCnexp; };
- Int_t GetFilterType() const { return fFilterType; };
- void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const { r1 = fR1; r2 = fR2; c1 = fC1; c2 = fC2; ped = fPedestal; };
-
- void SetADCnoise(Float_t adcn) { fADCnoise = adcn; };
- Float_t GetADCnoise() const { return fADCnoise; };
-
- void SetDebugLevel(Int_t deb) { fDebug = deb; };
- Int_t GetDebugLevel() const { return fDebug; };
- void SetDeltaY(Float_t dy) { fDeltaY = dy; };
- Float_t GetDeltaY() const { return fDeltaY; };
- void SetDeltaS(Float_t ds) { fDeltaS = ds; };
- Float_t GetDeltaS() const { return fDeltaS; };
-
- Float_t GetXprojPlane() const { return fXprojPlane; };
-
- void SetField(Float_t b) { fField = b; };
- Float_t GetField() const { return fField; };
-
- void SetLtuPtCut(Float_t ptcut) { fLtuPtCut = ptcut; };
- Float_t GetLtuPtCut() const { return fLtuPtCut; };
-
- void SetGtuPtCut(Float_t ptcut) { fGtuPtCut = ptcut; };
- Float_t GetGtuPtCut() const { return fGtuPtCut; };
-
- void SetHighPt(Float_t hpt) { fHighPt = hpt; };
- Float_t GetHighPt() const { return fHighPt; };
-
- void SetNPartJetLow(Int_t npj) { fNPartJetLow = npj; };
- Int_t GetNPartJetLow() const { return fNPartJetLow; };
- void SetNPartJetHigh(Int_t npj) { fNPartJetHigh = npj; };
- Int_t GetNPartJetHigh() const { return fNPartJetHigh; };
+ virtual void Copy(TObject &p) const;
- void SetJetLowPt(Float_t thr) { fJetLowPt = thr; };
- Float_t GetJetLowPt() const { return fJetLowPt; };
- void SetJetHighPt(Float_t thr) { fJetHighPt = thr; };
- Float_t GetJetHighPt() const { return fJetHighPt; };
+ void Init();
+
+ Int_t GetTime1() const { return fTime1; };
+ Int_t GetTime2() const { return fTime2; };
+ Float_t GetClusThr() const { return fClusThr; };
+ Float_t GetPadThr() const { return fPadThr; };
+ Int_t GetSum10() const { return fSum10; };
+ Int_t GetSum12() const { return fSum12; };
+ Int_t GetTailCancelation() const { return fTCOn; };
+ Int_t GetNexponential() const { return fTCnexp; };
+ Int_t GetFilterType() const { return fFilterType; };
+ void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const
+ { r1 = fR1;
+ r2 = fR2;
+ c1 = fC1;
+ c2 = fC2;
+ ped = fPedestal; };
+ Float_t GetADCnoise() const { return fADCnoise; };
+ Int_t GetDebugLevel() const { return fDebug; };
+ Float_t GetDeltaY() const { return fDeltaY; };
+ Float_t GetDeltaS() const { return fDeltaS; };
+ Float_t GetXprojPlane() const { return fXprojPlane; };
+ Float_t GetField() const { return fField; };
+ Float_t GetLtuPtCut() const { return fLtuPtCut; };
+ Float_t GetGtuPtCut() const { return fGtuPtCut; };
+ Float_t GetHighPt() const { return fHighPt; };
+ Int_t GetNPartJetLow() const { return fNPartJetLow; };
+ Int_t GetNPartJetHigh() const { return fNPartJetHigh; };
+ Float_t GetJetLowPt() const { return fJetLowPt; };
+ Float_t GetJetHighPt() const { return fJetHighPt; };
+
+ void SetTimeRange(Int_t time1, Int_t time2) { fTime1 = time1;
+ fTime2 = time2; };
+ void SetClusThr(Float_t clth) { fClusThr = clth; };
+ void SetPadThr(Float_t path) { fPadThr = path; };
+ void SetSum10(Int_t sum) { fSum10 = sum; };
+ void SetSum12(Int_t sum) { fSum12 = sum; };
+ void SetTailCancelation(Int_t tcOn = 0) { fTCOn = tcOn; };
+ void SetNexponential(Int_t nexp = 1) { fTCnexp = nexp; };
+ void SetFilterType(Int_t ftype = 0) { fFilterType = ftype; };
+ void SetFilterParam(Float_t r1, Float_t r2, Float_t c1, Float_t c2, Float_t ped)
+ { fR1 = r1;
+ fR2 = r2;
+ fC1 = c1;
+ fC2 = c2;
+ fPedestal = ped; };
+ void SetADCnoise(Float_t adcn) { fADCnoise = adcn; };
+ void SetDebugLevel(Int_t deb) { fDebug = deb; };
+ void SetDeltaY(Float_t dy) { fDeltaY = dy; };
+ void SetDeltaS(Float_t ds) { fDeltaS = ds; };
+ void SetField(Float_t b) { fField = b; };
+ void SetLtuPtCut(Float_t ptcut) { fLtuPtCut = ptcut; };
+ void SetGtuPtCut(Float_t ptcut) { fGtuPtCut = ptcut; };
+ void SetHighPt(Float_t hpt) { fHighPt = hpt; };
+ void SetNPartJetLow(Int_t npj) { fNPartJetLow = npj; };
+ void SetNPartJetHigh(Int_t npj) { fNPartJetHigh = npj; };
+ void SetJetLowPt(Float_t thr) { fJetLowPt = thr; };
+ void SetJetHighPt(Float_t thr) { fJetHighPt = thr; };
protected:
- Int_t fDebug; // debugging flag
+ Int_t fDebug; // Debugging flag
- Int_t fTime1; // first time bin for tracking (incl.)
- Int_t fTime2; // last time bin for tracking (incl.)
- Float_t fClusThr; // cluster threshold
- Float_t fPadThr; // pad threshold
- Int_t fSum10; // MCM CreateSeeds: Min_Thr_Left_Neighbour
- Int_t fSum12; // MCM CreateSeeds: Min_Sum_From_Two_Neighbours
- Int_t fTCOn; // tail cancelation flag
- Int_t fTCnexp; // number of exp in filter
- Int_t fFilterType; // filter type (0=A - analog, 1=D - digital)
+ Int_t fTime1; // First time bin for tracking (incl.)
+ Int_t fTime2; // Last time bin for tracking (incl.)
+ Float_t fClusThr; // Cluster threshold
+ Float_t fPadThr; // Pad threshold
+ Int_t fSum10; // MCM CreateSeeds: Min_Thr_Left_Neighbour
+ Int_t fSum12; // MCM CreateSeeds: Min_Sum_From_Two_Neighbours
+ Int_t fTCOn; // Tail cancelation flag
+ Int_t fTCnexp; // Number of exp in filter
+ Int_t fFilterType; // Filter type (0=A - analog, 1=D - digital)
- // filter parameters (1 = long, 2 = short component)
- Float_t fR1; // time constant [microseconds]
- Float_t fR2; // time constant [microseconds]
- Float_t fC1; // weight
- Float_t fC2; // weight
- Float_t fPedestal; // ADC baseline
- Float_t fADCnoise; // ADC noise (not contained in the digitizer)
+ // Filter parameters (1 = long, 2 = short component)
+ Float_t fR1; // Time constant [microseconds]
+ Float_t fR2; // Time constant [microseconds]
+ Float_t fC1; // Weight
+ Float_t fC2; // Weight
+ Float_t fPedestal; // ADC baseline
+ Float_t fADCnoise; // ADC noise (not contained in the digitizer)
- Float_t fDeltaY; // Y (offset) matching window in the GTU
- Float_t fDeltaS; // Slope matching window in the GTU
+ Float_t fDeltaY; // Y (offset) matching window in the GTU
+ Float_t fDeltaS; // Slope matching window in the GTU
- Float_t fXprojPlane; // Projection plane (X) for GTU matching
+ Float_t fXprojPlane; // Projection plane (X) for GTU matching
- Float_t fLtuPtCut; // Local pt cut
- Float_t fGtuPtCut; // Global pt cut
+ Float_t fLtuPtCut; // Local pt cut
+ Float_t fGtuPtCut; // Global pt cut
- Float_t fField; // Magnetic field
+ Float_t fField; // Magnetic field
- Float_t fHighPt; // High pt selection
+ Float_t fHighPt; // High pt selection
- Int_t fNPartJetLow; // Number of tracks for jet (low)
- Int_t fNPartJetHigh; // Number of tracks for jet (high)
- Float_t fJetLowPt; // Low pt threshold for jet particles
- Float_t fJetHighPt; // High pt threshold for jet particles
+ Int_t fNPartJetLow; // Number of tracks for jet (low)
+ Int_t fNPartJetHigh; // Number of tracks for jet (high)
+ Float_t fJetLowPt; // Low pt threshold for jet particles
+ Float_t fJetHighPt; // High pt threshold for jet particles
- ClassDef(AliTRDtrigParam,2) // TRD trigger parameter class
+ ClassDef(AliTRDtrigParam,2) // TRD trigger parameter class
};
///////////////////////////////////////////////////////////////////////////////
// //
-// //
// TRD trigger class //
// //
+// Author: //
+// Bogdan Vulpescu //
// //
///////////////////////////////////////////////////////////////////////////////
#include <TTree.h>
#include <TBranch.h>
#include <TMatrixD.h>
+#include <TClonesArray.h>
+#include <TObjArray.h>
#include "AliLog.h"
#include "AliRun.h"
#include "AliTRDdataArrayI.h"
#include "AliTRDcalibDB.h"
#include "AliTRDCommonParam.h"
-#include "Cal/AliTRDCalPIDLQ.h"
#include "AliTRDrawData.h"
-
#include "AliTRDtrigger.h"
#include "AliTRDmodule.h"
#include "AliTRDmcmTracklet.h"
+#include "AliTRDgtuTrack.h"
#include "AliTRDtrigParam.h"
#include "AliTRDmcm.h"
#include "AliTRDzmaps.h"
-
-//#include "AliHeader.h"
+#include "Cal/AliTRDCalPIDLQ.h"
ClassImp(AliTRDtrigger)
//_____________________________________________________________________________
-AliTRDtrigger::AliTRDtrigger():
- TNamed(),
- fTracks("AliTRDgtuTrack",0)
+AliTRDtrigger::AliTRDtrigger()
+ :TNamed()
+ ,fField(0)
+ ,fGeo(NULL)
+ ,fCalib(NULL)
+ ,fCParam(NULL)
+ ,fTrigParam(NULL)
+ ,fRunLoader(NULL)
+ ,fDigitsManager(NULL)
+ ,fTrackletTree(NULL)
+ ,fTracklets(NULL)
+ ,fNROB(0)
+ ,fMCM(NULL)
+ ,fTrk(NULL)
+ ,fTrkTest(NULL)
+ ,fModule(NULL)
+ ,fGTUtrk(NULL)
+ ,fNtracklets(0)
+ ,fDigits(NULL)
+ ,fTrack0(NULL)
+ ,fTrack1(NULL)
+ ,fTrack2(NULL)
+ ,fNPrimary(0)
+ ,fTracks(NULL)
{
//
// AliTRDtrigger default constructor
//
- fDigitsManager = NULL;
- fTrackletTree = NULL;
- fTracklets = NULL;
-
- fNROB = 0;
- fTrigParam = NULL;
- fMCM = NULL;
- fTrk = NULL;
- fTrkTest = NULL;
- fGTUtrk = NULL;
-
- fNtracklets = 0;
-
- fDigits = NULL;
- fTrack0 = NULL;
- fTrack1 = NULL;
- fTrack2 = NULL;
-
- fModule = NULL;
-
- fNPrimary = 0;
-
- fField = 0.0;
- fGeo = NULL;
- fCalib = NULL;
- fCParam = NULL;
-
}
//_____________________________________________________________________________
-AliTRDtrigger::AliTRDtrigger(const Text_t *name, const Text_t *title):
- TNamed(name,title),
- fTracks("AliTRDgtuTrack",1000)
+AliTRDtrigger::AliTRDtrigger(const Text_t *name, const Text_t *title)
+ :TNamed(name,title)
+ ,fField(0)
+ ,fGeo(NULL)
+ ,fCalib(NULL)
+ ,fCParam(NULL)
+ ,fTrigParam(NULL)
+ ,fRunLoader(NULL)
+ ,fDigitsManager(new AliTRDdigitsManager())
+ ,fTrackletTree(NULL)
+ ,fTracklets(new TObjArray(400))
+ ,fNROB(0)
+ ,fMCM(NULL)
+ ,fTrk(NULL)
+ ,fTrkTest(NULL)
+ ,fModule(NULL)
+ ,fGTUtrk(NULL)
+ ,fNtracklets(0)
+ ,fDigits(NULL)
+ ,fTrack0(NULL)
+ ,fTrack1(NULL)
+ ,fTrack2(NULL)
+ ,fNPrimary(0)
+ ,fTracks(new TClonesArray("AliTRDgtuTrack",1000))
{
//
// AliTRDtrigger constructor
//
- fDigitsManager = new AliTRDdigitsManager();
- fTrackletTree = NULL;
- fTracklets = new TObjArray(400);
-
- fNROB = 0;
- fTrigParam = NULL;
- fMCM = NULL;
- fTrk = NULL;
- fTrkTest = NULL;
- fGTUtrk = NULL;
-
- fNtracklets = 0;
-
- fDigits = NULL;
- fTrack0 = NULL;
- fTrack1 = NULL;
- fTrack2 = NULL;
-
- fModule = NULL;
-
- fNPrimary = 0;
-
- fField = 0.0;
- fGeo = NULL;
- fCalib = NULL;
- fCParam = NULL;
-
}
//_____________________________________________________________________________
-AliTRDtrigger::AliTRDtrigger(const AliTRDtrigger &p):TNamed(p)
+AliTRDtrigger::AliTRDtrigger(const AliTRDtrigger &p)
+ :TNamed(p)
+ ,fField(p.fField)
+ ,fGeo(NULL)
+ ,fCalib(NULL)
+ ,fCParam(NULL)
+ ,fTrigParam(NULL)
+ ,fRunLoader(NULL)
+ ,fDigitsManager(NULL)
+ ,fTrackletTree(NULL)
+ ,fTracklets(NULL)
+ ,fNROB(p.fNROB)
+ ,fMCM(NULL)
+ ,fTrk(NULL)
+ ,fTrkTest(NULL)
+ ,fModule(NULL)
+ ,fGTUtrk(NULL)
+ ,fNtracklets(p.fNtracklets)
+ ,fDigits(NULL)
+ ,fTrack0(NULL)
+ ,fTrack1(NULL)
+ ,fTrack2(NULL)
+ ,fNPrimary(p.fNPrimary)
+ ,fTracks(NULL)
{
//
// AliTRDtrigger copy constructor
//
- ((AliTRDtrigger &) p).Copy(*this);
-
}
///_____________________________________________________________________________
delete fTracklets;
}
- fTracks.Delete();
+ if (fTracks) {
+ fTracks->Delete();
+ delete fTracks;
+ }
}
{
fModule = new AliTRDmodule(fTrigParam);
- /*
- AliHeader *header = fRunLoader->GetHeader();
- fNPrimary = header->GetNprimary();
- */
- fTracks.Clear();
+ fTracks->Clear();
- fField = fTrigParam->GetField();
- fGeo = (AliTRDgeometry*)AliTRDgeometry::GetGeometry(fRunLoader);
+ fField = fTrigParam->GetField();
+ fGeo = (AliTRDgeometry*)AliTRDgeometry::GetGeometry(fRunLoader);
- fCalib = AliTRDcalibDB::Instance();
- if (!fCalib)
- {
- Error("Init","No instance of AliTRDcalibDB.");
+ fCalib = AliTRDcalibDB::Instance();
+ if (!fCalib) {
+ AliError("No instance of AliTRDcalibDB.");
return;
}
fCParam = AliTRDCommonParam::Instance();
- if (!fCParam)
- {
- Error("Init","No common params.");
+ if (!fCParam) {
+ AliError("No common parameters.");
return;
}
//
TString evfoldname = AliConfig::GetDefaultEventFolderName();
- fRunLoader = AliRunLoader::GetRunLoader(evfoldname);
+ fRunLoader = AliRunLoader::GetRunLoader(evfoldname);
- if (!fRunLoader)
+ if (!fRunLoader) {
fRunLoader = AliRunLoader::Open(name);
-
+ }
if (!fRunLoader) {
- Error("Open","Can not open session for file %s.",name);
+ AliError(Form("Can not open session for file %s.",name));
return kFALSE;
}
// Open input
-
- if (fRunLoader->GetAliRun() == 0x0) fRunLoader->LoadgAlice();
+ if (fRunLoader->GetAliRun() == 0x0) {
+ fRunLoader->LoadgAlice();
+ }
gAlice = fRunLoader->GetAliRun();
-
if (!(gAlice)) {
fRunLoader->LoadgAlice();
gAlice = fRunLoader->GetAliRun();
if (!(gAlice)) {
- Error("Open","Could not find AliRun object.");
+ AliError("Could not find AliRun object.");
return kFALSE;
}
}
fRunLoader->GetEvent(nEvent);
// Open output
-
TObjArray *ioArray = 0;
-
- AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
+ AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
loader->MakeTree("T");
fTrackletTree = loader->TreeT();
fTrackletTree->Branch("TRDmcmTracklet","TObjArray",&ioArray,32000,0);
- /*
- fRunLoader->LoadHeader();
- */
Init();
return kTRUE;
}
-
//_____________________________________________________________________________
Bool_t AliTRDtrigger::ReadDigits()
{
//
if (!fRunLoader) {
- Error("ReadDigits","Can not find the Run Loader");
+ AliError("Can not find the Run Loader");
return kFALSE;
}
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
- if (!loader->TreeD()) loader->LoadDigits();
-
- if (!loader->TreeD()) return kFALSE;
+ if (!loader->TreeD()) {
+ loader->LoadDigits();
+ }
+ if (!loader->TreeD()) {
+ return kFALSE;
+ }
return (fDigitsManager->ReadDigits(loader->TreeD()));
//
AliTRDrawData *raw = new AliTRDrawData();
-
- fDigitsManager = raw->Raw2Digits(rawReader);
+ fDigitsManager = raw->Raw2Digits(rawReader);
return kTRUE;
AliLoader *loader = rl->GetLoader("TRDLoader");
loader->LoadTracks();
- fTrackletTree = loader->TreeT();
+ fTrackletTree = loader->TreeT();
- TBranch *branch = fTrackletTree->GetBranch("TRDmcmTracklet");
+ TBranch *branch = fTrackletTree->GetBranch("TRDmcmTracklet");
if (!branch) {
- Error("ReadTracklets","Can't get the branch !");
+ AliError("Can't get the branch !");
return kFALSE;
}
TObjArray *tracklets = new TObjArray(400);
branch->SetAddress(&tracklets);
- Int_t nEntries = (Int_t) fTrackletTree->GetEntries();
- Int_t iEntry, itrk;
- Int_t iStack, iStackPrev = -1;
+ Int_t nEntries = (Int_t) fTrackletTree->GetEntries();
+ Int_t iEntry;
+ Int_t itrk;
+ Int_t iStack;
+ Int_t iStackPrev = -1;
for (iEntry = 0; iEntry < nEntries; iEntry++) {
+
fTrackletTree->GetEvent(iEntry);
- for (itrk = 0; itrk < tracklets->GetEntriesFast(); itrk++){
-
- fTrk = (AliTRDmcmTracklet*)tracklets->UncheckedAt(itrk);
-
- idet = fTrk->GetDetector();
+ for (itrk = 0; itrk < tracklets->GetEntriesFast(); itrk++) {
+ fTrk = (AliTRDmcmTracklet*)tracklets->UncheckedAt(itrk);
+ idet = fTrk->GetDetector();
iStack = idet / (AliTRDgeometry::Nplan());
+
if (iStackPrev != iStack) {
if (iStackPrev == -1) {
iStackPrev = iStack;
- } else {
- MakeTracks(idet-AliTRDgeometry::Nplan());
+ }
+ else {
+ MakeTracks(idet - AliTRDgeometry::Nplan());
ResetTracklets();
iStackPrev = iStack;
}
Tracklets()->Add(fTrk);
- if (iEntry == (nEntries-1) && itrk == (tracklets->GetEntriesFast()-1)) {
+ if ((iEntry == (nEntries-1)) &&
+ (itrk == (tracklets->GetEntriesFast() - 1))) {
idet++;
MakeTracks(idet-AliTRDgeometry::Nplan());
ResetTracklets();
// Create tracklets from digits
//
- Int_t chamBeg = 0;
- Int_t chamEnd = AliTRDgeometry::Ncham();
- Int_t planBeg = 0;
- Int_t planEnd = AliTRDgeometry::Nplan();
- Int_t sectBeg = 0;
- Int_t sectEnd = AliTRDgeometry::Nsect();
+ Int_t chamBeg = 0;
+ Int_t chamEnd = AliTRDgeometry::Ncham();
+ Int_t planBeg = 0;
+ Int_t planEnd = AliTRDgeometry::Nplan();
+ Int_t sectBeg = 0;
+ Int_t sectEnd = AliTRDgeometry::Nsect();
fTrkTest = new AliTRDmcmTracklet(0,0,0);
-
- fMCM = new AliTRDmcm(fTrigParam,0);
-
- Int_t time, col, row, col1, col2;
+ fMCM = new AliTRDmcm(fTrigParam,0);
+
+ Int_t time;
+ Int_t col;
+ Int_t row;
+ Int_t col1;
+ Int_t col2;
+ Int_t idet = -1;
+ Int_t iStack = -1;
+ Int_t iStackPrev = -1;
Float_t amp;
- Int_t idet, iStack, iStackPrev;
- idet = -1;
- iStack = -1;
- iStackPrev = -1;
+
for (Int_t isect = sectBeg; isect < sectEnd; isect++) {
for (Int_t icham = chamBeg; icham < chamEnd; icham++) {
- // number of ROBs in the chamber
- if( icham == 2 ) {
+ // Number of ROBs in the chamber
+ if(icham == 2) {
fNROB = 6;
- } else {
+ }
+ else {
fNROB = 8;
}
if (iStackPrev != iStack) {
if (iStackPrev == -1) {
iStackPrev = iStack;
- } else {
+ }
+ else {
MakeTracks(idet-AliTRDgeometry::Nplan());
ResetTracklets();
iStackPrev = iStack;
}
}
- Int_t nRowMax = fCParam->GetRowMax(iplan,icham,isect);
- Int_t nColMax = fCParam->GetColMax(iplan);
- Int_t nTimeTotal = fCalib->GetNumberOfTimeBins();
+ Int_t nRowMax = fCParam->GetRowMax(iplan,icham,isect);
+ Int_t nColMax = fCParam->GetColMax(iplan);
+ Int_t nTimeTotal = fCalib->GetNumberOfTimeBins();
// Get the digits
fDigits = fDigitsManager->GetDigits(idet);
for (Int_t iMcm = 0; iMcm < kNMCM; iMcm++) {
fMCM->Reset();
-
fMCM->SetRobId(iRob);
fMCM->SetChaId(idet);
row = fMCM->GetRow();
- if (row < 0 || row >= nRowMax) {
- Error("MakeTracklets","MCM row number out of range.");
+ if ((row < 0) || (row >= nRowMax)) {
+ AliError("MCM row number out of range.");
continue;
}
for (time = 0; time < nTimeTotal; time++) {
for (col = col1; col < col2; col++) {
- if (col >= 0 && col < nColMax) {
+ if ((col >= 0) && (col < nColMax)) {
amp = TMath::Abs(fDigits->GetDataUnchecked(row,col,time));
- } else {
+ }
+ else {
amp = 0.0;
}
fMCM->SetADC(col-col1,time,amp);
-
}
}
for (Int_t iSeed = 0; iSeed < kMaxTrackletsPerMCM; iSeed++) {
- if (fMCM->GetSeedCol()[iSeed] < 0) continue;
+ if (fMCM->GetSeedCol()[iSeed] < 0) {
+ continue;
+ }
- if ( fTrigParam->GetDebugLevel() > 1 )
- printf("Add tracklet %d in col %02d \n",fNtracklets,fMCM->GetSeedCol()[iSeed]);
+ if (fTrigParam->GetDebugLevel() > 1) {
+ AliInfo(Form("Add tracklet %d in col %02d \n",fNtracklets,fMCM->GetSeedCol()[iSeed]));
+ }
- if ( fTrigParam->GetDebugLevel() == -1 ) {
- printf("Add tracklet %d in col %02d \n",fNtracklets,fMCM->GetSeedCol()[iSeed]);
+ if (fTrigParam->GetDebugLevel() == -1) {
+ AliInfo(Form("Add tracklet %d in col %02d \n",fNtracklets,fMCM->GetSeedCol()[iSeed]));
for (time = 0; time < nTimeTotal; time++) {
for (col = 0; col < kMcmCol; col++) {
printf("%03.0f ",fMCM->GetADC(col,time));
if (makeTracks) {
idet++;
- MakeTracks(idet-AliTRDgeometry::Nplan());
+ MakeTracks(idet - AliTRDgeometry::Nplan());
ResetTracklets();
}
if (robid%kNcolRob == 0) {
- if ( mcmid%kNmcmRob == 0 ) {
+ if (mcmid%kNmcmRob == 0) {
fMCM->SetColRange(18*0-1,18*1-1+2+1);
}
- if ( mcmid%kNmcmRob == 1 ) {
+ if (mcmid%kNmcmRob == 1) {
fMCM->SetColRange(18*1-1,18*2-1+2+1);
}
- if ( mcmid%kNmcmRob == 2 ) {
+ if (mcmid%kNmcmRob == 2) {
fMCM->SetColRange(18*2-1,18*3-1+2+1);
}
- if ( mcmid%kNmcmRob == 3 ) {
+ if (mcmid%kNmcmRob == 3) {
fMCM->SetColRange(18*3-1,18*4-1+2+1);
}
- } else {
+ }
+ else {
- if ( mcmid%kNmcmRob == 0 ) {
+ if (mcmid%kNmcmRob == 0) {
fMCM->SetColRange(18*4-1,18*5-1+2+1);
}
- if ( mcmid%kNmcmRob == 1 ) {
+ if (mcmid%kNmcmRob == 1) {
fMCM->SetColRange(18*5-1,18*6-1+2+1);
}
- if ( mcmid%kNmcmRob == 2 ) {
+ if (mcmid%kNmcmRob == 2) {
fMCM->SetColRange(18*6-1,18*7-1+2+1);
}
- if ( mcmid%kNmcmRob == 3 ) {
+ if (mcmid%kNmcmRob == 3) {
fMCM->SetColRange(18*7-1,18*8-1+2+1);
}
track[1] = fTrack1->GetDataUnchecked(row,iCol+iCol1,iTime);
track[2] = fTrack2->GetDataUnchecked(row,iCol+iCol1,iTime);
- if (fMCM->IsCluster(iCol,iTime)) {
+ if (fMCM->IsCluster(iCol,iTime)) {
fTrkTest->AddCluster(iCol+iCol1,iTime,amp,track);
- } else if ((iCol+1+1) < kMcmCol) {
+ }
+ else if ((iCol+1+1) < kMcmCol) {
amp[0] = fMCM->GetADC(iCol-1+1,iTime);
amp[1] = fMCM->GetADC(iCol +1,iTime);
}
- } else {
- }
+ }
}
track[1] = fTrack1->GetDataUnchecked(row,iCol+iCol1,iTime);
track[2] = fTrack2->GetDataUnchecked(row,iCol+iCol1,iTime);
- if (fMCM->IsCluster(iCol,iTime)) {
+ if (fMCM->IsCluster(iCol,iTime)) {
fTrk->AddCluster(iCol+iCol1,iTime,amp,track);
- } else if ((iCol+1+1) < kMcmCol) {
+ }
+ else if ((iCol+1+1) < kMcmCol) {
amp[0] = fMCM->GetADC(iCol-1+1,iTime);
amp[1] = fMCM->GetADC(iCol +1,iTime);
}
- } else {
}
}
//
if ((det < -1) || (det >= AliTRDgeometry::Ndet())) {
- Error("WriteTracklets","Unexpected detector index %d.",det);
+ AliError(Form("Unexpected detector index %d.",det));
return kFALSE;
}
TObjArray *detTracklets = new TObjArray(400);
for (Int_t i = 0; i < nTracklets; i++) {
+
AliTRDmcmTracklet *trk = (AliTRDmcmTracklet *) Tracklets()->UncheckedAt(i);
if (det == trk->GetDetector()) {
detTracklets->AddLast(trk);
}
- else {
- }
+
}
branch->SetAddress(&detTracklets);
if (det == -1) {
- Info("WriteTracklets","Writing the Tracklet tree %s for event %d."
- ,fTrackletTree->GetName(),fRunLoader->GetEventNumber());
+ AliInfo(Form("Writing the Tracklet tree %s for event %d."
+ ,fTrackletTree->GetName(),fRunLoader->GetEventNumber()));
AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
loader->WriteTracks("OVERWRITE");
Int_t nRowMax, iplan, icham, isect, row;
if ((det < 0) || (det >= AliTRDgeometry::Ndet())) {
- Error("MakeTracks","Unexpected detector index %d.",det);
+ AliError(Form("Unexpected detector index %d.",det));
return;
}
}
+//_____________________________________________________________________________
+void AliTRDtrigger::AddTrack(const AliTRDgtuTrack *t, Int_t det)
+{
+ //
+ // Add a track to the list
+ //
+
+ AliTRDgtuTrack *track = new(fTracks->operator[](fTracks->GetEntriesFast()))
+ AliTRDgtuTrack(*t);
+ track->SetDetector(det);
+
+}
+
+//_____________________________________________________________________________
+TObjArray* AliTRDtrigger::Tracklets()
+{
+ //
+ // Returns list of tracklets
+ //
+
+ if (!fTracklets) {
+ fTracklets = new TObjArray(400);
+ }
+ return fTracklets;
+}
+
+//_____________________________________________________________________________
+void AliTRDtrigger::ResetTracklets()
+{
+ //
+ // Resets the list of tracklets
+ //
+
+ if (fTracklets) {
+ fTracklets->Delete();
+ }
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDtrigger::GetNumberOfTracks() const
+{
+ //
+ // Returns number of tracks
+ //
+
+ return fTracks->GetEntriesFast();
+
+}
+
+//_____________________________________________________________________________
+AliTRDgtuTrack* AliTRDtrigger::GetTrack(Int_t i) const
+{
+ //
+ // Returns a given track from the list
+ //
+
+ return (AliTRDgtuTrack *) fTracks->UncheckedAt(i);
+
+}
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
+/* $Id$ */
+
///////////////////////////////////////////////////////////////////////////////
// //
// TRD trigger class //
///////////////////////////////////////////////////////////////////////////////
#include <TNamed.h>
-#include <TObjArray.h>
-#include <TClonesArray.h>
-
-#include "AliTRDgtuTrack.h"
class TTree;
-
-class AliTRDdigitsManager;
-class AliTRDdataArrayI;
-class AliTRDgeometry;
-class AliTRDcalibDB;
-class AliTRDCommonParam;
+class TClonesArray;
+class TObjArray;
class AliRunLoader;
class AliRawReader;
class AliTRDmcmTracklet;
+class AliTRDgtuTrack;
class AliTRDmcm;
class AliTRDmodule;
class AliTRDtrigParam;
+class AliTRDdigitsManager;
+class AliTRDdataArrayI;
+class AliTRDgeometry;
+class AliTRDcalibDB;
+class AliTRDCommonParam;
class AliTRDtrigger : public TNamed {
AliTRDtrigger();
AliTRDtrigger(const Text_t* name, const Text_t* title);
AliTRDtrigger(const AliTRDtrigger &p);
- virtual ~AliTRDtrigger();
-
- AliTRDtrigger &operator=(const AliTRDtrigger &p);
- virtual void Copy(TObject &p) const;
-
- void Init();
-
- void SetRunLoader(AliRunLoader *rl) { fRunLoader = rl; };
- Bool_t Open(const Char_t *name, Int_t nEvent = 0);
- Bool_t ReadDigits();
- Bool_t ReadDigits(AliRawReader* rawReader);
- Bool_t MakeTracklets(Bool_t makeTracks = kFALSE);
- Bool_t WriteTracklets(Int_t det);
- Bool_t ReadTracklets(AliRunLoader *rl);
-
- void AddTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
- Bool_t TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
- TObjArray *Tracklets() {
- if(!fTracklets) fTracklets = new TObjArray(400); return fTracklets;
- };
- void ResetTracklets() { if(fTracklets) fTracklets->Delete(); };
- void SetMCMcoordinates(Int_t imcm);
- void SetParameter(AliTRDtrigParam *trigp) { fTrigParam = trigp; };
- AliTRDtrigParam *GetParameter() const { return fTrigParam; };
-
- void MakeTracks(Int_t det);
-
- AliTRDgtuTrack *GetTrack(Int_t i) const {
- return (AliTRDgtuTrack *)fTracks.UncheckedAt(i);
- }
- void AddTrack(const AliTRDgtuTrack *t, Int_t det) {
- AliTRDgtuTrack * track = new(fTracks[fTracks.GetEntriesFast()]) AliTRDgtuTrack(*t);
- track->SetDetector(det);
- }
- Int_t GetNumberOfTracks() const {return fTracks.GetEntriesFast();}
-
- Int_t GetNPrimary() const { return fNPrimary; };
+ virtual ~AliTRDtrigger();
+ AliTRDtrigger &operator=(const AliTRDtrigger &p);
+
+ virtual void Copy(TObject &p) const;
+
+ void Init();
+
+ Bool_t Open(const Char_t *name, Int_t nEvent = 0);
+ Bool_t ReadDigits();
+ Bool_t ReadDigits(AliRawReader* rawReader);
+ Bool_t MakeTracklets(Bool_t makeTracks = kFALSE);
+ void MakeTracks(Int_t det);
+ Bool_t WriteTracklets(Int_t det);
+ Bool_t ReadTracklets(AliRunLoader *rl);
+
+ void AddTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
+ void AddTrack(const AliTRDgtuTrack *t, Int_t det);
+ Bool_t TestTracklet(Int_t det, Int_t row, Int_t seed, Int_t n);
+ TObjArray *Tracklets();
+ void ResetTracklets();
+
+ Int_t GetNumberOfTracks() const;
+ Int_t GetNPrimary() const { return fNPrimary; };
+ AliTRDtrigParam *GetParameter() const { return fTrigParam; };
+ AliTRDgtuTrack *GetTrack(Int_t i) const;
+
+ void SetRunLoader(AliRunLoader *rl) { fRunLoader = rl; };
+ void SetMCMcoordinates(Int_t imcm);
+ void SetParameter(AliTRDtrigParam *trigp) { fTrigParam = trigp; };
+
protected:
- Float_t fField; //! Magnetic field
- AliTRDgeometry *fGeo; //! TRD geometry
- AliTRDcalibDB *fCalib; //! Calibration DB
- AliTRDCommonParam *fCParam; //! Common parameters
+ Float_t fField; //! Magnetic field
+ AliTRDgeometry *fGeo; //! TRD geometry
+ AliTRDcalibDB *fCalib; //! Calibration DB
+ AliTRDCommonParam *fCParam; //! Common parameters
- AliTRDtrigParam *fTrigParam; //! Trigger class parameters
- AliRunLoader *fRunLoader; //! Run Loader
- AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
- TTree *fTrackletTree; //! Tree with tracklets
- TObjArray *fTracklets; //! Array of tracklets
+ AliTRDtrigParam *fTrigParam; //! Trigger class parameters
+ AliRunLoader *fRunLoader; //! Run Loader
+ AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
+ TTree *fTrackletTree; //! Tree with tracklets
+ TObjArray *fTracklets; //! Array of tracklets
- Int_t fNROB; //! Number of ROBs in the current chamber
- AliTRDmcm *fMCM; //! Current MCM
- AliTRDmcmTracklet *fTrk; //! Current tracklet
- AliTRDmcmTracklet *fTrkTest; //! Test tracklet
- AliTRDmodule *fModule; //! Current module
- AliTRDgtuTrack *fGTUtrk; //! Current GTU track
+ Int_t fNROB; //! Number of ROBs in the current chamber
+ AliTRDmcm *fMCM; //! Current MCM
+ AliTRDmcmTracklet *fTrk; //! Current tracklet
+ AliTRDmcmTracklet *fTrkTest; //! Test tracklet
+ AliTRDmodule *fModule; //! Current module
+ AliTRDgtuTrack *fGTUtrk; //! Current GTU track
- Int_t fNtracklets; //! Tracklets counter
+ Int_t fNtracklets; //! Tracklets counter
- AliTRDdataArrayI *fDigits; //! Array with digits
- AliTRDdataArrayI *fTrack0; //! Track dictionary 0
- AliTRDdataArrayI *fTrack1; //! Track dictionary 1
- AliTRDdataArrayI *fTrack2; //! Track dictionary 2
+ AliTRDdataArrayI *fDigits; //! Array with digits
+ AliTRDdataArrayI *fTrack0; //! Track dictionary 0
+ AliTRDdataArrayI *fTrack1; //! Track dictionary 1
+ AliTRDdataArrayI *fTrack2; //! Track dictionary 2
- Int_t fNPrimary; //! Number of primary tracks
+ Int_t fNPrimary; //! Number of primary tracks
- TClonesArray fTracks; //! Array of GTU tracks
+ TClonesArray *fTracks; //! Array of GTU tracks
- ClassDef(AliTRDtrigger,2) // TRD trigger class
+ ClassDef(AliTRDtrigger,3) // TRD trigger class
};