19.5.2011 Kamil Sedlak
1) bug fix in musrAnalysis.cxx for rotation reference frame causing some memory leak 2) Implementing prompt peak variables and conditions (usefull only for investigations of the origin of the prompt peak). 3) Updating the documentation describing changes in point 2)
This commit is contained in:
@@ -103,6 +103,8 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) {
|
||||
dataWindowMax = 10.0;
|
||||
pileupWindowMin = -10.5;
|
||||
pileupWindowMax = 10.5;
|
||||
promptPeakWindowMin = -0.010;
|
||||
promptPeakWindowMax = 0.010;
|
||||
musrMode = 'D';
|
||||
overallBinDelay = 0;
|
||||
boolInfinitelyLowMuonRate = false;
|
||||
@@ -190,6 +192,14 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) {
|
||||
sscanf(&line[strlen("PILEUPWINDOWMAX=")],"%g",&tmpfvar);
|
||||
pileupWindowMax = tmpfvar;
|
||||
}
|
||||
else if (strncmp(tmpString0,"PROMPTPEAKMIN=",strlen("PROMPTPEAKMIN="))==0) {
|
||||
sscanf(&line[strlen("PROMPTPEAKMIN=")],"%g",&tmpfvar);
|
||||
promptPeakWindowMin = tmpfvar;
|
||||
}
|
||||
else if (strncmp(tmpString0,"PROMPTPEAKMAX=",strlen("PROMPTPEAKMAX="))==0) {
|
||||
sscanf(&line[strlen("PROMPTPEAKMAX=")],"%g",&tmpfvar);
|
||||
promptPeakWindowMax = tmpfvar;
|
||||
}
|
||||
else if (strncmp(tmpString0,"MUSRMODE=",strlen("MUSRMODE="))==0) {
|
||||
sscanf(&line[strlen("MUSRMODE=")],"%s",&tmpString1);
|
||||
musrMode = tmpString1[0];
|
||||
@@ -222,7 +232,7 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) {
|
||||
int nrBinsX, nrBinsY;
|
||||
float minX, maxX, minY, maxY;
|
||||
char varXName[500]; char varYName[500];
|
||||
char furtherOption[200];
|
||||
char furtherOption[200]; sprintf(furtherOption,"Undefined");
|
||||
float rot_ref_frequency, rot_ref_phase;
|
||||
if (strcmp(tmpString0,"musrTH1D")==0) {
|
||||
sscanf(&line[endOfHistoTitle+2],"%d %g %g %s %s %g %g",&nrBinsX,&minX,&maxX,varXName,furtherOption,&rot_ref_frequency,&rot_ref_phase);
|
||||
@@ -379,6 +389,13 @@ void musrAnalysis::ReadInInputParameters(char* charV1190FileName) {
|
||||
else if (strcmp(conditionNameTMP,"goodEvent_D_det_AND_pileupEvent")==0) conditionMap[iConditionTMP]=&goodEvent_D_det_AND_pileupEvent;
|
||||
else if (strcmp(conditionNameTMP,"goodEvent_L_det_AND_pileupEvent")==0) conditionMap[iConditionTMP]=&goodEvent_L_det_AND_pileupEvent;
|
||||
else if (strcmp(conditionNameTMP,"goodEvent_R_det_AND_pileupEvent")==0) conditionMap[iConditionTMP]=&goodEvent_R_det_AND_pileupEvent;
|
||||
else if (strcmp(conditionNameTMP,"promptPeak")==0) conditionMap[iConditionTMP]=&promptPeak;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakF")==0) conditionMap[iConditionTMP]=&promptPeakF;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakB")==0) conditionMap[iConditionTMP]=&promptPeakB;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakU")==0) conditionMap[iConditionTMP]=&promptPeakU;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakD")==0) conditionMap[iConditionTMP]=&promptPeakD;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakL")==0) conditionMap[iConditionTMP]=&promptPeakL;
|
||||
else if (strcmp(conditionNameTMP,"promptPeakR")==0) conditionMap[iConditionTMP]=&promptPeakR;
|
||||
else {
|
||||
std::cout<<" !!! ERROR: Condition of the name \""<<conditionNameTMP<<"\" not predefined ==> Add it in the musrAnalysis.cxx S T O P !!!"<<std::endl;
|
||||
exit(1);
|
||||
@@ -1041,6 +1058,15 @@ void musrAnalysis::FillHistograms(Int_t iiiEntry) {
|
||||
goodEvent_L_det_AND_pileupEvent = goodEvent_L_det && pileupEvent;
|
||||
goodEvent_R_det_AND_pileupEvent = goodEvent_R_det && pileupEvent;
|
||||
|
||||
promptPeak = goodEvent_det && (det_time10>promptPeakWindowMin) && (det_time10<promptPeakWindowMax);
|
||||
promptPeakF = promptPeak && goodEvent_F_det;
|
||||
promptPeakB = promptPeak && goodEvent_B_det;
|
||||
promptPeakU = promptPeak && goodEvent_U_det;
|
||||
promptPeakD = promptPeak && goodEvent_D_det;
|
||||
promptPeakL = promptPeak && goodEvent_L_det;
|
||||
promptPeakR = promptPeak && goodEvent_R_det;
|
||||
|
||||
|
||||
// if (bool_debugingRequired && muonTriggered_det) {
|
||||
// std::cout<<"DEBUG: goodEvent_det: eventID="<<eventID<<std::endl;
|
||||
// if (goodEvent_det) std::cout<<" ___DETECTED___"<<std::endl;
|
||||
|
||||
@@ -240,6 +240,13 @@ public :
|
||||
Bool_t goodEvent_D_det_AND_pileupEvent;
|
||||
Bool_t goodEvent_L_det_AND_pileupEvent;
|
||||
Bool_t goodEvent_R_det_AND_pileupEvent;
|
||||
Bool_t promptPeak;
|
||||
Bool_t promptPeakF;
|
||||
Bool_t promptPeakB;
|
||||
Bool_t promptPeakU;
|
||||
Bool_t promptPeakD;
|
||||
Bool_t promptPeakL;
|
||||
Bool_t promptPeakR;
|
||||
|
||||
musrAnalysis(TTree *tree=0);
|
||||
virtual ~musrAnalysis();
|
||||
@@ -295,6 +302,8 @@ public :
|
||||
Double_t dataWindowMax;
|
||||
Double_t pileupWindowMin;
|
||||
Double_t pileupWindowMax;
|
||||
Double_t promptPeakWindowMin;
|
||||
Double_t promptPeakWindowMax;
|
||||
Long64_t pileupWindowBinMin;
|
||||
Long64_t pileupWindowBinMax;
|
||||
Long64_t dataWindowBinMin;
|
||||
|
||||
@@ -143,6 +143,14 @@ Double_t musrTH::GetBinContent1D(Int_t i, Int_t jBin) {
|
||||
return value;
|
||||
}
|
||||
//==============================================================================================
|
||||
Int_t musrTH::GetXmin1D() {
|
||||
return int(histArray1D[0]->GetXaxis()->GetXmin());
|
||||
}
|
||||
//==============================================================================================
|
||||
Int_t musrTH::GetXmax1D() {
|
||||
return int(histArray1D[0]->GetXaxis()->GetXmax());
|
||||
}
|
||||
//==============================================================================================
|
||||
Int_t musrTH::GetNbinsX1D() {
|
||||
return histArray1D[0]->GetNbinsX();
|
||||
}
|
||||
@@ -171,7 +179,8 @@ void musrTH::FillHumanDecayArray(musrTH* decayMapHistos, humanDecayMapType myMap
|
||||
}
|
||||
|
||||
// // if (iHumanBinForAllTheRest != -1) {
|
||||
for (Int_t j=1; j<= (decayMapHistos->GetNbinsX1D()); j++) {
|
||||
// for (Int_t j=1; j<= (decayMapHistos->GetNbinsX1D()); j++) {
|
||||
for (Int_t j=(decayMapHistos->GetXmin1D()); j<= (decayMapHistos->GetXmax1D()); j++) {
|
||||
Double_t value = decayMapHistos->GetBinContent1D(i,j);
|
||||
Bool_t thisBinWasAssigned=false;
|
||||
if (value!=0) {
|
||||
@@ -180,8 +189,10 @@ void musrTH::FillHumanDecayArray(musrTH* decayMapHistos, humanDecayMapType myMap
|
||||
if (iDecayHistoBin==j) thisBinWasAssigned=true;
|
||||
}
|
||||
}
|
||||
if ((!thisBinWasAssigned)&&(value!=0)) {
|
||||
std::cout<<"musrHT.cxx: Some muons stoped and decayed in detector no. "<<j<<", but this bin is not assighned to humanDecayHistogram"<<std::endl;
|
||||
if ((!thisBinWasAssigned)&&(value!=0)&&(j!=-1001)) { // in case of pileup histo, -1001 is assigned
|
||||
// if there was no pileup muon. Avoid printing error in this case.
|
||||
std::cout<<"musrHT.cxx: "<<value<<" muons stoped and decayed in detector no. "<<j
|
||||
<<", but this bin is not assigned to humanDecayHistogram "<<i<<std::endl;
|
||||
// Double_t value2 = histArray1D[i]-> GetBinContent(XXXX);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
// TH1D** GetHistArray1D(std::string& varToBeFilled) {varToBeFilled = variableToBeFilled_X; return histArray1D;}
|
||||
TH1D** GetHistArray1D() {return histArray1D;}
|
||||
// TH2D** GetHistArray2D() {return histArray2D;}
|
||||
Int_t GetXmin1D();
|
||||
Int_t GetXmax1D();
|
||||
Int_t GetNbinsX1D();
|
||||
Int_t GetNbinsX2D();
|
||||
Int_t GetNbinsY2D();
|
||||
|
||||
Reference in New Issue
Block a user