Ejemplo n.º 1
0
void CRealMediaWindowlessSite::InternalRecomputeRegion()
{
	ComputeRegion();

	POSITION pos = m_pChildren.GetHeadPosition();
	while(pos)
	{
		CRealMediaWindowlessSite* pSite = (CRealMediaWindowlessSite*)(IRMASite*)m_pChildren.GetNext(pos);
		if(pSite) pSite->InternalRecomputeRegion();
	}
}
Ejemplo n.º 2
0
//_________________________________________________________________
Bool_t SelectPPCoincMapRegions::Process(Long64_t entry)
{
    if (entry % (nentries/1000)== 0)
    {
        std::cout << std::setiosflags( std::ios::fixed );
        std::cout.precision(1);
        std::cout << "\r"
  		<< std::setw(8) << std::right <<(100.0*entry)/nentries 
  		<< "% completed";
        std::cout.flush();
        std::cout << std::resetiosflags( std::ios::fixed );
    }
    else if (entry == (nentries - 1 ))
    {
        std::cout << std::setiosflags( std::ios::fixed );
        std::cout.precision(1);
        std::cout << "\r" << std::setw(8) << std::right << 100 << "% completed  ";
        std::cout.flush();
        std::cout << std::resetiosflags( std::ios::fixed );
    }

    b_evnum->GetEntry(entry);
    b_run->GetEntry(entry);
    b_trigger->GetEntry(entry);

    bpmval = 0;
    tdcval = 0;
    Double_t adc_val, tdc_val;
    Float_t tofval;
    std::fill(region_multiplicity.begin(), region_multiplicity.end(),0);
    std::fill(mult_mismatch.begin(), mult_mismatch.end(),0);

    UInt_t region = 0;
    for (incr=fChLow;incr<=fChHigh;incr++)
    {
        for (UInt_t j=0; j<fNRegions+2; j++)
        {
            data_in_region_of_strip[j][incr] = false;
        }

        b_adc[incr]->GetEntry(entry);
        adc_val = nt_adc[incr];


        b_tdc[incr]->GetEntry(entry);
        tdc_val = nt_tdc[incr];

        // TOF corresponds to appropriate BPM channel
        tofval = nt_tdc[32*(incr/32+1)-1]-tdc_val;

        if (adc_val>fPedThresh[incr])
        {
            region = ComputeRegion(incr, adc_val);
            data_in_region_of_strip[region][incr] = true;
            region_multiplicity[region]++;
        }
    }

    // count nonzero regions
    Int_t nregions = std::count_if(region_multiplicity.begin(),
                                   region_multiplicity.end(),
                                   std::bind2nd(std::greater<UInt_t>(),0));

    // sum the multiplicities of each region
    Int_t mult = std::accumulate(region_multiplicity.begin(),
                                 region_multiplicity.end(),
                                 0,
                                 std::plus<UInt_t>());


//    std::cout << "Generating mask " << std::endl; std::cout.flush();
    std::string mask = GenerateMask(region_multiplicity);
//    std::cout << "consolidating mask " << mask << std::endl; std::cout.flush();
//    mask = MultiplicityGroupGenerator::ConsolidateCombo(mask, fNRegions+2);

    if (mult>0 && mult<=fMaxMult)
    {
//        std::cout << "filling mult=" << mult << "\tmask=" << mask << std::endl;  std::cout.flush();
        regional_coinc[mult]->Fill(mask.data(),1.0);
    }

    return kTRUE;
}