// $Id$ // // File: DL3Trigger.h // Created: Tue Jan 8 14:46:49 EST 2013 // Creator: davidl (on Linux ifarm12s01 2.6.32-220.7.1.el6.x86_64 x86_64) // #ifndef _DL3Trigger_ #define _DL3Trigger_ #include #include #include class DL3Trigger:public jana::JObject{ public: JOBJECT_PUBLIC(DL3Trigger); // NOTE: The ONLY member of this that is guaranteed to // be valid is L3good. This is because the algorithm // will stop calculating as soon as an accept or reject // criteria is met. DL3Trigger():Ntagger(-1),Nstart_counter(-1),Ntof(-1) ,Ncdc_layers(-1),Nfdc_planes(-1) ,Nfdc(-1),Nfdc_pseudo(-1),Ncdc(-1) ,Ntrack_candidates(-1),Ntrack_wb(-1) ,Ptot_tracks_wb(-1),Nbcal_clusters(-1) ,Nfcal_clusters(-1),Ebcal(-1),Efcal(-1) ,L3good(true){} // Add data members here. For example: float Ephoton_truth; // From DBeamPhoton for MC data only (GeV) int Ntagger; // Number of reconstructed tagger hits int Nstart_counter; // Number of start counter hits int Ntof; // Number of TOF hits int Ncdc_layers; // Number of different CDC layers hit int Nfdc_planes; // Number of different FDC planes hit int Nfdc; // Number of FDC hits (cathode + anode) int Nfdc_pseudo; // Number of FDC pseudo hits int Ncdc; // Number of CDC hits int Ntrack_candidates; // Number of track candidates int Ntrack_wb; // Number of wire-based tracks float Ptot_tracks_wb; // Scaler sum of total momentum from wire-based tracks int Nbcal_clusters; // Number of BCAL clusters int Nfcal_clusters; // Number of FCAL clusters float Ebcal; // Total energy in BCAL (rough estimate) float Efcal; // Total energy in FCAL bool L3good; // true if event passes L3 trigger // This method is used primarily for pretty printing // the second argument to AddString is printf style format void toStrings(vector > &items)const{ AddString(items, "Ephoton_truth", "%3.2f", Ephoton_truth); AddString(items, "Ntagger", "%4d", Ntagger); AddString(items, "Nstart_counter", "%4d", Nstart_counter); AddString(items, "Ntof", "%4d", Ntof); AddString(items, "Ncdc_layers", "%4d", Ncdc_layers); AddString(items, "Nfdc_planes", "%4d", Nfdc_planes); AddString(items, "Nfdc", "%4d", Nfdc); AddString(items, "Nfdc_pseudo", "%4d", Nfdc_pseudo); AddString(items, "Ncdc", "%4d", Ncdc); AddString(items, "Ntrack_candidates", "%4d", Ntrack_candidates); AddString(items, "Ntrack_wb", "%4d", Ntrack_wb); AddString(items, "Ptot_tracks_wb", "%3.2f", Ptot_tracks_wb); AddString(items, "Nbcal_clusters", "%4d", Nbcal_clusters); AddString(items, "Nfcal_clusters", "%4d", Nfcal_clusters); AddString(items, "Ebcal", "%3.2f", Ebcal); AddString(items, "Efcal", "%3.2f", Efcal); AddString(items, "L3good", "%d", L3good); } }; #endif // _DL3Trigger_