Re: Another change prop. - BrVertexFilter

From: Bjorn H Samset (bjornhs@rcf2.rhic.bnl.gov)
Date: Thu Dec 13 2001 - 04:20:01 EST

  • Next message: Truls Martin Larsen: "Re: Another change prop. - BrVertexFilter"

    On Wed, 12 Dec 2001, Christian Holm Christensen wrote:
    
    > > More importantly, I'd like to change the order in which it checks the BB
    > > vertices - it currently looks for BbRdo first and then for BrBbVertex.  I
    > > guess the other way around would be more sensible since BrBbVertex is more
    > > precise.
    >
    > That;'s easily done - just add more BrVertexFilter's.  That is, do
    >
    >   //__________________________________________________________________
    >   // Module: BrVertexFilter
    >   BrVertexFilter* vertexFilter =
    >     new BrVertexFilter("bbfilter", "BB vertex filter");
    >   vertexFilter->SetMaxZdcMaxVertexZ(50)
    >   vertexFilter->SetMaxBbMaxVertexZ(0)
    >   mainModule->AddModule(vertexFilter);
    >
    >
    >   //__________________________________________________________________
    >   // Module: BrVertexFilter
    >   BrVertexFilter* vertexFilter =
    >     new BrVertexFilter("bbfilter", "BB vertex filter");
    >   vertexFilter->SetMaxZdcMaxVertexZ(0)
    >   vertexFilter->SetMaxBbMaxVertexZ(50)
    >   mainModule->AddModule(vertexFilter);
    >
    > and so on.  Also check out BrColsionFilter.  If any specific vertex is
    > set to 0 (zero) then, that vertex isn't checked.  As you see, there's
    > no reason to change the module/filter - all you need is to read the
    > doc and/ro the code (if the doc is missing, please complain, and the
    > appropiate person - in this case me - should fix it).
    
    Eh, did you read the above? ;-) My problem is with the different vertex
    measurements from the BB, not different detectors. The current code is the
    following:
    
      TString tableName("");
      tableName += BrDetectorList::GetDetectorName(kBrBB);
      BrBbRdo* rdoBb = (BrBbRdo*)node->GetObject(tableName.Data());
      if (rdoBb)
        fCurrentBbVertexZ = rdoBb->GetZ0();
      else {
        BrBbVertex* vtxBb = (BrBbVertex*)node->GetObject("BB Vertex");
        if (!vtxBb){
          if (Verbose() > kShowStop + 5)
            Warning("CheckBbVertex",
                    "could not find Beam-Beam table '%s' in input event",
                    "BbRdo");
          return kFALSE;
        }
        fCurrentBbVertexZ = vtxBb->GetZ0();
      }
    
    I.e. _first_ check for a BbRdo. If this is found then use it. If not, then
    look for a BrBbVertex. If my InNode for some reason contains both (as was
    the case yesterday...) then the VertexFilter automagically decides for me
    which one to use. I guess another option is to have separate tests for Rdo
    and brVertex objects, and yet another is to fiddle around with
    switchModules and appendContainers until I get what I want, but for now I
    think the easiest is to just make it look for the most precise measurement
    first:
    
      TString tableName("");
      tableName += BrDetectorList::GetDetectorName(kBrBB);
      BrBbVertex* vtxBb = (BrBbVertex*)node->GetObject("BB Vertex");
      if (vtxBb)
        fCurrentBbVertexZ = vtxBb->GetZ0();
      else {
        BrBbRdo* rdoBb = (BrBbRdo*)node->GetObject(tableName.Data());
        if (!rdoBb) {
          if (kDemandBbVertex) Stop("CheckBbVertex",
                                    "could not find any Beam-Beam data in
                                     input event");
          if (Verbose() > kShowStop + 5)
            Warning("CheckBbVertex",
                    "could not find Beam-Beam table '%s' in input event",
                    "BbRdo");
          return kFALSE;
        }
        fCurrentBbVertexZ = rdoBb->GetZ0();
      }
    
    Also note the implementation of a kDemandBbVertex, by default set to
    fFALSE, that stops the pipeline if there is no BrBbVertex or BbRdo
    present.
    
    > > Plus some minor cleanup...
    >
    > What are those  'minor cleanup's?  Please be more precise.
    
    Actually nothing - I saw some erraneous documentation in a prevoius
    version of the code, but I see that you have corrected that already.
    
    (When is a programmer not precise? When he hasn't yet made the changes to
    his own code ;-)
    
    Ping :-)
    
    --
    Bjorn H. Samset                           Phone: 22856465/92051998
    PhD student, heavy ion physics            Adr:   Schouterrassen 6
    Inst. of Physics, University of Oslo             0573 Oslo
                                  \|/
    ----------------------------> -*- <-----------------------------
                                  /|\
    



    This archive was generated by hypermail 2b30 : Thu Dec 13 2001 - 04:20:53 EST