Ignore:
Timestamp:
03/20/00 18:35:11 (25 years ago)
Author:
blanch
Message:
The trigger is already implemented but it does not save the trigger information in any file as it is implemented in timecam. In the next days there will be a version which also creates the files with the trigger information. It is going to be a mixing of the current camera and timecam programs.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Simulation/Detector/Camera/camera.cxx

    r365 r379  
    2121//
    2222// $RCSfile: camera.cxx,v $
    23 // $Revision: 1.5 $
    24 // $Author: petry $
    25 // $Date: 2000-02-18 17:40:35 $
     23// $Revision: 1.6 $
     24// $Author: blanch $
     25// $Date: 2000-03-20 18:35:11 $
    2626//
    2727////////////////////////////////////////////////////////////////////////
     
    5252#include "TTree.h"
    5353#include "TBranch.h"
     54#include "TCanvas.h"
    5455
    5556#include "MDiag.h"
     
    5758#include "MRawEvt.h"
    5859#include "MMcEvt.h"
     60#include "MMcTrig.hxx"
     61
     62#include "MTrigger.hxx"
    5963
    6064/*!@"
     
    417421  int itrigger;               //@< index of pixel fired
    418422  int ntrigger = 0;           //@< number of triggers in the whole file
     423  //  MTrigger  Trigger ;         //@< A instance of the Class MTrigger
     424
     425  //    MMcTrig *McTrig   = new MMcTrig() ;
    419426
    420427  float plateScale_cm2deg;    //@< plate scale (deg/cm)
     
    780787    baseline_mv[i] = 0.;
    781788  }
    782        
     789
     790  //  Instance of the Trigger class
     791
     792  MTrigger  Trigger ;         //@< A instance of the Class MTrigger
     793       
    783794  //!@' @#### Main loop.
    784795  //@'
     
    982993//        cout << i << " " << baseline_mv[i] <<"\n";
    983994//      }
    984  
    985 
    986         cout << "Total number of phes: " << inumphe << "\n";
    987 
     995
     996          cout << "Total number of phes: " << inumphe <<endl;
     997         
    988998        // TRIGGER HERE
    989999
    990         trigger = FALSE;
    991 
    992         if( TRUE ) trigger = TRUE; // put your trigger function here
     1000        //   
     1001        //   remove the prvious values of the analog signal for
     1002        //   each pixel and put the new ones from photoe array
     1003        //
     1004        Trigger.Reset();
     1005       
     1006        for(i=0;i<inumphe;i++){
     1007          Trigger.FillShow(photoe[i].ipixnum,float((photoe[i].iarrtime_ns-arrtmin_ns+TOTAL_TRIGGER_TIME/10.0)));
     1008        }
     1009
     1010        //
     1011        //   now the noise of the electronic
     1012        //   (preamps, optical transmission,..)  is introduced.
     1013        //   This is done inside the class MTrigger by the method ElecNoise.
     1014        //   
     1015        Trigger.ElecNoise() ;
     1016       
     1017        //
     1018        //   look if in all the signals in the trigger signal branch
     1019        //   is a possible Trigger. Therefore we habe to diskriminate all
     1020        //   the simulated analog signals (Method Diskriminate in class
     1021        //   MTrigger). We look simultanously for the moments at which
     1022        //   there are more than TRIGGER_MULTI pixels above the
     1023        //   CHANNEL_THRESHOLD.
     1024        //
     1025
     1026        Trigger.Diskriminate();
     1027
     1028        //McTrig->SetZeroLevel(trigger = (Short_t) Trigger.ZeroLevel()) ;
     1029        trigger = (Short_t) Trigger.ZeroLevel();
     1030       
     1031        //
     1032        //   Start the First Level Trigger simulation
     1033        //
     1034        if ( trigger > 0 ) {
     1035          //      McTrig->SetFirstLevel ( trigger = Trigger.FirstLevel() )  ;
     1036          trigger = Trigger.FirstLevel();
     1037        }
     1038        if ( trigger>0 ) {
     1039          cout << "TRIG"<<"  "<<thetashw <<"  "<< trigger  << endl;
     1040        }
    9931041
    9941042//      for( i=0; i<inumphe; i++){
     
    9961044//      }
    9971045       
    998         if ( trigger == TRUE ) {
     1046        if ( trigger>0 ) {
    9991047         
    10001048          itrigger = i;
     
    27792827//
    27802828// $Log: not supported by cvs2svn $
     2829// Revision 1.5  2000/02/18 17:40:35  petry
     2830// This version includes drastic changes compared to camera.cxx 1.4.
     2831// It is not yet finished and not immediately useful because the
     2832// trigger simulation is not yet re-implemented. I had to take it
     2833// out together with some other stuff in order to tidy the whole
     2834// program up. This is not meant as an insult to anyone. I needed
     2835// to do this in order to be able to work on it.
     2836//
     2837// This version has been put in the repository in order to be
     2838// able to share the further development with others.
     2839//
     2840// If you need something working, wait or take an earlier one.
     2841// See file README.
     2842//
    27812843// Revision 1.4  2000/01/25 08:36:23  petry
    27822844// The pixelization in previous versions was buggy.
Note: See TracChangeset for help on using the changeset viewer.