StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuEEmcCrateTimingMaker.h
1 // $Id: StMuEEmcCrateTimingMaker.h,v 1.4 2005/02/01 23:35:46 jwebb Exp $
2 
3 /*
4  * \class StMuEEmcCrateTimingMaker
5  * \author Dave Relyea
6  *
7  * Class for generating EEMC timing scans. The maker is configured to use
8  * the ezTree branches in the muDst, without access to the database. ADC
9  * spectra are accumulated/integrated from a fixed cut above pedestal to
10  * the maximum. macros/makeTimingFiles.C runs the code. macros/plotTiming.C
11  * produces plots from the output.
12  *
13  */
14 
15 #ifndef STAR_StMuEEmcCrateTimingMaker
16 #define STAR_StMuEEmcCrateTimingMaker
17 
18 #include "StEEmcUtil/EEfeeRaw/EEdims.h"
19 
20 #ifndef StMaker_H
21 #include "StMaker.h"
22 #endif
23 
24 #include "TFile.h"
25 #include "TTree.h"
26 #include "TH2.h"
27 
28 class TObjArray ;
29 class StMuDstMaker;
30 class StTriggerData ;
31 class EztEmcRawData;
32 
33 
35  public:
36 
38  virtual ~StMuEEmcCrateTimingMaker(){ /* nada */ }
39  virtual Int_t Init();
40  virtual Int_t Make();
41  virtual Int_t Finish();
42 
45  void setFlavor(TString testFlavor = "tower") {mFlavor = testFlavor;}
47  void setTiming(Float_t timeDelay) {mTimeDelay = timeDelay;}
50  void setPhase(Int_t phase) {mPhase = phase;}
52  void setDirectory(TString directory) {mDirectory = directory;}
53 
55  void setNumberOfChannels( Int_t n=25 );
58  void setNumberOfSigma( Int_t n=10 );
61  void setMinCounts( Int_t min );
62 
63  private:
64  const static int MxMapmtFeeCh= (MaxMapmtCrates* MaxMapmtCrateCh / 16) + 1;
65  // we're taking every sixteenth channel...
66  StMuDstMaker* mMuDstMaker;
67  TFile* mOutputFile;
68  TTree* mOutputTree;
69  TString mFlavor;
70  TString mDirectory;
71 
72  // Integrate every 16th channel starting from mPhase
73  Int_t mPhase;
74  Int_t mCycle; // = 16, hardcoded for now...
75 
76  // Number of channels above pedestal to cut (default mode)
77  Int_t mNchannels;
78  // Number of sigma above pedestal to cut (only if set)
79  Float_t mNsigma;
81  Int_t mMinCounts;
82 
85  Float_t mTimeDelay;
86  Float_t totalIntegral[MxMapmtFeeCh];
87  Float_t totalError[MxMapmtFeeCh];
88  Int_t channelIds[MxMapmtFeeCh];
89  Int_t crateIds[MxMapmtFeeCh];
90  Int_t kludge;
91  TH2F* cratehist;
92 
93  public:
94 
95  ClassDef(StMuEEmcCrateTimingMaker, 1)
96 };
97 
98 inline void StMuEEmcCrateTimingMaker::setNumberOfChannels( Int_t n ) { mNchannels = n; }
99 inline void StMuEEmcCrateTimingMaker::setMinCounts( Int_t c ) { mMinCounts = c; }
100 #endif
void setDirectory(TString directory)
Output directory.
void setFlavor(TString testFlavor="tower")
void setTiming(Float_t timeDelay)
Specify the delay setting for this run.
void setNumberOfSigma(Int_t n=10)
void setNumberOfChannels(Int_t n=25)
Sets the number of channels above pedestal.