Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

LIAnalysis.h

Go to the documentation of this file.
00001 
00002 
00003 // Program name: LIAnalysis.h                    
00004 //                                                                     
00005 // Package: LISummary                                        
00006 //                                                                    
00007 // Coded by Jeff Hartnell Sep-Dec/2002       
00008 //                                                                    
00009 // Purpose: To analyse LI summary root files and look at drift points  
00010 //                                                                    
00011 // Contact: jeffrey.hartnell@physics.ox.ac.uk                         
00013 
00014 #ifndef LIANALYSIS_H
00015 #define LIANALYSIS_H
00016 
00017 #include <string>
00018 #include <vector>
00019 
00020 #include "TChain.h"
00021 #include "TGraph.h"
00022 #include "TH2F.h"
00023 
00024 #include "MessageService/Msg.h"
00025 
00026 #include "LISummary/LILookup.h"
00027 
00028 class LIAnalysis : public LILookup {
00029 
00030  public:  
00031   
00032   LIAnalysis(Int_t analyseChainFlag);
00033   ~LIAnalysis();
00034   
00035   void AdcVsChannel(Int_t plane,Int_t crate);
00036   void AdcDistribution();
00037   void AdcVsLed();
00038   void AdcVsPin();
00039   void AdcVsPixel(Int_t plane,Int_t AshtrayMin=-1,Int_t AshtrayMax=-1,
00040                   Int_t led=-1);
00041   void AshtrayVsPlane(Int_t nearPb,Int_t farPb);
00042   void CalcAdcAv();
00043   void ChannelAdc(Int_t chan,Int_t chan2);
00044   void CheckData(Int_t rt=-1);
00045   void ClearFibres();
00046   void GainCurves(Int_t pulserBoxToPlot=0,Int_t maxLedToPlot=6);
00047   void GainCurves_Led();
00048   void GainVsTime();
00049   void DebugPins();
00050   void HighGainSearch(Int_t maxAdcThreshold,Float_t gainThreshold);
00051   void IndividualChannels();
00052   void LedTuning(Int_t pNum,Int_t pWidth,
00053                  Int_t idealAdc,const Int_t numGcPoints,
00054                  Double_t firstGcPoint,Double_t lastGcPoint,
00055                  Double_t dADCdPHAtSat,
00056                  Int_t numCalibPoints=-1,
00057                  Int_t numSecondFile=0);
00058   void LISnarlProblem();
00059   void MiswiringSearch(Int_t adcThreshold);
00060   void NumPulses();
00061   void PinDiode();
00062   void PinDiodeChips();
00063   void PinMap();
00064   void PixelVsPlane(Int_t nearPb,Int_t farPb);
00065   void PmtGain(Int_t plane,Int_t cr,Int_t printGain);
00066   void PrintElec();
00067   void PrintPmt();
00068   void Reflectors(LILookup::ELINearOrFarSide nearOrFarSide);
00069   void ReflectorsGc(LILookup::ELINearOrFarSide nearOrFarSide);
00070   void SearchForBadLeds(Int_t minNumHits=200);
00071   void StripVsPlane(Int_t nearPb=0,Int_t farPb=0,Int_t ledCut=-1);
00072   void StripVsPlaneWholeDet();
00073   void Template();
00074   void Test();
00075   void TriggerPmt();
00076   void WriteGainCurveTextFile();
00077   void WriteGainsTextFile(Int_t task=1, std::string destfilename = "");
00078   void WriteOldGainsTextFile();
00079   void NoisyChips(Float_t);
00080   
00081  private:
00082 
00083   void AnalyseChain();
00084   void AppendVect(std::vector<Double_t>& trunk,
00085                   std::vector<Double_t> appendix);
00086   std::string GetElecString();
00087   void InitialiseLoopVariables();
00088   void MakeChain();
00089   void PrintBigMessage();
00090   void PrintBlockInfo(std::string preString);
00091   void PrintGainTableRow(Int_t pl,Int_t st,Int_t end,
00092                          std::string sPrefix,
00093                          std::string sAdcN,std::string sGainN,
00094                          std::string sGainErrN,std::string sNumN,
00095                          std::string sAdcF,std::string sGainF,
00096                          std::string sGainErrF,std::string sNumF,
00097                          std::string sLogLevel="Debug");
00098   void SetChainBranches();
00099   void SetLoopVariables(Int_t entry,Int_t printOnNewLed=0,
00100                         Bool_t doInfoPrint=true);
00101   TGraph* TGraphVect(std::vector<Double_t>& vX,
00102                      std::vector<Double_t>& vY);
00103   
00104   //data members
00105   Int_t ashtray;
00106   Int_t calibPoint;
00107   Int_t calibType;
00108   Int_t chAdd;
00109   TChain *chain;
00110   Int_t channel;
00111   Int_t chip;
00112   Int_t correlatedHit;
00113   Int_t crate;
00114   Int_t detectorType;
00115   Int_t eastWest;
00116   Int_t elecType;
00117   Int_t farLed;
00118   Int_t farPulserBox;
00119   Int_t firstRunNumber;
00120   Int_t geoAdd;
00121   char histname[80];//used in naming arrays of histograms
00122   Int_t highRunNumber;
00123   Int_t inRack;
00124   Int_t lastLed;
00125   Int_t lastCalibPoint;
00126   Int_t lastPulserBox;
00127   Int_t lastRunNumber;
00128   Int_t led;
00129   Int_t liEvent;
00130   Int_t liRunNum;
00131   LILookup lookup;
00132   Int_t lowRunNumber;
00133   Int_t masterCh;
00134   Int_t maxLedNum;
00135   Int_t maxPbNum;
00136   Int_t maxCalibPoint;
00137   Float_t mean;
00138   Int_t minderCh;
00139   Int_t nearLed;
00140   Int_t nearPulserBox;
00141   Int_t numCalibPoints;
00142   Int_t numEntries;
00143   Int_t numericMuxBox;
00144   Int_t numEvents; 
00145   Int_t numLeds;
00146   Int_t numLiEvents;
00147   std::map<Int_t,Int_t> numLiEventsL;
00148   std::map<Int_t,Int_t> numLiEventsP;
00149   Int_t numLiRuns;
00150   Int_t period;
00151   Int_t pixel;
00152   Int_t pinGain;
00153   Int_t pinInBox;
00154   Int_t plane;
00155   Int_t previousRunNumber;
00156   Int_t pulseHeight;
00157   Int_t pulserBox;
00158   Int_t pulses;
00159   Int_t pulseWidth;
00160   Int_t rackBay;
00161   Int_t rackLevel;
00162   Int_t readoutType;
00163   Float_t rms;
00164   Int_t run;
00165   Int_t runNumber;
00166   Int_t runNumberSub;
00167   Int_t runType;
00168   std::string s;//general purpose string
00169   std::string fS;//general purpose string
00170   Int_t strip;
00171   Int_t stripEnd;
00172   Int_t summaryCounter;
00173   Int_t timestamp;
00174   Int_t timestampNanoSec;
00175   Int_t varc;
00176   Int_t vfb;
00177   Int_t vmm;
00178 
00179   ClassDef(LIAnalysis,0)
00180 };
00181 
00182 #endif // LIANALYSIS_H

Generated on Mon Feb 15 11:06:51 2010 for loon by  doxygen 1.3.9.1