BrSiDig ADC channel mapping (was RE: Some numbers from Norway)

From: Christian Holm Christensen (cholm@hehi03.nbi.dk)
Date: Thu Jun 28 2001 - 11:27:42 EDT

  • Next message: Christian Holm Christensen: "Changes to BRAT 2.0.0"

    Hi Trine et al, 
    
    I didn't see your mail until I had sent the previous one, so I may
    repeat myself a couple of times, sorry about that. 
    
    On Thu, 28 Jun 2001 14:42:11 +0200 (MET DST)
    trine@lynx.uio.no (Trine Tveter) wrote
    concerning ": RE: Some numbers from Norway":
    > Hi Steve et al,
    > 
    > In the program I think Bjørn used to generate the .root files, the DigTiles
    > and SiDig objects were created the following way:
    > 
    >        BrDigTiles* tileobject=0;
    >        BrDigTiles* tileinput = (BrDigTiles*) InputEvent->GetObject("DigTiles");
    >          if(tileinput){
    >          tileobject  = new BrDigTiles(*tileinput);
    >          RawNode->AddObject(tileobject);
    >        } // tile
    > 
    >        BrSiDig* siObject=0;
    >        BrSiDig* siinput = (BrSiDig*) InputEvent->GetObject("DigSi");
    >        if(siinput){
    >           siObject  = new BrSiDig(*siinput);
    >           RawNode->AddObject(siObject);
    >         } // si
    > 
    > which looks a bit dangerous - I leave it up to the C++ experts to
    > speculate on the possible consequences.  
    
    It really depends on the internal members of the class you copy wether
    the bitwise copy CTOR does the right thing.  
    
    AFAIK,  C++ allocates room for a new object (with no allocation to
    internal pointer members), and then copies _bitwise_ the data from the
    old object to the newly allocated memory.  Please check the ISO/ANSI
    standard for a complete description of the default copy CTOR. 
    
    It'd probably be better to define the operator = for BrSiDig: 
    
      const BrSiDig& BrSiDig::operator=(const BrSiDig& other) 
      {  
        if (&other == this)
          return *this;
    
        SetName(other.GetName());
        SetTitle(other.GetTitle());
        fNumSiChan = other.GetNumberOfChannels();
        for (Int_t i = 0; i < fNumSiChan; i++) { 
          fAdc[i] = other.GetAdc(i);
    
        return *this;
      }
    
    which can be used as: 
    
      BrSiDig* siinput = (BrSiDig*) InputEvent->GetObject("DigSi");
      if(siinput){
        BrSiDig* siObject = new BrSiDig;
        *siObject = *siinput;
        RawNode->AddObject(siObject);
      } // si
    
    Optionally the copy CTOR: 
    
      BrSiDig::BrSiDig(const BrSiDig& other) 
      {
        SetName(other.GetName());
        SetTitle(other.GetTitle());
        fNumSiChan = other.GetNumberOfChannels();
        for (Int_t i = 0; i < fNumSiChan; i++) { 
          fAdc[i] = other.GetAdc(i);
      }
    
    can be used as: 
    
      BrSiDig* siinput = (BrSiDig*) InputEvent->GetObject("DigSi");
      if(siinput)
        RawNode->AddObject(new BrSiDig(*siinput));
    
    > > If so, it is likely that a similar problem
    > > will exist with the tile data.  
    > 
    > I see an index shift of 2 in the Si data, but strangely, no such
    > effect in the Tile data.  
    
    As I wrote previously, I see absolutely no problem in both BrTileDig
    and BrSiDig (apart from the initialisation, which I've fixed in
    current BRAT). 
    
    > Here follows a sample series of Tile ADC values (from an event with
    > suggested "total centrality" 1.83356), 
    > printed with the statement 
    > 
    >   for (Int_t iti=1; iti<49; iti++){
    >      cout << iti << " ID: " << TileTable->GetId(iti) << " ADC: " 
    >           << TileTable->GetAdc(iti) << endl;
    >   }
    > 
    > and the result is:
    > 
    > 1 ID: 0 ADC: 19656
    > 2 ID: 0 ADC: 12928
    > 3 ID: 0 ADC: 14776
    > 4 ID: 0 ADC: 20712
    > 5 ID: 0 ADC: 23600
    > 6 ID: 0 ADC: 24952
    > 7 ID: 0 ADC: 22304
    > 8 ID: 0 ADC: 20416
    > 9 ID: 0 ADC: 14224
    > 10 ID: 0 ADC: 18920
    > 11 ID: 0 ADC: 32760
    > 12 ID: 0 ADC: 19728
    > 13 ID: 0 ADC: 19336
    > 14 ID: 0 ADC: 23768
    > 15 ID: 0 ADC: 15864
    > 16 ID: 0 ADC: 12752
    > 17 ID: 0 ADC: 20376
    > 18 ID: 0 ADC: 20616
    > 19 ID: 0 ADC: 18664
    > 20 ID: 0 ADC: 15848
    > 21 ID: 0 ADC: 10376
    > 22 ID: 0 ADC: 15864
    > 23 ID: 0 ADC: 291
    > 24 ID: 0 ADC: 300
    > 25 ID: 0 ADC: 20184
    > 26 ID: 0 ADC: 18792
    > 27 ID: 0 ADC: 19856
    > 28 ID: 0 ADC: 17392
    > 29 ID: 0 ADC: 32416
    > 30 ID: 0 ADC: 19664
    > 31 ID: 0 ADC: 23432
    > 32 ID: 0 ADC: 7688
    > 33 ID: 0 ADC: 25760
    > 34 ID: 0 ADC: 18008
    > 35 ID: 0 ADC: 14848
    > 36 ID: 0 ADC: 28184
    > 37 ID: 0 ADC: 21080
    > 38 ID: 0 ADC: 14056
    > 39 ID: 0 ADC: 28000
    > 40 ID: 0 ADC: 23976
    > 41 ID: 0 ADC: 259
    > 42 ID: 0 ADC: 296
    > 43 ID: 0 ADC: 0
    > 44 ID: 0 ADC: 0
    > 45 ID: 0 ADC: 0
    > 46 ID: 0 ADC: 0
    > 47 ID: 0 ADC: 0
    > 48 ID: 0 ADC: 0
    > 
    > (does this look healthy to an expert?)
    
    Well, almost.  The reason why channel 43 -> 48 is zero, is simple
    because there's no such tiles in the IR at the moment, but there's in 
    principle room for them.  Channel 23 and 24 (channel 22 and 23 in
    BrTileCalibration lingo) should be ignored, since they are not
    instrumented either (at least since some date I can't remember when -
    Steve and Hiro knows). 
    
    > > As far as I can tell, the Dig classes basically do the same thing
    > > as before and the change in indexing that I referred to in my
    > > message has more to do with the local organization. The strange
    > > results for locations 225 to 289 looks like an initialization (or
    > > lack thereof) error.   
    > 
    > I have tried to check correlations between Tile and Si mult
    > etc. after my "educated guess" remapping (assuming only an index
    > shift for Si, and that the entries are in the correct sequence), and
    > the results look reasonable to a non-expert's eye.  Are there any
    > plots I could make that would reveal remaining errors?  I attach a
    > plot that shows the total multiplicity distribution, with
    > centrality classes according to the MultCentModule, the
    > SiCentModule and the TileCentModule (for the first 10000 events of
    > Bjørn's 90 deg. root file made in April.)   
    >
    > > This is our main holdup in producing a final draft for the
    > > multiplicity paper so we are obviously very anxious to have this
    > > resolved quickly. 
    > 
    > I doubt if I will have time to produce any final numbers before the
    > weekend now - unfortunately I have to skip town myself due to
    > important family duties  from tomorrow morning to late Monday
    > evening (my sister's youngest daughter is to be baptized ....) but
    > at least I could start "boiling the trees" as soon as we have agreed
    > on the remapping. 
    
    My feeling is, that you are using some BRAT version or similar where
    there's an error.  Please compare the BRAT code you're using to the
    current code.  What version of BRAT is it  you're using?  What version
    of ROOT? 
    
    Yours, 
    
    Christian  -----------------------------------------------------------
    Holm Christensen                             Phone:  (+45) 35 35 96 91 
      Sankt Hansgade 23, 1. th.                  Office: (+45) 353  25 305 
      DK-2200 Copenhagen N                       Web:    www.nbi.dk/~cholm    
      Denmark                                    Email:       cholm@nbi.dk
    



    This archive was generated by hypermail 2b30 : Thu Jun 28 2001 - 11:28:58 EDT