#ifndef EXPERIMENT_SPECIFIC_HH #define EXPERIMENT_SPECIFIC_HH #define TRACK_EXP -1 // <--- make sure here is your experiment number!!!! // e.g. 393 for s393 #ifdef EXTEND_EVENT_DATA #include bool Event_data::init_cuts() { // load your graphical cuts here if needed. Return false if loading // failed. return true; } void Event_data::track_event() { // apply your own cuts here // Tpat, incoming, charge (energy) on tof-wall, SSTs, ... // leave this function with return; if the event is not good. This section // could be similar to the following (adjust to your needs): // outgoing charge if ((Tfmul<1) || (Tfe[0]<10) ) return; // *** you might want to keep the stuff below: *** // check GFI positions if ((Gf1n<1) || (Gf2n<1)) return; if (isnan(Gf1x[0]) || isnan(Gf2x[0])) return; if (Gf1x[0]<-25.0 || Gf1x[0]>25.0 || Gf2x[0]<-25.0 || Gf2x[0]>25.0) return; // check SSTs if (SS01SMUL==0 || SS02SMUL==0) return; if (SS01KMUL==0 || SS02KMUL==0) return; Inz=5; Inaoverz=14./5.; //Inbeta is used as start approximation of beta when calibrating the FTF (--ignore-tof). //Use the value from config file. Inbeta=MY_X("Inbeta"); //outz=5; //calculate Z from energy range in TFW. //uses known beta to cheat some more. if(MY_X("Truebeta_valid")) { double beta=MY_X("Truebeta"); double IionE=9.352906073747982e-07;//mean ionization energy (MeV) double C_tfw=0.060319339946223; //MeV double BConst=C_tfw*(log( 1.022/( IionE*(pow(beta,-2) - 1) ))*pow(beta,-2) - 1); double Z=sqrt(Tfe[0]/BConst); unsigned int Z_int=(unsigned int)( Z + 0.5 ); if(fabs(Z-Z_int)>0.25) {return;} outz=Z_int; } // here we assign the chosen hits to the corresponding detector planes. // detectors before aladin (and after target): track->ftrack_before.set_measured(SS01X(0),SS01Y(0),&sst1, SS02X(0),SS02Y(0),&sst2); // detectors after aladin: track->ftrack_after.set_measured( Gf1x[0] ,Tfy[0] ,&gfi1, Gf2x[0] ,Tfy[0] ,&gfi2, Tfx[0] ,Tfy[0] ,&ftf); T0 = 0; // track it! track_fragment(0,0,0,0,0); } #else #define EVENT_DATA_OMITTED #endif #endif //EXPERIMENT_SPECIFIC_HH