CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch9/src/DataFormats/METReco/interface/PhiWedge.h

Go to the documentation of this file.
00001 #ifndef DATAFORMATS_METRECO_PHIWEDGE_H
00002 #define DATAFORMATS_METRECO_PHIWEDGE_H
00003 /*
00004   [class]:  PhiWedge
00005   [authors]: R. Remington, The University of Florida
00006   [description]: Simple class analogous to CaloTower but in z-direction.  Stores basic information related to Hcal and Ecal rechits within constant 5-degree phi windows.  The idea will be to match these reconstructed phi-wedges with csc tracks for BeamHalo identification.
00007   [date]: October 15, 2009
00008 */
00009 #include "TMath.h"
00010 #include <vector>
00011 namespace reco{
00012   
00013   class PhiWedge {
00014     
00015   public:
00016     // Constructors
00017     PhiWedge();
00018     PhiWedge(float E, int iphi, int constituents);
00019     PhiWedge(float E, int iphi, int constituents, float min_time , float max_time);
00020     PhiWedge(const PhiWedge&);
00021     // Destructors
00022     
00023     ~PhiWedge(){}
00024     
00025     // Energy sum of all rechits above threshold in this 5-degree window
00026     float Energy() const {return energy_;}
00027     
00028     // Number of rechits above threshold in this 5-degree window
00029     int NumberOfConstituents() const  {return constituents_;}
00030     
00031     // iPhi value of this 5-degree window
00032     int iPhi() const {return iphi_;}
00033     
00034     // Global phi lower bound of this 5-degree window (between 0 and 2Pi)
00035     float PhiLow() const {return 2.*TMath::Pi()*(float)((iphi_ * 5)-(5.));}
00036     
00037     // Global phi upper bound of this 5-degree window (between 0 and 2Pi
00038     float PhiHigh() const {return 2.*TMath::Pi()*(float)((iphi_* 5));}
00039 
00040     // Get Min/Max Time
00041     float MinTime()const{return min_time_;}
00042     float MaxTime()const{return max_time_;}
00043     
00044     // Get halo direction confidence based on time ordering of the rechits ( must be within range of -1 to + 1 )
00045     // Direction is calculated by counting the number of pair-wise time-ascending rechits from -Z to +Z and then normalizing this count by number of pair-wise combinations
00046     // If all pair-wise combinations are consistent with a common z-direction, then this value will be plus or minus 1 exactly.  Otherwise it will be somewhere in between.
00047     float ZDirectionConfidence() const { return (1. - PlusZOriginConfidence_)*2. -1. ;}
00048     float PlusZDirectionConfidence() const { return 1.-PlusZOriginConfidence_;}
00049     float MinusZDirectionConfidence() const { return PlusZOriginConfidence_ ;}
00050     
00051     // Get halo origin confidence based on time ordering of the rechits
00052     float PlusZOriginConfidence() const { return PlusZOriginConfidence_ ;} 
00053     float MinusZOriginConfidence() const { return 1.- PlusZOriginConfidence_;}
00054     
00055     // To be filled later or removed
00056     int OverlappingCSCTracks() const {return OverlappingCSCTracks_;}
00057     int OverlappingCSCSegments()const {return OverlappingCSCSegments_;}
00058     int OverlappingCSCRecHits() const {return OverlappingCSCRecHits_;}
00059     int OverlappingCSCHaloTriggers() const {return OverlappingCSCHaloTriggers_;}
00060     
00061     // Setters
00062     void SetOverlappingCSCTracks(int x) { OverlappingCSCTracks_ = x;}
00063     void SetOverlappingCSCSegments(int x) { OverlappingCSCSegments_ =x;}
00064     void SetOverlappingCSCRecHits(int x){ OverlappingCSCRecHits_ =x ;}
00065     void SetOverlappingCSCHaloTriggers(int x){ OverlappingCSCHaloTriggers_ = x ;}
00066     void SetMinMaxTime(float min, float max ){ min_time_ = min; max_time_ = max;}
00067     void SetPlusZOriginConfidence( float x ) { PlusZOriginConfidence_ = x ;}
00068     
00069 
00070 
00071   private:
00072     float energy_;
00073     int iphi_;
00074     int constituents_;
00075     float  min_time_;
00076     float max_time_;
00077     float PlusZOriginConfidence_;
00078     int OverlappingCSCTracks_;
00079     int OverlappingCSCSegments_;
00080     int OverlappingCSCRecHits_;
00081     int OverlappingCSCHaloTriggers_;
00082     
00083   };
00084   typedef std::vector<PhiWedge> PhiWedgeCollection;
00085 }
00086 #endif