]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
These files were for generating DDL data streams back when AliRoot/MUON was not creat...
authorszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:32:59 +0000 (04:32 +0000)
committerszostak <szostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 29 May 2007 04:32:59 +0000 (04:32 +0000)
HLT/MUON/src/Clustering/RawDataReconstruction/Config_MUON_test.C [deleted file]
HLT/MUON/src/Clustering/RawDataReconstruction/Reconstruction.C [deleted file]
HLT/MUON/src/Clustering/RawDataReconstruction/display.C [deleted file]
HLT/MUON/src/Clustering/RawDataReconstruction/rawddl4.C [deleted file]
HLT/MUON/src/Clustering/RawDataReconstruction/rawddl5.C [deleted file]

diff --git a/HLT/MUON/src/Clustering/RawDataReconstruction/Config_MUON_test.C b/HLT/MUON/src/Clustering/RawDataReconstruction/Config_MUON_test.C
deleted file mode 100644 (file)
index da8ca0a..0000000
+++ /dev/null
@@ -1,187 +0,0 @@
-// Config file test for MUON spectormeter
-// Remember to define the directory and option
-// gAlice->SetConfigFunction("Config('$HOME','box');");
-
-void
-Config (char directory[100] = "", char option[6] = "box")
-{
-  //
-  // Config file for MUON test
-  // Gines MARTINEZ, Subatech, mai 2003, august 2003
-  // 
-
-  //=====================================================================
-  //  Libraries required by geant321
-  gSystem->Load ("libgeant321.so");
-  new TGeant3 ("C++ Interface to Geant3");
-  //=======================================================================
-  //  Create the output file    
-  Text_t filename[100];
-  sprintf (filename, "%sgalice.root", directory);
-  cout << ">>> Output file is " << filename << endl;
-  cout << ">>> Config_MUON_test.C: Creating Run Loader ..." << endl;
-  AliRunLoader *rl = 0x0;
-  rl =
-    AliRunLoader::Open (filename, AliConfig::GetDefaultEventFolderName (),
-                       "recreate");
-  if (rl == 0x0)
-    {
-      gAlice->Fatal ("Config_MUON_test.C",
-                    "Can not instatiate the Run Loader");
-      return;
-    }
-  rl->SetCompressionLevel (2);
-  rl->SetNumberOfEventsPerFile (100);
-  gAlice->SetRunLoader (rl);
-
-
-  //=======================================================================
-  // Set External decayer
-  TVirtualMCDecayer *decayer = new AliDecayerPythia ();
-  decayer->SetForceDecay (kAll);
-  decayer->Init ();
-  gMC->SetExternalDecayer (decayer);
-
-  //
-  //=======================================================================
-  // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
-  gMC->SetProcess ("DCAY", 1);
-  gMC->SetProcess ("PAIR", 1);
-  gMC->SetProcess ("COMP", 1);
-  gMC->SetProcess ("PHOT", 1);
-  gMC->SetProcess ("PFIS", 0);
-  gMC->SetProcess ("DRAY", 0);
-  gMC->SetProcess ("ANNI", 1);
-  gMC->SetProcess ("BREM", 1);
-  gMC->SetProcess ("MUNU", 1);
-  gMC->SetProcess ("CKOV", 1);
-  gMC->SetProcess ("HADR", 1);
-  gMC->SetProcess ("LOSS", 2);
-  gMC->SetProcess ("MULS", 1);
-  gMC->SetProcess ("RAYL", 1);
-
-  Float_t cut = 1.e-3;         // 1MeV cut by default
-  Float_t tofmax = 1.e10;
-
-  gMC->SetCut ("CUTGAM", cut);
-  gMC->SetCut ("CUTELE", cut);
-  gMC->SetCut ("CUTNEU", cut);
-  gMC->SetCut ("CUTHAD", cut);
-  gMC->SetCut ("CUTMUO", cut);
-  gMC->SetCut ("BCUTE", cut);
-  gMC->SetCut ("BCUTM", cut);
-  gMC->SetCut ("DCUTE", cut);
-  gMC->SetCut ("DCUTM", cut);
-  gMC->SetCut ("PPCUTM", cut);
-  gMC->SetCut ("TOFMAX", tofmax);
-  //
-  //=======================================================================
-  // ************* STEERING parameters FOR ALICE SIMULATION **************
-  // Chamber positions
-  // From AliMUONConstants class we get :
-  //   Position Z (along beam) of the chambers (in cm) 
-  //        (from AliMUONConstants class):  
-  //    533.5,  546.5,  678.5, 693.5,  964.0, 986.0, 1251.5, 1278.5, 
-  //   1416.5, 1443.5,  1610, 1625.,  1710., 1725. 
-  //   Internal Radius (in cm)   
-  //     36.4,  46.2,  66.0,  80.,  80., 100., 100.    
-  //   External Radius (in cm)
-  //    183.,  245.,  395.,  560., 563., 850., 900.  
-  //=======================================================================
-  if (!strcmp (option, "box"))
-    {
-      AliGenBox *gener = new AliGenBox (1);
-      gener->SetMomentumRange (20., 20.1);
-      gener->SetPhiRange (0.,180.);
-      gener->SetThetaRange (171.000, 178.001);
-      gener->SetPart (13);     // Muons
-      gener->SetOrigin (0., 0., 0.);   //vertex position
-      gener->SetSigma (0.0, 0.0, 0.0); //Sigma in (X,Y,Z) (cm) on IP position
-    }
-  if (!strcmp (option, "gun"))
-    {
-      //*********************************************
-      // Example for Fixed Particle Gun             *
-      //*********************************************
-      AliGenFixed *gener = new AliGenFixed (ntracks);
-      gener->SetMomentum (10);
-      gener->SetPhiRange (0.);
-      gener->SetThetaRange (0.);
-      gener->SetOrigin (30, 30, 1200); //vertex position
-      gener->SetPart (13);     //GEANT particle type  13 is muons
-    }
-  if (!strcmp (option, "scan"))
-    {
-      AliGenScan *gener = new AliGenScan (-1);
-      gener->SetMomentumRange (10, 10);
-      gener->SetPhiRange (0, 0);
-      gener->SetThetaRange (-180, -180);
-      //vertex position
-      //gener->SetSigma(1,1,0);           //Sigma in (X,Y,Z) (cm) on IP position
-      gener->SetPart (kRootino);
-      gener->SetRange (100, -300., 300., 100, -300., 300., 1, 2000, 2000);
-    }
-  if (!strcmp (option, "param"))
-    {
-      //*******************************************************
-      // Example for J/psi or Upsilon Production from  Parameterisation *
-      //*******************************************************
-      AliGenParam *gener = new AliGenParam (1, AliGenMUONlib::kUpsilon);
-      gener->SetMomentumRange (0, 999);
-      gener->SetPtRange (0, 100.);
-      gener->SetPhiRange (0., 360.);
-      gener->SetCutOnChild (1);
-      gener->SetChildPhiRange (0., 360.);
-      gener->SetChildThetaRange (171.0, 178.0);
-      gener->SetOrigin (0, 0, 0);      //vertex position    gener->SetSigma(0,0,0);           //Sigma in (X,Y,Z) (cm) on IP position
-      gener->SetForceDecay (kDiMuon);
-      gener->SetTrackingFlag (1);
-      gener->Init ();
-    }
-  //============================================================= 
-  // Field (L3 0.4 T)
-  AliMagFMaps *field =
-    new AliMagFMaps ("Maps", "Maps", 1, 1., 10., AliMagFMaps::k4kG);
-  gAlice->SetField (field);
-
-  //=================== Alice BODY parameters =============================
-  AliBODY *BODY = new AliBODY ("BODY", "Alice envelop");
-  //=================== ABSO parameters ============================
-  AliABSO *ABSO = new AliABSOv0 ("ABSO", "Muon Absorber");
-  //=================== DIPO parameters ============================
-  AliDIPO *DIPO = new AliDIPOv2 ("DIPO", "Dipole version 2");
-  //================== HALL parameters ============================
-  AliHALL *HALL = new AliHALL ("HALL", "Alice Hall");
-  //=================== PIPE parameters ============================
-  AliPIPE *PIPE = new AliPIPEv0 ("PIPE", "Beam Pipe");
-  //=================== SHIL parameters ============================
-  AliSHIL *SHIL = new AliSHILv2 ("SHIL", "Shielding Version 2");
-  //=================== MUON Subsystem ===========================
-  cout << ">>> Config_MUON_test.C: Creating AliMUONv1 ..." << endl;
-
-  // Old MUONv1 version (renamed to MUONv3)
-  //AliMUONv3 *MUON  = new AliMUONv3("MUON","default"); 
-
-  // New MUONv1 version (geometry defined via builders)
-  AliMUON *MUON = new AliMUONv1 ("MUON", "default");
-
-  //MUON->SetAlign(true);
-  // If align = true, the detection elements transformations
-  // are taken from the input files and not from the code
-
-  //MUON->SetDebug(2);
-  // To check setting of transformations from input files
-  // set align = true, debug level = 2 and run with scan generator
-
-  //MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
-  MUON->AddGeometryBuilder (new AliMUONSt1GeometryBuilderV2 (MUON));
-  MUON->AddGeometryBuilder (new AliMUONSt2GeometryBuilder (MUON));
-  MUON->AddGeometryBuilder (new AliMUONSlatGeometryBuilder (MUON));
-  MUON->AddGeometryBuilder (new AliMUONTriggerGeometryBuilder (MUON));
-}
-
-Float_t
-EtaToTheta (Float_t arg)
-{
-  return (180. / TMath::Pi ()) * 2. * atan (exp (-arg));
-}
diff --git a/HLT/MUON/src/Clustering/RawDataReconstruction/Reconstruction.C b/HLT/MUON/src/Clustering/RawDataReconstruction/Reconstruction.C
deleted file mode 100644 (file)
index f50172b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-void
-Reconstruction (char *fileName = "galice.root")
-{
-
-  TPluginManager *pluginManager = gROOT->GetPluginManager ();
-  pluginManager->AddHandler ("AliReconstructor", "MUON",
-                            "AliMUONReconstructor", "MUON",
-                            "AliMUONReconstructor()");
-
-  AliReconstruction MuonRec (fileName);
-  MuonRec.SetRunTracking ("");
-  MuonRec.SetRunVertexFinder (kFALSE);
-  MuonRec.SetRunLocalReconstruction ("MUON");
-  MuonRec.SetFillESD ("MUON");
-  MuonRec.Run ();
-}
diff --git a/HLT/MUON/src/Clustering/RawDataReconstruction/display.C b/HLT/MUON/src/Clustering/RawDataReconstruction/display.C
deleted file mode 100644 (file)
index 1ff5f24..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-// This macro displays the hits belonging to a track for selected detectors
-// Input: in the tracks contains the interesting tracks
-//        ntracks is the number of interesing tracks
-//        The default values correspond to "Show everything"
-// Note: For the moment it works only with HIJING events, the PYTHIA is 
-//       still not supported 
-void display (const char *filename="galice.root",Int_t nevent=0, Int_t * tracks=0, Int_t ntracks=0) {
-// Dynamically link some shared libs
-   if (gClassTable->GetID("AliRun") < 0) {
-      gROOT->LoadMacro("loadlibs.C");
-      loadlibs();
-   } else {
-      delete gAlice->GetRunLoader();
-      delete gAlice;
-      gAlice = 0;
-   }
-      
-// Connect the Root Galice file containing Geometry, Kine and Hits
-   AliRunLoader *rl = 0x0;
-   TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
-   if(file){
-     cout<<"galice.root is already open \n";
-   }
-
-   
-   rl = AliRunLoader::Open(filename,"DISPLAYED EVENT");
-   
-   if (rl == 0x0)
-    {
-      cerr<<"Error <display.C()>: can not get Run Loader. Exiting"<<endl;
-      return;
-    }
-// Get AliRun object from file or create it if not on file
-
-   rl->LoadgAlice();
-   gAlice = rl->GetAliRun();
-   if (!gAlice) {
-    cerr<<"AliTPCHits2Digits.C : AliRun object not found on file\n";
-    return;
-  }
-    
-// Load data
-   rl->GetEvent(nevent);
-   rl->LoadKinematics();
-   rl->LoadHeader();
-   rl->LoadHits();
-
-// Create Event Display object
-   AliDisplay *edisplay = new AliDisplay(750);
-   if (ntracks>0) edisplay->SetTracksToDisplay(tracks, ntracks);
-   
-// Display the requested event
-   edisplay->ShowNextEvent(0);
-
-// Define the buttons to switch on/off the existing modules
-   Float_t nodet=0.;
-   TObjArray *moduli = gAlice->Modules();
-   Int_t nomod=moduli->GetEntriesFast();
-   AliModule *modu;
-   for (Int_t j=0; j<nomod; j++){
-     modu=(AliModule*)moduli->At(j);
-     char *avoid=strstr("BODY MAG ABSO DIPO HALL FRAME SHIL PIPE",modu->GetName());
-     if(avoid)continue;
-     nodet++;
-   }
-   TDialogCanvas *dialog = new TDialogCanvas("Modules"," ",150,30*nodet);
-   Float_t yval1=1./nodet*0.9*0.05;
-   Float_t yval2=1./nodet*0.9*0.95;
-   char action[50];
-   char title[30];
-   char bname[30];
-   TButton *butto1;
-   for (Int_t j=0; j<nomod; j++){
-     modu=(AliModule*)moduli->At(j);
-     char *avoid=strstr(" BODY MAG ABSO DIPO HALL FRAME SHIL PIPE",modu->GetName());
-     if(avoid)continue;
-     sprintf(action,"swioff(\"%s\")",modu->GetName());
-     sprintf(title,"%s is on",modu->GetName());
-     sprintf(bname,"but%s",modu->GetName());
-     butto1 = new TButton(title,action,.05,yval1,.95,yval2);
-     butto1->SetName(bname);
-     butto1->SetFillColor(3);
-     butto1->Draw();
-     yval1+=1./nodet;
-     yval2+=1./nodet;
-   }
-} 
-
-void swioff(const char *dete){
-  gAlice->Display()->DisableDetector(dete);
-  gAlice->Display()->Pad()->Modified();
-  gAlice->Display()->Pad()->Update();
-  char bname[30];
-  char action[50];
-  char title[30];
-  sprintf(bname,"but%s",dete);
-  TDialogCanvas *dia = (TDialogCanvas *)gROOT->FindObject("Modules");
-  TButton *bt = (TButton *)dia->FindObject(bname);
-  bt->SetFillColor(2);
-  sprintf(action,"swion(\"%s\")",dete);
-  bt->SetMethod(action);
-  sprintf(title,"%s is off",dete);
-  bt->SetTitle(title);
-  dia->Draw();
-}
-
-void swion(const char *dete){
-  gAlice->Display()->EnableDetector(dete);
-  gAlice->Display()->Pad()->Modified();
-  gAlice->Display()->Pad()->Update();
-  TDialogCanvas *dia = (TDialogCanvas *)gROOT->FindObject("Modules");
-  char bname[30];
-  char action[50];
-  char title[30];
-  sprintf(bname,"but%s",dete);
-  TButton *bt = (TButton *)dia->FindObject(bname);
-  bt->SetFillColor(3);
-  sprintf(action,"swioff(\"%s\")",dete);
-  bt->SetMethod(action);
-  sprintf(title,"%s is on",dete);
-  bt->SetTitle(title);
-  dia->Draw();
-}
-
diff --git a/HLT/MUON/src/Clustering/RawDataReconstruction/rawddl4.C b/HLT/MUON/src/Clustering/RawDataReconstruction/rawddl4.C
deleted file mode 100644 (file)
index f8fc109..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-// ROOT includes
-#include "TBranch.h"
-#include "TClonesArray.h"
-#include "TFile.h"
-#include "TH1.h"
-#include "TParticle.h"
-#include "TTree.h"
-//
-// // STEER includes
-#include "AliRun.h"
-#include "AliRunLoader.h"
-#include "AliHeader.h"
-#include "AliLoader.h"
-#include "AliStack.h"
-//
-// // MUON includes
-#include "AliMUON.h"
-#include "AliMUONData.h"
-#include "AliMUONHit.h"
-#include "AliMUONConstants.h"
-#include "AliMUONDigit.h"
-// //
-// 
-
-
-void rawddl4 (Int_t evNumber1 = 0, Int_t evNumber2 = 0)
-{
-
-  long int mappheader2, mapp2[123456];
-  FILE *fb = fopen ("lutraw41.dat", "r");
-  for (Int_t n = 0; n < 48448; n++)
-    {
-      fscanf (fb, "%ld", &mappheader2);
-      fscanf (fb, "%ld", &mapp2[mappheader2]);
-    }
-  fclose (fb);
-  long int mappheader4, mapp4[123456];
-  FILE *fc = fopen ("lutraw42.dat", "r");
-  for (Int_t n = 0; n < 48448; n++)
-    {
-      fscanf (fc, "%ld", &mappheader4);
-      fscanf (fc, "%ld", &mapp4[mappheader4]);
-    }
-  fclose (fc);
-  FILE *fp = fopen ("ddl13.dat", "w+");
-  FILE *fq = fopen ("ddl14.dat", "w+");
-  FILE *fr = fopen ("ddl15.dat", "w+");
-  FILE *fs = fopen ("ddl16.dat", "w+");
-
-  AliRunLoader *RunLoader =
-    AliRunLoader::Open ("galice.root", "MUONFolder", "READ");
-  if (RunLoader == 0x0)
-    {
-      printf (">>> Error : Error Opening %s file \n", "galice.root");
-      return;
-    }
-  // Loading MUON subsystem
-  AliLoader *MUONLoader = RunLoader->GetLoader ("MUONLoader");
-  MUONLoader->LoadDigits ("READ");
-
-  // Creating MUON data container
-  AliMUONData muondata (MUONLoader, "MUON", "MUON");
-
-  Int_t ievent, nevents;
-  nevents = RunLoader->GetNumberOfEvents ();
-  printf (">>> No. of Event %d \n", nevents);
-  AliMUONDigit *mDigit;
-  
-  Int_t dspheader[1000][4];
-  Int_t dsphead[1000][100];
-
-  //   Start loop over events 
-  for (int ievent = evNumber1; ievent <= evNumber2; ievent++)  // event start 
-    {
-      printf ("Event:%d\n", ievent + 1);
-      for (Int_t ii = 0; ii < 1000; ii++)
-       {
-         for (Int_t ij = 0; ij < 100; ij++)
-           {
-             dsphead[ii][ij] = 0;
-           }
-       }
-      for (Int_t ik = 0; ik < 1000; ik++)
-       {
-         for (Int_t il = 0; il < 4; il++)
-           {
-             dspheader[ik][il] = 0;
-           }
-       }
-//       printf(">>> Event %d \n",ievent);
-      RunLoader->GetEvent (ievent);
-
-      muondata.SetTreeAddress ("D");
-
-      Int_t ncathodes = 2;
-      for (Int_t icathode = 0; icathode < ncathodes; icathode++)
-       {
-         muondata.GetCathode (icathode);
-
-         Int_t ichamber;
-         for (ichamber = 6; ichamber < 8; ichamber++)
-           {
-             Int_t idigit, ndigits;
-             ndigits = (Int_t) muondata.Digits (ichamber)->GetEntriesFast ();  //7 or 8
-
-             for (idigit = 0; idigit < ndigits; idigit++)
-               {
-                 mDigit =
-                   static_cast <
-                   AliMUONDigit * >(muondata.Digits (ichamber)->At (idigit));
-                 {             // pads start  
-                   Int_t dsp = 0, xydata = 0, manu = 0, adc = 0;
-                   Int_t index = 0, counter = 0;
-                   Int_t iqpad = mDigit->Signal ();    // charge per pad
-                   if (iqpad >= 4096)
-                     iqpad = 4095;
-                   Int_t iPx = mDigit->PadX ();        // pad number on X
-                   Int_t iPy = mDigit->PadY ();        // pad number on Y
-//printf("root:%f\t%f\n",x,y);
-                   Int_t modx = abs (iPx);
-                   if (icathode == 0)
-                     {
-                       xydata = 1024 * modx + iPy;
-                       manu = ((mapp2[xydata] >> 6) & 1023);
-                       adc = (((mapp2[xydata] << 11) >> 11) & 63);
-                       dsp = iPy / 80;
-                     }
-                   if (icathode == 1)
-                     {
-                       xydata = 128 * modx + iPy;
-                       manu = ((mapp4[xydata] >> 6) & 1023);
-                       if (manu > 0)
-                         {
-                           adc = (((mapp4[xydata] << 11) >> 11) & 63);
-                           if (manu <= 509)
-                             dsp = 0;
-                           if (manu > 509 && manu <= 525)
-                             dsp = 1;
-                           if (manu > 525 && manu <= 546)
-                             dsp = 2;
-                           if (manu > 546 && manu <= 579)
-                             dsp = 3;
-                           if (manu > 579 && manu <= 612)
-                             dsp = 4;
-                           if (manu > 612 && manu <= 645)
-                             dsp = 5;
-                           if (manu > 635 && manu <= 678)
-                             dsp = 6;
-                           if (manu > 668 && manu <= 711)
-                             dsp = 7;
-                           if (manu > 709 && manu <= 732)
-                             dsp = 8;
-                           if (manu > 722 && manu <= 748)
-                             dsp = 9;
-                           if (manu > 738 && manu <= 757)
-                             dsp = 10;
-                         }
-                     }
-                   if (iPx < 0)
-                     {
-                       if (ichamber == 6)
-                         {
-                           dsp += 501;
-                           index = 0;
-                         }
-                       if (ichamber == 7)
-                         {
-                           dsp += 541;
-                           index = 2;
-                         }
-                       dspheader[dsp][index] += 1;
-                       counter = dspheader[dsp][index];
-                       dsphead[dsp][counter] =
-                         4096 * (64 * (manu) + adc) + iqpad;
-                     }
-                   else
-                     {
-                       if (ichamber == 6)
-                         {
-                           dsp += 521;
-                           index = 1;
-                         }
-                       if (ichamber == 7)
-                         {
-                           dsp += 561;
-                           index = 3;
-                         }
-                       dspheader[dsp][index] += 1;
-                       counter = dspheader[dsp][index];
-                       dsphead[dsp][counter] =
-                         4096 * (64 * (manu) + adc) + iqpad;
-                     }
-                 }             //pad
-               }               // digit
-           }                   // chamber
-       }                       // cathode
-      for (Int_t dsp = 501; dsp < 580; dsp++)
-       {
-         for (Int_t aa = 0; aa < 4; aa++)
-           {
-             Int_t dspcount = dspheader[dsp][aa];
-             if (aa == 0)
-               {
-                 fwrite (&dsp, 2, 1, fp);
-                 fwrite (&dspcount, 2, 1, fp);
-                 for (Int_t ax = 1; ax <= dspcount; ax++)
-                   fwrite (&dsphead[dsp][ax], 4, 1, fp);
-               }
-             if (aa == 1)
-               {
-                 fwrite (&dsp, 2, 1, fq);
-                 fwrite (&dspcount, 2, 1, fq);
-                 for (Int_t ax = 1; ax <= dspcount; ax++)
-                   fwrite (&dsphead[dsp][ax], 4, 1, fq);
-               }
-             if (aa == 2)
-               {
-                 fwrite (&dsp, 2, 1, fr);
-                 fwrite (&dspcount, 2, 1, fr);
-                 for (Int_t ax = 1; ax <= dspcount; ax++)
-                   fwrite (&dsphead[dsp][ax], 4, 1, fr);
-               }
-             if (aa == 3)
-               {
-                 fwrite (&dsp, 2, 1, fs);
-                 fwrite (&dspcount, 2, 1, fs);
-                 for (Int_t ax = 1; ax <= dspcount; ax++)
-                   fwrite (&dsphead[dsp][ax], 4, 1, fs);
-               }
-           }
-       }
-
-    }                          //event
-  fclose (fp);
-  fclose (fq);
-  fclose (fr);
-  fclose (fs);
-}                              // end of funtion     
diff --git a/HLT/MUON/src/Clustering/RawDataReconstruction/rawddl5.C b/HLT/MUON/src/Clustering/RawDataReconstruction/rawddl5.C
deleted file mode 100644 (file)
index c06b431..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-// ROOT includes
-// #include "TBranch.h"
-#include "TClonesArray.h"
-#include "TFile.h"
-#include "TH1.h"
-#include "TParticle.h"
-#include "TTree.h"
-// //
-// // // STEER includes
-#include "AliRun.h"
-#include "AliRunLoader.h"
-#include "AliHeader.h"
-#include "AliLoader.h"
-#include "AliStack.h"
-// //
-// // // MUON includes
-#include "AliMUON.h"
-#include "AliMUONData.h"
-#include "AliMUONHit.h"
-#include "AliMUONConstants.h"
-#include "AliMUONDigit.h"
-// // //
-// //
-// 
-void rawddl5(Int_t evNumber1=0,Int_t evNumber2=0) 
-{
-  long int mappheader2,mapp2[123456];
-  FILE *fb = fopen("lutraw51.dat","r");
-  for(Int_t n=0;n<59136;n++)
-    {
-     fscanf(fb,"%ld",&mappheader2);
-     fscanf(fb,"%ld",&mapp2[mappheader2]);
-    }
-  fclose(fb);
-  long int mappheader4,mapp4[123456];
-  FILE *fc = fopen("lutraw52.dat","r");
-  for(Int_t n=0;n<59136;n++)
-    {
-     fscanf(fc,"%ld",&mappheader4);
-     fscanf(fc,"%ld",&mapp4[mappheader4]);
-    }
-  fclose(fc);
-       FILE *fp = fopen("ddl17.dat","w+");              
-       FILE *fq = fopen("ddl18.dat","w+");              
-       FILE *fr = fopen("ddl19.dat","w+");              
-       FILE *fs = fopen("ddl20.dat","w+");
-   AliRunLoader * RunLoader = AliRunLoader::Open("galice.root","MUONFolder","REA
-          D");
-  if (RunLoader ==0x0) {
-                printf(">>> Error : Error Opening %s file \n","galice.root");
-        return;
-                      }
-  // Loading MUON subsystem
-     AliLoader * MUONLoader = RunLoader->GetLoader("MUONLoader");
-        MUONLoader->LoadDigits("READ");
-
-  // Creating MUON data container
-     AliMUONData muondata(MUONLoader,"MUON","MUON");
-
-     Int_t ievent, nevents;
-     nevents = RunLoader->GetNumberOfEvents();
-       printf(">>> No. of Event %d \n",nevents);
-       AliMUONDigit * mDigit;
-       
-        Int_t dspheader[1000][4];
-        Int_t dsphead[1000][100];
-//   Start loop over events
-  for (int ievent=evNumber1; ievent<= evNumber2; ievent++) // event start 
-      {
-             printf("Event:%d\n",ievent+1);
-         for(Int_t ii=0;ii<1000;ii++)
-            {
-          for(Int_t ij=0;ij<100;ij++)
-             {
-              dsphead[ii][ij]=0;
-             }
-            }
-        for(Int_t ik=0;ik<1000;ik++)
-            {
-          for(Int_t il=0;il<4;il++)
-             {
-              dspheader[ik][il]=0;
-             }
-            }
-       RunLoader->GetEvent(ievent);
-
-       muondata.SetTreeAddress("D");
-
-       Int_t ncathodes=2;
-       for(Int_t icathode=0; icathode<ncathodes; icathode++) {
-       muondata.GetCathode(icathode);
-
-       Int_t ichamber;
-       for( ichamber=8; ichamber<10; ichamber++) {
-       Int_t idigit, ndigits;
-       ndigits = (Int_t) muondata.Digits(ichamber)->GetEntriesFast(); //9 or 10
-       for(idigit=0; idigit<ndigits; idigit++) {
-       mDigit = static_cast<AliMUONDigit*>(muondata.Digits(ichamber)->At(idigit)
-);
-                   {                                              // pads start
-               Int_t dsp = 0, xydata=0, manu=0, adc=0;
-               Int_t index=0, counter=0;
-                    Int_t iqpad = mDigit->Signal();              // charge per pad
-                         if(iqpad>=4096)
-                                  iqpad = 4095;
-                    Int_t iPx = mDigit->PadX();               // pad number on X
-                    Int_t iPy = mDigit->PadY();               // pad number on Y
-                                                                             
-       Int_t modx = abs(iPx);
-        if(icathode==0)
-         {
- xydata = 2048*modx+iPy;
- manu=((mapp2[xydata]>>6)&1023);
- adc=(((mapp2[xydata]<<11)>>11)&63);
-        dsp=iPy/80;
-         }
-              if(icathode == 1)
-               {
- xydata = 256*modx+iPy;
- manu=((mapp4[xydata]>>6)&1023);
-if(manu>0){
- adc=(((mapp4[xydata]<<11)>>11)&63);
-if(manu<=625)
-  dsp=0;
-if(manu>625&&manu<=637)
-  dsp=1;
-if(manu>637&&manu<=656)
-  dsp=2;
-if(manu>656&&manu<=680)
-  dsp=3;
-if(manu>680&&manu<=716)
-  dsp=4;
-if(manu>716&&manu<=752)
-  dsp=5;
-if(manu>752&&manu<=788)
-  dsp=6;
-if(manu>788&&manu<=824)
-  dsp=7;
-if(manu>824&&manu<=860)
-  dsp=8;
-if(manu>860&&manu<=884)
-  dsp=9;
-if(manu>884&&manu<=903)
-  dsp=10;
-if(manu>903&&manu<=915)
-  dsp=11;
-if(manu>915&&manu<=924)
-  dsp=12;
-          }
-                }
-if(iPx<0)
-  {
-   if(ichamber==8)
-     {
-       dsp+=601;
-       index=0;
-     }
-   if(ichamber==9)
-     {
-       dsp+=641;
-       index=2;
-     }
-   dspheader[dsp][index]+=1;
-   counter = dspheader[dsp][index];
-   dsphead[dsp][counter]=4096*(64*(manu)+adc)+iqpad; 
-  }
-else
-  {
-   if(ichamber==8)
-     {
-       dsp+=621;
-       index=1;
-     }
-   if(ichamber==9)
-     {
-       dsp+=661;
-       index=3;
-     }
-    dspheader[dsp][index]+=1;
-    counter = dspheader[dsp][index];
-    dsphead[dsp][counter]=4096*(64*(manu)+adc)+iqpad; 
-  }
-               } //pad
-             }   //digit
-            }  // chamber
-           } //cathode
- for(Int_t dsp=601;dsp<680;dsp++)
-    {
-   for(Int_t aa=0;aa<4;aa++)
-     {
-     Int_t dspcount=dspheader[dsp][aa];
-if(aa==0)
-  {
-     fwrite(&dsp,2,1,fp);
-     fwrite(&dspcount,2,1,fp);
-     for(Int_t ax=1;ax<=dspcount;ax++)
-       fwrite(&dsphead[dsp][ax],4,1,fp);
-  }
-if(aa==1)
-  {
-     fwrite(&dsp,2,1,fq);
-     fwrite(&dspcount,2,1,fq);
-     for(Int_t ax=1;ax<=dspcount;ax++)
-       fwrite(&dsphead[dsp][ax],4,1,fq);
-  }
-if(aa==2)
-  {
-     fwrite(&dsp,2,1,fr);
-     fwrite(&dspcount,2,1,fr);
-     for(Int_t ax=1;ax<=dspcount;ax++)
-       fwrite(&dsphead[dsp][ax],4,1,fr);
-  }
-if(aa==3)
-  {
-     fwrite(&dsp,2,1,fs);
-     fwrite(&dspcount,2,1,fs);
-     for(Int_t ax=1;ax<=dspcount;ax++)
-       fwrite(&dsphead[dsp][ax],4,1,fs);
-  }
-      }
-     }
-     } //event
-fclose(fp);
-fclose(fq);
-fclose(fr);
-fclose(fs);
-}  // end of funtion