Re: Possible problem ? *** here are the attachments ***

From: Nick van Eijndhoven (Nick@phys.uu.nl)
Date: Tue Aug 18 1998 - 11:26:44 MEST


In my previous mail I forgot the attachments.
Here they are. 
-- 

                                              Cheers,

                               _/_/      _/    _/   _/_/_/_/    _/   _/
                              _/  _/    _/    _/   _/          _/  _/
                             _/    _/  _/    _/   _/          _/_/
                            _/      _/_/    _/   _/          _/  _/
                           _/        _/    _/   _/_/_/_/    _/    _/


*----------------------------------------------------------------------*
 Dr. Nick van Eijndhoven                Department of Subatomic Physics
 email : nick@phys.uu.nl                Utrecht University / NIKHEF
 tel. +31-30-2532331 (direct)           P.O. Box 80.000
 tel. +31-30-2531492 (secr.)            NL-3508 TA Utrecht
 fax. +31-30-2518689                    The Netherlands
 WWW : http://www.phys.uu.nl/~nick      Office : Ornstein lab. 172
 ----------------------------------------------------------------------
 tel. +41-22-7679751 (direct)           CERN PPE Division / ALICE exp.
 tel. +41-22-7675857 (secr.)            CH-1211 Geneva 23
 fax. +41-22-7679480                    Switzerland
 CERN beep : 13+7294                    Office : B 160 1-012
*----------------------------------------------------------------------*


//////////////////////////////////////////////////////////////////////////
// Program to analyze the LEDA data of WA98
//
// NvE 09-sep-1997 UU-SAP Utrecht
//////////////////////////////////////////////////////////////////////////

#include <iostream.h>
#include <math.h>

//////////////////////////////////////////////////////////////////////////
typedef struct // Definition of the cluster tree data
{
 int jrun,jevt,itword,jwscal;
 float etm;
} Header;
//////////////////////////////////////////////////////////////////////////
void positions_up(AliCalorimeter& cal)
{
// Determination of the lab. position of each module of the upper LEDA 

 float sx=4.105;  // X-dimension of a module in cm
 float sy=4.085;  // Y-dimension of a module in cm
 float tilt=8.31; // Tilt angle in degrees

 float pi=acos(-1.);
 float tiltr=tilt*pi/180.; // Tilt angle in radians

 float dx=sx;            // X-displacement skipping 1 module horizontal
 float dy=sy*cos(tiltr); // Y-displacement skipping 1 module vertical
 float dz=sy*sin(tiltr); // Z-displacement skipping 1 module vertical

 // Position of the left upper module (1,1) looking downstream
 float x0=293.;  
 float y0=345.73;
 float z0=2180.12;

 // Determine and store position of each module
 int nr=cal.GetNrows();
 int nc=cal.GetNcolumns();
 float pos[3];
 for (int i=1; i<=nr; i++)
 {
  for (int j=1; j<=nc; j++)
  {
   pos[0]=x0-float(j-1)*dx;
   pos[1]=y0-float(i-1)*dy;
   pos[2]=z0+float(i-1)*dz;
   cal.setp(i,j,pos);
  }
 }
}
//////////////////////////////////////////////////////////////////////////
void positions_lw(AliCalorimeter& cal)
{
// Determination of the lab. position of each module of the lower LEDA 

 float sx=4.105;  // X-dimension of a module in cm
 float sy=4.085;  // Y-dimension of a module in cm
 float tilt=8.31; // Tilt angle in degrees

 float pi=acos(-1.);
 float tiltr=tilt*pi/180.; // Tilt angle in radians

 float dx=sx;            // X-displacement skipping 1 module horizontal
 float dy=sy*cos(tiltr); // Y-displacement skipping 1 module vertical
 float dz=sy*sin(tiltr); // Z-displacement skipping 1 module vertical

 // Position of the left lower module (1,1) looking downstream
 float x0=291.91;  
 float y0=-331.14;
 float z0=2183.14;

 // Determine and store position of each module
 int nr=cal.GetNrows();
 int nc=cal.GetNcolumns();
 float pos[3];
 for (int i=1; i<=nr; i++)
 {
  for (int j=1; j<=nc; j++)
  {
   pos[0]=x0-float(j-1)*dx;
   pos[1]=y0+float(i-1)*dy;
   pos[2]=z0+float(i-1)*dz;
   cal.setp(i,j,pos);
  }
 }
}
//////////////////////////////////////////////////////////////////////////
void pbdata2()
{
//////////////////////////////////////////////////////////////////////////
// ROOT based analysis program for the WA98 Pb+Pb data
//
// NvE 09-sep-1997 UU-SAP Utrecht
//////////////////////////////////////////////////////////////////////////


// Connect the tree file(s) to the chain
   TChain pb("h999");
   pb.Add("../pb96_09066.root");

// Declaration of leaves types and branch addresses
//////////////////////////////////////////////////////////
//   This file has been automatically generated 
//     (Thu Jun 18 12:56:17 1998 by ROOT version 2.00/08)
//   from TTree h999/PWA98
//   found on file: pb96_09066.root
//////////////////////////////////////////////////////////

   Int_t           JRUN;
   Int_t           JEVT;
   Int_t           JDATE;
   Int_t           JTIME;
   Int_t           JEVID;
   UInt_t          JWSCAL;
   UInt_t          ITWORD;
   Float_t         ZDC;
   Float_t         EMIR;
   Float_t         EMIRE;
   Float_t         EMIRH;
   Float_t         ETM;
   Float_t         ETME;
   Float_t         ETMH;
   Int_t           NMOD;
   Int_t           IROWL[3000];
   UInt_t          ICOLL[3000];
   Float_t         ADCL[3000];
   UInt_t          IRL[3000];
   Float_t         THETAL[3000];
   Float_t         PHIL[3000];
   Int_t           NCLU;
   Int_t           IROWC[400];
   UInt_t          ICOLC[400];
   Float_t         ADCC[400];
   UInt_t          IRC[400];
   Float_t         THETAC[400];
   Float_t         PHIC[400];
   Int_t           NCLUV;
   Int_t           IADCCV[1000];
   Float_t         THETACV[1000];
   Float_t         PHICV[1000];

//Set branch addresses
   pb.SetBranchAddress("JRUN",&JRUN);
   pb.SetBranchAddress("JEVT",&JEVT);
   pb.SetBranchAddress("JDATE",&JDATE);
   pb.SetBranchAddress("JTIME",&JTIME);
   pb.SetBranchAddress("JEVID",&JEVID);
   pb.SetBranchAddress("JWSCAL",&JWSCAL);
   pb.SetBranchAddress("ITWORD",&ITWORD);
   pb.SetBranchAddress("ZDC",&ZDC);
   pb.SetBranchAddress("EMIR",&EMIR);
   pb.SetBranchAddress("EMIRE",&EMIRE);
   pb.SetBranchAddress("EMIRH",&EMIRH);
   pb.SetBranchAddress("ETM",&ETM);
   pb.SetBranchAddress("ETME",&ETME);
   pb.SetBranchAddress("ETMH",&ETMH);
   pb.SetBranchAddress("NMOD",&NMOD);
   pb.SetBranchAddress("IROWL",IROWL);
   pb.SetBranchAddress("ICOLL",ICOLL);
   pb.SetBranchAddress("ADCL",ADCL);
   pb.SetBranchAddress("IRL",IRL);
   pb.SetBranchAddress("THETAL",THETAL);
   pb.SetBranchAddress("PHIL",PHIL);
   pb.SetBranchAddress("NCLU",&NCLU);
   pb.SetBranchAddress("IROWC",IROWC);
   pb.SetBranchAddress("ICOLC",ICOLC);
   pb.SetBranchAddress("ADCC",ADCC);
   pb.SetBranchAddress("IRC",IRC);
   pb.SetBranchAddress("THETAC",THETAC);
   pb.SetBranchAddress("PHIC",PHIC);
   pb.SetBranchAddress("NCLUV",&NCLUV);
   pb.SetBranchAddress("IADCCV",IADCCV);
   pb.SetBranchAddress("THETACV",THETACV);
   pb.SetBranchAddress("PHICV",PHICV);

//////////////////////////////////////////////////////////////////////////
//
// Definitions completed.
// Hereafter the user code may follow to perform data analysis.
//
//////////////////////////////////////////////////////////////////////////

// Selection of branches to be read
// pb.SetBranchStatus("*",0);  // disable all branches
// pb.SetBranchStatus("JRUN",1);
// pb.SetBranchStatus("JEVT",1);
// pb.SetBranchStatus("JWSCAL",1);
// pb.SetBranchStatus("ITWORD",1);
// pb.SetBranchStatus("ETM",1);


// Definition of output file to be stored
 TFile* output = new TFile("caldat.root","RECREATE","Pb+Pb data tree");
 TTree* tree=new TTree("T","WA98 Pb+Pb data");

// The event header structure
 Header evhead;

// Define a calorimeter consisting of a module matrix
 AliCalorimeter* ledaup=new AliCalorimeter(44,144);
 AliCalorimeter* ledalw=new AliCalorimeter(40,144);

// The various branches in the tree
 TBranch* b0=tree->Branch("evhead",&evhead,"jrun/I:jevt:itword:jwscal:etm/F");
 TBranch* b1=tree->Branch("ledaup","AliCalorimeter",&ledaup); 
 TBranch* b2=tree->Branch("ledalw","AliCalorimeter",&ledalw); 

// Determine and store all Module positions
// positions_up(ledaup);
// positions_lw(ledalw);

 cout << endl;
 cout << " ledaup dimensions : nrows = " << ledaup.GetNrows()
      << " ncols = " << ledaup.GetNcolumns() << endl;
 cout << " ledalw dimensions : nrows = " << ledalw.GetNrows()
      << " ncols = " << ledalw.GetNcolumns() << endl;
 cout << endl;

// TH1F* xgeo = new TH1F("xgeo","Scaled Et spectrum",100,0,500);
// TH1F* cluold1 = new TH1F("cluold1","Munster leda1 cluster signals",500,0,1000);
// TH1F* cluold2 = new TH1F("cluold2","Munster leda2 cluster signals",500,0,1000);

// The main analysis loop
 int nentries = pb.GetEntries();
 cout << " nentries = " << nentries << endl;
 cout << endl;

 nentries=10; // Just to test the program
 cout << " nentries set to " << nentries << " for testing." << endl;

 int nbytes=0;
 int prnfreq=1; // Frequency of printing an output line

 for (int ient=0; ient<nentries; ient++)
 {
  nbytes=pb.GetEvent(ient);

  if (ITWORD <= 5)
  {
//   xgeo->Fill(ETM,JWSCAL);

   // The Munster cluster data
//   int idet;
//   for (int i=0; i<NCLU; i++)
//   {
//    idet=1;
//    if (IROWC[i] > 0) idet=2;
//    if (idet == 1)
//    {
//     cluold1->Fill(ADCC[i]);
//    }
//    else
//    {
//     cluold2->Fill(ADCC[i]);
//    }
//   }

   // Fill the event header data
    evhead.jrun=JRUN;
    evhead.jevt=JEVT;
    evhead.itword=ITWORD;
    evhead.jwscal=JWSCAL;
    evhead.etm=ETM;

   // Fill calorimeter with module data
   for (int j=0; j<NMOD; j++)
   {
    if (ADCL[j] > 3)
    {
     if (IROWL[j] > 0) ledaup.SetSignal(IROWL[j],ICOLL[j],ADCL[j]);
     if (IROWL[j] < 0) ledalw.SetSignal(-IROWL[j],ICOLL[j],ADCL[j]);
    }
   }


  if ((ient%prnfreq) == 0) // Print a line every 'prnfreq' events
  {
   cout << " ient = " << (ient+1) << " itword = " << ITWORD << " etm = " << ETM 
        << " still " << (nentries-(ient+1)) << " to go." << endl;
   cout << " No. ledaup modules with a signal : " << ledaup.GetNsignals() << endl;
   cout << " No. ledalw modules with a signal : " << ledalw.GetNsignals() << endl;
  }

   // Perform clustering on the calorimeter
//   ledaup.Group(2); // look in maximal 2 rings around central module
//   ledalw.Group(2); // look in maximal 2 rings around central module

//   int nclup=ledaup.GetNclusters();
//   int ncllw=ledalw.GetNclusters();

//   cout << endl;
//   cout << " Reconstructed no. of clusters in ledaup : " << nclup << endl;
//   cout << " Reconstructed no. of clusters in ledalw : " << ncllw << endl;

   // Write the data to the tree
   tree->Fill();

   // Reset the complete calorimeter
   ledaup.Reset();
   ledalw.Reset();

  }
 }

 tree->Print(); // Provide overview of the Tree contents

// Write the produced histos to the output file(s)
 output->Write();
 output->Close();
}


 the current keyboard layout is 437 
  *******************************************
  *                                         *
  *        W E L C O M E  to  R O O T       *
  *                                         *
  *   Version   2.00/08       5 June 1998   *
  *                                         *
  *  You are welcome to visit our Web site  *
  *          http://root.cern.ch            *
  *                                         *
  *******************************************

CINT/ROOT C/C++ Interpreter version 5.13.55, May 16 1998
Type ? for help. Commands must be C++ statements.
Enclose multiple statements between { }.

 --- Welcome to the ROOT general session --- 

 --- Tree and RALICE classes are loaded by default --- 

 *** Start at Date : 18-aug-98 Time : 10:52:35 ***

NULL

Processing pbdata2.cc...

 ledaup dimensions : nrows = 44 ncols = 144
 ledalw dimensions : nrows = 40 ncols = 144

 nentries = 3333

 nentries set to 10 for testing.
 ient = 1 itword = 5 etm = 7.47261 still 9 to go.
 No. ledaup modules with a signal : 0
 No. ledalw modules with a signal : 0
 ient = 2 itword = 5 etm = 7.93093 still 8 to go.
 No. ledaup modules with a signal : 34
 No. ledalw modules with a signal : 35
 ient = 3 itword = 3 etm = 290.969 still 7 to go.
 No. ledaup modules with a signal : 430
 No. ledalw modules with a signal : 314
 ient = 4 itword = 5 etm = 6.79157 still 6 to go.
 No. ledaup modules with a signal : 8
 No. ledalw modules with a signal : 14
 ient = 5 itword = 3 etm = 375.195 still 5 to go.
 No. ledaup modules with a signal : 521
 No. ledalw modules with a signal : 459
 ient = 6 itword = 1 etm = 70.8652 still 4 to go.
 No. ledaup modules with a signal : 103
 No. ledalw modules with a signal : 110
 ient = 7 itword = 3 etm = 292.347 still 3 to go.
 No. ledaup modules with a signal : 400
 No. ledalw modules with a signal : 378
 ient = 8 itword = 3 etm = 280.064 still 2 to go.
 No. ledaup modules with a signal : 393
 No. ledalw modules with a signal : 357
 ient = 9 itword = 5 etm = 3.32494 still 1 to go.
 No. ledaup modules with a signal : 19
 No. ledalw modules with a signal : 19
 ient = 10 itword = 3 etm = 303.525 still 0 to go.
 No. ledaup modules with a signal : 370
 No. ledalw modules with a signal : 309
******************************************************************************
*Tree    :T         : WA98 Pb+Pb data                                        *
*Entries :       10 : Total  Size =    286164 bytes  File  Size =      41594 *
*        :          : Tree compression factor =   6.88                       *
******************************************************************************
*Branch  :evhead    : jrun/I:jevt:itword:jwscal:etm/F                        *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :ledaup    : ledaup                                                 *
*Entries :       10 : BranchObject (see below)                               *
*............................................................................*
*Branch  :fNrows    : fNrows                                                 *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNcolumns : fNcolumns                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNsignals : fNsignals                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNclusters : fNclusters                                            *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fModules  : fModules                                               *
*Entries :       10 : Total  Size =    157150 bytes  File Size  =      22133 *
*Baskets :        5 : Basket Size =     32000 bytes  Compression=   7.10     *
*............................................................................*
*Branch  :fClusters : fClusters                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fUniqueID : fUniqueID                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fBits     : fBits                                                  *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :ledalw    : ledalw                                                 *
*Entries :       10 : BranchObject (see below)                               *
*............................................................................*
*Branch  :fNrows    : fNrows                                                 *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNcolumns : fNcolumns                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNsignals : fNsignals                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fNclusters : fNclusters                                            *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fModules  : fModules                                               *
*Entries :       10 : Total  Size =    129014 bytes  File Size  =      19461 *
*Baskets :        5 : Basket Size =     32000 bytes  Compression=   6.63     *
*............................................................................*
*Branch  :fClusters : fClusters                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fUniqueID : fUniqueID                                              *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
*Branch  :fBits     : fBits                                                  *
*Entries :       10 : Total  Size =         0 bytes  File Size  =          0 *
*Baskets :        0 : Basket Size =     32000 bytes  Compression=   1.00     *
*............................................................................*
TFile Writing Name=caldat.root Title=Pb+Pb data tree

 --- General ROOT session ended --- 

 *** Stop at Date : 18-aug-98 Time : 10:52:40 ***

NULL
NULL



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:36 MET