]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Major fixes in the digits and raw-data reco. Now both are equivalent. To be propagate...
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Jun 2010 12:27:20 +0000 (12:27 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 14 Jun 2010 12:27:20 +0000 (12:27 +0000)
VZERO/AliVZERORawStream.cxx
VZERO/AliVZERORawStream.h
VZERO/AliVZEROReconstructor.cxx

index dac7e880c30534b33ab89875438c836062ce972b..07d5d3f0490d0361df2a67b314fd96e82c599973 100644 (file)
@@ -46,9 +46,9 @@ AliVZERORawStream::AliVZERORawStream(AliRawReader* rawReader) :
 
   // Initalize the containers
   for(Int_t i = 0; i < kNChannels; i++) {
-    fTime[i] = fWidth[i] = 0.;
+    fTime[i] = fWidth[i] = 0;
     for(Int_t j = 0; j < kNEvOfInt; j++) {
-      fADC[i][j] = 0.;
+      fADC[i][j] = 0;
       fIsInt[i][j] = fIsBB[i][j] = fIsBG[i][j] = kFALSE;
     }
     fBBScalers[i] = fBGScalers[i] = 0;
@@ -74,9 +74,9 @@ void AliVZERORawStream::Reset()
 
   // Reinitalize the containers
   for(Int_t i = 0; i < kNChannels; i++) {
-    fTime[i] = fWidth[i] = 0.;
+    fTime[i] = fWidth[i] = 0;
     for(Int_t j = 0; j < kNEvOfInt; j++) {
-      fADC[i][j] = 0.;
+      fADC[i][j] = 0;
       fIsInt[i][j] = fIsBB[i][j] = fIsBG[i][j] = kFALSE;
     }
     fBBScalers[i] = fBGScalers[i] = 0;
@@ -131,7 +131,7 @@ Bool_t AliVZERORawStream::Next()
       for(Int_t iChannel = iChannel_Offset; iChannel < iChannel_Offset+4; iChannel++) {
         for(Int_t iEvOfInt = 0; iEvOfInt < kNEvOfInt; iEvOfInt++) {
           UShort_t data = GetNextShort();
-          fADC[iChannel][iEvOfInt] = Float_t (data & 0x3ff);
+          fADC[iChannel][iEvOfInt] = data & 0x3ff;
           fIsInt[iChannel][iEvOfInt] = (data >> 10) & 0x1;
         }
       }
@@ -182,12 +182,8 @@ Bool_t AliVZERORawStream::Next()
 
     for(Int_t iChannel = (iCIU*8) + 7; iChannel >= iCIU*8; iChannel--) { 
       UInt_t time = GetNextWord();
-      Float_t coarse1  = 25. * ((time >> 8) & 0xf );
-      Float_t coarse2  = 25. / 8. * ((time >> 5) & 0x7 );
-      Float_t fine     = 25. / 256. * (time & 0x1f);
-
-      fTime[iChannel]  = coarse1 + coarse2 + fine;
-      fWidth[iChannel] = 0.4 * ( (time >> 12) & 0x7f);   // HPTDC used in pairing mode
+      fTime[iChannel]  = time & 0xfff;
+      fWidth[iChannel] = ((time >> 12) & 0x7f); // HPTDC used in pairing mode
     }
     
     // End of decoding of one CIU card
index 6909d9fa38f6888479c51ed11c4d5f3c7e8f69fd..f435846907d09968d82da0883c82a503baf00555 100644 (file)
@@ -51,11 +51,11 @@ class AliVZERORawStream: public TObject {
        
 // Getters of ADC signals, ADC pedestals, time information and corresponding flags :
 
-    Float_t           GetADC(Int_t channel) const
+    Short_t           GetADC(Int_t channel) const
       { return TMath::MaxElement(kNEvOfInt, fADC[channel]); }    // maximum value instead of central clock
 //    { return fADC[channel][kNEvOfInt/2]; }
             
-    Float_t           GetPedestal(Int_t channel, Int_t event) const
+    Short_t           GetPedestal(Int_t channel, Int_t event) const
       { return fADC[channel][event]; }
     Bool_t            GetIntegratorFlag(Int_t channel, Int_t event) const
       { return fIsInt[channel][event]; }
@@ -63,9 +63,9 @@ class AliVZERORawStream: public TObject {
       { return fIsBB[channel][event]; } 
     Bool_t            GetBGFlag(Int_t channel, Int_t event) const
       { return fIsBG[channel][event]; }   
-    Float_t           GetTime(Int_t channel) const
+    Short_t           GetTime(Int_t channel) const
       { return fTime[channel]; }
-    Float_t           GetWidth(Int_t channel) const
+    Short_t           GetWidth(Int_t channel) const
       { return fWidth[channel]; }
 
     UShort_t          GetTriggerInputs() const
@@ -116,12 +116,12 @@ class AliVZERORawStream: public TObject {
     Bool_t        fIsBBMB[kNChannels][kNBunches];   // 'Beam-Beam' flag for all channels for the previous 10 MB events
     Bool_t        fIsBGMB[kNChannels][kNBunches];   // 'Beam-Gas' for all channels for the previous 10 MB events
 
-    Float_t       fADC[kNChannels][kNEvOfInt];   // ADC counts for all channels and all events of interest
+    Short_t       fADC[kNChannels][kNEvOfInt];   // ADC counts for all channels and all events of interest
     Bool_t        fIsInt[kNChannels][kNEvOfInt]; // 'Integrator' flag for all channels 
     Bool_t        fIsBB[kNChannels][kNEvOfInt];  // 'Beam-Beam' flag for all channels
     Bool_t        fIsBG[kNChannels][kNEvOfInt];  // 'Beam-Gas' flag for all channels
-    Float_t       fTime[kNChannels];             // leading time for all channels - from HPTDC - in nanoseconds
-    Float_t       fWidth[kNChannels];            // pulse width for all channels - from HPTDC - in nanoseconds
+    Short_t       fTime[kNChannels];             // leading time for all channels - from HPTDC - in HPTDC units
+    Short_t       fWidth[kNChannels];            // pulse width for all channels - from HPTDC - in HPTDC units
 
     UShort_t      fTrigger;        // VZERO trigger inputs
     UShort_t      fTriggerMask;    // VZERO trigger inputs mask
index 5958687de38af195f4cf2cbb030f5c644d40b512..ece4c8552cdf9449da40f4999ca34300cccf7af6 100644 (file)
@@ -136,133 +136,74 @@ void AliVZEROReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   rawReader->Reset();
   AliVZERORawStream rawStream(rawReader);
   if (rawStream.Next()) { 
-     Float_t adc[64]; 
-     Float_t time[64], width[64];  
-     Bool_t BBFlag[64], BGFlag[64], integrator[64];
-     Short_t chargeADC[64][21];
-     for(Int_t i=0; i<64; i++) {
-       Int_t j   =  rawStream.GetOfflineChannel(i);
-       adc[j]    = 0.0;
-       time[j]   = 0.0;
-       width[j]  = 0.0;
-       BBFlag[j] = kFALSE;
-       BGFlag[j] = kFALSE;
-       integrator[j] = kFALSE;
-       // Search for the maximum charge in the train of 21 LHC clocks 
-       // regardless of the integrator which has been operated:
-       Float_t maxadc = 0;
-       Int_t imax = -1;
-       Float_t adcPedSub[21];
-       for(Int_t iClock=0; iClock<21; iClock++){
-        chargeADC[j][iClock] = (Short_t)rawStream.GetPedestal(i,iClock);
-        Bool_t iIntegrator = rawStream.GetIntegratorFlag(i,iClock);
-        Int_t k = j+64*iIntegrator;
-        adcPedSub[iClock] = rawStream.GetPedestal(i,iClock) - fCalibData->GetPedestal(k);
-        if(adcPedSub[iClock] <= GetRecoParam()->GetNSigmaPed()*fCalibData->GetSigma(k)) {
-          adcPedSub[iClock] = 0;
-          continue;
-        }
-        if(iClock < GetRecoParam()->GetStartClock() || iClock > GetRecoParam()->GetEndClock()) continue;
-        if(adcPedSub[iClock] > maxadc) {
-          maxadc = adcPedSub[iClock];
-          imax   = iClock;
-        }
-       }
-
-       AliDebug(2,Form("Channel %d (online), %d (offline)",i,j)); 
-        if (imax != -1) {
-          Int_t start = imax - GetRecoParam()->GetNPreClocks();
-          if (start < 0) start = 0;
-          Int_t end = imax + GetRecoParam()->GetNPostClocks();
-          if (end > 20) end = 20;
-          for(Int_t iClock = start; iClock <= end; iClock++) {
-            if (iClock >= imax) {
-              BBFlag[j] |= rawStream.GetBBFlag(i,iClock);
-              BGFlag[j] |= rawStream.GetBGFlag(i,iClock);
-            }
-            if (iClock == imax)
-              adc[j] += rawStream.GetPedestal(i,iClock);
-            else 
-              adc[j] += adcPedSub[iClock];
-
-            AliDebug(2,Form("clock = %d adc = %f",iClock,rawStream.GetPedestal(i,iClock))); 
-          }
-          // Convert i (FEE channel numbering) to j (aliroot channel numbering)
-
-          integrator[j] =  rawStream.GetIntegratorFlag(i,imax); 
-        }
-
-        Int_t board   = j / 8;
-        time[j]       =  rawStream.GetTime(i)/ (25./256.) * fCalibData->GetTimeResolution(board);
-        width[j]      =  rawStream.GetWidth(i) / 0.4 * fCalibData->GetWidthResolution(board);
-
-        // Filling the esd friend object
-        fESDVZEROfriend->SetBBScalers(j,rawStream.GetBBScalers(i));
-        fESDVZEROfriend->SetBGScalers(j,rawStream.GetBGScalers(i));
-        for (Int_t iBunch = 0; iBunch < AliESDVZEROfriend::kNBunches; iBunch++) {
-            fESDVZEROfriend->SetChargeMB(j,iBunch,rawStream.GetChargeMB(i,iBunch));
-            fESDVZEROfriend->SetIntMBFlag(j,iBunch,rawStream.GetIntMBFlag(i,iBunch));
-            fESDVZEROfriend->SetBBMBFlag(j,iBunch,rawStream.GetBBMBFlag(i,iBunch));
-            fESDVZEROfriend->SetBGMBFlag(j,iBunch,rawStream.GetBGMBFlag(i,iBunch));
-        }
-        for (Int_t iEv = 0; iEv < AliESDVZEROfriend::kNEvOfInt; iEv++) {
-            fESDVZEROfriend->SetPedestal(j,iEv,rawStream.GetPedestal(i,iEv));
-            fESDVZEROfriend->SetIntegratorFlag(j,iEv,rawStream.GetIntegratorFlag(i,iEv));
-            fESDVZEROfriend->SetBBFlag(j,iEv,rawStream.GetBBFlag(i,iEv));
-            fESDVZEROfriend->SetBGFlag(j,iEv,rawStream.GetBGFlag(i,iEv));
-        }
-        fESDVZEROfriend->SetTime(j,time[j]);
-        fESDVZEROfriend->SetWidth(j,width[j]);
-     }  
-
-     // Filling the esd friend object
-     fESDVZEROfriend->SetTriggerInputs(rawStream.GetTriggerInputs());
-     fESDVZEROfriend->SetTriggerInputsMask(rawStream.GetTriggerInputsMask());
-
-     for(Int_t iScaler = 0; iScaler < AliESDVZEROfriend::kNScalers; iScaler++)
-         fESDVZEROfriend->SetTriggerScalers(iScaler,rawStream.GetTriggerScalers(iScaler));
-
-     for(Int_t iBunch = 0; iBunch < AliESDVZEROfriend::kNBunches; iBunch++)
-         fESDVZEROfriend->SetBunchNumbersMB(iBunch,rawStream.GetBunchNumbersMB(iBunch));
+
+    Int_t aBBflagsV0A = 0;
+    Int_t aBBflagsV0C = 0;
+    Int_t aBGflagsV0A = 0;
+    Int_t aBGflagsV0C = 0;
+
+    for(Int_t iChannel=0; iChannel < 64; ++iChannel) {
+      Int_t offlineCh = rawStream.GetOfflineChannel(iChannel);
+      // ADC charge samples
+      Short_t chargeADC[AliVZEROdigit::kNClocks];
+      for(Int_t iClock=0; iClock < AliVZEROdigit::kNClocks; ++iClock) {
+       chargeADC[iClock] = rawStream.GetPedestal(iChannel,iClock);
+      }
+      // Integrator flag
+      Bool_t integrator = rawStream.GetIntegratorFlag(iChannel,AliVZEROdigit::kNClocks/2);
+      // Beam-beam and beam-gas flags
+      if(offlineCh<32) {
+       if (rawStream.GetBBFlag(iChannel,AliVZEROdigit::kNClocks/2)) aBBflagsV0C |= (1 << offlineCh);
+       if (rawStream.GetBGFlag(iChannel,AliVZEROdigit::kNClocks/2)) aBGflagsV0C |= (1 << offlineCh);
+      } else {
+       if (rawStream.GetBBFlag(iChannel,AliVZEROdigit::kNClocks/2)) aBBflagsV0A |= (1 << (offlineCh-32));
+       if (rawStream.GetBGFlag(iChannel,AliVZEROdigit::kNClocks/2)) aBGflagsV0A |= (1 << (offlineCh-32));
+      }
+      // HPTDC data (leading time and width)
+      Int_t board = AliVZEROCalibData::GetBoardNumber(offlineCh);
+      Float_t time = rawStream.GetTime(iChannel)*fCalibData->GetTimeResolution(board);
+      Float_t width = rawStream.GetWidth(iChannel)*fCalibData->GetWidthResolution(board);
+      // Add a digit
+      if(!fCalibData->IsChannelDead(iChannel)){
+         new ((*fDigitsArray)[fDigitsArray->GetEntriesFast()])
+           AliVZEROdigit(offlineCh, 0.0, time,
+                         width,integrator,
+                         chargeADC);
+      }
+
+      // Filling the part of esd friend object that is available only for raw data
+      fESDVZEROfriend->SetBBScalers(offlineCh,rawStream.GetBBScalers(iChannel));
+      fESDVZEROfriend->SetBGScalers(offlineCh,rawStream.GetBGScalers(iChannel));
+      for (Int_t iBunch = 0; iBunch < AliESDVZEROfriend::kNBunches; iBunch++) {
+       fESDVZEROfriend->SetChargeMB(offlineCh,iBunch,rawStream.GetChargeMB(iChannel,iBunch));
+       fESDVZEROfriend->SetIntMBFlag(offlineCh,iBunch,rawStream.GetIntMBFlag(iChannel,iBunch));
+       fESDVZEROfriend->SetBBMBFlag(offlineCh,iBunch,rawStream.GetBBMBFlag(iChannel,iBunch));
+       fESDVZEROfriend->SetBGMBFlag(offlineCh,iBunch,rawStream.GetBGMBFlag(iChannel,iBunch));
+      }
+
+    }  
+
+    // Filling the global part of esd friend object that is available only for raw data
+    fESDVZEROfriend->SetTriggerInputs(rawStream.GetTriggerInputs());
+    fESDVZEROfriend->SetTriggerInputsMask(rawStream.GetTriggerInputsMask());
+
+    for(Int_t iScaler = 0; iScaler < AliESDVZEROfriend::kNScalers; iScaler++)
+      fESDVZEROfriend->SetTriggerScalers(iScaler,rawStream.GetTriggerScalers(iScaler));
+
+    for(Int_t iBunch = 0; iBunch < AliESDVZEROfriend::kNBunches; iBunch++)
+      fESDVZEROfriend->SetBunchNumbersMB(iBunch,rawStream.GetBunchNumbersMB(iBunch));
      
+    // Store the BB and BG flags in the digits tree (user info)
+    digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsV0A",aBBflagsV0A));
+    digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsV0C",aBBflagsV0C));
+    digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsV0A",aBGflagsV0A));
+    digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsV0C",aBGflagsV0C));
 
-     Int_t aBBflagsV0A = 0;
-     Int_t aBBflagsV0C = 0;
-     Int_t aBGflagsV0A = 0;
-     Int_t aBGflagsV0C = 0;
-
-     // Channels(aliroot numbering) will be ordered in the tree
-     for(Int_t iChannel = 0; iChannel < 64; iChannel++) {
-       if(iChannel<32) {
-        if (BBFlag[iChannel]) aBBflagsV0C |= (1 << iChannel);
-        if (BGFlag[iChannel]) aBGflagsV0C |= (1 << iChannel);
-       } else {
-        if (BBFlag[iChannel]) aBBflagsV0A |= (1 << (iChannel-32));
-        if (BGFlag[iChannel]) aBGflagsV0A |= (1 << (iChannel-32));
-       }
-         if(fCalibData->IsChannelDead(iChannel)){
-           adc[iChannel]  = (Float_t) kInvalidADC; 
-           time[iChannel] = (Float_t) kInvalidTime;     
-         }
-        if (adc[iChannel] > 0)
-          new ((*fDigitsArray)[fDigitsArray->GetEntriesFast()])
-             AliVZEROdigit(iChannel, adc[iChannel], time[iChannel],
-                          width[iChannel],integrator[iChannel],
-                          chargeADC[iChannel]);
-        
-     }          
-
-     // Store the BB and BG flags in the digits tree (user info)
-     digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsV0A",aBBflagsV0A));
-     digitsTree->GetUserInfo()->Add(new TParameter<int>("BBflagsV0C",aBBflagsV0C));
-     digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsV0A",aBGflagsV0A));
-     digitsTree->GetUserInfo()->Add(new TParameter<int>("BGflagsV0C",aBGflagsV0C));
-
-     digitsTree->Fill();
+    digitsTree->Fill();
   }
 
   fDigitsArray->Clear();
-}
+}      
 
 //______________________________________________________________________
 void AliVZEROReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
@@ -323,6 +264,17 @@ void AliVZEROReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
   else
     AliWarning("V0C beam-gas flags not found in digits tree UserInfo! The flags will not be written to the raw-data stream!");
   
+  // Beam-beam and beam-gas flags (hardware)
+  for (Int_t iChannel = 0; iChannel < 64; ++iChannel) {
+    if(iChannel < 32) {
+      aBBflag[iChannel] = (aBBflagsV0C >> iChannel) & 0x1;
+      aBGflag[iChannel] = (aBGflagsV0C >> iChannel) & 0x1;
+    }
+    else {
+      aBBflag[iChannel] = (aBBflagsV0A >> (iChannel-32)) & 0x1;
+      aBGflag[iChannel] = (aBGflagsV0A >> (iChannel-32)) & 0x1;
+    }
+  }
 
   Int_t nEntries = (Int_t)digitsTree->GetEntries();
   for (Int_t e=0; e<nEntries; e++) {
@@ -332,24 +284,46 @@ void AliVZEROReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
     
     for (Int_t d=0; d<nDigits; d++) {    
         AliVZEROdigit* digit = (AliVZEROdigit*) fDigitsArray->At(d);      
-        Int_t  pmNumber      = digit->PMNumber(); 
-        // Pedestal retrieval and suppression: 
-       Bool_t   integrator  = digit->Integrator();
-       Int_t k = pmNumber+64*integrator;
-        Float_t  pedestal    = fCalibData->GetPedestal(k);
-        adc[pmNumber]   =  digit->ADC() - pedestal; 
-        time[pmNumber]  =  CorrectLeadingTime(pmNumber,digit->Time(),adc[pmNumber]);
-       width[pmNumber] =  digit->Width();
-       if(pmNumber < 32) {
-         aBBflag[pmNumber] = (aBBflagsV0C >> pmNumber) & 0x1;
-         aBGflag[pmNumber] = (aBGflagsV0C >> pmNumber) & 0x1;
+        Int_t  pmNumber = digit->PMNumber();
+
+        // Pedestal retrieval and suppression
+       Bool_t integrator = digit->Integrator();
+        Float_t maxadc = 0;
+        Int_t imax = -1;
+        Float_t adcPedSub[AliVZEROdigit::kNClocks];
+        for(Int_t iClock=0; iClock < AliVZEROdigit::kNClocks; ++iClock) {
+         Short_t charge = digit->ChargeADC(iClock);
+         Bool_t iIntegrator = (iClock%2 == 0) ? integrator : !integrator;
+         Int_t k = pmNumber + 64*iIntegrator;
+         adcPedSub[iClock] = (Float_t)charge - fCalibData->GetPedestal(k);
+         if(adcPedSub[iClock] <= GetRecoParam()->GetNSigmaPed()*fCalibData->GetSigma(k)) {
+           adcPedSub[iClock] = 0;
+           continue;
+         }
+         if(iClock < GetRecoParam()->GetStartClock() || iClock > GetRecoParam()->GetEndClock()) continue;
+         if(adcPedSub[iClock] > maxadc) {
+           maxadc = adcPedSub[iClock];
+           imax   = iClock;
+         }
        }
-       else {
-         aBBflag[pmNumber] = (aBBflagsV0A >> (pmNumber-32)) & 0x1;
-         aBGflag[pmNumber] = (aBGflagsV0A >> (pmNumber-32)) & 0x1;
+
+       if (imax != -1) {
+         Int_t start = imax - GetRecoParam()->GetNPreClocks();
+         if (start < 0) start = 0;
+         Int_t end = imax + GetRecoParam()->GetNPostClocks();
+         if (end > 20) end = 20;
+         for(Int_t iClock = start; iClock <= end; iClock++) {
+           adc[pmNumber] += adcPedSub[iClock];
+         }
        }
 
-       if (adc[pmNumber] > 0) AliDebug(1,Form("PM = %d ADC = %f TDC %f    Int %d (%d %d %d %d %d)    %f %f   %f %f    %d %d",pmNumber, adc[pmNumber],digit->Time(),
+       // HPTDC leading time and width
+       // Correction for slewing and various time delays
+        time[pmNumber]  =  CorrectLeadingTime(pmNumber,digit->Time(),adc[pmNumber]);
+       width[pmNumber] =  digit->Width();
+
+       if (adc[pmNumber] > 0) AliDebug(1,Form("PM = %d ADC = %f TDC %f (%f)   Int %d (%d %d %d %d %d)    %f %f   %f %f    %d %d",pmNumber, adc[pmNumber],
+                                              digit->Time(),time[pmNumber],
                                               integrator,
                                               digit->ChargeADC(8),digit->ChargeADC(9),digit->ChargeADC(10),
                                               digit->ChargeADC(11),digit->ChargeADC(12),
@@ -357,9 +331,18 @@ void AliVZEROReconstructor::FillESD(TTree* digitsTree, TTree* /*clustersTree*/,
                                               fCalibData->GetPedestal(pmNumber+64),fCalibData->GetSigma(pmNumber+64),
                                               aBBflag[pmNumber],aBGflag[pmNumber]));
 
-       if(adc[pmNumber] > (fCalibData->GetPedestal(k) + GetRecoParam()->GetNSigmaPed()*fCalibData->GetSigma(k))) {
-           mult[pmNumber] += adc[pmNumber]*fCalibData->GetMIPperADC(pmNumber);
-        }          
+       mult[pmNumber] = adc[pmNumber]*fCalibData->GetMIPperADC(pmNumber);
+
+       // Fill ESD friend object
+       for (Int_t iEv = 0; iEv < AliESDVZEROfriend::kNEvOfInt; iEv++) {
+         fESDVZEROfriend->SetPedestal(pmNumber,iEv,(Float_t)digit->ChargeADC(iEv));
+         fESDVZEROfriend->SetIntegratorFlag(pmNumber,iEv,(iEv%2 == 0) ? integrator : !integrator);
+         fESDVZEROfriend->SetBBFlag(pmNumber,iEv,aBBflag[pmNumber]);
+         fESDVZEROfriend->SetBGFlag(pmNumber,iEv,aBGflag[pmNumber]);
+       }
+       fESDVZEROfriend->SetTime(pmNumber,digit->Time());
+       fESDVZEROfriend->SetWidth(pmNumber,digit->Width());
+
     } // end of loop over digits
   } // end of loop over events in digits tree