Kamil Sedlak 7.2.2013
Implemented changes of James Lord. Compiling was possible, but no testing was done so far.
This commit is contained in:
@ -23,6 +23,12 @@
|
||||
//#include "musrTH.hh"
|
||||
#include <math.h>
|
||||
|
||||
const double pi=3.14159265358979324; // initialise here instead JSL
|
||||
const double microsecond=1.;
|
||||
const double nanosecond=0.001;
|
||||
const double picosecond=0.000001;
|
||||
|
||||
|
||||
class musrTH;
|
||||
|
||||
//#include "musrSimGlobal.hh"
|
||||
@ -192,6 +198,7 @@ public :
|
||||
Double_t eventID_double;
|
||||
Double_t muDecayDetID_double;
|
||||
Double_t det_n_double;
|
||||
Double_t det_multifirst_double;
|
||||
Double_t muDecayPosR;
|
||||
Double_t wght;
|
||||
Double_t det_m0edep;
|
||||
@ -219,6 +226,7 @@ public :
|
||||
Double_t pos_Phi_MINUS_muDecayPol_Phi360;
|
||||
Double_t pos_detID;
|
||||
Double_t pos_detID_doubleHit;
|
||||
Double_t pos_doubleHit_dPhi;
|
||||
// Double_t det_time0;
|
||||
// Double_t get_time0;
|
||||
// Double_t det_time1;
|
||||
@ -229,6 +237,7 @@ public :
|
||||
Double_t det_time20;
|
||||
Double_t det_time31;
|
||||
Double_t det_time1_MINUS_muDecayTime;
|
||||
Double_t det_multi_interval;
|
||||
Double_t detP_x;
|
||||
Double_t detP_y;
|
||||
Double_t detP_z;
|
||||
@ -254,6 +263,7 @@ public :
|
||||
Bool_t alwaysTrue;
|
||||
Bool_t oncePerEvent;
|
||||
Bool_t muonDecayedInSample_gen;
|
||||
Bool_t muonDecayedInSampleOnce_gen;
|
||||
Bool_t muonTriggered_gen;
|
||||
Bool_t muonTriggered_gen_AND_muonDecayedInSample_gen;
|
||||
Bool_t muonTriggered_det;
|
||||
@ -264,6 +274,12 @@ public :
|
||||
Bool_t pileupEventCandidate;
|
||||
Bool_t pileupEvent;
|
||||
Bool_t goodEvent_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_F_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_B_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_U_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_D_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_L_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_R_det_AND_muonDecayedInSample_gen;
|
||||
Bool_t goodEvent_F_det;
|
||||
Bool_t goodEvent_B_det;
|
||||
Bool_t goodEvent_U_det;
|
||||
@ -284,6 +300,25 @@ public :
|
||||
Bool_t promptPeakL;
|
||||
Bool_t promptPeakR;
|
||||
Bool_t doubleHit;
|
||||
// pulsed:
|
||||
// goodEvent_det = (discrim triggered, however happened)
|
||||
// goodEvent_gen = (1st or only over-threshold event, even if killed by dead time)
|
||||
// doubleHitEvent_gen = (2nd onwards of a double hit sequence, whether detected or dead)
|
||||
Bool_t doubleHitEvent_gen;
|
||||
// doubleHit = (2nd and subsequent hits, counted)
|
||||
// to subdivide double counting among banks (2nd and subsequent)
|
||||
Bool_t goodEvent_F_det_AND_doubleHit;
|
||||
Bool_t goodEvent_B_det_AND_doubleHit;
|
||||
Bool_t goodEvent_U_det_AND_doubleHit;
|
||||
Bool_t goodEvent_D_det_AND_doubleHit;
|
||||
Bool_t goodEvent_L_det_AND_doubleHit;
|
||||
Bool_t goodEvent_R_det_AND_doubleHit;
|
||||
// singleHitEvent_gen = (single hits only)
|
||||
Bool_t singleHitEvent_gen;
|
||||
// stackedEvent_gen = (multiple small hits adding to threshold, muon details refer to last one)
|
||||
Bool_t stackedEvent_gen;
|
||||
// pileupEvent = (all events killed by dead time)
|
||||
// ..._AND_pileupEvent = subdivided by bank (note the _det isn't appropriate here)
|
||||
|
||||
musrAnalysis(TTree *tree=0);
|
||||
virtual ~musrAnalysis();
|
||||
@ -298,6 +333,7 @@ public :
|
||||
virtual void CreateHistograms();
|
||||
virtual void AnalyseEvent(Long64_t iiiEntry);
|
||||
virtual void FillHistograms(Int_t iiiEntry);
|
||||
virtual void FillHistogramsPulsed(Int_t iiiEntry1, Int_t iiiEntry2);
|
||||
virtual void SaveHistograms(char* runChar,char* v1190FileName);
|
||||
virtual void RemoveOldHitsFromCounters(Long64_t timeBinLimit);
|
||||
// virtual void RewindAllTimeInfo(Double_t timeToRewind);
|
||||
@ -319,11 +355,13 @@ public :
|
||||
TH1D* hGeantParameters;
|
||||
TH1D* hInfo;
|
||||
|
||||
typedef std::multimap<double,int> doubleHitSorterType;
|
||||
|
||||
// typedef std::map<int,int> debugEventMapType;
|
||||
// debugEventMapType debugEventMap;
|
||||
// Bool_t bool_debugingRequired;
|
||||
|
||||
static const Double_t pi=3.14159265358979324;
|
||||
//JSL static const Double_t pi=3.14159265358979324;
|
||||
static musrWriteDump* myWriteDump;
|
||||
|
||||
private:
|
||||
@ -335,9 +373,10 @@ public :
|
||||
Int_t mdelay;
|
||||
Int_t pdelay;
|
||||
Int_t mcoincwin;
|
||||
Int_t pcoincwin;
|
||||
Int_t pcoincwin; // pulsed: for dead time or add-up overlap. Model as exponential decay of this time constant?
|
||||
Int_t vcoincwin;
|
||||
Double_t muonRateFactor;
|
||||
Double_t muonRateFactor; // also mean rate for pulsed mode
|
||||
Double_t muonPulseWidthFactor; // pulsed
|
||||
Double_t dataWindowMin;
|
||||
Double_t dataWindowMax;
|
||||
Double_t pileupWindowMin;
|
||||
@ -346,16 +385,22 @@ public :
|
||||
Double_t promptPeakWindowMax;
|
||||
Int_t overallBinDelay;
|
||||
Bool_t boolInfinitelyLowMuonRate;
|
||||
|
||||
char musrMode; // D = time diferential; I = time integral;
|
||||
Double_t frameInterval; // JSL: pulsed: to divide muons into frames
|
||||
Double_t detRecoveryTime; // JSL: pulsed: for dead time effects
|
||||
Bool_t doPartialFrameAtEnd; // process the left over muons if the beam goes off mid frame having done some complete frames
|
||||
// Bool_t processInBulk; // do all the muons in one go rather than re-filtering at end of run
|
||||
Double_t commonThreshold; // set all thresholds to this value regardless of individual settings
|
||||
|
||||
char musrMode; // D = time diferential; I = time integral; P = pulsed time differential
|
||||
Double_t safeTimeWindow;
|
||||
Double_t currentTime;
|
||||
// Double_t nextEventTime;
|
||||
Double_t nextUnfilledEventTime;
|
||||
Long64_t numberOfRewinds;
|
||||
Long64_t numberOfRewinds; // JSL: number of frames for Pulsed Mode
|
||||
Long64_t numberOfGoodMuons;
|
||||
// Int_t currentEventID;
|
||||
Long64_t lastPreprocessedEntry;
|
||||
Long64_t firstPreprocessedEntry; // JSL: first in this frame
|
||||
musrCounter* mCounter;
|
||||
typedef std::map<int,musrCounter*> counterMapType;
|
||||
counterMapType pCounterMap;
|
||||
@ -367,9 +412,9 @@ public :
|
||||
Bool_t bool_muDecayTimeTransformation;
|
||||
Double_t muDecayTime_Transformation_min, muDecayTime_Transformation_max, muDecayTime_t_min, muDecayTime_t_max;
|
||||
|
||||
static const Double_t microsecond=1.;
|
||||
static const Double_t nanosecond=0.001;
|
||||
static const Double_t picosecond=0.000001;
|
||||
// static const Double_t microsecond=1.;
|
||||
// static const Double_t nanosecond=0.001;
|
||||
// static const Double_t picosecond=0.000001;
|
||||
// static const Double_t rewindTime=1000000.;
|
||||
// static const Double_t rewindTime=1000.;
|
||||
// static const Long64_t rewindTimeBins=1000000000000000; // Max Long64_t can be +9,223,372,036,854,775,807
|
||||
@ -383,6 +428,7 @@ public :
|
||||
public:
|
||||
static const Int_t nrConditions = 31;
|
||||
Bool_t condition[nrConditions];
|
||||
Long64_t conditionCounter[nrConditions];
|
||||
static Long64_t rewindTimeBins;
|
||||
// static Int_t clock_channelID;
|
||||
// static Long64_t clock_interval;
|
||||
@ -488,7 +534,10 @@ musrAnalysis::musrAnalysis(TTree *tree)
|
||||
variableMap["posIniMomZ"]=&posIniMomZ;
|
||||
// variableMap["nFieldNomVal"]=&nFieldNomVal_double;
|
||||
// variableMap["fieldNomVal0"]=...; //[nFieldNomVal]
|
||||
variableMap["fieldNomVal0"]=&fieldNomVal[0]; // JSL: allow nominal field especially for background muons stopping elsewhere in map
|
||||
variableMap["fieldNomVal1"]=&fieldNomVal[1]; // a second field if defined. Could add more?
|
||||
variableMap["det_n"]=&det_n_double;
|
||||
variableMap["det_multifirst"]=&det_multifirst_double;
|
||||
//
|
||||
variableMap["muDecayPosR"]=&muDecayPosR;
|
||||
variableMap["wght"]=&wght;
|
||||
@ -517,6 +566,7 @@ musrAnalysis::musrAnalysis(TTree *tree)
|
||||
variableMap["pos_Phi_MINUS_muDecayPol_Phi360"]=&pos_Phi_MINUS_muDecayPol_Phi360;
|
||||
variableMap["pos_detID"]=&pos_detID;
|
||||
variableMap["pos_detID_doubleHit"]=&pos_detID_doubleHit;
|
||||
variableMap["pos_doubleHit_dPhi"]=&pos_doubleHit_dPhi;
|
||||
// variableMap["det_time0"]=&det_time0;
|
||||
// variableMap["gen_time0"]=&gen_time0;
|
||||
// variableMap["det_time1"]=&det_time1;
|
||||
@ -525,6 +575,7 @@ musrAnalysis::musrAnalysis(TTree *tree)
|
||||
variableMap["gen_time10"]=&gen_time10;
|
||||
variableMap["det_time10_MINUS_gen_time10"]=&det_time10_MINUS_gen_time10;
|
||||
variableMap["det_time1_MINUS_muDecayTime"]=&det_time1_MINUS_muDecayTime;
|
||||
variableMap["multiHitInterval"]=&det_multi_interval;
|
||||
variableMap["detP_x"]=&detP_x;
|
||||
variableMap["detP_y"]=&detP_x;
|
||||
variableMap["detP_z"]=&detP_x;
|
||||
|
Reference in New Issue
Block a user