Changeset 15119


Ignore:
Timestamp:
03/19/13 09:24:39 (12 years ago)
Author:
Jens Buss
Message:
add GetEdgePositions and GetMaxPositions to functions
Location:
fact/tools/rootmacros
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fact/tools/rootmacros/zerosearch.C

    r14815 r15119  
    441441    for (reg = regions.begin() ; reg < regions.end() ; reg++){
    442442        counter = 0;
    443         // check if linear falling edge is completely in pipeline
     443        // check if linear rising edge is completely in pipeline
    444444        // if not --> delete
    445445        if ( reg->maxPos - end < 0 )
     
    567567    return regions.size();
    568568}
     569
     570size_t GetMaxPositions(
     571    vector<Region>  &regions,
     572    vector<int>     &maxPositions,
     573    int VerbosityLevel)
     574{
     575    maxPositions.clear();
     576    vector<Region>::iterator it = regions.begin();
     577    while( it != regions.end() )
     578    {
     579        maxPositions.push_back(it->maxPos);
     580        if (VerbosityLevel > 3){
     581            cout << "getting maxPos@ " << it->maxPos << "\t";
     582            cout << endl;
     583        }
     584        ++it;
     585    }
     586
     587    return regions.size();
     588}
     589
     590size_t GetEdgePositions(
     591    vector<Region>  &regions,
     592    vector<int>     &edgePos,
     593    int VerbosityLevel)
     594{
     595    maxPositions.clear();
     596    vector<Region>::iterator it = regions.begin();
     597    while( it != regions.end() )
     598    {
     599        maxPositions.push_back(it->halfRisingEdgePos);
     600        if (VerbosityLevel > 3){
     601            cout << "getting maxPos@ " << it->halfRisingEdgePos << "\t";
     602            cout << endl;
     603        }
     604        ++it;
     605    }
     606
     607    return regions.size();
     608}
  • fact/tools/rootmacros/zerosearch.h

    r14806 r15119  
    7373    int VerbosityLevel = 1);
    7474
     75// Get the derived arrival times in terms of the position of selected pulses
     76// position of the peak
     77size_t GetMaxPositions(
     78    vector<Region>  &regions,
     79    vector<int>     &maxPositions,
     80    int VerbosityLevel);
     81
     82// Get the derived arrival times in terms of the position of selected pulses
     83// rising edges
     84size_t GetEdgePositions(
     85    vector<Region>  &regions,
     86    vector<int>     &edgePos,
     87    int VerbosityLevel);
     88
    7589
    7690#endif
Note: See TracChangeset for help on using the changeset viewer.