Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:33

0001 
0002 #include "L1Trigger/CSCTrackFinder/test/src/MultiplicityHistogramList.h"
0003 
0004 namespace csctf_analysis
0005 {
0006   MultiplicityHistogramList::MultiplicityHistogramList()
0007   {
0008 
0009     TFileDirectory dir = fs->mkdir("TFMultiplicity");
0010     
0011     nTFTracks = dir.make<TH1F>("nTFTracks","TF Track Multiplicity",10,0,10);
0012     highestTFPt = dir.make<TH1F>("highestTFPt","Highest TF Pt",150,0,150);
0013     highestTFPtMed = dir.make<TH1F>("highestTFPtMed","Highest TF Pt between 1-50GeV",50,0,50);
0014     highestTFPtLow = dir.make<TH1F>("highestTFPtLow","Highest TF Pt between 1-10GeV",20,0,10);
0015 
0016     nTFTracks->GetXaxis()->SetTitle("Number of Track Finder Tracks");
0017     nTFTracks->GetYaxis()->SetTitle("Events");
0018     highestTFPt->GetXaxis()->SetTitle("Highest Track Finder Pt per Event (GeV)");
0019     highestTFPt->GetYaxis()->SetTitle("Events");
0020     highestTFPtMed->GetXaxis()->SetTitle("Highest Track Finder Pt per Event (GeV)");
0021     highestTFPtMed->GetYaxis()->SetTitle("Events");
0022     highestTFPtLow->GetXaxis()->SetTitle("Highest Track Finder Pt per Event (GeV)");
0023     highestTFPtLow->GetYaxis()->SetTitle("Events");
0024 
0025   }
0026 
0027   void MultiplicityHistogramList::FillMultiplicityHist( std::vector<TFTrack>* trackFinderTrack )
0028   {
0029     float highestPt=0;
0030     float ntf=0;
0031     std::vector<TFTrack>::iterator tfTrack;
0032     for(tfTrack=trackFinderTrack->begin(); tfTrack != trackFinderTrack->end(); tfTrack++)  
0033     {
0034         ntf++;
0035         float pt = tfTrack->getPt();
0036         if(pt>highestPt)
0037             highestPt=pt;
0038     }
0039     nTFTracks->Fill(ntf);       
0040     highestTFPt->Fill(highestPt);       
0041     highestTFPtMed->Fill(highestPt);        
0042     highestTFPtLow->Fill(highestPt);        
0043   }
0044 
0045 }