Changeset 615 for trunk


Ignore:
Timestamp:
02/22/01 19:52:30 (24 years ago)
Author:
magicsol
Message:
A boolean Map of the fired pixels when trigger happens has been introduced.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcTrig.hxx

    r584 r615  
    99
    1010#include <iostream.h>
    11 #include "TObject.h"
     11#include "MParContainer.h"
    1212
    1313#include "MTriggerDefine.h"
    1414
    15 class MMcTrig : public TObject {
     15class MMcTrig : public MParContainer {
    1616 private:
    1717
    18   Short_t nFirstLevel  ;    // Number of First Level Trigger in this Event
    19   Short_t nSecondLevel ;    // Number of Second Level Trigger in this Event
     18  Short_t fNumFirstLevel  ;    // Number of First Level Trigger in this Event
     19  Short_t fNumSecondLevel ;    // Number of Second Level Trigger in this Event
    2020
    21   Float_t timeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
     21  Float_t fTimeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
    2222                            // Time when it triggers
    23   Int_t pixelFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
    24                             // Pixel which triggers
    25   Short_t FirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
     23  Byte_t fPixelsFirst[((Int_t)(TRIGGER_PIXELS/8))+1][((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
     24                            // Pixel which are above threshold when trigger happens
     25  Short_t fFirstToSecond[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME))+1];
    2626
    2727 public:
     
    3535
    3636  void SetFirstLevel  ( Short_t nTr ) {
    37     nFirstLevel = nTr ;
     37    fNumFirstLevel = nTr ;
    3838  }
    3939  void SetSecondLevel ( Short_t nTr ) {
    40     nSecondLevel = nTr ;
     40    fNumSecondLevel = nTr ;
    4141  }
    4242
    4343  void SetTime( Float_t t, Int_t i){
    4444    if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1  || i<1){
    45       cout<<"nFirstLevel out of range. Time will be -99"<<endl;
     45      cout<<"fNumFirstLevel out of range. Time will be -99"<<endl;
    4646    }
    4747    else{
    48       timeFirst[i-1]=t;
     48      fTimeFirst[i-1]=t;
    4949    }
    5050  }
    5151
    52   void SetPixel( Int_t iPix, Int_t i){
    53     if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1  || i<1){
    54       cout<<"nFirstLevel out of range. Pixel will be -1"<<endl;
     52  void SetMapPixels(Byte_t *map,Int_t nfirst){
     53    // 
     54    //  It sets the map of pixel that are above the trheshold
     55    //
     56
     57    int i;
     58
     59    for(i=0;i<((Int_t)(TRIGGER_PIXELS/8))+1;i++){
     60      fPixelsFirst[i][nfirst]=map[i];
    5561    }
    56     else{
    57       pixelFirst[i-1]=iPix;
    58     }
     62    cout<<endl;
    5963  }
    6064
    6165  Int_t GetFirstLevel() {
    62     return ( nFirstLevel ); 
     66    return ( fNumFirstLevel ); 
    6367  }
     68
     69  Byte_t IsPixelFired(Int_t npix, Int_t nfirstlevel);
    6470
    6571  ClassDef(MMcTrig, 1)  //Stores Montecarlo Information
Note: See TracChangeset for help on using the changeset viewer.