Tool_DetailsArranger.h 5.24 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/

///////////////////////////////////////////////////////////////////
//  Header file for class Tool_DetailsArranger
///////////////////////////////////////////////////////////////////
// (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
// Tool for PID of TauSeeds
///////////////////////////////////////////////////////////////////
// sebastian.fleischmann@cern.ch
///////////////////////////////////////////////////////////////////

#ifndef PANTAUALGS_TOOL_DETAILSARRANGER_H
#define PANTAUALGS_TOOL_DETAILSARRANGER_H

#include <string>
#include <vector>

21
22
23
//! ASG
#include "AsgTools/AsgTool.h"
#include "AsgTools/ToolHandle.h"
24
25
26
27
28
29

//! xAOD EDM
#include "xAODTau/TauJet.h"
// #include "xAODTau/TauDefs.h"

//! PanTau
30
31
#include "PanTauAlgs/ITool_PanTauTools.h"
#include "PanTauAlgs/ITool_InformationStore.h"
32

33
#include "PanTauAlgs/TauConstituent.h"
34
35

namespace PanTau {
36
    class PanTauSeed2;
37
38
39
    class PanTauDetails;
}

40
41
42
//namespace Analysis {
//    class TauDetailsContainer;
//}
43
44
45
46
47
48
49
50
51
52
53

class StoreGateSvc;


namespace PanTau {

    /** @class Tool_DetailsArranger
        Tool for PID of Tau Seeds
        @author Sebastian Fleischmann
        @author Christian Limbach <limbach@physik.uni-bonn.de>
    */
54
  class Tool_DetailsArranger : public asg::AsgTool, virtual public PanTau::ITool_PanTauTools {
55
    
56
    ASG_TOOL_CLASS1(Tool_DetailsArranger, PanTau::ITool_PanTauTools)
57
58
59
60
61
62
63
64
65
    
    public:
        
        enum PanTauDetailsType {
            t_Int,
            t_Float,
            t_NTypes
        };
        
66
        Tool_DetailsArranger(const std::string &name);
67
68
69
70
71
        virtual ~Tool_DetailsArranger ();
        
        virtual StatusCode initialize();
//         virtual StatusCode finalize();
        
72
        virtual StatusCode execute(PanTau::PanTauSeed2* inSeed);//, Analysis::TauDetailsContainer* detailsCont);
73
74
75
76
77
78
79
        
    protected:
        
        StoreGateSvc*                                       m_sgSvc;
        
        ToolHandle<PanTau::ITool_InformationStore>  m_Tool_InformationStore;
        
80
        void                        addPanTauDetailToTauJet(PanTauSeed2*                            inSeed,
81
82
83
                                                            std::string                            featName,
                                                            xAOD::TauJetParameters::PanTauDetails  detailEnum,
                                                            PanTauDetailsType                      detailType) const;
84
85
86
87

        StatusCode                        arrangePFOLinks(PanTau::PanTauSeed2* inSeed, xAOD::TauJet* tauJet);

        void                        SetHLVTau(PanTau::PanTauSeed2* inSeed, xAOD::TauJet* tauJet, std::string inputAlg, std::string m_varTypeName_Basic);
88
89
90
91
92
93
94
95
96
97
98

	std::vector< ElementLink< xAOD::PFOContainer > > PreselectNeutralLinks(std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks, xAOD::TauJet* tauJet);

	void StripPi0ConstsFromNeutralConsts(std::vector< ElementLink< xAOD::PFOContainer > > &neutralPFOLinks, std::vector< ElementLink< xAOD::PFOContainer > > pi0PFOLinks);

	bool HasMultPi0sInOneCluster(const xAOD::PFO* pfo, int decayModeProto, TString inputAlg);

	void SetNeutralConstituentMass(xAOD::PFO* neutral_pfo, double mass);

	void SetNeutralConstituentVectorMasses(std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks, double mass);

99
100
101
102
	std::vector< ElementLink< xAOD::PFOContainer > > CollectConstituentsAsPFOLinks( PanTau::PanTauSeed2* inSeed, std::vector< ElementLink< xAOD::PFOContainer > > cellbased_neutralPFOLinks, PanTau::TauConstituent2::Type type );

    void createPi0Vectors(xAOD::TauJet* tauJet, std::vector<TLorentzVector>& vPi0s, std::vector< std::vector< ElementLink<xAOD::PFOContainer> > > &vec_pi0pfos);
    
103
104
105
106
107

        /* std::vector<unsigned int>   helper_IndicesOfNeutralsToBePi0(xAOD::TauJet* tauJet,  */
        /*                                                             std::vector< ElementLink<xAOD::PFOContainer> > neutralPFOLinks,  */
        /*                                                             int nMaxPi0s); */
        /* int                         helper_CopyNeutralsAndSetPi0(xAOD::TauJet* tauJet, int nMaxPi0s, bool isSpecialCase_1pXnTo1p1n); */
108
109
110
        
        bool        m_expectInvalidFeatures;
        
111
112
113
114
115
116
	const float MASS_PI0 = 134.98; // in MeV
        
        double      m_CoreCone;
        std::vector<double> m_EtaBinEdges;
        std::vector<double> m_EtaBinnedEtCuts;
        
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
        std::string m_varTypeName_Sum;
        std::string m_varTypeName_Ratio;
        std::string m_varTypeName_EtInRing;
        std::string m_varTypeName_Isolation;
        std::string m_varTypeName_Num;
        std::string m_varTypeName_Mean;
        std::string m_varTypeName_StdDev;
        std::string m_varTypeName_HLV;
        std::string m_varTypeName_Angle;
        std::string m_varTypeName_DeltaR;
        std::string m_varTypeName_JetMoment;
        std::string m_varTypeName_Combined;
        std::string m_varTypeName_JetShape;
        std::string m_varTypeName_ImpactParams;
        std::string m_varTypeName_Basic;
        std::string m_varTypeName_PID;
        std::string m_varTypeName_Shots;
        
    };
} // end of namespace PanTau
#endif // PANTAUALGS_TAUDISCRIMINANTTOOL_H