Ignore:
Timestamp:
09/22/00 18:40:18 (24 years ago)
Author:
harald
Message:
Added a lot of changes done by oscar.
Location:
trunk/MagicSoft/include-Classes
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/include-Classes/LinkDef.h

    r374 r436  
    1010#pragma link C++ class MMcEvt;
    1111#pragma link C++ class MMcTrig;
     12#pragma link C++ class MHeaderTrig;
    1213
    1314#pragma link C++ class MPedData;
  • trunk/MagicSoft/include-Classes/MMcTrig.cxx

    r394 r436  
    2323  Int_t i;
    2424
    25   topology     = -1 ;
    26   multiplicity = -1 ;
    27   for(i=0;i<TRIGGER_PIXELS;i++){
    28     threshold[i] = -1.0;
     25  nFirstLevel  = 0 ;
     26
     27  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
     28    timeFirst[i]    = -99.9;
     29    pixelFirst[i]   = -9;
    2930  }
    3031
    31   nFirstLevel  = 0 ;
    32   timeFirst    = -99.9;
    33   pixelFirst   = -9;
    34    
    3532  nSecondLevel = 0 ;
    36 
     33  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
     34    FirstToSecond[i]=0;
     35  }
    3736}
    3837
     
    5049
    5150  nFirstLevel  = 0 ;
    52   timeFirst    = -99.9;
    53   pixelFirst   = -9;
     51  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1;i++){
     52    timeFirst[i]    = -99.9;
     53    pixelFirst[i]   = -9;
     54  }
    5455
    55   nSecondLevel = 0 ;
     56  nSecondLevel = 0 ;
     57  for(i=0;i<TOTAL_TRIGGER_TIME/LEVEL2_DEAD_TIME+1;i++){
     58    FirstToSecond[i]=0;
     59  }
    5660
    5761  //  cout << "MMcTrig::Clear() " << endl ;
     
    6569
    6670  cout <<endl << "Monte Carlo Trigger output:" <<endl;
    67   cout << " Topology Trigger in this event : "<<topology<<endl;
    68   cout << " Multiplicity Trigger in this event : "<<multiplicity<<endl;
    6971  cout << " First  Level Trigger in this Event : "<<nFirstLevel<<endl;
    70   cout << " Time of first  Level Trigger in this Event : "<< timeFirst<<endl;
    71   cout << " Pixels of first  Level Trigger in this Event : "<<pixelFirst<<endl;
     72  cout << " Times of first  Level Trigger in this Event : ";
     73  for (i=0;i<nFirstLevel;i++){
     74    cout<< timeFirst[i]<<"-";
     75  }
     76  cout<<endl;
     77  cout << " Pixels of first  Level Trigger in this Event : ";
     78  for (i=0;i<nFirstLevel;i++){
     79    cout<<pixelFirst[i]<<"-";
     80  }
     81  cout<<endl;
    7282  cout << " Second Level Trigger in this Event : " << nSecondLevel << endl ;
    7383  cout << endl ;
  • trunk/MagicSoft/include-Classes/MMcTrig.hxx

    r420 r436  
    1515class MMcTrig : public TObject {
    1616 private:
    17   Short_t topology     ;    // Topology of the trigger
    18                                    // 0 = N-1 neighbours of one pixel
    19                                    // 1 = N neighbours
    20                                    // 2 = N closed pack
    21   Short_t multiplicity ;    // Pixel multiplicity of trigger configuration
    22   Float_t threshold[TRIGGER_PIXELS] ; // Threshold for trigger
    23  
    24   Short_t nZeroLevel   ;
     17
    2518  Short_t nFirstLevel  ;    // Number of First Level Trigger in this Event
    2619  Short_t nSecondLevel ;    // Number of Second Level Trigger in this Event
    2720
    28   Float_t timeFirst;    // Time when it triggers
    29   Int_t pixelFirst;     // Pixel which triggers
     21  Float_t timeFirst[((Int_t)(TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME))+1];
     22                            // 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];
    3026
    3127 public:
     
    3834  void Print(Option_t *);
    3935
    40   void SetTopology(Short_t nTop) {
    41     topology=nTop;
    42   }
    43 
    44   void SetMultiplicity(Short_t nMul) {
    45     multiplicity=nMul;
    46   }
    47 
    48   void SetThreshold(Float_t fthr[]){
    49     int i;
    50     for(i=0;i<TRIGGER_PIXELS;i++){
    51       threshold[i]=fthr[i];
    52     }
    53   }
    54 
    55   void SetZeroLevel (Short_t nTr) {
    56     nZeroLevel = nTr ;
    57   }
    58 
    5936  void SetFirstLevel  ( Short_t nTr ) {
    6037    nFirstLevel = nTr ;
     
    6441  }
    6542
    66   void SetTime( Float_t t){
    67     timeFirst=t;
     43  void SetTime( Float_t t, Int_t i){
     44    if (i>TOTAL_TRIGGER_TIME/LEVEL1_DEAD_TIME+1  || i<1){
     45      cout<<"nFirstLevel out of range. Time will be -99"<<endl;
     46    }
     47    else{
     48      timeFirst[i-1]=t;
     49    }
    6850  }
    6951
    70   void SetPixel( Int_t iPix){
    71     pixelFirst=iPix;
     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;
     55    }
     56    else{
     57      pixelFirst[i-1]=iPix;
     58    }
    7259  }
    7360
    74   int GetFirstLevel() {
     61  Int_t GetFirstLevel() {
    7562    return ( nFirstLevel ); 
    7663  }
     
    8168
    8269#endif
    83 
Note: See TracChangeset for help on using the changeset viewer.