* provided "as is" without express or implied warranty. *
**************************************************************************/
-/*
-$Log$
-Revision 1.16 2002/03/25 20:01:30 cblume
-Introduce parameter class
-
-Revision 1.15 2001/11/14 12:09:11 cblume
-Use correct name for digitizer
-
-Revision 1.14 2001/11/14 10:50:45 cblume
-Changes in digits IO. Add merging of summable digits
-
-Revision 1.13 2001/05/28 17:07:58 hristov
-Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
-
-Revision 1.12 2001/05/21 17:42:58 hristov
-Constant casted to avoid the ambiguity
-
-Revision 1.11 2001/05/21 16:45:47 hristov
-Last minute changes (C.Blume)
-
-Revision 1.10 2001/05/07 08:06:44 cblume
-Speedup of the code. Create only AliTRDcluster
-
-Revision 1.9 2000/11/01 14:53:20 cblume
-Merge with TRD-develop
-
-Revision 1.1.4.5 2000/10/15 23:40:01 cblume
-Remove AliTRDconst
-
-Revision 1.1.4.4 2000/10/06 16:49:46 cblume
-Made Getters const
-
-Revision 1.1.4.3 2000/10/04 16:34:58 cblume
-Replace include files by forward declarations
-
-Revision 1.1.4.2 2000/09/22 14:49:49 cblume
-Adapted to tracking code
-
-Revision 1.8 2000/10/02 21:28:19 fca
-Removal of useless dependecies via forward declarations
-
-Revision 1.7 2000/06/27 13:08:50 cblume
-Changed to Copy(TObject &A) to appease the HP-compiler
-
-Revision 1.6 2000/06/09 11:10:07 cblume
-Compiler warnings and coding conventions, next round
-
-Revision 1.5 2000/06/08 18:32:58 cblume
-Make code compliant to coding conventions
-
-Revision 1.4 2000/06/07 16:27:01 cblume
-Try to remove compiler warnings on Sun and HP
-
-Revision 1.3 2000/05/08 16:17:27 cblume
-Merge TRD-develop
-
-Revision 1.1.4.1 2000/05/08 15:09:01 cblume
-Introduce AliTRDdigitsManager
-
-Revision 1.1 2000/02/28 18:58:54 cblume
-Add new TRD classes
-
-*/
+/* $Id$ */
///////////////////////////////////////////////////////////////////////////////
// //
#include <TFile.h>
#include "AliRun.h"
+#include "AliRunLoader.h"
+#include "AliLoader.h"
-#include "AliTRD.h"
#include "AliTRDclusterizerV1.h"
#include "AliTRDmatrix.h"
#include "AliTRDgeometry.h"
-#include "AliTRDdigitizer.h"
#include "AliTRDdataArrayF.h"
#include "AliTRDdataArrayI.h"
#include "AliTRDdigitsManager.h"
//_____________________________________________________________________________
AliTRDclusterizerV1::AliTRDclusterizerV1(const AliTRDclusterizerV1 &c)
+:AliTRDclusterizer(c)
{
//
// AliTRDclusterizerV1 copy constructor
// Reads the digits arrays from the input aliroot file
//
- if (!fInputFile) {
+ if (!fRunLoader) {
printf("<AliTRDclusterizerV1::ReadDigits> ");
printf("No input file open\n");
return kFALSE;
}
-
- fDigitsManager->Open(fInputFile->GetName());
+ AliLoader* loader = fRunLoader->GetLoader("TRDLoader");
+ if (!loader->TreeD()) loader->LoadDigits();
// Read in the digit arrays
- return (fDigitsManager->ReadDigits());
+ return (fDigitsManager->ReadDigits(loader->TreeD()));
}
Int_t row, col, time;
+ /*
if (fTRD->IsVersion() != 1) {
printf("<AliTRDclusterizerV1::MakeCluster> ");
printf("TRD must be version 1 (slow simulator).\n");
return kFALSE;
}
+ */
// Get the geometry
- AliTRDgeometry *geo = fTRD->GetGeometry();
+ AliTRDgeometry *geo = AliTRDgeometry::GetGeometry(fRunLoader);
// Create a default parameter class if none is defined
if (!fPar) {
Int_t chamBeg = 0;
Int_t chamEnd = AliTRDgeometry::Ncham();
- if (fTRD->GetSensChamber() >= 0) {
- chamBeg = fTRD->GetSensChamber();
- chamEnd = chamBeg + 1;
- }
Int_t planBeg = 0;
Int_t planEnd = AliTRDgeometry::Nplan();
- if (fTRD->GetSensPlane() >= 0) {
- planBeg = fTRD->GetSensPlane();
- planEnd = planBeg + 1;
- }
Int_t sectBeg = 0;
Int_t sectEnd = AliTRDgeometry::Nsect();
for (Int_t iplan = planBeg; iplan < planEnd; iplan++) {
for (Int_t isect = sectBeg; isect < sectEnd; isect++) {
- if (fTRD->GetSensSector() >= 0) {
- Int_t sens1 = fTRD->GetSensSector();
- Int_t sens2 = sens1 + fTRD->GetSensSectorRange();
- sens2 -= ((Int_t) (sens2 / AliTRDgeometry::Nsect()))
- * AliTRDgeometry::Nsect();
- if (sens1 < sens2) {
- if ((isect < sens1) || (isect >= sens2)) continue;
- }
- else {
- if ((isect < sens1) && (isect >= sens2)) continue;
- }
- }
-
Int_t idet = geo->GetDetector(iplan,icham,isect);
Int_t nClusters = 0;
// Loop through the chamber and find the maxima
for ( row = 0; row < nRowMax; row++) {
- for ( col = 2; col < nColMax; col++) {
+ // for ( col = 2; col < nColMax; col++) {
+ for ( col = 4; col < nColMax-2; col++) {
for (time = 0; time < nTimeTotal; time++) {
Int_t signalL = TMath::Abs(digits->GetDataUnchecked(row,col ,time));
clusterSig[1] = rowSize * rowSize / 12.;
// Add the cluster to the output array
- fTRD->AddCluster(clusterPos
- ,idet
- ,clusterCharge
- ,clusterTracks
- ,clusterSig
- ,iType);
+ AddCluster(clusterPos
+ ,idet
+ ,clusterCharge
+ ,clusterTracks
+ ,clusterSig
+ ,iType);
}
}
// Write the cluster and reset the array
WriteClusters(idet);
- fTRD->ResetRecPoints();
+ ResetRecPoints();
if (fVerbose > 0) {
printf("<AliTRDclusterizerV1::MakeCluster> ");